LKML Archive on lore.kernel.org help / color / mirror / Atom feed
* ACPI S3 fails to re-init NIC on Asus A7V @ 2004-05-27 19:57 Carsten Aulbert 2004-05-27 20:15 ` Arjan van de Ven 0 siblings, 1 reply; 3+ messages in thread From: Carsten Aulbert @ 2004-05-27 19:57 UTC (permalink / raw) To: linux-kernel Hi all, Please consider the following problem: Home Server (daisy): Asus A7V board Duron 650 MHz Debian sarge (not 100% up2date right now - from March 22nd) SiS900 (also tried 3Com 3c509-TX-M without a change) Kernels tried: 2.4.22 (IIRC), 2.6.4, 2.6.4 with acpi-patch 20040311, 2.6.6 Suspending to S3 works fine, resume also (except with the onboard-Promise chip, but that's not a big issue), however, trying to use the network after resume gives NETDEV WATCHDOG: eth0: transmit timed out This also did not help: /etc/init.d/networking stop modprobe -r sis900 echo 3 > /proc/acpi/sleep [resume] modprobe sis900 -> module is loaded successfully /etc/init.d/networking start -> sets the static routes correctly pinging a machine on the network yields the same error as before. (Also tried 3Com 3c509-TXM to no avail) To spare you about ~1000 lines of output, I've put the output of dmesg, lspci -v, acpidmp and an excerpt from /var/log/syslog with enabled sis900-debugging here http://carsten.welcomes-you.com/misc-tmp/acpi-s3/ Does this problem ring any bell, do you need more input from my side? I'm currently running out of options and ideas. TIA for any help Carsten PS: I'm not subscribed but monitor linux.kernel, but feel free to Cc me. ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: ACPI S3 fails to re-init NIC on Asus A7V 2004-05-27 19:57 ACPI S3 fails to re-init NIC on Asus A7V Carsten Aulbert @ 2004-05-27 20:15 ` Arjan van de Ven 2004-05-28 6:17 ` Carsten Aulbert 0 siblings, 1 reply; 3+ messages in thread From: Arjan van de Ven @ 2004-05-27 20:15 UTC (permalink / raw) To: Carsten Aulbert; +Cc: linux-kernel On Thu, May 27, 2004 at 10:14:50PM +0200, Carsten Aulbert wrote: > Hi all, > > Please consider the following problem: > > Home Server (daisy): > > Asus A7V board > Duron 650 MHz > Debian sarge (not 100% up2date right now - from March 22nd) > SiS900 (also tried 3Com 3c509-TX-M without a change) > > Kernels tried: > 2.4.22 (IIRC), 2.6.4, 2.6.4 with acpi-patch 20040311, 2.6.6 > > Suspending to S3 works fine, resume also (except with the > onboard-Promise chip, but that's not a big issue), however, trying to > use the network after resume gives > NETDEV WATCHDOG: eth0: transmit timed out please try this patch: diff -urNp linux-1100/drivers/pci/pci.c linux-1110/drivers/pci/pci.c --- linux-1100/drivers/pci/pci.c +++ linux-1110/drivers/pci/pci.c @@ -385,6 +385,7 @@ pci_enable_device_bars(struct pci_dev *d int pci_enable_device(struct pci_dev *dev) { + dev->is_enabled = 1; return pci_enable_device_bars(dev, (1 << PCI_NUM_RESOURCES) - 1); } @@ -399,6 +400,9 @@ void pci_disable_device(struct pci_dev *dev) { u16 pci_command; + + dev->is_enabled = 0; + dev->is_busmaster = 0; pci_read_config_word(dev, PCI_COMMAND, &pci_command); if (pci_command & PCI_COMMAND_MASTER) { @@ -601,6 +605,7 @@ pci_set_master(struct pci_dev *dev) cmd |= PCI_COMMAND_MASTER; pci_write_config_word(dev, PCI_COMMAND, cmd); } + dev->is_busmaster = 1; pcibios_set_master(dev); } diff -urNp linux-1100/drivers/pci/pci-driver.c linux-1110/drivers/pci/pci-driver.c --- linux-1100/drivers/pci/pci-driver.c +++ linux-1110/drivers/pci/pci-driver.c @@ -299,10 +299,30 @@ static int pci_device_suspend(struct dev { struct pci_dev * pci_dev = to_pci_dev(dev); struct pci_driver * drv = pci_dev->driver; + int i = 0; if (drv && drv->suspend) - return drv->suspend(pci_dev,state); - return 0; + i = drv->suspend(pci_dev,state); + + pci_save_state(pci_dev, pci_dev->saved_config_space); + return i; +} + + +/* + * Default resume method for devices that have no driver provided resume, + * or not even a driver at all. + */ +static void pci_default_resume(struct pci_dev *pci_dev) +{ + /* restore the PCI config space */ + pci_restore_state(pci_dev, pci_dev->saved_config_space); + /* if the device was enabled before suspend, reenable */ + if (pci_dev->is_enabled) + pci_enable_device(pci_dev); + /* if the device was busmaster before the suspend, make it busmaster again */ + if (pci_dev->is_busmaster) + pci_set_master(pci_dev); } static int pci_device_resume(struct device * dev) @@ -312,6 +332,8 @@ static int pci_device_resume(struct devi if (drv && drv->resume) drv->resume(pci_dev); + else + pci_default_resume(pci_dev); return 0; } diff -urNp linux-1100/include/linux/pci.h linux-1110/include/linux/pci.h --- linux-1100/include/linux/pci.h +++ linux-1110/include/linux/pci.h @@ -488,6 +488,11 @@ struct pci_dev { /* These fields are used by common fixups */ unsigned int transparent:1; /* Transparent PCI bridge */ unsigned int multifunction:1;/* Part of multi-function device */ + /* keep track of device state */ + unsigned int is_enabled:1; /* pci_enable_device has been called */ + unsigned int is_busmaster:1; /* device is busmaster */ + + unsigned int saved_config_space[16]; /* config space saved at suspend time */ #ifdef CONFIG_PCI_NAMES #define PCI_NAME_SIZE 96 #define PCI_NAME_HALF __stringify(43) /* less than half to handle slop */ ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: ACPI S3 fails to re-init NIC on Asus A7V 2004-05-27 20:15 ` Arjan van de Ven @ 2004-05-28 6:17 ` Carsten Aulbert 0 siblings, 0 replies; 3+ messages in thread From: Carsten Aulbert @ 2004-05-28 6:17 UTC (permalink / raw) To: linux-kernel Arjan van de Ven wrote: > > please try this patch: [...] Thanks a lot for the patch, applied it to vanilla 2.6.6, but that did not help (at all :( ). in both cases (with and without unloading the sis900 module before suspending) I get: /var/log/syslog [...] May 28 07:54:03 daisy kernel: PM: Preparing system for suspend May 28 07:54:03 daisy kernel: Stopping tasks: ==========================================| May 28 07:54:03 daisy kernel: PM: Entering state. May 28 07:54:03 daisy kernel: hwsleep-0304 [12] acpi_enter_sleep_state: Entering sleep state [S3] May 28 07:54:03 daisy kernel: Back to C! May 28 07:54:03 daisy kernel: spurious 8259A interrupt: IRQ7. May 28 07:54:03 daisy kernel: PM: Finishing up. May 28 07:54:03 daisy kernel: blk: queue d7de0c00, I/O limit 4095Mb (mask 0xffffffff) May 28 07:54:03 daisy kernel: blk: queue d7de0400, I/O limit 4095Mb (mask 0xffffffff) May 28 07:54:03 daisy sleepd[584]: 34 sec sleep; resetting timer May 28 07:54:03 daisy kernel: Restarting tasks... done May 28 07:54:04 daisy kernel: MCE: The hardware reports a non fatal, correctable incident occurred on CPU 0. May 28 07:54:04 daisy kernel: Bank 1: ddd1ffdd22063591 May 28 07:54:04 daisy kernel: MCE: The hardware reports a non fatal, correctable incident occurred on CPU 0. May 28 07:54:04 daisy kernel: Bank 2: a00060000002042e [ modprobe sis900 debug=4 ] May 28 07:54:26 daisy kernel: sis900.c: v1.08.07 11/02/2003 May 28 07:54:26 daisy kernel: eth0: SiS 900 Internal MII PHY transceiver found at address 1. May 28 07:54:26 daisy kernel: eth0: Using transceiver found at address 1 as default May 28 07:54:28 daisy kernel: eth0: SiS 900 PCI Fast Ethernet at 0xa400, IRQ 11, 00:30:ab:01:7b:6e. May 28 07:54:34 daisy kernel: eth0: Receive Filter Addrss[0]=3000 May 28 07:54:34 daisy kernel: eth0: Receive Filter Addrss[1]=1ab May 28 07:54:34 daisy kernel: eth0: Receive Filter Addrss[2]=6e7b May 28 07:54:34 daisy kernel: eth0: TX descriptor register loaded with: 177d6000 May 28 07:54:34 daisy kernel: eth0: RX descriptor register loaded with: 177d1000 May 28 07:54:36 daisy kernel: eth0: Media Link On 100mbps full-duplex May 28 07:54:48 daisy kernel: eth0: Queued Tx packet at d73f0b96 size 42 to slot 0. May 28 07:54:54 daisy kernel: NETDEV WATCHDOG: eth0: transmit timed out May 28 07:54:54 daisy kernel: eth0: exiting interrupt, interrupt status = 0x0x00000000. May 28 07:54:54 daisy kernel: eth0: Transmit timeout, status 00000004 00000241 May 28 07:54:54 daisy kernel: eth0: Queued Tx packet at d73f0996 size 42 to slot 0. [...] That's all info I can currently squeeze out of the box (due to my limited knowledge I suppose), anyone with any idea, how to proceed? Cheers Carsten ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-05-28 6:18 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2004-05-27 19:57 ACPI S3 fails to re-init NIC on Asus A7V Carsten Aulbert 2004-05-27 20:15 ` Arjan van de Ven 2004-05-28 6:17 ` Carsten Aulbert
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).