Commit bc4b6b52 authored by Divy Le Ray's avatar Divy Le Ray Committed by David S. Miller

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: default avatarDivy Le Ray <divy@chelsio.com>
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent b881955b
...@@ -2408,9 +2408,7 @@ void t3_fatal_err(struct adapter *adapter) ...@@ -2408,9 +2408,7 @@ void t3_fatal_err(struct adapter *adapter)
static pci_ers_result_t t3_io_error_detected(struct pci_dev *pdev, static pci_ers_result_t t3_io_error_detected(struct pci_dev *pdev,
pci_channel_state_t state) pci_channel_state_t state)
{ {
struct net_device *dev = pci_get_drvdata(pdev); struct adapter *adapter = pci_get_drvdata(pdev);
struct port_info *pi = netdev_priv(dev);
struct adapter *adapter = pi->adapter;
int i; int i;
/* Stop all ports */ /* Stop all ports */
...@@ -2444,9 +2442,7 @@ static pci_ers_result_t t3_io_error_detected(struct pci_dev *pdev, ...@@ -2444,9 +2442,7 @@ static pci_ers_result_t t3_io_error_detected(struct pci_dev *pdev,
*/ */
static pci_ers_result_t t3_io_slot_reset(struct pci_dev *pdev) static pci_ers_result_t t3_io_slot_reset(struct pci_dev *pdev)
{ {
struct net_device *dev = pci_get_drvdata(pdev); struct adapter *adapter = pci_get_drvdata(pdev);
struct port_info *pi = netdev_priv(dev);
struct adapter *adapter = pi->adapter;
if (pci_enable_device(pdev)) { if (pci_enable_device(pdev)) {
dev_err(&pdev->dev, dev_err(&pdev->dev,
...@@ -2469,9 +2465,7 @@ static pci_ers_result_t t3_io_slot_reset(struct pci_dev *pdev) ...@@ -2469,9 +2465,7 @@ static pci_ers_result_t t3_io_slot_reset(struct pci_dev *pdev)
*/ */
static void t3_io_resume(struct pci_dev *pdev) static void t3_io_resume(struct pci_dev *pdev)
{ {
struct net_device *dev = pci_get_drvdata(pdev); struct adapter *adapter = pci_get_drvdata(pdev);
struct port_info *pi = netdev_priv(dev);
struct adapter *adapter = pi->adapter;
int i; int i;
/* Restart the ports */ /* Restart the ports */
...@@ -2491,7 +2485,7 @@ static void t3_io_resume(struct pci_dev *pdev) ...@@ -2491,7 +2485,7 @@ static void t3_io_resume(struct pci_dev *pdev)
if (is_offload(adapter)) { if (is_offload(adapter)) {
__set_bit(OFFLOAD_DEVMAP_BIT, &adapter->registered_device_map); __set_bit(OFFLOAD_DEVMAP_BIT, &adapter->registered_device_map);
if (offload_open(dev)) if (offload_open(adapter->port[0]))
printk(KERN_WARNING printk(KERN_WARNING
"Could not bring back offload capabilities\n"); "Could not bring back offload capabilities\n");
} }
......
...@@ -1364,7 +1364,12 @@ static void restart_ctrlq(unsigned long data) ...@@ -1364,7 +1364,12 @@ static void restart_ctrlq(unsigned long data)
*/ */
int t3_mgmt_tx(struct adapter *adap, struct sk_buff *skb) int t3_mgmt_tx(struct adapter *adap, struct sk_buff *skb)
{ {
return ctrl_xmit(adap, &adap->sge.qs[0].txq[TXQ_CTRL], skb); int ret;
local_bh_disable();
ret = ctrl_xmit(adap, &adap->sge.qs[0].txq[TXQ_CTRL], skb);
local_bh_enable();
return ret;
} }
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment