aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/8139too.c
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2009-12-09 01:14:38 -0500
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2009-12-09 01:14:38 -0500
commitbcd6acd51f3d4d1ada201e9bc5c40a31d6d80c71 (patch)
tree2f6dffd2d3e4dd67355a224de7e7a960335a92fd /drivers/net/8139too.c
parent11c34c7deaeeebcee342cbc35e1bb2a6711b2431 (diff)
parent3ff6a468b45b5dfeb0e903e56f4eb27d34b2437c (diff)
Merge commit 'origin/master' into next
Conflicts: include/linux/kvm.h
Diffstat (limited to 'drivers/net/8139too.c')
-rw-r--r--drivers/net/8139too.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/net/8139too.c b/drivers/net/8139too.c
index 4a362875502..25f7339daab 100644
--- a/drivers/net/8139too.c
+++ b/drivers/net/8139too.c
@@ -1549,8 +1549,8 @@ static inline void rtl8139_thread_iter (struct net_device *dev,
1549 mii_lpa = mdio_read (dev, tp->phys[0], MII_LPA); 1549 mii_lpa = mdio_read (dev, tp->phys[0], MII_LPA);
1550 1550
1551 if (!tp->mii.force_media && mii_lpa != 0xffff) { 1551 if (!tp->mii.force_media && mii_lpa != 0xffff) {
1552 int duplex = (mii_lpa & LPA_100FULL) 1552 int duplex = ((mii_lpa & LPA_100FULL) ||
1553 || (mii_lpa & 0x01C0) == 0x0040; 1553 (mii_lpa & 0x01C0) == 0x0040);
1554 if (tp->mii.full_duplex != duplex) { 1554 if (tp->mii.full_duplex != duplex) {
1555 tp->mii.full_duplex = duplex; 1555 tp->mii.full_duplex = duplex;
1556 1556
@@ -1936,8 +1936,8 @@ static int rtl8139_rx(struct net_device *dev, struct rtl8139_private *tp,
1936 RTL_R16 (RxBufAddr), 1936 RTL_R16 (RxBufAddr),
1937 RTL_R16 (RxBufPtr), RTL_R8 (ChipCmd)); 1937 RTL_R16 (RxBufPtr), RTL_R8 (ChipCmd));
1938 1938
1939 while (netif_running(dev) && received < budget 1939 while (netif_running(dev) && received < budget &&
1940 && (RTL_R8 (ChipCmd) & RxBufEmpty) == 0) { 1940 (RTL_R8 (ChipCmd) & RxBufEmpty) == 0) {
1941 u32 ring_offset = cur_rx % RX_BUF_LEN; 1941 u32 ring_offset = cur_rx % RX_BUF_LEN;
1942 u32 rx_status; 1942 u32 rx_status;
1943 unsigned int pkt_size; 1943 unsigned int pkt_size;
@@ -2004,9 +2004,8 @@ no_early_rx:
2004 /* Malloc up new buffer, compatible with net-2e. */ 2004 /* Malloc up new buffer, compatible with net-2e. */
2005 /* Omit the four octet CRC from the length. */ 2005 /* Omit the four octet CRC from the length. */
2006 2006
2007 skb = netdev_alloc_skb(dev, pkt_size + NET_IP_ALIGN); 2007 skb = netdev_alloc_skb_ip_align(dev, pkt_size);
2008 if (likely(skb)) { 2008 if (likely(skb)) {
2009 skb_reserve (skb, NET_IP_ALIGN); /* 16 byte align the IP fields. */
2010#if RX_BUF_IDX == 3 2009#if RX_BUF_IDX == 3
2011 wrap_copy(skb, rx_ring, ring_offset+4, pkt_size); 2010 wrap_copy(skb, rx_ring, ring_offset+4, pkt_size);
2012#else 2011#else
@@ -2522,8 +2521,8 @@ static void __set_rx_mode (struct net_device *dev)
2522 AcceptBroadcast | AcceptMulticast | AcceptMyPhys | 2521 AcceptBroadcast | AcceptMulticast | AcceptMyPhys |
2523 AcceptAllPhys; 2522 AcceptAllPhys;
2524 mc_filter[1] = mc_filter[0] = 0xffffffff; 2523 mc_filter[1] = mc_filter[0] = 0xffffffff;
2525 } else if ((dev->mc_count > multicast_filter_limit) 2524 } else if ((dev->mc_count > multicast_filter_limit) ||
2526 || (dev->flags & IFF_ALLMULTI)) { 2525 (dev->flags & IFF_ALLMULTI)) {
2527 /* Too many to filter perfectly -- accept all multicasts. */ 2526 /* Too many to filter perfectly -- accept all multicasts. */
2528 rx_mode = AcceptBroadcast | AcceptMulticast | AcceptMyPhys; 2527 rx_mode = AcceptBroadcast | AcceptMulticast | AcceptMyPhys;
2529 mc_filter[1] = mc_filter[0] = 0xffffffff; 2528 mc_filter[1] = mc_filter[0] = 0xffffffff;