From 12064a8e212429e85ab978cf235f7270df1fdc1b Mon Sep 17 00:00:00 2001 From: Don Wood Date: Sat, 5 Sep 2009 20:36:36 -0700 Subject: [PATCH] --- yaml --- r: 157393 b: refs/heads/master c: c4c3f279cd8e9cc1d3e2f364a27beadb2e69cda8 h: refs/heads/master i: 157391: 684a73f577b13909785008cef5ddc0678240e518 v: v3 --- [refs] | 2 +- trunk/drivers/infiniband/hw/mthca/mthca_catas.c | 1 - .../infiniband/hw/mthca/mthca_config_reg.h | 2 ++ trunk/drivers/infiniband/hw/mthca/mthca_dev.h | 1 - trunk/drivers/infiniband/hw/mthca/mthca_eq.c | 17 +++++------------ trunk/drivers/infiniband/hw/mthca/mthca_main.c | 2 -- .../infiniband/hw/mthca/mthca_provider.c | 3 --- .../infiniband/hw/mthca/mthca_provider.h | 1 - trunk/drivers/infiniband/hw/mthca/mthca_qp.c | 12 ++++-------- trunk/drivers/infiniband/hw/mthca/mthca_reset.c | 1 + trunk/drivers/infiniband/hw/nes/nes_cm.c | 2 ++ 11 files changed, 15 insertions(+), 29 deletions(-) diff --git a/[refs] b/[refs] index 8f730ed6c6c3..7c75cc18b032 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: d84106477733cb155c5dcaea664ddf120bf69eb7 +refs/heads/master: c4c3f279cd8e9cc1d3e2f364a27beadb2e69cda8 diff --git a/trunk/drivers/infiniband/hw/mthca/mthca_catas.c b/trunk/drivers/infiniband/hw/mthca/mthca_catas.c index 056b2a4c6970..65ad359fdf16 100644 --- a/trunk/drivers/infiniband/hw/mthca/mthca_catas.c +++ b/trunk/drivers/infiniband/hw/mthca/mthca_catas.c @@ -88,7 +88,6 @@ 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); diff --git a/trunk/drivers/infiniband/hw/mthca/mthca_config_reg.h b/trunk/drivers/infiniband/hw/mthca/mthca_config_reg.h index 155bc66395be..75671f75cac4 100644 --- a/trunk/drivers/infiniband/hw/mthca/mthca_config_reg.h +++ b/trunk/drivers/infiniband/hw/mthca/mthca_config_reg.h @@ -34,6 +34,8 @@ #ifndef MTHCA_CONFIG_REG_H #define MTHCA_CONFIG_REG_H +#include + #define MTHCA_HCR_BASE 0x80680 #define MTHCA_HCR_SIZE 0x0001c #define MTHCA_ECR_BASE 0x80700 diff --git a/trunk/drivers/infiniband/hw/mthca/mthca_dev.h b/trunk/drivers/infiniband/hw/mthca/mthca_dev.h index 7e6a6d64ad4e..9ef611f6dd36 100644 --- a/trunk/drivers/infiniband/hw/mthca/mthca_dev.h +++ b/trunk/drivers/infiniband/hw/mthca/mthca_dev.h @@ -357,7 +357,6 @@ 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 diff --git a/trunk/drivers/infiniband/hw/mthca/mthca_eq.c b/trunk/drivers/infiniband/hw/mthca/mthca_eq.c index 8c31fa36e95e..90e4e450a120 100644 --- a/trunk/drivers/infiniband/hw/mthca/mthca_eq.c +++ b/trunk/drivers/infiniband/hw/mthca/mthca_eq.c @@ -829,34 +829,27 @@ 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, dev->eq_table.eq[i].irq_name, - dev->eq_table.eq + i); + 0, eq_name[i], 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, dev->eq_table.eq[0].irq_name, dev); + IRQF_SHARED, DRV_NAME, dev); if (err) goto err_out_cmd; dev->eq_table.have_irq = 1; diff --git a/trunk/drivers/infiniband/hw/mthca/mthca_main.c b/trunk/drivers/infiniband/hw/mthca/mthca_main.c index 518cc540e516..13da9f1d24c0 100644 --- a/trunk/drivers/infiniband/hw/mthca/mthca_main.c +++ b/trunk/drivers/infiniband/hw/mthca/mthca_main.c @@ -1116,8 +1116,6 @@ 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: diff --git a/trunk/drivers/infiniband/hw/mthca/mthca_provider.c b/trunk/drivers/infiniband/hw/mthca/mthca_provider.c index bcf7a4014820..87ad889e367b 100644 --- a/trunk/drivers/infiniband/hw/mthca/mthca_provider.c +++ b/trunk/drivers/infiniband/hw/mthca/mthca_provider.c @@ -334,9 +334,6 @@ 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; diff --git a/trunk/drivers/infiniband/hw/mthca/mthca_provider.h b/trunk/drivers/infiniband/hw/mthca/mthca_provider.h index 90f4c4d2e983..c621f8794b88 100644 --- a/trunk/drivers/infiniband/hw/mthca/mthca_provider.h +++ b/trunk/drivers/infiniband/hw/mthca/mthca_provider.h @@ -113,7 +113,6 @@ 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; diff --git a/trunk/drivers/infiniband/hw/mthca/mthca_qp.c b/trunk/drivers/infiniband/hw/mthca/mthca_qp.c index c10576fa60c1..f5081bfde6db 100644 --- a/trunk/drivers/infiniband/hw/mthca/mthca_qp.c +++ b/trunk/drivers/infiniband/hw/mthca/mthca_qp.c @@ -1319,12 +1319,10 @@ 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); - __acquire(&recv_cq->lock); - } else if (send_cq->cqn < recv_cq->cqn) { + else if (send_cq->cqn < recv_cq->cqn) { spin_lock_irq(&send_cq->lock); spin_lock_nested(&recv_cq->lock, SINGLE_DEPTH_NESTING); } else { @@ -1334,12 +1332,10 @@ 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) { - __release(&recv_cq->lock); + if (send_cq == recv_cq) 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 { diff --git a/trunk/drivers/infiniband/hw/mthca/mthca_reset.c b/trunk/drivers/infiniband/hw/mthca/mthca_reset.c index 2a13a163d337..acb6817f6060 100644 --- a/trunk/drivers/infiniband/hw/mthca/mthca_reset.c +++ b/trunk/drivers/infiniband/hw/mthca/mthca_reset.c @@ -30,6 +30,7 @@ * SOFTWARE. */ +#include #include #include #include diff --git a/trunk/drivers/infiniband/hw/nes/nes_cm.c b/trunk/drivers/infiniband/hw/nes/nes_cm.c index 114b802771ad..fe08eb57c99f 100644 --- a/trunk/drivers/infiniband/hw/nes/nes_cm.c +++ b/trunk/drivers/infiniband/hw/nes/nes_cm.c @@ -2456,6 +2456,7 @@ int nes_cm_disconn(struct nes_qp *nesqp) if (nesqp->disconn_pending == 0) { nesqp->disconn_pending++; spin_unlock_irqrestore(&nesqp->lock, flags); + nes_add_ref(&nesqp->ibqp); /* init our disconnect work element, to */ INIT_WORK(&nesqp->disconn_work, nes_disconnect_worker); @@ -2477,6 +2478,7 @@ static void nes_disconnect_worker(struct work_struct *work) nes_debug(NES_DBG_CM, "processing AEQE id 0x%04X for QP%u.\n", nesqp->last_aeq, nesqp->hwqp.qp_id); nes_cm_disconn_true(nesqp); + nes_rem_ref(&nesqp->ibqp); }