aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
diff options
context:
space:
mode:
authorDivy Le Ray <divy@chelsio.com>2009-01-27 01:22:19 -0500
committerDavid S. Miller <davem@davemloft.net>2009-01-27 01:22:19 -0500
commita73efd0a8552927ebe5dff84936f7fdac4f7e314 (patch)
treec43976f285ffd71cb927cbc5cea8b7156a1a231a /drivers/infiniband
parentcb0bc205959bf8c60acae9c71f3da0597e756f8e (diff)
iw_cxgb3: handle chip reset notifications
Freeze activity when notified that the underlying chip is getting reset on a EEH event or fatal error. Signed-off-by: Divy Le Ray <divy@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/hw/cxgb3/cxio_hal.c3
-rw-r--r--drivers/infiniband/hw/cxgb3/cxio_hal.h2
-rw-r--r--drivers/infiniband/hw/cxgb3/iwch.c15
3 files changed, 19 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/cxgb3/cxio_hal.c b/drivers/infiniband/hw/cxgb3/cxio_hal.c
index 4dcf08b3fd83..11efd3528ce4 100644
--- a/drivers/infiniband/hw/cxgb3/cxio_hal.c
+++ b/drivers/infiniband/hw/cxgb3/cxio_hal.c
@@ -701,6 +701,9 @@ static int __cxio_tpt_op(struct cxio_rdev *rdev_p, u32 reset_tpt_entry,
701 u32 stag_idx; 701 u32 stag_idx;
702 u32 wptr; 702 u32 wptr;
703 703
704 if (rdev_p->flags)
705 return -EIO;
706
704 stag_state = stag_state > 0; 707 stag_state = stag_state > 0;
705 stag_idx = (*stag) >> 8; 708 stag_idx = (*stag) >> 8;
706 709
diff --git a/drivers/infiniband/hw/cxgb3/cxio_hal.h b/drivers/infiniband/hw/cxgb3/cxio_hal.h
index 656fe47bc84f..9ed65b055171 100644
--- a/drivers/infiniband/hw/cxgb3/cxio_hal.h
+++ b/drivers/infiniband/hw/cxgb3/cxio_hal.h
@@ -108,6 +108,8 @@ struct cxio_rdev {
108 struct gen_pool *pbl_pool; 108 struct gen_pool *pbl_pool;
109 struct gen_pool *rqt_pool; 109 struct gen_pool *rqt_pool;
110 struct list_head entry; 110 struct list_head entry;
111 u32 flags;
112#define CXIO_ERROR_FATAL 1
111}; 113};
112 114
113static inline int cxio_num_stags(struct cxio_rdev *rdev_p) 115static inline int cxio_num_stags(struct cxio_rdev *rdev_p)
diff --git a/drivers/infiniband/hw/cxgb3/iwch.c b/drivers/infiniband/hw/cxgb3/iwch.c
index 4489c89d6710..37a4fc264a07 100644
--- a/drivers/infiniband/hw/cxgb3/iwch.c
+++ b/drivers/infiniband/hw/cxgb3/iwch.c
@@ -51,13 +51,15 @@ cxgb3_cpl_handler_func t3c_handlers[NUM_CPL_CMDS];
51 51
52static void open_rnic_dev(struct t3cdev *); 52static void open_rnic_dev(struct t3cdev *);
53static void close_rnic_dev(struct t3cdev *); 53static void close_rnic_dev(struct t3cdev *);
54static void iwch_err_handler(struct t3cdev *, u32, u32);
54 55
55struct cxgb3_client t3c_client = { 56struct cxgb3_client t3c_client = {
56 .name = "iw_cxgb3", 57 .name = "iw_cxgb3",
57 .add = open_rnic_dev, 58 .add = open_rnic_dev,
58 .remove = close_rnic_dev, 59 .remove = close_rnic_dev,
59 .handlers = t3c_handlers, 60 .handlers = t3c_handlers,
60 .redirect = iwch_ep_redirect 61 .redirect = iwch_ep_redirect,
62 .err_handler = iwch_err_handler
61}; 63};
62 64
63static LIST_HEAD(dev_list); 65static LIST_HEAD(dev_list);
@@ -160,6 +162,17 @@ static void close_rnic_dev(struct t3cdev *tdev)
160 mutex_unlock(&dev_mutex); 162 mutex_unlock(&dev_mutex);
161} 163}
162 164
165static void iwch_err_handler(struct t3cdev *tdev, u32 status, u32 error)
166{
167 struct cxio_rdev *rdev = tdev->ulp;
168
169 if (status == OFFLOAD_STATUS_DOWN)
170 rdev->flags = CXIO_ERROR_FATAL;
171
172 return;
173
174}
175
163static int __init iwch_init_module(void) 176static int __init iwch_init_module(void)
164{ 177{
165 int err; 178 int err;