diff options
author | Divy Le Ray <divy@chelsio.com> | 2009-01-27 01:21:59 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-01-27 01:21:59 -0500 |
commit | cb0bc205959bf8c60acae9c71f3da0597e756f8e (patch) | |
tree | b17980de266cf103d14cea0152fa37cffe45dba0 /drivers/net/cxgb3/cxgb3_offload.c | |
parent | 1373c0fdbc5b477f5597a3ca9f2c782f15b56886 (diff) |
cxgb3: Notify fatal errors
Set up a notification mechanism to inform upper layer modules
(iWARP, iSCSI) of a chip reset due to an EEH event or a fatal error.
Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/cxgb3/cxgb3_offload.c')
-rw-r--r-- | drivers/net/cxgb3/cxgb3_offload.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/net/cxgb3/cxgb3_offload.c b/drivers/net/cxgb3/cxgb3_offload.c index 2d7f69aff1d9..620d80be6aac 100644 --- a/drivers/net/cxgb3/cxgb3_offload.c +++ b/drivers/net/cxgb3/cxgb3_offload.c | |||
@@ -153,6 +153,18 @@ void cxgb3_remove_clients(struct t3cdev *tdev) | |||
153 | mutex_unlock(&cxgb3_db_lock); | 153 | mutex_unlock(&cxgb3_db_lock); |
154 | } | 154 | } |
155 | 155 | ||
156 | void cxgb3_err_notify(struct t3cdev *tdev, u32 status, u32 error) | ||
157 | { | ||
158 | struct cxgb3_client *client; | ||
159 | |||
160 | mutex_lock(&cxgb3_db_lock); | ||
161 | list_for_each_entry(client, &client_list, client_list) { | ||
162 | if (client->err_handler) | ||
163 | client->err_handler(tdev, status, error); | ||
164 | } | ||
165 | mutex_unlock(&cxgb3_db_lock); | ||
166 | } | ||
167 | |||
156 | static struct net_device *get_iff_from_mac(struct adapter *adapter, | 168 | static struct net_device *get_iff_from_mac(struct adapter *adapter, |
157 | const unsigned char *mac, | 169 | const unsigned char *mac, |
158 | unsigned int vlan) | 170 | unsigned int vlan) |