diff options
author | Hauke Mehrtens <hauke@hauke-m.de> | 2013-10-06 18:31:32 +0000 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2013-10-06 18:31:32 +0000 |
commit | 2c5e4aa6add7eefb6663893a47cc6ffbb0241c68 (patch) | |
tree | c26da8ee9f0d3c8bf51af2bc020dd2df536bd625 /target/linux/brcm47xx/patches-3.10/200-b44-add-support-for-Byte-Queue-Limits.patch | |
parent | 048fc8f0c149731229463f6fe97ce0a536b33a99 (diff) | |
download | upstream-2c5e4aa6add7eefb6663893a47cc6ffbb0241c68.tar.gz upstream-2c5e4aa6add7eefb6663893a47cc6ffbb0241c68.tar.bz2 upstream-2c5e4aa6add7eefb6663893a47cc6ffbb0241c68.zip |
brcm47xx: b44: fix some problems with the phy
* do not try initialize a unused phy
* some improvements to the phylib patch
* do not turn the phy off when mac is off
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
SVN-Revision: 38306
Diffstat (limited to 'target/linux/brcm47xx/patches-3.10/200-b44-add-support-for-Byte-Queue-Limits.patch')
-rw-r--r-- | target/linux/brcm47xx/patches-3.10/200-b44-add-support-for-Byte-Queue-Limits.patch | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/target/linux/brcm47xx/patches-3.10/200-b44-add-support-for-Byte-Queue-Limits.patch b/target/linux/brcm47xx/patches-3.10/200-b44-add-support-for-Byte-Queue-Limits.patch new file mode 100644 index 0000000000..127c9849d5 --- /dev/null +++ b/target/linux/brcm47xx/patches-3.10/200-b44-add-support-for-Byte-Queue-Limits.patch @@ -0,0 +1,43 @@ +--- a/drivers/net/ethernet/broadcom/b44.c ++++ b/drivers/net/ethernet/broadcom/b44.c +@@ -596,6 +596,7 @@ static void b44_timer(unsigned long __op + static void b44_tx(struct b44 *bp) + { + u32 cur, cons; ++ unsigned bytes_compl = 0, pkts_compl = 0; + + cur = br32(bp, B44_DMATX_STAT) & DMATX_STAT_CDMASK; + cur /= sizeof(struct dma_desc); +@@ -612,9 +613,14 @@ static void b44_tx(struct b44 *bp) + skb->len, + DMA_TO_DEVICE); + rp->skb = NULL; ++ ++ bytes_compl += skb->len; ++ pkts_compl++; ++ + dev_kfree_skb_irq(skb); + } + ++ netdev_completed_queue(bp->dev, pkts_compl, bytes_compl); + bp->tx_cons = cons; + if (netif_queue_stopped(bp->dev) && + TX_BUFFS_AVAIL(bp) > B44_TX_WAKEUP_THRESH) +@@ -1018,6 +1024,8 @@ static netdev_tx_t b44_start_xmit(struct + if (bp->flags & B44_FLAG_REORDER_BUG) + br32(bp, B44_DMATX_PTR); + ++ netdev_sent_queue(dev, skb->len); ++ + if (TX_BUFFS_AVAIL(bp) < 1) + netif_stop_queue(dev); + +@@ -1416,6 +1424,8 @@ static void b44_init_hw(struct b44 *bp, + + val = br32(bp, B44_ENET_CTRL); + bw32(bp, B44_ENET_CTRL, (val | ENET_CTRL_ENABLE)); ++ ++ netdev_reset_queue(bp->dev); + } + + static int b44_open(struct net_device *dev) |