Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 133920
b: refs/heads/master
c: a73efd0
h: refs/heads/master
v: v3
  • Loading branch information
Divy Le Ray authored and David S. Miller committed Jan 27, 2009
1 parent 861298c commit ac8c7af
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 2 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: cb0bc205959bf8c60acae9c71f3da0597e756f8e
refs/heads/master: a73efd0a8552927ebe5dff84936f7fdac4f7e314
3 changes: 3 additions & 0 deletions trunk/drivers/infiniband/hw/cxgb3/cxio_hal.c
Original file line number Diff line number Diff line change
Expand Up @@ -701,6 +701,9 @@ static int __cxio_tpt_op(struct cxio_rdev *rdev_p, u32 reset_tpt_entry,
u32 stag_idx;
u32 wptr;

if (rdev_p->flags)
return -EIO;

stag_state = stag_state > 0;
stag_idx = (*stag) >> 8;

Expand Down
2 changes: 2 additions & 0 deletions trunk/drivers/infiniband/hw/cxgb3/cxio_hal.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ struct cxio_rdev {
struct gen_pool *pbl_pool;
struct gen_pool *rqt_pool;
struct list_head entry;
u32 flags;
#define CXIO_ERROR_FATAL 1
};

static inline int cxio_num_stags(struct cxio_rdev *rdev_p)
Expand Down
15 changes: 14 additions & 1 deletion trunk/drivers/infiniband/hw/cxgb3/iwch.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,15 @@ cxgb3_cpl_handler_func t3c_handlers[NUM_CPL_CMDS];

static void open_rnic_dev(struct t3cdev *);
static void close_rnic_dev(struct t3cdev *);
static void iwch_err_handler(struct t3cdev *, u32, u32);

struct cxgb3_client t3c_client = {
.name = "iw_cxgb3",
.add = open_rnic_dev,
.remove = close_rnic_dev,
.handlers = t3c_handlers,
.redirect = iwch_ep_redirect
.redirect = iwch_ep_redirect,
.err_handler = iwch_err_handler
};

static LIST_HEAD(dev_list);
Expand Down Expand Up @@ -160,6 +162,17 @@ static void close_rnic_dev(struct t3cdev *tdev)
mutex_unlock(&dev_mutex);
}

static void iwch_err_handler(struct t3cdev *tdev, u32 status, u32 error)
{
struct cxio_rdev *rdev = tdev->ulp;

if (status == OFFLOAD_STATUS_DOWN)
rdev->flags = CXIO_ERROR_FATAL;

return;

}

static int __init iwch_init_module(void)
{
int err;
Expand Down

0 comments on commit ac8c7af

Please sign in to comment.