diff options
author | Divy Le Ray <divy@chelsio.com> | 2007-12-17 21:47:41 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:07:22 -0500 |
commit | bc4b6b52691bae42b1eec3eb86ab4c718387d9f0 (patch) | |
tree | 2554bd6d43828c99a5258997484bbdc5298ea0e7 | |
parent | b881955b7d045e7486e9af08398242aeb7199f67 (diff) |
cxgb3 - Fix EEH, missing softirq blocking
set_pci_drvdata() stores a pointer to the adapter,
not the net device.
Add missing softirq blocking in t3_mgmt_tx.
Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
-rw-r--r-- | drivers/net/cxgb3/cxgb3_main.c | 14 | ||||
-rw-r--r-- | drivers/net/cxgb3/sge.c | 7 |
2 files changed, 10 insertions, 11 deletions
diff --git a/drivers/net/cxgb3/cxgb3_main.c b/drivers/net/cxgb3/cxgb3_main.c index d1aa7779796e..0e3dcbff002d 100644 --- a/drivers/net/cxgb3/cxgb3_main.c +++ b/drivers/net/cxgb3/cxgb3_main.c | |||
@@ -2408,9 +2408,7 @@ void t3_fatal_err(struct adapter *adapter) | |||
2408 | static pci_ers_result_t t3_io_error_detected(struct pci_dev *pdev, | 2408 | static pci_ers_result_t t3_io_error_detected(struct pci_dev *pdev, |
2409 | pci_channel_state_t state) | 2409 | pci_channel_state_t state) |
2410 | { | 2410 | { |
2411 | struct net_device *dev = pci_get_drvdata(pdev); | 2411 | struct adapter *adapter = pci_get_drvdata(pdev); |
2412 | struct port_info *pi = netdev_priv(dev); | ||
2413 | struct adapter *adapter = pi->adapter; | ||
2414 | int i; | 2412 | int i; |
2415 | 2413 | ||
2416 | /* Stop all ports */ | 2414 | /* Stop all ports */ |
@@ -2444,9 +2442,7 @@ static pci_ers_result_t t3_io_error_detected(struct pci_dev *pdev, | |||
2444 | */ | 2442 | */ |
2445 | static pci_ers_result_t t3_io_slot_reset(struct pci_dev *pdev) | 2443 | static pci_ers_result_t t3_io_slot_reset(struct pci_dev *pdev) |
2446 | { | 2444 | { |
2447 | struct net_device *dev = pci_get_drvdata(pdev); | 2445 | struct adapter *adapter = pci_get_drvdata(pdev); |
2448 | struct port_info *pi = netdev_priv(dev); | ||
2449 | struct adapter *adapter = pi->adapter; | ||
2450 | 2446 | ||
2451 | if (pci_enable_device(pdev)) { | 2447 | if (pci_enable_device(pdev)) { |
2452 | dev_err(&pdev->dev, | 2448 | dev_err(&pdev->dev, |
@@ -2469,9 +2465,7 @@ static pci_ers_result_t t3_io_slot_reset(struct pci_dev *pdev) | |||
2469 | */ | 2465 | */ |
2470 | static void t3_io_resume(struct pci_dev *pdev) | 2466 | static void t3_io_resume(struct pci_dev *pdev) |
2471 | { | 2467 | { |
2472 | struct net_device *dev = pci_get_drvdata(pdev); | 2468 | struct adapter *adapter = pci_get_drvdata(pdev); |
2473 | struct port_info *pi = netdev_priv(dev); | ||
2474 | struct adapter *adapter = pi->adapter; | ||
2475 | int i; | 2469 | int i; |
2476 | 2470 | ||
2477 | /* Restart the ports */ | 2471 | /* Restart the ports */ |
@@ -2491,7 +2485,7 @@ static void t3_io_resume(struct pci_dev *pdev) | |||
2491 | 2485 | ||
2492 | if (is_offload(adapter)) { | 2486 | if (is_offload(adapter)) { |
2493 | __set_bit(OFFLOAD_DEVMAP_BIT, &adapter->registered_device_map); | 2487 | __set_bit(OFFLOAD_DEVMAP_BIT, &adapter->registered_device_map); |
2494 | if (offload_open(dev)) | 2488 | if (offload_open(adapter->port[0])) |
2495 | printk(KERN_WARNING | 2489 | printk(KERN_WARNING |
2496 | "Could not bring back offload capabilities\n"); | 2490 | "Could not bring back offload capabilities\n"); |
2497 | } | 2491 | } |
diff --git a/drivers/net/cxgb3/sge.c b/drivers/net/cxgb3/sge.c index cef153d1d32c..6367cee0d66a 100644 --- a/drivers/net/cxgb3/sge.c +++ b/drivers/net/cxgb3/sge.c | |||
@@ -1364,7 +1364,12 @@ static void restart_ctrlq(unsigned long data) | |||
1364 | */ | 1364 | */ |
1365 | int t3_mgmt_tx(struct adapter *adap, struct sk_buff *skb) | 1365 | int t3_mgmt_tx(struct adapter *adap, struct sk_buff *skb) |
1366 | { | 1366 | { |
1367 | return ctrl_xmit(adap, &adap->sge.qs[0].txq[TXQ_CTRL], skb); | 1367 | int ret; |
1368 | local_bh_disable(); | ||
1369 | ret = ctrl_xmit(adap, &adap->sge.qs[0].txq[TXQ_CTRL], skb); | ||
1370 | local_bh_enable(); | ||
1371 | |||
1372 | return ret; | ||
1368 | } | 1373 | } |
1369 | 1374 | ||
1370 | /** | 1375 | /** |