diff options
author | Dimitris Michailidis <dm@chelsio.com> | 2010-10-21 07:29:55 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-10-24 18:52:30 -0400 |
commit | 8f6d9f40476895571df039b6f1f5230ec7faebad (patch) | |
tree | f960e7ca556f14aa1f8b6f9dcffb0cd491bb9fad /drivers/net/cxgb4 | |
parent | 2d3359f8b9e6b3d6339b7e72f8e82275058eb13c (diff) |
cxgb4: fix crash due to manipulating queues before registration
Before commit "net: allocate tx queues in register_netdevice"
netif_tx_stop_all_queues and related functions could be used between
device allocation and registration but now only after registration.
cxgb4 has such a call before registration and crashes now. Move it
after register_netdev.
Signed-off-by: Dimitris Michailidis <dm@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/cxgb4')
-rw-r--r-- | drivers/net/cxgb4/cxgb4_main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/cxgb4/cxgb4_main.c b/drivers/net/cxgb4/cxgb4_main.c index 87054e0a5746..2a01a23ed409 100644 --- a/drivers/net/cxgb4/cxgb4_main.c +++ b/drivers/net/cxgb4/cxgb4_main.c | |||
@@ -3658,7 +3658,6 @@ static int __devinit init_one(struct pci_dev *pdev, | |||
3658 | pi->rx_offload = RX_CSO; | 3658 | pi->rx_offload = RX_CSO; |
3659 | pi->port_id = i; | 3659 | pi->port_id = i; |
3660 | netif_carrier_off(netdev); | 3660 | netif_carrier_off(netdev); |
3661 | netif_tx_stop_all_queues(netdev); | ||
3662 | netdev->irq = pdev->irq; | 3661 | netdev->irq = pdev->irq; |
3663 | 3662 | ||
3664 | netdev->features |= NETIF_F_SG | TSO_FLAGS; | 3663 | netdev->features |= NETIF_F_SG | TSO_FLAGS; |
@@ -3730,6 +3729,7 @@ static int __devinit init_one(struct pci_dev *pdev, | |||
3730 | 3729 | ||
3731 | __set_bit(i, &adapter->registered_device_map); | 3730 | __set_bit(i, &adapter->registered_device_map); |
3732 | adapter->chan_map[adap2pinfo(adapter, i)->tx_chan] = i; | 3731 | adapter->chan_map[adap2pinfo(adapter, i)->tx_chan] = i; |
3732 | netif_tx_stop_all_queues(adapter->port[i]); | ||
3733 | } | 3733 | } |
3734 | } | 3734 | } |
3735 | if (!adapter->registered_device_map) { | 3735 | if (!adapter->registered_device_map) { |