aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/benet
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2011-04-07 17:05:23 -0400
committerDavid S. Miller <davem@davemloft.net>2011-04-07 17:05:23 -0400
commitc1e48efc701b79ee4367c9a1a4e8bbc7c3586e02 (patch)
tree91921f7c0884813c72993fcd2ecd37dc5e56d89d /drivers/net/benet
parent912d398d28b4359c2fb1f3763f1ce4f86de8350e (diff)
parent1b86a58f9d7ce4fe2377687f378fbfb53bdc9b6c (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts: drivers/net/benet/be_main.c
Diffstat (limited to 'drivers/net/benet')
-rw-r--r--drivers/net/benet/be.h4
-rw-r--r--drivers/net/benet/be_main.c17
2 files changed, 12 insertions, 9 deletions
diff --git a/drivers/net/benet/be.h b/drivers/net/benet/be.h
index 0899d9122278..ea1ea824d7c7 100644
--- a/drivers/net/benet/be.h
+++ b/drivers/net/benet/be.h
@@ -155,7 +155,7 @@ struct be_eq_obj {
155 u16 min_eqd; /* in usecs */ 155 u16 min_eqd; /* in usecs */
156 u16 max_eqd; /* in usecs */ 156 u16 max_eqd; /* in usecs */
157 u16 cur_eqd; /* in usecs */ 157 u16 cur_eqd; /* in usecs */
158 u8 msix_vec_idx; 158 u8 eq_idx;
159 159
160 struct napi_struct napi; 160 struct napi_struct napi;
161}; 161};
@@ -292,7 +292,7 @@ struct be_adapter {
292 u32 num_rx_qs; 292 u32 num_rx_qs;
293 u32 big_page_size; /* Compounded page size shared by rx wrbs */ 293 u32 big_page_size; /* Compounded page size shared by rx wrbs */
294 294
295 u8 msix_vec_next_idx; 295 u8 eq_next_idx;
296 struct be_drv_stats drv_stats; 296 struct be_drv_stats drv_stats;
297 297
298 struct vlan_group *vlan_grp; 298 struct vlan_group *vlan_grp;
diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c
index a24fb45c0f71..2c3685389485 100644
--- a/drivers/net/benet/be_main.c
+++ b/drivers/net/benet/be_main.c
@@ -1509,7 +1509,7 @@ static int be_tx_queues_create(struct be_adapter *adapter)
1509 if (be_cmd_eq_create(adapter, eq, adapter->tx_eq.cur_eqd)) 1509 if (be_cmd_eq_create(adapter, eq, adapter->tx_eq.cur_eqd))
1510 goto tx_eq_free; 1510 goto tx_eq_free;
1511 1511
1512 adapter->tx_eq.msix_vec_idx = adapter->msix_vec_next_idx++; 1512 adapter->tx_eq.eq_idx = adapter->eq_next_idx++;
1513 1513
1514 1514
1515 /* Alloc TX eth compl queue */ 1515 /* Alloc TX eth compl queue */
@@ -1621,7 +1621,7 @@ static int be_rx_queues_create(struct be_adapter *adapter)
1621 if (rc) 1621 if (rc)
1622 goto err; 1622 goto err;
1623 1623
1624 rxo->rx_eq.msix_vec_idx = adapter->msix_vec_next_idx++; 1624 rxo->rx_eq.eq_idx = adapter->eq_next_idx++;
1625 1625
1626 /* CQ */ 1626 /* CQ */
1627 cq = &rxo->cq; 1627 cq = &rxo->cq;
@@ -1697,11 +1697,11 @@ static irqreturn_t be_intx(int irq, void *dev)
1697 if (!isr) 1697 if (!isr)
1698 return IRQ_NONE; 1698 return IRQ_NONE;
1699 1699
1700 if ((1 << adapter->tx_eq.msix_vec_idx & isr)) 1700 if ((1 << adapter->tx_eq.eq_idx & isr))
1701 event_handle(adapter, &adapter->tx_eq); 1701 event_handle(adapter, &adapter->tx_eq);
1702 1702
1703 for_all_rx_queues(adapter, rxo, i) { 1703 for_all_rx_queues(adapter, rxo, i) {
1704 if ((1 << rxo->rx_eq.msix_vec_idx & isr)) 1704 if ((1 << rxo->rx_eq.eq_idx & isr))
1705 event_handle(adapter, &rxo->rx_eq); 1705 event_handle(adapter, &rxo->rx_eq);
1706 } 1706 }
1707 } 1707 }
@@ -1964,7 +1964,7 @@ static void be_sriov_disable(struct be_adapter *adapter)
1964static inline int be_msix_vec_get(struct be_adapter *adapter, 1964static inline int be_msix_vec_get(struct be_adapter *adapter,
1965 struct be_eq_obj *eq_obj) 1965 struct be_eq_obj *eq_obj)
1966{ 1966{
1967 return adapter->msix_entries[eq_obj->msix_vec_idx].vector; 1967 return adapter->msix_entries[eq_obj->eq_idx].vector;
1968} 1968}
1969 1969
1970static int be_request_irq(struct be_adapter *adapter, 1970static int be_request_irq(struct be_adapter *adapter,
@@ -2356,6 +2356,7 @@ static int be_clear(struct be_adapter *adapter)
2356 be_mcc_queues_destroy(adapter); 2356 be_mcc_queues_destroy(adapter);
2357 be_rx_queues_destroy(adapter); 2357 be_rx_queues_destroy(adapter);
2358 be_tx_queues_destroy(adapter); 2358 be_tx_queues_destroy(adapter);
2359 adapter->eq_next_idx = 0;
2359 2360
2360 if (be_physfn(adapter) && adapter->sriov_enabled) 2361 if (be_physfn(adapter) && adapter->sriov_enabled)
2361 for (vf = 0; vf < num_vfs; vf++) 2362 for (vf = 0; vf < num_vfs; vf++)
@@ -3152,11 +3153,13 @@ static int be_resume(struct pci_dev *pdev)
3152static void be_shutdown(struct pci_dev *pdev) 3153static void be_shutdown(struct pci_dev *pdev)
3153{ 3154{
3154 struct be_adapter *adapter = pci_get_drvdata(pdev); 3155 struct be_adapter *adapter = pci_get_drvdata(pdev);
3155 struct net_device *netdev = adapter->netdev; 3156
3157 if (!adapter)
3158 return;
3156 3159
3157 cancel_delayed_work_sync(&adapter->work); 3160 cancel_delayed_work_sync(&adapter->work);
3158 3161
3159 netif_device_detach(netdev); 3162 netif_device_detach(adapter->netdev);
3160 3163
3161 be_cmd_reset_function(adapter); 3164 be_cmd_reset_function(adapter);
3162 3165