diff options
author | David S. Miller <davem@davemloft.net> | 2016-06-28 10:22:25 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-06-28 10:22:25 +0200 |
commit | d1b5a8da298bc15f67e16f18aa0812c35fe639a2 (patch) | |
tree | a35d34b93e06d0227b7b69298c6b2166c3185b45 | |
parent | bonding: fix 802.3ad aggregator reselection (diff) | |
parent | net: bgmac: Remove superflous netif_carrier_on() (diff) | |
download | linux-d1b5a8da298bc15f67e16f18aa0812c35fe639a2.tar.xz linux-d1b5a8da298bc15f67e16f18aa0812c35fe639a2.zip |
Merge branch 'bgmac-fixes'
Florian Fainelli says:
====================
net: bgmac: Random fixes
This patch series fixes a few issues spotted by code inspection and
actual testing.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/broadcom/bgmac.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/net/ethernet/broadcom/bgmac.c b/drivers/net/ethernet/broadcom/bgmac.c index ee5f431ab32a..a6333d38ecc0 100644 --- a/drivers/net/ethernet/broadcom/bgmac.c +++ b/drivers/net/ethernet/broadcom/bgmac.c @@ -267,15 +267,16 @@ static void bgmac_dma_tx_free(struct bgmac *bgmac, struct bgmac_dma_ring *ring) while (ring->start != ring->end) { int slot_idx = ring->start % BGMAC_TX_RING_SLOTS; struct bgmac_slot_info *slot = &ring->slots[slot_idx]; - u32 ctl1; + u32 ctl0, ctl1; int len; if (slot_idx == empty_slot) break; + ctl0 = le32_to_cpu(ring->cpu_base[slot_idx].ctl0); ctl1 = le32_to_cpu(ring->cpu_base[slot_idx].ctl1); len = ctl1 & BGMAC_DESC_CTL1_LEN; - if (ctl1 & BGMAC_DESC_CTL0_SOF) + if (ctl0 & BGMAC_DESC_CTL0_SOF) /* Unmap no longer used buffer */ dma_unmap_single(dma_dev, slot->dma_addr, len, DMA_TO_DEVICE); @@ -1312,7 +1313,8 @@ static int bgmac_open(struct net_device *net_dev) phy_start(bgmac->phy_dev); - netif_carrier_on(net_dev); + netif_start_queue(net_dev); + return 0; } |