Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 122933
b: refs/heads/master
c: 7adf152
h: refs/heads/master
i:
  122931: 224ed59
v: v3
  • Loading branch information
Peter P Waskiewicz Jr authored and David S. Miller committed Dec 26, 2008
1 parent 6eb9169 commit c8e1c23
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d7b06636be162d3f74c9ce5d6d0d9ea4e5d362c8
refs/heads/master: 7adf1525befb5606462431eb1a4ea40ded5baef4
4 changes: 2 additions & 2 deletions trunk/drivers/net/ixgbe/ixgbe_dcb_nl.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ static u8 ixgbe_dcbnl_set_state(struct net_device *netdev, u8 state)
netdev->netdev_ops->ndo_stop(netdev);
ixgbe_reset_interrupt_capability(adapter);
ixgbe_napi_del_all(adapter);
INIT_LIST_HEAD(&netdev->napi_list);
kfree(adapter->tx_ring);
kfree(adapter->rx_ring);
adapter->tx_ring = NULL;
Expand All @@ -157,7 +158,6 @@ static u8 ixgbe_dcbnl_set_state(struct net_device *netdev, u8 state)
adapter->flags &= ~IXGBE_FLAG_RSS_ENABLED;
adapter->flags |= IXGBE_FLAG_DCB_ENABLED;
ixgbe_init_interrupt_scheme(adapter);
ixgbe_napi_add_all(adapter);
if (netif_running(netdev))
netdev->netdev_ops->ndo_open(netdev);
} else {
Expand All @@ -167,6 +167,7 @@ static u8 ixgbe_dcbnl_set_state(struct net_device *netdev, u8 state)
netdev->netdev_ops->ndo_stop(netdev);
ixgbe_reset_interrupt_capability(adapter);
ixgbe_napi_del_all(adapter);
INIT_LIST_HEAD(&netdev->napi_list);
kfree(adapter->tx_ring);
kfree(adapter->rx_ring);
adapter->tx_ring = NULL;
Expand All @@ -176,7 +177,6 @@ static u8 ixgbe_dcbnl_set_state(struct net_device *netdev, u8 state)
adapter->flags &= ~IXGBE_FLAG_DCB_ENABLED;
adapter->flags |= IXGBE_FLAG_RSS_ENABLED;
ixgbe_init_interrupt_scheme(adapter);
ixgbe_napi_add_all(adapter);
if (netif_running(netdev))
netdev->netdev_ops->ndo_open(netdev);
}
Expand Down
11 changes: 8 additions & 3 deletions trunk/drivers/net/ixgbe/ixgbe_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2064,6 +2064,8 @@ static int ixgbe_up_complete(struct ixgbe_adapter *adapter)
else
ixgbe_configure_msi_and_legacy(adapter);

ixgbe_napi_add_all(adapter);

clear_bit(__IXGBE_DOWN, &adapter->state);
ixgbe_napi_enable_all(adapter);

Expand Down Expand Up @@ -3176,8 +3178,13 @@ static int ixgbe_close(struct net_device *netdev)
void ixgbe_napi_add_all(struct ixgbe_adapter *adapter)
{
int q_idx, q_vectors;
struct net_device *netdev = adapter->netdev;
int (*poll)(struct napi_struct *, int);

/* check if we already have our netdev->napi_list populated */
if (&netdev->napi_list != netdev->napi_list.next)
return;

if (adapter->flags & IXGBE_FLAG_MSIX_ENABLED) {
poll = &ixgbe_clean_rxonly;
/* Only enable as many vectors as we have rx queues. */
Expand Down Expand Up @@ -3271,6 +3278,7 @@ static int ixgbe_suspend(struct pci_dev *pdev, pm_message_t state)
}
ixgbe_reset_interrupt_capability(adapter);
ixgbe_napi_del_all(adapter);
INIT_LIST_HEAD(&netdev->napi_list);
kfree(adapter->tx_ring);
kfree(adapter->rx_ring);

Expand Down Expand Up @@ -4212,8 +4220,6 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev,
netif_carrier_off(netdev);
netif_tx_stop_all_queues(netdev);

ixgbe_napi_add_all(adapter);

strcpy(netdev->name, "eth%d");
err = register_netdev(netdev);
if (err)
Expand Down Expand Up @@ -4299,7 +4305,6 @@ static void __devexit ixgbe_remove(struct pci_dev *pdev)
pci_release_regions(pdev);

DPRINTK(PROBE, INFO, "complete\n");
ixgbe_napi_del_all(adapter);
kfree(adapter->tx_ring);
kfree(adapter->rx_ring);

Expand Down

0 comments on commit c8e1c23

Please sign in to comment.