aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/cxgb3/cxgb3_main.c
diff options
context:
space:
mode:
authorSteve Wise <swise@opengridcomputing.com>2009-09-05 23:22:38 -0400
committerRoland Dreier <rolandd@cisco.com>2009-09-05 23:22:38 -0400
commitfa0d4c11c4b6eb49708b82b638ceb0761152f46a (patch)
tree3e1cdc905a64d532cbf7d2fa6b58413c698f6f31 /drivers/net/cxgb3/cxgb3_main.c
parentb496fe82d4075847a1c42efba2e81d28f6467b3a (diff)
RDMA/cxgb3: Handle port events properly
Massage the err_handler upcall into an event handler upcall, pass netdev port events to the cxgb3 ULPs and generate RDMA port events based on LLD port events. Signed-off-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/net/cxgb3/cxgb3_main.c')
-rw-r--r--drivers/net/cxgb3/cxgb3_main.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/cxgb3/cxgb3_main.c b/drivers/net/cxgb3/cxgb3_main.c
index fb5df5c6203e..c97ab82ec743 100644
--- a/drivers/net/cxgb3/cxgb3_main.c
+++ b/drivers/net/cxgb3/cxgb3_main.c
@@ -1286,6 +1286,7 @@ static int cxgb_open(struct net_device *dev)
1286 if (!other_ports) 1286 if (!other_ports)
1287 schedule_chk_task(adapter); 1287 schedule_chk_task(adapter);
1288 1288
1289 cxgb3_event_notify(&adapter->tdev, OFFLOAD_PORT_UP, pi->port_id);
1289 return 0; 1290 return 0;
1290} 1291}
1291 1292
@@ -1318,6 +1319,7 @@ static int cxgb_close(struct net_device *dev)
1318 if (!adapter->open_device_map) 1319 if (!adapter->open_device_map)
1319 cxgb_down(adapter); 1320 cxgb_down(adapter);
1320 1321
1322 cxgb3_event_notify(&adapter->tdev, OFFLOAD_PORT_DOWN, pi->port_id);
1321 return 0; 1323 return 0;
1322} 1324}
1323 1325
@@ -2717,7 +2719,7 @@ static int t3_adapter_error(struct adapter *adapter, int reset)
2717 2719
2718 if (is_offload(adapter) && 2720 if (is_offload(adapter) &&
2719 test_bit(OFFLOAD_DEVMAP_BIT, &adapter->open_device_map)) { 2721 test_bit(OFFLOAD_DEVMAP_BIT, &adapter->open_device_map)) {
2720 cxgb3_err_notify(&adapter->tdev, OFFLOAD_STATUS_DOWN, 0); 2722 cxgb3_event_notify(&adapter->tdev, OFFLOAD_STATUS_DOWN, 0);
2721 offload_close(&adapter->tdev); 2723 offload_close(&adapter->tdev);
2722 } 2724 }
2723 2725
@@ -2782,7 +2784,7 @@ static void t3_resume_ports(struct adapter *adapter)
2782 } 2784 }
2783 2785
2784 if (is_offload(adapter) && !ofld_disable) 2786 if (is_offload(adapter) && !ofld_disable)
2785 cxgb3_err_notify(&adapter->tdev, OFFLOAD_STATUS_UP, 0); 2787 cxgb3_event_notify(&adapter->tdev, OFFLOAD_STATUS_UP, 0);
2786} 2788}
2787 2789
2788/* 2790/*