net: bgmac: Random fixes
Subsystems (3)
cover net: bgmac: Random fixes
Hi all,
This patch series fixes a few issues spotted by code inspection and actual testing.
Thanks
Florian Fainelli (3):
net: bgmac: Fix SOF bit checking
net: bgmac: Start transmit queue in bgmac_open
net: bgmac: Remove superflous netif_carrier_on()
drivers/net/ethernet/broadcom/bgmac.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
Signature · 1 line
2.7.4
PATCH 1/3 net: bgmac: Fix SOF bit checking
We are checking for the Start of Frame bit in the ctl1 word, while this bit is set in the ctl0 word instead. Read the ctl0 word and update the check to verify that.
Fixes 9cde94506eac ("bgmac: implement scatter/gather support")
Signed-off-by Florian Fainelli <[email protected]>
--- drivers/net/ethernet/broadcom/bgmac.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/net/ethernet/broadcom/bgmac.c +3 -2
@@ -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 );
Signature · 1 line
2.7.4
David Miller
maintainerFrom: Florian Fainelli <[email protected]>
Date: Thu, 23 Jun 2016 14:23:11 -0700
Quoted 2 lines
This patch series fixes a few issues spotted by code inspection and actual testing.
Series applied, thanks.