Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 157393
b: refs/heads/master
c: c4c3f27
h: refs/heads/master
i:
  157391: 684a73f
v: v3
  • Loading branch information
Don Wood authored and Roland Dreier committed Sep 6, 2009
1 parent 0fe9960 commit 12064a8
Show file tree
Hide file tree
Showing 11 changed files with 15 additions and 29 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d84106477733cb155c5dcaea664ddf120bf69eb7
refs/heads/master: c4c3f279cd8e9cc1d3e2f364a27beadb2e69cda8
1 change: 0 additions & 1 deletion trunk/drivers/infiniband/hw/mthca/mthca_catas.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
2 changes: 2 additions & 0 deletions trunk/drivers/infiniband/hw/mthca/mthca_config_reg.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
#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
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/infiniband/hw/mthca/mthca_dev.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
17 changes: 5 additions & 12 deletions trunk/drivers/infiniband/hw/mthca/mthca_eq.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/infiniband/hw/mthca/mthca_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
3 changes: 0 additions & 3 deletions trunk/drivers/infiniband/hw/mthca/mthca_provider.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/infiniband/hw/mthca/mthca_provider.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
12 changes: 4 additions & 8 deletions trunk/drivers/infiniband/hw/mthca/mthca_qp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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 {
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/infiniband/hw/mthca/mthca_reset.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
* SOFTWARE.
*/

#include <linux/init.h>
#include <linux/errno.h>
#include <linux/pci.h>
#include <linux/delay.h>
Expand Down
2 changes: 2 additions & 0 deletions trunk/drivers/infiniband/hw/nes/nes_cm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -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);
}


Expand Down

0 comments on commit 12064a8

Please sign in to comment.