Skip to content

Commit

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

Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/infiniband/hw/mthca/mthca_dev.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions trunk/drivers/infiniband/hw/mthca/mthca_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
3 changes: 3 additions & 0 deletions trunk/drivers/infiniband/hw/mthca/mthca_provider.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 0fe9960

Please sign in to comment.