aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bnx2.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/bnx2.c')
-rw-r--r--drivers/net/bnx2.c24
1 files changed, 18 insertions, 6 deletions
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
index 6500b7c4739f..8466d351a703 100644
--- a/drivers/net/bnx2.c
+++ b/drivers/net/bnx2.c
@@ -1497,6 +1497,8 @@ static int bnx2_fw_sync(struct bnx2 *, u32, int, int);
1497 1497
1498static int 1498static int
1499bnx2_setup_remote_phy(struct bnx2 *bp, u8 port) 1499bnx2_setup_remote_phy(struct bnx2 *bp, u8 port)
1500__releases(&bp->phy_lock)
1501__acquires(&bp->phy_lock)
1500{ 1502{
1501 u32 speed_arg = 0, pause_adv; 1503 u32 speed_arg = 0, pause_adv;
1502 1504
@@ -1554,6 +1556,8 @@ bnx2_setup_remote_phy(struct bnx2 *bp, u8 port)
1554 1556
1555static int 1557static int
1556bnx2_setup_serdes_phy(struct bnx2 *bp, u8 port) 1558bnx2_setup_serdes_phy(struct bnx2 *bp, u8 port)
1559__releases(&bp->phy_lock)
1560__acquires(&bp->phy_lock)
1557{ 1561{
1558 u32 adv, bmcr; 1562 u32 adv, bmcr;
1559 u32 new_adv = 0; 1563 u32 new_adv = 0;
@@ -1866,6 +1870,8 @@ bnx2_set_remote_link(struct bnx2 *bp)
1866 1870
1867static int 1871static int
1868bnx2_setup_copper_phy(struct bnx2 *bp) 1872bnx2_setup_copper_phy(struct bnx2 *bp)
1873__releases(&bp->phy_lock)
1874__acquires(&bp->phy_lock)
1869{ 1875{
1870 u32 bmcr; 1876 u32 bmcr;
1871 u32 new_bmcr; 1877 u32 new_bmcr;
@@ -1963,6 +1969,8 @@ bnx2_setup_copper_phy(struct bnx2 *bp)
1963 1969
1964static int 1970static int
1965bnx2_setup_phy(struct bnx2 *bp, u8 port) 1971bnx2_setup_phy(struct bnx2 *bp, u8 port)
1972__releases(&bp->phy_lock)
1973__acquires(&bp->phy_lock)
1966{ 1974{
1967 if (bp->loopback == MAC_LOOPBACK) 1975 if (bp->loopback == MAC_LOOPBACK)
1968 return 0; 1976 return 0;
@@ -2176,6 +2184,8 @@ bnx2_init_copper_phy(struct bnx2 *bp, int reset_phy)
2176 2184
2177static int 2185static int
2178bnx2_init_phy(struct bnx2 *bp, int reset_phy) 2186bnx2_init_phy(struct bnx2 *bp, int reset_phy)
2187__releases(&bp->phy_lock)
2188__acquires(&bp->phy_lock)
2179{ 2189{
2180 u32 val; 2190 u32 val;
2181 int rc = 0; 2191 int rc = 0;
@@ -3005,6 +3015,8 @@ bnx2_rx_int(struct bnx2 *bp, struct bnx2_napi *bnapi, int budget)
3005 skb->ip_summed = CHECKSUM_UNNECESSARY; 3015 skb->ip_summed = CHECKSUM_UNNECESSARY;
3006 } 3016 }
3007 3017
3018 skb_record_rx_queue(skb, bnapi - &bp->bnx2_napi[0]);
3019
3008#ifdef BCM_VLAN 3020#ifdef BCM_VLAN
3009 if (hw_vlan) 3021 if (hw_vlan)
3010 vlan_hwaccel_receive_skb(skb, bp->vlgrp, vtag); 3022 vlan_hwaccel_receive_skb(skb, bp->vlgrp, vtag);
@@ -3061,7 +3073,7 @@ bnx2_msi(int irq, void *dev_instance)
3061 if (unlikely(atomic_read(&bp->intr_sem) != 0)) 3073 if (unlikely(atomic_read(&bp->intr_sem) != 0))
3062 return IRQ_HANDLED; 3074 return IRQ_HANDLED;
3063 3075
3064 netif_rx_schedule(&bnapi->napi); 3076 napi_schedule(&bnapi->napi);
3065 3077
3066 return IRQ_HANDLED; 3078 return IRQ_HANDLED;
3067} 3079}
@@ -3078,7 +3090,7 @@ bnx2_msi_1shot(int irq, void *dev_instance)
3078 if (unlikely(atomic_read(&bp->intr_sem) != 0)) 3090 if (unlikely(atomic_read(&bp->intr_sem) != 0))
3079 return IRQ_HANDLED; 3091 return IRQ_HANDLED;
3080 3092
3081 netif_rx_schedule(&bnapi->napi); 3093 napi_schedule(&bnapi->napi);
3082 3094
3083 return IRQ_HANDLED; 3095 return IRQ_HANDLED;
3084} 3096}
@@ -3114,9 +3126,9 @@ bnx2_interrupt(int irq, void *dev_instance)
3114 if (unlikely(atomic_read(&bp->intr_sem) != 0)) 3126 if (unlikely(atomic_read(&bp->intr_sem) != 0))
3115 return IRQ_HANDLED; 3127 return IRQ_HANDLED;
3116 3128
3117 if (netif_rx_schedule_prep(&bnapi->napi)) { 3129 if (napi_schedule_prep(&bnapi->napi)) {
3118 bnapi->last_status_idx = sblk->status_idx; 3130 bnapi->last_status_idx = sblk->status_idx;
3119 __netif_rx_schedule(&bnapi->napi); 3131 __napi_schedule(&bnapi->napi);
3120 } 3132 }
3121 3133
3122 return IRQ_HANDLED; 3134 return IRQ_HANDLED;
@@ -3226,7 +3238,7 @@ static int bnx2_poll_msix(struct napi_struct *napi, int budget)
3226 rmb(); 3238 rmb();
3227 if (likely(!bnx2_has_fast_work(bnapi))) { 3239 if (likely(!bnx2_has_fast_work(bnapi))) {
3228 3240
3229 netif_rx_complete(napi); 3241 napi_complete(napi);
3230 REG_WR(bp, BNX2_PCICFG_INT_ACK_CMD, bnapi->int_num | 3242 REG_WR(bp, BNX2_PCICFG_INT_ACK_CMD, bnapi->int_num |
3231 BNX2_PCICFG_INT_ACK_CMD_INDEX_VALID | 3243 BNX2_PCICFG_INT_ACK_CMD_INDEX_VALID |
3232 bnapi->last_status_idx); 3244 bnapi->last_status_idx);
@@ -3259,7 +3271,7 @@ static int bnx2_poll(struct napi_struct *napi, int budget)
3259 3271
3260 rmb(); 3272 rmb();
3261 if (likely(!bnx2_has_work(bnapi))) { 3273 if (likely(!bnx2_has_work(bnapi))) {
3262 netif_rx_complete(napi); 3274 napi_complete(napi);
3263 if (likely(bp->flags & BNX2_FLAG_USING_MSI_OR_MSIX)) { 3275 if (likely(bp->flags & BNX2_FLAG_USING_MSI_OR_MSIX)) {
3264 REG_WR(bp, BNX2_PCICFG_INT_ACK_CMD, 3276 REG_WR(bp, BNX2_PCICFG_INT_ACK_CMD,
3265 BNX2_PCICFG_INT_ACK_CMD_INDEX_VALID | 3277 BNX2_PCICFG_INT_ACK_CMD_INDEX_VALID |