* WOL failure after shutdown @ 2001-02-11 23:28 James Brents 0 siblings, 0 replies; 6+ messages in thread From: James Brents @ 2001-02-11 23:28 UTC (permalink / raw) To: linux-kernel Hello, In the event of a power outtage, my servers all shutdown -h when the backup UPS gets low, and I have them configured to start back up with a router (that uses an AT mobo, so it will start automatically) to send wakeonlan packets to my other servers to start them back up. Wakeonlan works if i were to hit the power before Linux starts, so I know I have it configured properly, and I also have wakeonlan turned on in the BIOS. However, when I do shutdown -h, it will turn the power off, but wakeonlan does not work. Ive tried enabling ACPI and tinkering with options in the BIOS, but i cant power up with WOL after issuing shutdown -h. Im using an Abit KT7 motherboard, which uses the Via Apollo KT133 chipset. Any ideas/suggestions will be greatly appreciated. -- James Brents James@nistix.com - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org Please read the FAQ at http://www.tux.org/lkml/ ^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <Pine.LNX.4.10.10102111831050.30844-100000@coffee.psychology.mcmaster.ca>]
* Re: WOL failure after shutdown [not found] <Pine.LNX.4.10.10102111831050.30844-100000@coffee.psychology.mcmaster.ca> @ 2001-02-12 2:37 ` James Brents 2001-02-12 8:06 ` Philipp Matthias Hahn ` (2 more replies) 0 siblings, 3 replies; 6+ messages in thread From: James Brents @ 2001-02-12 2:37 UTC (permalink / raw) To: Mark Hahn; +Cc: linux-kernel Sorry, I wrote that in a hurry. Its a 3Com PCI 3c905C Tornado. I can successfully use wakeonlan if I power off the machine immeadiatly after turning it on. Using the shutdown command, which it will when I need it to power back up, it will not work. Im using a wakeonlan cable to my motherboard as well, not using wake through PCI bus. Kernel is 2.4.1 I appologize for not providing all required the specs in the original message. -- James Mark Hahn wrote: >> wakeonlan packets to my other servers to start them back up. Wakeonlan >> works if i were to hit the power before Linux starts, so I know I have >> it configured properly, and I also have wakeonlan turned on in the BIOS. >> However, when I do shutdown -h, it will turn the power off, but >> wakeonlan does not work. Ive tried enabling ACPI and tinkering with >> options in the BIOS, but i cant power up with WOL after issuing shutdown -h. > > > so when can you powerup with WOL? WOL requires that the driver leave the > card in a particular state; obviously, you should mention which NIC. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org Please read the FAQ at http://www.tux.org/lkml/ ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: WOL failure after shutdown 2001-02-12 2:37 ` James Brents @ 2001-02-12 8:06 ` Philipp Matthias Hahn 2001-02-12 8:16 ` Tobias Ringstrom 2001-02-12 9:54 ` Alan Cox 2 siblings, 0 replies; 6+ messages in thread From: Philipp Matthias Hahn @ 2001-02-12 8:06 UTC (permalink / raw) To: Linux Kernel Mailing List On Sun, 11 Feb 2001, James Brents wrote: > Sorry, I wrote that in a hurry. Its a 3Com PCI 3c905C Tornado. I can > successfully use wakeonlan if I power off the machine immeadiatly after > turning it on. Using the shutdown command, which it will when I need it > to power back up, it will not work. Look at the page of Donald Becker at http://cesdis.gsfc.nasa.gov/linux/drivers/vortex.html Last time there was a small program to reactivate the D3-ACPI state which is necessary to wake your nic. I think it's calles "pci-config.c" BYtE Philipp -- / / (_)__ __ ____ __ Philipp Hahn / /__/ / _ \/ // /\ \/ / /____/_/_//_/\_,_/ /_/\_\ pmhahn@titan.lahn.de ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: WOL failure after shutdown 2001-02-12 2:37 ` James Brents 2001-02-12 8:06 ` Philipp Matthias Hahn @ 2001-02-12 8:16 ` Tobias Ringstrom 2001-02-12 8:26 ` Jeff Garzik 2001-02-12 9:54 ` Alan Cox 2 siblings, 1 reply; 6+ messages in thread From: Tobias Ringstrom @ 2001-02-12 8:16 UTC (permalink / raw) To: James Brents; +Cc: Andrew Morton, Mark Hahn, Kernel Mailing List On Sun, 11 Feb 2001, James Brents wrote: > Sorry, I wrote that in a hurry. Its a 3Com PCI 3c905C Tornado. I can > successfully use wakeonlan if I power off the machine immeadiatly after > turning it on. Using the shutdown command, which it will when I need it > to power back up, it will not work. > Im using a wakeonlan cable to my motherboard as well, not using wake > through PCI bus. > Kernel is 2.4.1 > I appologize for not providing all required the specs in the original > message. Try this patch. It is against the zero-copy version of the driver, but I'm sure you can apply it, at least manually, to any 2.4 version. Andrew, when can we expect to have WOL working in 2.4? /Tobias --- linux-2.4.1-zc1.orig/drivers/net/3c59x.c Tue Jan 30 22:16:01 2001 +++ linux-2.4.1-zc1/drivers/net/3c59x.c Wed Jan 31 08:46:00 2001 @@ -754,6 +754,7 @@ static void set_rx_mode(struct net_device *dev); static int vortex_ioctl(struct net_device *dev, struct ifreq *rq, int cmd); static void vortex_tx_timeout(struct net_device *dev); +static void acpi_wake(struct pci_dev *pdev); static void acpi_set_WOL(struct net_device *dev); /* This driver uses 'options' to pass the media type, full-duplex flag, etc. */ @@ -1426,6 +1427,8 @@ int i; int retval; + acpi_wake(vp->pdev); + /* Use the now-standard shared IRQ implementation. */ if ((retval = request_irq(dev->irq, vp->full_bus_master_rx ? &boomerang_interrupt : &vortex_interrupt, SA_SHIRQ, dev->name, dev))) { @@ -2647,12 +2650,6 @@ struct vortex_private *vp = (struct vortex_private *)dev->priv; long ioaddr = dev->base_addr; - /* AKPM: This kills the 905 */ - if (vortex_debug > 1) { - printk(KERN_INFO PFX "Wake-on-LAN functions disabled\n"); - } - return; - /* Power up on: 1==Downloaded Filter, 2==Magic Packets, 4==Link Status. */ EL3WINDOW(7); outw(2, ioaddr + 0x0c); @@ -2663,6 +2660,34 @@ pci_write_config_word(vp->pdev, 0xe0, 0x8103); } +/* Change from D3 (sleep) to D0 (active). + Problem: The Cyclone forgets all PCI config info during the transition! */ +static void acpi_wake(struct pci_dev *pdev) +{ + u32 base0, base1, romaddr; + u16 pci_command, pwr_command; + u8 pci_latency, pci_cacheline, irq; + + pci_read_config_word(pdev, 0xe0, &pwr_command); + if ((pwr_command & 3) == 0) + return; + pci_read_config_word( pdev, PCI_COMMAND, &pci_command); + pci_read_config_dword(pdev, PCI_BASE_ADDRESS_0, &base0); + pci_read_config_dword(pdev, PCI_BASE_ADDRESS_1, &base1); + pci_read_config_dword(pdev, PCI_ROM_ADDRESS, &romaddr); + pci_read_config_byte( pdev, PCI_LATENCY_TIMER, &pci_latency); + pci_read_config_byte( pdev, PCI_CACHE_LINE_SIZE, &pci_cacheline); + pci_read_config_byte( pdev, PCI_INTERRUPT_LINE, &irq); + + pci_write_config_word( pdev, 0xe0, 0x0000); + pci_write_config_dword(pdev, PCI_BASE_ADDRESS_0, base0); + pci_write_config_dword(pdev, PCI_BASE_ADDRESS_1, base1); + pci_write_config_dword(pdev, PCI_ROM_ADDRESS, romaddr); + pci_write_config_byte( pdev, PCI_INTERRUPT_LINE, irq); + pci_write_config_byte( pdev, PCI_LATENCY_TIMER, pci_latency); + pci_write_config_byte( pdev, PCI_CACHE_LINE_SIZE, pci_cacheline); + pci_write_config_word( pdev, PCI_COMMAND, pci_command | 5); +} static void __devexit vortex_remove_one (struct pci_dev *pdev) { - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org Please read the FAQ at http://www.tux.org/lkml/ ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: WOL failure after shutdown 2001-02-12 8:16 ` Tobias Ringstrom @ 2001-02-12 8:26 ` Jeff Garzik 0 siblings, 0 replies; 6+ messages in thread From: Jeff Garzik @ 2001-02-12 8:26 UTC (permalink / raw) To: Tobias Ringstrom Cc: James Brents, Andrew Morton, Mark Hahn, Kernel Mailing List Tobias Ringstrom wrote: > > On Sun, 11 Feb 2001, James Brents wrote: > > > Sorry, I wrote that in a hurry. Its a 3Com PCI 3c905C Tornado. I can > > successfully use wakeonlan if I power off the machine immeadiatly after > > turning it on. Using the shutdown command, which it will when I need it > > to power back up, it will not work. > > Im using a wakeonlan cable to my motherboard as well, not using wake > > through PCI bus. > > Kernel is 2.4.1 > > I appologize for not providing all required the specs in the original > > message. > > Try this patch. It is against the zero-copy version of the driver, but > I'm sure you can apply it, at least manually, to any 2.4 version. > > Andrew, when can we expect to have WOL working in 2.4? > > +/* Change from D3 (sleep) to D0 (active). > + Problem: The Cyclone forgets all PCI config info during the transition! */ > +static void acpi_wake(struct pci_dev *pdev) [...] Compare this code with pci_set_power_state() function in drivers/pci/pci.c. Jeff -- Jeff Garzik | "You see, in this world there's two kinds of Building 1024 | people, my friend: Those with loaded guns MandrakeSoft | and those who dig. You dig." --Blondie - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org Please read the FAQ at http://www.tux.org/lkml/ ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: WOL failure after shutdown 2001-02-12 2:37 ` James Brents 2001-02-12 8:06 ` Philipp Matthias Hahn 2001-02-12 8:16 ` Tobias Ringstrom @ 2001-02-12 9:54 ` Alan Cox 2 siblings, 0 replies; 6+ messages in thread From: Alan Cox @ 2001-02-12 9:54 UTC (permalink / raw) To: James Brents; +Cc: Mark Hahn, linux-kernel > Sorry, I wrote that in a hurry. Its a 3Com PCI 3c905C Tornado. I can > successfully use wakeonlan if I power off the machine immeadiatly after > turning it on. Using the shutdown command, which it will when I need it > to power back up, it will not work. That would seem reasonable. You probably want the 'poweroff' command to put the box into completely off state. If you want to just sleep then apm -s will do an APM suspend. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org Please read the FAQ at http://www.tux.org/lkml/ ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2001-02-13 6:55 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-02-11 23:28 WOL failure after shutdown James Brents
[not found] <Pine.LNX.4.10.10102111831050.30844-100000@coffee.psychology.mcmaster.ca>
2001-02-12 2:37 ` James Brents
2001-02-12 8:06 ` Philipp Matthias Hahn
2001-02-12 8:16 ` Tobias Ringstrom
2001-02-12 8:26 ` Jeff Garzik
2001-02-12 9:54 ` Alan Cox
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox