Via-Rhine WOL vs PXE Boot
Hi!
In recent kernels I have been having trouble booting from a LAN with the built in PXE firmware in my Via Epia M10k board. This will never happen after a cold-boot. But do accur after the first reboot or power-down/power-up cycle. When this occurs the PXE firmware exits with no error, as at least a unplugged wire (from cold-boot) will yield an error message with the unchanged driver. Cold-boot refers to complete power separation from the motherboard.
I've traced this down to a specific change in the via-rhine ethernet driver:
http://linux.bkbits.net:8080/linux-2.6/diffs/drivers/net/via-rhine.c%401.75?nav=index.html|
src/.|src/drivers|src/drivers/net|hist/drivers/net/via-rhine.c
I have not yet tried messing with variations of this change vs the WOL feature, or the WOL feature at all, but probably will sometime soon. If someone have some idea of what might be going wrong here,
I would be happy to test.
Kenneth
Quoted 9 lines · Kenneth Aafløy
In recent kernels I have been having trouble booting from a LAN with the built in PXE firmware in my Via Epia M10k board. This will never happen after a cold-boot. But do accur after the first reboot or power-down/power-up cycle. When this occurs the PXE firmware exits with no error, as at least a unplugged wire (from cold-boot) will yield an error message with the unchanged driver. Cold-boot refers to complete power separation from the motherboard.
I've traced this down to a specific change in the via-rhine ethernet driver:
[...]
The patch you are referring to contains very little code that affects chip programming without user intervention (e.g. calling ethtool ioctls). There is one notable exception: The patch introduces rhine_shutdown which is called at shutdown (well, duh!). I suppose you can make the problem go away if you comment out parts of said function. I'd start at the bottom with the D3 call.
Roger
Quoted 3 lines · Roger Luethi
Quoted 2 lines · Kenneth Aafløy
In recent kernels I have been having trouble booting from a LAN with the built in PXE firmware in my Via Epia M10k board.
[...]
Quoted 6 lines
The patch you are referring to contains very little code that affects chip programming without user intervention (e.g. calling ethtool ioctls). There is one notable exception: The patch introduces
rhine_shutdownwhich is called at shutdown (well, duh!). I suppose you can make the problem go away if you comment out parts of said function. I'd start at the bottom with the D3 call.
Indeed it was that last call to change the power state, as I too figured. Now I wonder if there is some other power state that could be set that would benefit powersaving, but not prevent the pxe boot rom from beeing confused?
Or should this rather be reported as a bug to Via, so that they can implement restoring the adapter from the D3 state in the pxe boot rom?
I've attached what I belive to be a bk patch (kinda new to that) which comments out this power-state change, untill something better is found. I have not tested WOL with this, but I can't think of any reason why it should not work.
Kenneth
# This is a BitKeeper generated diff -Nru style patch. #
# ChangeSet
# 2004/09/17 23:44:56+02:00 [email protected](none)
# via-rhine.c:
# [via-rhine] Disable the D3 power state in _shutdown.
#
# drivers/net/via-rhine.c # 2004/09/17 23:29:58+02:00 [email protected](none) +3 -1 # [via-rhine] Disable the D3 power state in _shutdown. # diff -Nru a/drivers/net/via-rhine.c b/drivers/net/via-rhine.c --- a/drivers/net/via-rhine.c 2004-09-17 23:49:38 +02:00 +++ b/drivers/net/via-rhine.c 2004-09-17 23:49:38 +02:00 @@ -1934,7 +1934,9 @@ writeb(readb(ioaddr + StickyHW) | 0x04, ioaddr + StickyHW);
/* Hit power state D3 (sleep) */
- writeb(readb(ioaddr + StickyHW) | 0x03, ioaddr + StickyHW);
+ /* Disabled for now, because it will confuse the PXE boot rom
+ * of some Via Epia boards. */
+ //writeb(readb(ioaddr + StickyHW) | 0x03, ioaddr + StickyHW);
/* TODO: Check use of pci_enable_wake() */
Quoted 2 lines · Kenneth Aafløy
Or should this rather be reported as a bug to Via, so that they can implement restoring the adapter from the D3 state in the pxe boot rom?
Have you tried the VIA driver to check if it fares any better?
Quoted 4 lines
I've attached what I belive to be a bk patch (kinda new to that) which comments out this power-state change, untill something better is found. I have not tested WOL with this, but I can't think of any reason why it should not work.
I'm afraid you will convince neither me nor the hardware with assumptions.
Roger
Quoted 7 lines · Roger Luethi
Quoted 4 lines · Kenneth Aafløy
I've attached what I belive to be a bk patch (kinda new to that) which comments out this power-state change, untill something better is found. I have not tested WOL with this, but I can't think of any reason why it should not work.
I'm afraid you will convince neither me nor the hardware with assumptions.
WOL still works fine, at least with my hardware, without that statement.
Kenneth
Quoted 3 lines · Kenneth Aafløy
Quoted 1 line
I'm afraid you will convince neither me nor the hardware with assumptions.
WOL still works fine, at least with my hardware, without that statement.
I have hardware that needs D3 for WOL to work. Gotta love this.
Roger