Merge branches 'cxgb3', 'ehca', 'ipath', 'ipoib', 'misc', 'mlx4', 'mthca' and 'nes' into for-linus
此提交包含在:

@@ -88,6 +88,7 @@ static void handle_catas(struct mthca_dev *dev)
|
||||
event.device = &dev->ib_dev;
|
||||
event.event = IB_EVENT_DEVICE_FATAL;
|
||||
event.element.port_num = 0;
|
||||
dev->active = false;
|
||||
|
||||
ib_dispatch_event(&event);
|
||||
|
||||
|
@@ -34,8 +34,6 @@
|
||||
#ifndef MTHCA_CONFIG_REG_H
|
||||
#define MTHCA_CONFIG_REG_H
|
||||
|
||||
#include <asm/page.h>
|
||||
|
||||
#define MTHCA_HCR_BASE 0x80680
|
||||
#define MTHCA_HCR_SIZE 0x0001c
|
||||
#define MTHCA_ECR_BASE 0x80700
|
||||
|
@@ -357,6 +357,7 @@ struct mthca_dev {
|
||||
struct ib_ah *sm_ah[MTHCA_MAX_PORTS];
|
||||
spinlock_t sm_lock;
|
||||
u8 rate[MTHCA_MAX_PORTS];
|
||||
bool active;
|
||||
};
|
||||
|
||||
#ifdef CONFIG_INFINIBAND_MTHCA_DEBUG
|
||||
|
@@ -829,27 +829,34 @@ int mthca_init_eq_table(struct mthca_dev *dev)
|
||||
|
||||
if (dev->mthca_flags & MTHCA_FLAG_MSI_X) {
|
||||
static const char *eq_name[] = {
|
||||
[MTHCA_EQ_COMP] = DRV_NAME " (comp)",
|
||||
[MTHCA_EQ_ASYNC] = DRV_NAME " (async)",
|
||||
[MTHCA_EQ_CMD] = DRV_NAME " (cmd)"
|
||||
[MTHCA_EQ_COMP] = DRV_NAME "-comp",
|
||||
[MTHCA_EQ_ASYNC] = DRV_NAME "-async",
|
||||
[MTHCA_EQ_CMD] = DRV_NAME "-cmd"
|
||||
};
|
||||
|
||||
for (i = 0; i < MTHCA_NUM_EQ; ++i) {
|
||||
snprintf(dev->eq_table.eq[i].irq_name,
|
||||
IB_DEVICE_NAME_MAX,
|
||||
"%s@pci:%s", eq_name[i],
|
||||
pci_name(dev->pdev));
|
||||
err = request_irq(dev->eq_table.eq[i].msi_x_vector,
|
||||
mthca_is_memfree(dev) ?
|
||||
mthca_arbel_msi_x_interrupt :
|
||||
mthca_tavor_msi_x_interrupt,
|
||||
0, eq_name[i], dev->eq_table.eq + i);
|
||||
0, dev->eq_table.eq[i].irq_name,
|
||||
dev->eq_table.eq + i);
|
||||
if (err)
|
||||
goto err_out_cmd;
|
||||
dev->eq_table.eq[i].have_irq = 1;
|
||||
}
|
||||
} else {
|
||||
snprintf(dev->eq_table.eq[0].irq_name, IB_DEVICE_NAME_MAX,
|
||||
DRV_NAME "@pci:%s", pci_name(dev->pdev));
|
||||
err = request_irq(dev->pdev->irq,
|
||||
mthca_is_memfree(dev) ?
|
||||
mthca_arbel_interrupt :
|
||||
mthca_tavor_interrupt,
|
||||
IRQF_SHARED, DRV_NAME, dev);
|
||||
IRQF_SHARED, dev->eq_table.eq[0].irq_name, dev);
|
||||
if (err)
|
||||
goto err_out_cmd;
|
||||
dev->eq_table.have_irq = 1;
|
||||
|
@@ -1116,6 +1116,8 @@ static int __mthca_init_one(struct pci_dev *pdev, int hca_type)
|
||||
pci_set_drvdata(pdev, mdev);
|
||||
mdev->hca_type = hca_type;
|
||||
|
||||
mdev->active = true;
|
||||
|
||||
return 0;
|
||||
|
||||
err_unregister:
|
||||
@@ -1215,15 +1217,11 @@ int __mthca_restart_one(struct pci_dev *pdev)
|
||||
static int __devinit mthca_init_one(struct pci_dev *pdev,
|
||||
const struct pci_device_id *id)
|
||||
{
|
||||
static int mthca_version_printed = 0;
|
||||
int ret;
|
||||
|
||||
mutex_lock(&mthca_device_mutex);
|
||||
|
||||
if (!mthca_version_printed) {
|
||||
printk(KERN_INFO "%s", mthca_version);
|
||||
++mthca_version_printed;
|
||||
}
|
||||
printk_once(KERN_INFO "%s", mthca_version);
|
||||
|
||||
if (id->driver_data >= ARRAY_SIZE(mthca_hca_table)) {
|
||||
printk(KERN_ERR PFX "%s has invalid driver data %lx\n",
|
||||
|
@@ -334,6 +334,9 @@ static struct ib_ucontext *mthca_alloc_ucontext(struct ib_device *ibdev,
|
||||
struct mthca_ucontext *context;
|
||||
int err;
|
||||
|
||||
if (!(to_mdev(ibdev)->active))
|
||||
return ERR_PTR(-EAGAIN);
|
||||
|
||||
memset(&uresp, 0, sizeof uresp);
|
||||
|
||||
uresp.qp_tab_size = to_mdev(ibdev)->limits.num_qps;
|
||||
|
@@ -113,6 +113,7 @@ struct mthca_eq {
|
||||
int nent;
|
||||
struct mthca_buf_list *page_list;
|
||||
struct mthca_mr mr;
|
||||
char irq_name[IB_DEVICE_NAME_MAX];
|
||||
};
|
||||
|
||||
struct mthca_av;
|
||||
|
@@ -1319,10 +1319,12 @@ int mthca_alloc_qp(struct mthca_dev *dev,
|
||||
}
|
||||
|
||||
static void mthca_lock_cqs(struct mthca_cq *send_cq, struct mthca_cq *recv_cq)
|
||||
__acquires(&send_cq->lock) __acquires(&recv_cq->lock)
|
||||
{
|
||||
if (send_cq == recv_cq)
|
||||
if (send_cq == recv_cq) {
|
||||
spin_lock_irq(&send_cq->lock);
|
||||
else if (send_cq->cqn < recv_cq->cqn) {
|
||||
__acquire(&recv_cq->lock);
|
||||
} else if (send_cq->cqn < recv_cq->cqn) {
|
||||
spin_lock_irq(&send_cq->lock);
|
||||
spin_lock_nested(&recv_cq->lock, SINGLE_DEPTH_NESTING);
|
||||
} else {
|
||||
@@ -1332,10 +1334,12 @@ static void mthca_lock_cqs(struct mthca_cq *send_cq, struct mthca_cq *recv_cq)
|
||||
}
|
||||
|
||||
static void mthca_unlock_cqs(struct mthca_cq *send_cq, struct mthca_cq *recv_cq)
|
||||
__releases(&send_cq->lock) __releases(&recv_cq->lock)
|
||||
{
|
||||
if (send_cq == recv_cq)
|
||||
if (send_cq == recv_cq) {
|
||||
__release(&recv_cq->lock);
|
||||
spin_unlock_irq(&send_cq->lock);
|
||||
else if (send_cq->cqn < recv_cq->cqn) {
|
||||
} else if (send_cq->cqn < recv_cq->cqn) {
|
||||
spin_unlock(&recv_cq->lock);
|
||||
spin_unlock_irq(&send_cq->lock);
|
||||
} else {
|
||||
|
@@ -30,7 +30,6 @@
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <linux/init.h>
|
||||
#include <linux/errno.h>
|
||||
#include <linux/pci.h>
|
||||
#include <linux/delay.h>
|
||||
|
新增問題並參考
封鎖使用者