diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-02 12:49:06 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-02 12:49:06 -0400 |
commit | ca55bd7e2905d344bf697f7c2cc347cb42999e7a (patch) | |
tree | f2b45dcfd55e72398d29320d2b3b9c3bace94a85 /drivers | |
parent | 4157fd85fc794bb7896b65c0cf686aa89d711d57 (diff) | |
parent | 12186be7d2e1106cede1cc728526e3d7998cbe94 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
net_cls: fix unconfigured struct tcf_proto keeps chaining and avoid kernel panic when we use cls_cgroup
e1000: add missing length check to e1000 receive routine
forcedeth: add phy_power_down parameter, leave phy powered up by default (v2)
Bluetooth: Remove useless flush_work() causing lockdep warnings
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/e1000/e1000_main.c | 5 | ||||
-rw-r--r-- | drivers/net/forcedeth.c | 15 |
2 files changed, 16 insertions, 4 deletions
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index b1419e21b46b..fffb006b7d95 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c | |||
@@ -4027,8 +4027,9 @@ static bool e1000_clean_rx_irq(struct e1000_adapter *adapter, | |||
4027 | PCI_DMA_FROMDEVICE); | 4027 | PCI_DMA_FROMDEVICE); |
4028 | 4028 | ||
4029 | length = le16_to_cpu(rx_desc->length); | 4029 | length = le16_to_cpu(rx_desc->length); |
4030 | 4030 | /* !EOP means multiple descriptors were used to store a single | |
4031 | if (unlikely(!(status & E1000_RXD_STAT_EOP))) { | 4031 | * packet, also make sure the frame isn't just CRC only */ |
4032 | if (unlikely(!(status & E1000_RXD_STAT_EOP) || (length <= 4))) { | ||
4032 | /* All receives must fit into a single buffer */ | 4033 | /* All receives must fit into a single buffer */ |
4033 | E1000_DBG("%s: Receive packet consumed multiple" | 4034 | E1000_DBG("%s: Receive packet consumed multiple" |
4034 | " buffers\n", netdev->name); | 4035 | " buffers\n", netdev->name); |
diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c index f9a846b1b92f..9f6a68fb7b45 100644 --- a/drivers/net/forcedeth.c +++ b/drivers/net/forcedeth.c | |||
@@ -897,6 +897,12 @@ enum { | |||
897 | }; | 897 | }; |
898 | static int phy_cross = NV_CROSSOVER_DETECTION_DISABLED; | 898 | static int phy_cross = NV_CROSSOVER_DETECTION_DISABLED; |
899 | 899 | ||
900 | /* | ||
901 | * Power down phy when interface is down (persists through reboot; | ||
902 | * older Linux and other OSes may not power it up again) | ||
903 | */ | ||
904 | static int phy_power_down = 0; | ||
905 | |||
900 | static inline struct fe_priv *get_nvpriv(struct net_device *dev) | 906 | static inline struct fe_priv *get_nvpriv(struct net_device *dev) |
901 | { | 907 | { |
902 | return netdev_priv(dev); | 908 | return netdev_priv(dev); |
@@ -1485,7 +1491,10 @@ static int phy_init(struct net_device *dev) | |||
1485 | 1491 | ||
1486 | /* restart auto negotiation, power down phy */ | 1492 | /* restart auto negotiation, power down phy */ |
1487 | mii_control = mii_rw(dev, np->phyaddr, MII_BMCR, MII_READ); | 1493 | mii_control = mii_rw(dev, np->phyaddr, MII_BMCR, MII_READ); |
1488 | mii_control |= (BMCR_ANRESTART | BMCR_ANENABLE | BMCR_PDOWN); | 1494 | mii_control |= (BMCR_ANRESTART | BMCR_ANENABLE); |
1495 | if (phy_power_down) { | ||
1496 | mii_control |= BMCR_PDOWN; | ||
1497 | } | ||
1489 | if (mii_rw(dev, np->phyaddr, MII_BMCR, mii_control)) { | 1498 | if (mii_rw(dev, np->phyaddr, MII_BMCR, mii_control)) { |
1490 | return PHY_ERROR; | 1499 | return PHY_ERROR; |
1491 | } | 1500 | } |
@@ -5513,7 +5522,7 @@ static int nv_close(struct net_device *dev) | |||
5513 | 5522 | ||
5514 | nv_drain_rxtx(dev); | 5523 | nv_drain_rxtx(dev); |
5515 | 5524 | ||
5516 | if (np->wolenabled) { | 5525 | if (np->wolenabled || !phy_power_down) { |
5517 | writel(NVREG_PFF_ALWAYS|NVREG_PFF_MYADDR, base + NvRegPacketFilterFlags); | 5526 | writel(NVREG_PFF_ALWAYS|NVREG_PFF_MYADDR, base + NvRegPacketFilterFlags); |
5518 | nv_start_rx(dev); | 5527 | nv_start_rx(dev); |
5519 | } else { | 5528 | } else { |
@@ -6367,6 +6376,8 @@ module_param(dma_64bit, int, 0); | |||
6367 | MODULE_PARM_DESC(dma_64bit, "High DMA is enabled by setting to 1 and disabled by setting to 0."); | 6376 | MODULE_PARM_DESC(dma_64bit, "High DMA is enabled by setting to 1 and disabled by setting to 0."); |
6368 | module_param(phy_cross, int, 0); | 6377 | module_param(phy_cross, int, 0); |
6369 | MODULE_PARM_DESC(phy_cross, "Phy crossover detection for Realtek 8201 phy is enabled by setting to 1 and disabled by setting to 0."); | 6378 | MODULE_PARM_DESC(phy_cross, "Phy crossover detection for Realtek 8201 phy is enabled by setting to 1 and disabled by setting to 0."); |
6379 | module_param(phy_power_down, int, 0); | ||
6380 | MODULE_PARM_DESC(phy_power_down, "Power down phy and disable link when interface is down (1), or leave phy powered up (0)."); | ||
6370 | 6381 | ||
6371 | MODULE_AUTHOR("Manfred Spraul <manfred@colorfullife.com>"); | 6382 | MODULE_AUTHOR("Manfred Spraul <manfred@colorfullife.com>"); |
6372 | MODULE_DESCRIPTION("Reverse Engineered nForce ethernet driver"); | 6383 | MODULE_DESCRIPTION("Reverse Engineered nForce ethernet driver"); |