* [PATCH 0/8] e100, e1000: Fixes for netdev-2.6#upstream-fixes
@ 2006-10-17 19:01 Kok, Auke
2006-10-17 19:02 ` [PATCH 1/8] e1000: FIX: don't poke at manageability registers for incompatible adapters Kok, Auke
` (8 more replies)
0 siblings, 9 replies; 12+ messages in thread
From: Kok, Auke @ 2006-10-17 19:01 UTC (permalink / raw)
To: Garzik, Jeff
Cc: netdev, Brandeburg, Jesse, Kok, Auke, Kok, Auke, Ronciak, John
Hi,
The following fixes targeted to netdev-2.6#upstream-fixes are available
through git:
git pull git://lost.foo-projects.org/~ahkok/git/netdev-2.6 upstream-fixes
And apply against 4a1d2d81fa327d095a0a8a1f961bace5b0a2f7da
Cheers,
Auke
---
Jesse Brandeburg <jesse.brandeburg@intel.com>:
e1000: FIX: don't poke at manageability registers for incompatible adapters
e1000: FIX: disable LPE for IPV6, only enable for jumbo frames
e1000: FIX: Don't limit descriptor size to 4kb for PCI-E adapters
e1000: FIX: move length adjustment due to crc stripping disabled.
Bruce Allan <bruce.w.allan@intel.com>:
e1000: FIX: fix wrong txdctl threshold bitmasks
Auke Kok <auke-jan.h.kok@intel.com>:
e1000: FIX: 82542 doesn't support WoL
e1000: Increment version to 7.2.9-k4
e100: FIX: fix netconsole fast reboot attached to e100
---
drivers/net/e100.c | 52 +++++++++++++++++++++++---------------
drivers/net/e1000/e1000_ethtool.c | 4 ++
drivers/net/e1000/e1000_hw.h | 6 ++--
drivers/net/e1000/e1000_main.c | 41 ++++++++++++++++++++---------
4 files changed, 66 insertions(+), 37 deletions(-)
---
Auke Kok <auke-jan.h.kok@intel.com>
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 1/8] e1000: FIX: don't poke at manageability registers for incompatible adapters
2006-10-17 19:01 [PATCH 0/8] e100, e1000: Fixes for netdev-2.6#upstream-fixes Kok, Auke
@ 2006-10-17 19:02 ` Kok, Auke
2006-10-17 19:02 ` [PATCH 2/8] e1000: FIX: 82542 doesn't support WoL Kok, Auke
` (7 subsequent siblings)
8 siblings, 0 replies; 12+ messages in thread
From: Kok, Auke @ 2006-10-17 19:02 UTC (permalink / raw)
To: Garzik, Jeff
Cc: netdev, Brandeburg, Jesse, Kok, Auke, Kok, Auke, Ronciak, John
The MANC register should not be read for PCI-E adapters at all, as well as
82543 and older where 82543 would master abort when this register was
accessed.
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
---
drivers/net/e1000/e1000_ethtool.c | 3 ++-
drivers/net/e1000/e1000_main.c | 21 ++++++++++++++-------
2 files changed, 16 insertions(+), 8 deletions(-)
diff --git a/drivers/net/e1000/e1000_ethtool.c b/drivers/net/e1000/e1000_ethtool.c
index 773821e..71fb278 100644
--- a/drivers/net/e1000/e1000_ethtool.c
+++ b/drivers/net/e1000/e1000_ethtool.c
@@ -461,7 +461,8 @@ e1000_get_regs(struct net_device *netdev
regs_buff[24] = (uint32_t)phy_data; /* phy local receiver status */
regs_buff[25] = regs_buff[24]; /* phy remote receiver status */
if (hw->mac_type >= e1000_82540 &&
- hw->media_type == e1000_media_type_copper) {
+ hw->mac_type < e1000_82571 &&
+ hw->media_type == e1000_media_type_copper) {
regs_buff[26] = E1000_READ_REG(hw, MANC);
}
}
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index ce0d35f..de3dced 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -699,7 +699,10 @@ e1000_reset(struct e1000_adapter *adapte
phy_data);
}
- if ((adapter->en_mng_pt) && (adapter->hw.mac_type < e1000_82571)) {
+ if ((adapter->en_mng_pt) &&
+ (adapter->hw.mac_type >= e1000_82540) &&
+ (adapter->hw.mac_type < e1000_82571) &&
+ (adapter->hw.media_type == e1000_media_type_copper)) {
manc = E1000_READ_REG(&adapter->hw, MANC);
manc |= (E1000_MANC_ARP_EN | E1000_MANC_EN_MNG2HOST);
E1000_WRITE_REG(&adapter->hw, MANC, manc);
@@ -1076,8 +1079,9 @@ e1000_remove(struct pci_dev *pdev)
flush_scheduled_work();
- if (adapter->hw.mac_type < e1000_82571 &&
- adapter->hw.media_type == e1000_media_type_copper) {
+ if (adapter->hw.mac_type >= e1000_82540 &&
+ adapter->hw.mac_type < e1000_82571 &&
+ adapter->hw.media_type == e1000_media_type_copper) {
manc = E1000_READ_REG(&adapter->hw, MANC);
if (manc & E1000_MANC_SMBUS_EN) {
manc |= E1000_MANC_ARP_EN;
@@ -4773,8 +4777,9 @@ e1000_suspend(struct pci_dev *pdev, pm_m
pci_enable_wake(pdev, PCI_D3cold, 0);
}
- if (adapter->hw.mac_type < e1000_82571 &&
- adapter->hw.media_type == e1000_media_type_copper) {
+ if (adapter->hw.mac_type >= e1000_82540 &&
+ adapter->hw.mac_type < e1000_82571 &&
+ adapter->hw.media_type == e1000_media_type_copper) {
manc = E1000_READ_REG(&adapter->hw, MANC);
if (manc & E1000_MANC_SMBUS_EN) {
manc |= E1000_MANC_ARP_EN;
@@ -4825,8 +4830,9 @@ e1000_resume(struct pci_dev *pdev)
netif_device_attach(netdev);
- if (adapter->hw.mac_type < e1000_82571 &&
- adapter->hw.media_type == e1000_media_type_copper) {
+ if (adapter->hw.mac_type >= e1000_82540 &&
+ adapter->hw.mac_type < e1000_82571 &&
+ adapter->hw.media_type == e1000_media_type_copper) {
manc = E1000_READ_REG(&adapter->hw, MANC);
manc &= ~(E1000_MANC_ARP_EN);
E1000_WRITE_REG(&adapter->hw, MANC, manc);
@@ -4948,6 +4954,7 @@ static void e1000_io_resume(struct pci_d
netif_device_attach(netdev);
if (adapter->hw.mac_type >= e1000_82540 &&
+ adapter->hw.mac_type < e1000_82571 &&
adapter->hw.media_type == e1000_media_type_copper) {
manc = E1000_READ_REG(&adapter->hw, MANC);
manc &= ~(E1000_MANC_ARP_EN);
---
Auke Kok <auke-jan.h.kok@intel.com>
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 2/8] e1000: FIX: 82542 doesn't support WoL
2006-10-17 19:01 [PATCH 0/8] e100, e1000: Fixes for netdev-2.6#upstream-fixes Kok, Auke
2006-10-17 19:02 ` [PATCH 1/8] e1000: FIX: don't poke at manageability registers for incompatible adapters Kok, Auke
@ 2006-10-17 19:02 ` Kok, Auke
2006-10-17 19:02 ` [PATCH 3/8] e1000: FIX: fix wrong txdctl threshold bitmasks Kok, Auke
` (6 subsequent siblings)
8 siblings, 0 replies; 12+ messages in thread
From: Kok, Auke @ 2006-10-17 19:02 UTC (permalink / raw)
To: Garzik, Jeff
Cc: netdev, Brandeburg, Jesse, Kok, Auke, Kok, Auke, Ronciak, John
Exclude 82542 when setting up WoL. This card does not do WoL at all.
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
---
drivers/net/e1000/e1000_ethtool.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/net/e1000/e1000_ethtool.c b/drivers/net/e1000/e1000_ethtool.c
index 71fb278..c564adb 100644
--- a/drivers/net/e1000/e1000_ethtool.c
+++ b/drivers/net/e1000/e1000_ethtool.c
@@ -1691,6 +1691,7 @@ static int e1000_wol_exclusion(struct e1
int retval = 1; /* fail by default */
switch (hw->device_id) {
+ case E1000_DEV_ID_82542:
case E1000_DEV_ID_82543GC_FIBER:
case E1000_DEV_ID_82543GC_COPPER:
case E1000_DEV_ID_82544EI_FIBER:
---
Auke Kok <auke-jan.h.kok@intel.com>
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 3/8] e1000: FIX: fix wrong txdctl threshold bitmasks
2006-10-17 19:01 [PATCH 0/8] e100, e1000: Fixes for netdev-2.6#upstream-fixes Kok, Auke
2006-10-17 19:02 ` [PATCH 1/8] e1000: FIX: don't poke at manageability registers for incompatible adapters Kok, Auke
2006-10-17 19:02 ` [PATCH 2/8] e1000: FIX: 82542 doesn't support WoL Kok, Auke
@ 2006-10-17 19:02 ` Kok, Auke
2006-10-17 19:02 ` [PATCH 4/8] e1000: FIX: disable LPE for IPV6, only enable for jumbo frames Kok, Auke
` (5 subsequent siblings)
8 siblings, 0 replies; 12+ messages in thread
From: Kok, Auke @ 2006-10-17 19:02 UTC (permalink / raw)
To: Garzik, Jeff
Cc: netdev, Brandeburg, Jesse, Kok, Auke, Kok, Auke, Ronciak, John
Threshold bitmasks for prefetch, host and writeback were clearing
bits that they were not supposed to. The leftmost 2 bits in the byte
for each threshold are reserved.
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
---
drivers/net/e1000/e1000_hw.h | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/e1000/e1000_hw.h b/drivers/net/e1000/e1000_hw.h
index 112447f..449a603 100644
--- a/drivers/net/e1000/e1000_hw.h
+++ b/drivers/net/e1000/e1000_hw.h
@@ -1961,9 +1961,9 @@ struct e1000_hw {
#define E1000_RXDCTL_GRAN 0x01000000 /* RXDCTL Granularity */
/* Transmit Descriptor Control */
-#define E1000_TXDCTL_PTHRESH 0x000000FF /* TXDCTL Prefetch Threshold */
-#define E1000_TXDCTL_HTHRESH 0x0000FF00 /* TXDCTL Host Threshold */
-#define E1000_TXDCTL_WTHRESH 0x00FF0000 /* TXDCTL Writeback Threshold */
+#define E1000_TXDCTL_PTHRESH 0x0000003F /* TXDCTL Prefetch Threshold */
+#define E1000_TXDCTL_HTHRESH 0x00003F00 /* TXDCTL Host Threshold */
+#define E1000_TXDCTL_WTHRESH 0x003F0000 /* TXDCTL Writeback Threshold */
#define E1000_TXDCTL_GRAN 0x01000000 /* TXDCTL Granularity */
#define E1000_TXDCTL_LWTHRESH 0xFE000000 /* TXDCTL Low Threshold */
#define E1000_TXDCTL_FULL_TX_DESC_WB 0x01010000 /* GRAN=1, WTHRESH=1 */
---
Auke Kok <auke-jan.h.kok@intel.com>
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 4/8] e1000: FIX: disable LPE for IPV6, only enable for jumbo frames
2006-10-17 19:01 [PATCH 0/8] e100, e1000: Fixes for netdev-2.6#upstream-fixes Kok, Auke
` (2 preceding siblings ...)
2006-10-17 19:02 ` [PATCH 3/8] e1000: FIX: fix wrong txdctl threshold bitmasks Kok, Auke
@ 2006-10-17 19:02 ` Kok, Auke
2006-10-17 19:02 ` [PATCH 5/8] e1000: FIX: Don't limit descriptor size to 4kb for PCI-E adapters Kok, Auke
` (4 subsequent siblings)
8 siblings, 0 replies; 12+ messages in thread
From: Kok, Auke @ 2006-10-17 19:02 UTC (permalink / raw)
To: Garzik, Jeff
Cc: netdev, Brandeburg, Jesse, Kok, Auke, Kok, Auke, Ronciak, John
Allocations using alloc_page are taking too long for normal MTU, so
use LPE only for jumbo frames. Disable packet split for IPV6 extension
headers since malformed headers can hang the RX.
Signed-off-bu: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
---
drivers/net/e1000/e1000_main.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index de3dced..f19b43c 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -1808,9 +1808,11 @@ e1000_setup_rctl(struct e1000_adapter *a
* followed by the page buffers. Therefore, skb->data is
* sized to hold the largest protocol header.
*/
+ /* allocations using alloc_page take too long for regular MTU
+ * so only enable packet split for jumbo frames */
pages = PAGE_USE_COUNT(adapter->netdev->mtu);
- if ((adapter->hw.mac_type > e1000_82547_rev_2) && (pages <= 3) &&
- PAGE_SIZE <= 16384)
+ if ((adapter->hw.mac_type >= e1000_82571) && (pages <= 3) &&
+ PAGE_SIZE <= 16384 && (rctl & E1000_RCTL_LPE))
adapter->rx_ps_pages = pages;
else
adapter->rx_ps_pages = 0;
---
Auke Kok <auke-jan.h.kok@intel.com>
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 5/8] e1000: FIX: Don't limit descriptor size to 4kb for PCI-E adapters
2006-10-17 19:01 [PATCH 0/8] e100, e1000: Fixes for netdev-2.6#upstream-fixes Kok, Auke
` (3 preceding siblings ...)
2006-10-17 19:02 ` [PATCH 4/8] e1000: FIX: disable LPE for IPV6, only enable for jumbo frames Kok, Auke
@ 2006-10-17 19:02 ` Kok, Auke
2006-10-17 19:02 ` [PATCH 6/8] e1000: FIX: move length adjustment due to crc stripping disabled Kok, Auke
` (3 subsequent siblings)
8 siblings, 0 replies; 12+ messages in thread
From: Kok, Auke @ 2006-10-17 19:02 UTC (permalink / raw)
To: Garzik, Jeff
Cc: netdev, Brandeburg, Jesse, Kok, Auke, Kok, Auke, Ronciak, John
82571 and newer chispets don't need to limit desc. length to 4kb and can
handle 8kb sizes.
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
---
drivers/net/e1000/e1000_main.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index f19b43c..95bbb2d 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -2992,6 +2992,11 @@ e1000_xmit_frame(struct sk_buff *skb, st
return NETDEV_TX_OK;
}
+ /* 82571 and newer doesn't need the workaround that limited descriptor
+ * length to 4kB */
+ if (adapter->hw.mac_type >= e1000_82571)
+ max_per_txd = 8192;
+
#ifdef NETIF_F_TSO
mss = skb_shinfo(skb)->gso_size;
/* The controller does a simple calculation to
---
Auke Kok <auke-jan.h.kok@intel.com>
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 6/8] e1000: FIX: move length adjustment due to crc stripping disabled.
2006-10-17 19:01 [PATCH 0/8] e100, e1000: Fixes for netdev-2.6#upstream-fixes Kok, Auke
` (4 preceding siblings ...)
2006-10-17 19:02 ` [PATCH 5/8] e1000: FIX: Don't limit descriptor size to 4kb for PCI-E adapters Kok, Auke
@ 2006-10-17 19:02 ` Kok, Auke
2006-10-17 19:02 ` [PATCH 7/8] e1000: Increment version to 7.2.9-k4 Kok, Auke
` (2 subsequent siblings)
8 siblings, 0 replies; 12+ messages in thread
From: Kok, Auke @ 2006-10-17 19:02 UTC (permalink / raw)
To: Garzik, Jeff
Cc: netdev, Brandeburg, Jesse, Kok, Auke, Kok, Auke, Ronciak, John
Move the length (rx_bytes counter) adjustment of 4 bytes down to after the
TBI_ACCEPT workaround.
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
---
drivers/net/e1000/e1000_main.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index 95bbb2d..89ab34d 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -3786,9 +3786,6 @@ e1000_clean_rx_irq(struct e1000_adapter
length = le16_to_cpu(rx_desc->length);
- /* adjust length to remove Ethernet CRC */
- length -= 4;
-
if (unlikely(!(status & E1000_RXD_STAT_EOP))) {
/* All receives must fit into a single buffer */
E1000_DBG("%s: Receive packet consumed multiple"
@@ -3816,6 +3813,10 @@ e1000_clean_rx_irq(struct e1000_adapter
}
}
+ /* adjust length to remove Ethernet CRC, this must be
+ * done after the TBI_ACCEPT workaround above */
+ length -= 4;
+
/* code added for copybreak, this should improve
* performance for small packets with large amounts
* of reassembly being done in the stack */
---
Auke Kok <auke-jan.h.kok@intel.com>
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 7/8] e1000: Increment version to 7.2.9-k4
2006-10-17 19:01 [PATCH 0/8] e100, e1000: Fixes for netdev-2.6#upstream-fixes Kok, Auke
` (5 preceding siblings ...)
2006-10-17 19:02 ` [PATCH 6/8] e1000: FIX: move length adjustment due to crc stripping disabled Kok, Auke
@ 2006-10-17 19:02 ` Kok, Auke
2006-10-17 19:02 ` [PATCH 8/8] e100: FIX: fix netconsole fast reboot attached to e100 Kok, Auke
2006-10-21 18:31 ` [PATCH 0/8] e100, e1000: Fixes for netdev-2.6#upstream-fixes Jeff Garzik
8 siblings, 0 replies; 12+ messages in thread
From: Kok, Auke @ 2006-10-17 19:02 UTC (permalink / raw)
To: Garzik, Jeff
Cc: netdev, Brandeburg, Jesse, Kok, Auke, Kok, Auke, Ronciak, John
Significant fixes -> increment driver version.
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
---
drivers/net/e1000/e1000_main.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index 89ab34d..8c84863 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -35,7 +35,7 @@ static char e1000_driver_string[] = "Int
#else
#define DRIVERNAPI "-NAPI"
#endif
-#define DRV_VERSION "7.2.9-k2"DRIVERNAPI
+#define DRV_VERSION "7.2.9-k4"DRIVERNAPI
char e1000_driver_version[] = DRV_VERSION;
static char e1000_copyright[] = "Copyright (c) 1999-2006 Intel Corporation.";
---
Auke Kok <auke-jan.h.kok@intel.com>
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 8/8] e100: FIX: fix netconsole fast reboot attached to e100
2006-10-17 19:01 [PATCH 0/8] e100, e1000: Fixes for netdev-2.6#upstream-fixes Kok, Auke
` (6 preceding siblings ...)
2006-10-17 19:02 ` [PATCH 7/8] e1000: Increment version to 7.2.9-k4 Kok, Auke
@ 2006-10-17 19:02 ` Kok, Auke
2006-10-21 18:31 ` [PATCH 0/8] e100, e1000: Fixes for netdev-2.6#upstream-fixes Jeff Garzik
8 siblings, 0 replies; 12+ messages in thread
From: Kok, Auke @ 2006-10-17 19:02 UTC (permalink / raw)
To: Garzik, Jeff
Cc: netdev, Brandeburg, Jesse, Kok, Auke, Kok, Auke, Ronciak, John
When rebooting with netconsole over e100, the driver shutdown code
would deadlock with netpoll. Reduce shutdown code to a bare minimum
while retaining WoL functionality.
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---
drivers/net/e100.c | 52 ++++++++++++++++++++++++++++++++--------------------
1 files changed, 32 insertions(+), 20 deletions(-)
diff --git a/drivers/net/e100.c b/drivers/net/e100.c
index 27d5d2f..d4a2572 100644
--- a/drivers/net/e100.c
+++ b/drivers/net/e100.c
@@ -159,7 +159,7 @@
#define DRV_NAME "e100"
#define DRV_EXT "-NAPI"
-#define DRV_VERSION "3.5.17-k2"DRV_EXT
+#define DRV_VERSION "3.5.17-k4"DRV_EXT
#define DRV_DESCRIPTION "Intel(R) PRO/100 Network Driver"
#define DRV_COPYRIGHT "Copyright(c) 1999-2006 Intel Corporation"
#define PFX DRV_NAME ": "
@@ -2039,7 +2039,6 @@ static int e100_change_mtu(struct net_de
return 0;
}
-#ifdef CONFIG_PM
static int e100_asf(struct nic *nic)
{
/* ASF can be enabled from eeprom */
@@ -2048,7 +2047,6 @@ static int e100_asf(struct nic *nic)
!(nic->eeprom[eeprom_config_asf] & eeprom_gcl) &&
((nic->eeprom[eeprom_smbus_addr] & 0xFF) != 0xFE));
}
-#endif
static int e100_up(struct nic *nic)
{
@@ -2715,34 +2713,32 @@ static void __devexit e100_remove(struct
}
}
+#ifdef CONFIG_PM
static int e100_suspend(struct pci_dev *pdev, pm_message_t state)
{
struct net_device *netdev = pci_get_drvdata(pdev);
struct nic *nic = netdev_priv(netdev);
- if (netif_running(netdev))
- e100_down(nic);
- e100_hw_reset(nic);
- netif_device_detach(netdev);
+ netif_poll_disable(nic->netdev);
+ del_timer_sync(&nic->watchdog);
+ netif_carrier_off(nic->netdev);
-#ifdef CONFIG_PM
pci_save_state(pdev);
- if (nic->flags & (wol_magic | e100_asf(nic)))
-#else
- if (nic->flags & (wol_magic))
-#endif
- pci_enable_wake(pdev, pci_choose_state(pdev, state), 1);
- else
- /* disable PME */
- pci_enable_wake(pdev, 0, 0);
+
+ if ((nic->flags & wol_magic) | e100_asf(nic)) {
+ pci_enable_wake(pdev, PCI_D3hot, 1);
+ pci_enable_wake(pdev, PCI_D3cold, 1);
+ } else {
+ pci_enable_wake(pdev, PCI_D3hot, 0);
+ pci_enable_wake(pdev, PCI_D3cold, 0);
+ }
pci_disable_device(pdev);
- pci_set_power_state(pdev, pci_choose_state(pdev, state));
+ pci_set_power_state(pdev, PCI_D3hot);
return 0;
}
-#ifdef CONFIG_PM
static int e100_resume(struct pci_dev *pdev)
{
struct net_device *netdev = pci_get_drvdata(pdev);
@@ -2764,7 +2760,23 @@ static int e100_resume(struct pci_dev *p
static void e100_shutdown(struct pci_dev *pdev)
{
- e100_suspend(pdev, PMSG_SUSPEND);
+ struct net_device *netdev = pci_get_drvdata(pdev);
+ struct nic *nic = netdev_priv(netdev);
+
+ netif_poll_disable(nic->netdev);
+ del_timer_sync(&nic->watchdog);
+ netif_carrier_off(nic->netdev);
+
+ if ((nic->flags & wol_magic) | e100_asf(nic)) {
+ pci_enable_wake(pdev, PCI_D3hot, 1);
+ pci_enable_wake(pdev, PCI_D3cold, 1);
+ } else {
+ pci_enable_wake(pdev, PCI_D3hot, 0);
+ pci_enable_wake(pdev, PCI_D3cold, 0);
+ }
+
+ pci_disable_device(pdev);
+ pci_set_power_state(pdev, PCI_D3hot);
}
/* ------------------ PCI Error Recovery infrastructure -------------- */
@@ -2848,9 +2860,9 @@ static struct pci_driver e100_driver = {
.id_table = e100_id_table,
.probe = e100_probe,
.remove = __devexit_p(e100_remove),
+#ifdef CONFIG_PM
/* Power Management hooks */
.suspend = e100_suspend,
-#ifdef CONFIG_PM
.resume = e100_resume,
#endif
.shutdown = e100_shutdown,
---
Auke Kok <auke-jan.h.kok@intel.com>
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH 0/8] e100, e1000: Fixes for netdev-2.6#upstream-fixes
2006-10-17 19:01 [PATCH 0/8] e100, e1000: Fixes for netdev-2.6#upstream-fixes Kok, Auke
` (7 preceding siblings ...)
2006-10-17 19:02 ` [PATCH 8/8] e100: FIX: fix netconsole fast reboot attached to e100 Kok, Auke
@ 2006-10-21 18:31 ` Jeff Garzik
2006-10-23 15:13 ` Auke Kok
8 siblings, 1 reply; 12+ messages in thread
From: Jeff Garzik @ 2006-10-21 18:31 UTC (permalink / raw)
To: Kok, Auke; +Cc: netdev, Brandeburg, Jesse, Kok, Auke, Ronciak, John
Kok, Auke wrote:
> Hi,
>
> The following fixes targeted to netdev-2.6#upstream-fixes are available
> through git:
>
> git pull git://lost.foo-projects.org/~ahkok/git/netdev-2.6 upstream-fixes
hrm. since another e100 fixes got applied, can you either (a) update
the above URL for that change, or (b) provide separate e100 and e1000
pull urls?
Jeff
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 0/8] e100, e1000: Fixes for netdev-2.6#upstream-fixes
2006-10-21 18:31 ` [PATCH 0/8] e100, e1000: Fixes for netdev-2.6#upstream-fixes Jeff Garzik
@ 2006-10-23 15:13 ` Auke Kok
2006-10-24 21:43 ` please pull from git://lost.foo-projects.org/~ahkok/git/netdev-2.6 upstream-fixes Auke Kok
0 siblings, 1 reply; 12+ messages in thread
From: Auke Kok @ 2006-10-23 15:13 UTC (permalink / raw)
To: Jeff Garzik; +Cc: netdev, Brandeburg, Jesse, Kok, Auke, Ronciak, John
Jeff Garzik wrote:
> Kok, Auke wrote:
>> Hi,
>>
>> The following fixes targeted to netdev-2.6#upstream-fixes are available
>> through git:
>>
>> git pull git://lost.foo-projects.org/~ahkok/git/netdev-2.6 upstream-fixes
>
> hrm. since another e100 fixes got applied, can you either (a) update
> the above URL for that change, or (b) provide separate e100 and e1000
> pull urls?
I dropped the e100 patch from the series, it now contains (at the above url) only the
e1000 changes.
Cheers,
Auke
^ permalink raw reply [flat|nested] 12+ messages in thread
* please pull from git://lost.foo-projects.org/~ahkok/git/netdev-2.6 upstream-fixes
2006-10-23 15:13 ` Auke Kok
@ 2006-10-24 21:43 ` Auke Kok
0 siblings, 0 replies; 12+ messages in thread
From: Auke Kok @ 2006-10-24 21:43 UTC (permalink / raw)
To: Auke Kok; +Cc: Jeff Garzik, netdev, Brandeburg, Jesse, Kok, Auke, Ronciak, John
Auke Kok wrote:
> Jeff Garzik wrote:
>> Kok, Auke wrote:
>>> Hi,
>>>
>>> The following fixes targeted to netdev-2.6#upstream-fixes are available
>>> through git:
>>>
>>> git pull git://lost.foo-projects.org/~ahkok/git/netdev-2.6
>>> upstream-fixes
>>
>> hrm. since another e100 fixes got applied, can you either (a) update
>> the above URL for that change, or (b) provide separate e100 and e1000
>> pull urls?
>
> I dropped the e100 patch from the series, it now contains (at the above
> url) only the e1000 changes.
okay, I've rebased the trees on the latest upstream-fixes and master from netdev-2.6,
and on top of that added the latest e100 shutdown patch to it (see below).
Jeff,
Please pull from git://lost.foo-projects.org/~ahkok/git/netdev-2.6
upstream-fixes in to your #upstream-fixes or #upstream-linus branch so that these
fixes get into 2.6.19.
Thanks.
Auke
---
e100: account for closed interface when shutting down
From: Auke Kok <auke-jan.h.kok@intel.com>
Account for the interface being closed before disabling polling
on a device, to fix shutdown on some systems that explcitly close
the netdevice before calling shutdown.
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
---
drivers/net/e100.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/net/e100.c b/drivers/net/e100.c
index a3a08a5..19ab344 100644
--- a/drivers/net/e100.c
+++ b/drivers/net/e100.c
@@ -2719,7 +2719,10 @@ static int e100_suspend(struct pci_dev *
struct net_device *netdev = pci_get_drvdata(pdev);
struct nic *nic = netdev_priv(netdev);
- netif_poll_disable(nic->netdev);
+#ifdef CONFIG_E100_NAPI
+ if (netif_running(netdev))
+ netif_poll_disable(nic->netdev);
+#endif
del_timer_sync(&nic->watchdog);
netif_carrier_off(nic->netdev);
@@ -2763,7 +2766,10 @@ static void e100_shutdown(struct pci_dev
struct net_device *netdev = pci_get_drvdata(pdev);
struct nic *nic = netdev_priv(netdev);
- netif_poll_disable(nic->netdev);
+#ifdef CONFIG_E100_NAPI
+ if (netif_running(netdev))
+ netif_poll_disable(nic->netdev);
+#endif
del_timer_sync(&nic->watchdog);
netif_carrier_off(nic->netdev);
^ permalink raw reply related [flat|nested] 12+ messages in thread
end of thread, other threads:[~2006-10-24 21:46 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-17 19:01 [PATCH 0/8] e100, e1000: Fixes for netdev-2.6#upstream-fixes Kok, Auke
2006-10-17 19:02 ` [PATCH 1/8] e1000: FIX: don't poke at manageability registers for incompatible adapters Kok, Auke
2006-10-17 19:02 ` [PATCH 2/8] e1000: FIX: 82542 doesn't support WoL Kok, Auke
2006-10-17 19:02 ` [PATCH 3/8] e1000: FIX: fix wrong txdctl threshold bitmasks Kok, Auke
2006-10-17 19:02 ` [PATCH 4/8] e1000: FIX: disable LPE for IPV6, only enable for jumbo frames Kok, Auke
2006-10-17 19:02 ` [PATCH 5/8] e1000: FIX: Don't limit descriptor size to 4kb for PCI-E adapters Kok, Auke
2006-10-17 19:02 ` [PATCH 6/8] e1000: FIX: move length adjustment due to crc stripping disabled Kok, Auke
2006-10-17 19:02 ` [PATCH 7/8] e1000: Increment version to 7.2.9-k4 Kok, Auke
2006-10-17 19:02 ` [PATCH 8/8] e100: FIX: fix netconsole fast reboot attached to e100 Kok, Auke
2006-10-21 18:31 ` [PATCH 0/8] e100, e1000: Fixes for netdev-2.6#upstream-fixes Jeff Garzik
2006-10-23 15:13 ` Auke Kok
2006-10-24 21:43 ` please pull from git://lost.foo-projects.org/~ahkok/git/netdev-2.6 upstream-fixes Auke Kok
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).