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_main.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_main.c')
-rw-r--r-- | drivers/net/cxgb3/cxgb3_main.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/net/cxgb3/cxgb3_main.c b/drivers/net/cxgb3/cxgb3_main.c index 7381f378b4e6..f2c7cc3e263a 100644 --- a/drivers/net/cxgb3/cxgb3_main.c +++ b/drivers/net/cxgb3/cxgb3_main.c | |||
@@ -2542,6 +2542,12 @@ static int t3_adapter_error(struct adapter *adapter, int reset) | |||
2542 | { | 2542 | { |
2543 | int i, ret = 0; | 2543 | int i, ret = 0; |
2544 | 2544 | ||
2545 | if (is_offload(adapter) && | ||
2546 | test_bit(OFFLOAD_DEVMAP_BIT, &adapter->open_device_map)) { | ||
2547 | cxgb3_err_notify(&adapter->tdev, OFFLOAD_STATUS_DOWN, 0); | ||
2548 | offload_close(&adapter->tdev); | ||
2549 | } | ||
2550 | |||
2545 | /* Stop all ports */ | 2551 | /* Stop all ports */ |
2546 | for_each_port(adapter, i) { | 2552 | for_each_port(adapter, i) { |
2547 | struct net_device *netdev = adapter->port[i]; | 2553 | struct net_device *netdev = adapter->port[i]; |
@@ -2550,10 +2556,6 @@ static int t3_adapter_error(struct adapter *adapter, int reset) | |||
2550 | cxgb_close(netdev); | 2556 | cxgb_close(netdev); |
2551 | } | 2557 | } |
2552 | 2558 | ||
2553 | if (is_offload(adapter) && | ||
2554 | test_bit(OFFLOAD_DEVMAP_BIT, &adapter->open_device_map)) | ||
2555 | offload_close(&adapter->tdev); | ||
2556 | |||
2557 | /* Stop SGE timers */ | 2559 | /* Stop SGE timers */ |
2558 | t3_stop_sge_timers(adapter); | 2560 | t3_stop_sge_timers(adapter); |
2559 | 2561 | ||
@@ -2605,6 +2607,9 @@ static void t3_resume_ports(struct adapter *adapter) | |||
2605 | } | 2607 | } |
2606 | } | 2608 | } |
2607 | } | 2609 | } |
2610 | |||
2611 | if (is_offload(adapter) && !ofld_disable) | ||
2612 | cxgb3_err_notify(&adapter->tdev, OFFLOAD_STATUS_UP, 0); | ||
2608 | } | 2613 | } |
2609 | 2614 | ||
2610 | /* | 2615 | /* |