Re: wol for xl(4)

2011-07-08 Thread Thomas Gerlach
On 07/08/2011 02:56 PM, Stefan Sperling wrote:
 On Mon, Jun 27, 2011 at 09:31:26AM +, Thomas Gerlach wrote:
 Tobias Ulmer tobiasu at tmux.org writes:

 I've lost track which patches need to be applied or not, but once a
 complete patch appears, I'm willing to test it on a machine that has
 three different xl's.



 hi tobias,

 sorry for any confusion. i think, the recent patches that should work are the
 following:
 After spending some time with xl hardware, I fixed several issues and
 got WOL to work even without the tiny WOL cable I thought was required.
 It seems to send the signal via the PME pin on the PCI connector.

 This diff works fine for me, against -current. Testing and OKs welcome.

 Index: ic/xl.c
 ===
 RCS file: /cvs/src/sys/dev/ic/xl.c,v
 retrieving revision 1.102
 diff -u -p -r1.102 xl.c
 --- ic/xl.c   21 Jun 2011 16:52:45 -  1.102
 +++ ic/xl.c   8 Jul 2011 12:46:21 -
 @@ -193,6 +193,7 @@ void xl_miibus_writereg(struct device *,
  void xl_miibus_statchg(struct device *);
  #ifndef SMALL_KERNEL
  int xl_wol(struct ifnet *, int);
 +void xl_wol_power(struct xl_softc *);
  #endif
  
  int
 @@ -204,6 +205,9 @@ xl_activate(struct device *self, int act
  
   switch (act) {
   case DVACT_QUIESCE:
 +#ifndef SMALL_KERNEL
 + xl_wol_power(sc);
 +#endif
   rv = config_activate_children(self, act);
   break;
   case DVACT_SUSPEND:
 @@ -2371,11 +2375,22 @@ xl_stop(struct xl_softc *sc)
   xl_freetxrx(sc);
  
  #ifndef SMALL_KERNEL
 - /* Call upper layer WOL power routine if WOL is enabled. */
 - if ((sc-xl_flags  XL_FLAG_WOL)  sc-wol_power)
 - sc-wol_power(sc-wol_power_arg);
 + xl_wol_power(sc);
  #endif
  }
 +
 +#ifndef SMALL_KERNEL
 +void
 +xl_wol_power(struct xl_softc *sc)
 +{
 + /* Re-enable RX and call upper layer WOL power routine
 +  * if WOL is enabled. */
 + if ((sc-xl_flags  XL_FLAG_WOL)  sc-wol_power) {
 + CSR_WRITE_2(sc, XL_COMMAND, XL_CMD_RX_ENABLE);
 + sc-wol_power(sc-wol_power_arg);
 + }
 +}
 +#endif
  
  void
  xl_attach(struct xl_softc *sc)
 Index: pci/if_xl_pci.c
 ===
 RCS file: /cvs/src/sys/dev/pci/if_xl_pci.c,v
 retrieving revision 1.36
 diff -u -p -r1.36 if_xl_pci.c
 --- pci/if_xl_pci.c   17 Apr 2011 20:52:43 -  1.36
 +++ pci/if_xl_pci.c   8 Jul 2011 12:49:22 -
 @@ -273,7 +273,7 @@ xl_pci_attach(struct device *parent, str
* PCI power state for WOL. It will be invoked when the
* interface stops and WOL was enabled. */
   command = pci_conf_read(pc, pa-pa_tag, XL_PCI_PWRMGMTCAP);
 - if (command  XL_PME_CAP_D3_HOT) {
 + if ((command  16)  XL_PME_CAP_D3_HOT) {
   sc-wol_power = xl_pci_wol_power;
   sc-wol_power_arg = psc; 
   }
 @@ -365,13 +365,8 @@ xl_pci_intr_ack(struct xl_softc *sc)
  void
  xl_pci_wol_power(void *ppsc)
  {
 - u_int32_t   command;
   struct xl_pci_softc *psc = (struct xl_pci_softc*)ppsc;
  
 - /* Make sure power management is enabled, and set the card into
 -  * D3hot power state so it stays active after system shutdown. */
 - command = pci_conf_read(psc-psc_pc, psc-psc_tag, XL_PCI_PWRMGMTCTRL);
 - command |= XL_PME_EN | XL_PSTATE_D3;
 - pci_conf_write(psc-psc_pc, psc-psc_tag, XL_PCI_PWRMGMTCTRL, command);
 + pci_set_powerstate(psc-psc_pc, psc-psc_tag, PCI_PMCSR_STATE_D3);
  }
  #endif



hi stefan,

nice work! i can confirm it working on my box. :)
haven't spend any thoughts on it for quite a time, since it also worked
with your previous patches. but this seems more like the linux way,
using pci_set_powerstate.

however, there's still the following problem:
if wol is enabled via /etc/hostname.xl0 (by adding the wol keyword),
it's not possible to log into the system, since the error messages xl0:
transmission error: ff and xl0: command never completed are thrown
out all the time.

a workaround to enable wol during startup is using /etc/rc.local by
adding the line ifconfig xl0 wol.

anyway, thanks again for this quite nice solution. :)


cheers,

thomas



Re: wol for xl(4)

2011-06-27 Thread Thomas Gerlach
Tobias Ulmer tobiasu at tmux.org writes:

 
 I've lost track which patches need to be applied or not, but once a
 complete patch appears, I'm willing to test it on a machine that has
 three different xl's.
 
 


hi tobias,

sorry for any confusion. i think, the recent patches that should work are the
following:

Index: ic/xl.c
===
RCS file: /cvs/src/sys/dev/ic/xl.c,v
retrieving revision 1.101
diff -u -p -r1.101 xl.c
--- ic/xl.c 17 Apr 2011 20:52:43 - 1.101
+++ ic/xl.c 17 Jun 2011 21:38:21 -
@@ -2373,9 +2373,13 @@ xl_stop(struct xl_softc *sc)
  xl_freetxrx(sc);
 
 #ifndef SMALL_KERNEL
- /* Call upper layer WOL power routine if WOL is enabled. */
- if ((sc-xl_flags  XL_FLAG_WOL)  sc-wol_power)
+ /* Re-enable RX and call upper layer WOL power routine
+ * if WOL is enabled. */
+ if ((sc-xl_flags  XL_FLAG_WOL)  sc-wol_power) {
+ CSR_WRITE_2(sc, XL_COMMAND, XL_CMD_RX_ENABLE);
+ xl_wait(sc);
  sc-wol_power(sc-wol_power_arg);
+ }
 #endif
 }
 
@@ -2694,6 +2698,10 @@ xl_wol(struct ifnet *ifp, int enable)
  struct xl_softc *sc = ifp-if_softc;
 
  XL_SEL_WIN(7);
+
+ /* Clear any pending PME events. */
+ CSR_READ_2(sc, XL_W7_BM_PME);
+
  if (enable) {
  CSR_WRITE_2(sc, XL_W7_BM_PME, XL_BM_PME_MAGIC);
  sc-xl_flags |= XL_FLAG_WOL;

Index: pci/if_xl_pci.c
===
RCS file: /cvs/src/sys/dev/pci/if_xl_pci.c,v
retrieving revision 1.36
diff -u -p -r1.36 if_xl_pci.c
--- pci/if_xl_pci.c 17 Apr 2011 20:52:43 - 1.36
+++ pci/if_xl_pci.c 17 Jun 2011 21:33:35 -
@@ -266,18 +266,6 @@ xl_pci_attach(struct device *parent, str
  pci_conf_write(pc, pa-pa_tag, XL_PCI_LOMEM, mem);
  pci_conf_write(pc, pa-pa_tag, XL_PCI_INTLINE, irq);
  }
-
-#ifndef SMALL_KERNEL
- /* The card is WOL-capable if it supports PME# assertion
- * from D3hot power state. Install a callback to configure
- * PCI power state for WOL. It will be invoked when the
- * interface stops and WOL was enabled. */
- command = pci_conf_read(pc, pa-pa_tag, XL_PCI_PWRMGMTCAP);
- if (command  XL_PME_CAP_D3_HOT) {
- sc-wol_power = xl_pci_wol_power;
- sc-wol_power_arg = psc;
- }
-#endif
  }
 
  /*
@@ -335,6 +323,16 @@ xl_pci_attach(struct device *parent, str
  printf(: %s, intrstr);
 
  xl_attach(sc);
+
+#ifndef SMALL_KERNEL
+ /* If the card is WOL-capable install a callback to configure
+ * PCI power state for WOL. It will be invoked when the
+ * interface stops and WOL was enabled. */
+ if (sc-xl_caps  XL_CAPS_PWRMGMT) {
+ sc-wol_power = xl_pci_wol_power;
+ sc-wol_power_arg = psc;
+ }
+#endif
 }
 
 int 



Re: wol for xl(4)

2011-06-24 Thread Thomas Gerlach
On 06/22/2011 03:15 PM, Stefan Sperling wrote:
 On Wed, Jun 22, 2011 at 11:43:27AM +, Thomas Gerlach wrote:
 ...crap! sorry, something went wrong here. :(
 
 I'm not sure what you mean went wrong.
 
 But in an effort to try to wrap this up, can you please try -current
 with just this diff and report back if that works? Thanks!
 
 Index: xl.c
 ===
 RCS file: /cvs/src/sys/dev/ic/xl.c,v
 retrieving revision 1.101
 diff -u -p -r1.101 xl.c
 --- xl.c  17 Apr 2011 20:52:43 -  1.101
 +++ xl.c  22 Jun 2011 13:10:24 -
 @@ -2373,9 +2373,13 @@ xl_stop(struct xl_softc *sc)
   xl_freetxrx(sc);
  
  #ifndef SMALL_KERNEL
 - /* Call upper layer WOL power routine if WOL is enabled. */
 - if ((sc-xl_flags  XL_FLAG_WOL)  sc-wol_power)
 + /* Re-enable RX and call upper layer WOL power routine
 +  * if WOL is enabled. */
 + if ((sc-xl_flags  XL_FLAG_WOL)  sc-wol_power) {
 + CSR_WRITE_2(sc, XL_COMMAND, XL_CMD_RX_ENABLE);
 + xl_wait(sc);
   sc-wol_power(sc-wol_power_arg);
 + }
  #endif
  }
  


hi

for now i managed to solve the problem by adding the following line to
/etc/rc.local:

ifconfig if wol

instead of using /etc/hostname.if to enable wol.


this successfully enables wol during startup, without any error messages
(assuming the patches from stefan are applied, of course).

cheers,

thomas



Re: wol for xl(4)

2011-06-22 Thread Thomas Gerlach
For me it works as well. :)

Just two more little flaws:

1) If you configure WOL inside /etc/hostname.if, then you get the following
error message during booting:

xl0: command never completed!
xl0: transmission error: ff

and you're not able to login. the problem is:
xl_init is called first, which makes a call to xl_stop. and xl_stop calls
xl_pci_power, which tries to bring the IF into D3 powerstate. more precisely,
the pci_conf_write routine is not able to set the XL_PSTATE_D3 bit (however,
it can set the XL_PME_ENABLE bit. i checked by setting just one of them.)

the initial disable mechanism of xl_attach doesn't work, since xl_init is
called _before_ xl_attach.

2) it would be nice if we push the wol setting stuff inside ONE routine, rather
than spreading it over several ones (that is, all the CSR_WRITE stuff together
into xl_pci_power.

i'm currently working on it...but maybe, stefan might be faster than me again
(if he wants to...). ;)

cheers



Re: wol for xl(4)

2011-06-22 Thread Thomas Gerlach
as for the pulling toghether, i would suggest something like this (draft,
patches against latest -current files, _without_ stefan's recent patches):

# diff -u xl.c.orig xl.c  xl.c.patch1

--- xl.c.orig   Sun Apr 17 22:52:43 2011
+++ xl.cWed Jun 22 11:53:45 2011
@@ -2373,8 +2373,9 @@
xl_freetxrx(sc);
 
 #ifndef SMALL_KERNEL
-   /* Call upper layer WOL power routine if WOL is enabled. */
-   if ((sc-xl_flags  XL_FLAG_WOL)  sc-wol_power)
+   /* Re-enable RX and call upper layer WOL power routine
+* if WOL power callback is registered. */
+   if (sc-wol_power)
sc-wol_power(sc-wol_power_arg);
 #endif
 }
@@ -2646,6 +2647,7 @@
CSR_WRITE_2(sc, XL_W0_MFG_ID, XL_NO_XCVR_PWR_MAGICBITS);
}
 
+#if 1
 #ifndef SMALL_KERNEL
/* Check availability of WOL. */
if ((sc-xl_caps  XL_CAPS_PWRMGMT) != 0) {
@@ -2654,6 +2656,7 @@
xl_wol(ifp, 0);
}
 #endif
+#endif
 
/*
 * Call MI attach routines.
@@ -2693,12 +2696,9 @@
 {
struct xl_softc *sc = ifp-if_softc;
 
-   XL_SEL_WIN(7);
if (enable) {
-   CSR_WRITE_2(sc, XL_W7_BM_PME, XL_BM_PME_MAGIC);
sc-xl_flags |= XL_FLAG_WOL;
} else {
-   CSR_WRITE_2(sc, XL_W7_BM_PME, 0);
sc-xl_flags = ~XL_FLAG_WOL;
}
return (0); 


# diff -u if_xl_pci.c.orig if_xl_pci.c  if_xl_pci.c.patch1

--- if_xl_pci.c.origSun Apr 17 22:52:43 2011
+++ if_xl_pci.c Wed Jun 22 11:53:06 2011
@@ -266,18 +266,6 @@
pci_conf_write(pc, pa-pa_tag, XL_PCI_LOMEM, mem);
pci_conf_write(pc, pa-pa_tag, XL_PCI_INTLINE, irq);
}
-
-#ifndef SMALL_KERNEL
-   /* The card is WOL-capable if it supports PME# assertion
-* from D3hot power state. Install a callback to configure
-* PCI power state for WOL. It will be invoked when the
-* interface stops and WOL was enabled. */
-   command = pci_conf_read(pc, pa-pa_tag, XL_PCI_PWRMGMTCAP);
-   if (command  XL_PME_CAP_D3_HOT) {
-   sc-wol_power = xl_pci_wol_power;
-   sc-wol_power_arg = psc; 
-   }
-#endif
}
 
/*
@@ -335,6 +323,16 @@
printf(: %s, intrstr);
 
xl_attach(sc);
+
+#ifndef SMALL_KERNEL
+   /* If the card is WOL-capable install a callback to configure
+* PCI power state for WOL. It will be invoked when the
+* interface stops and WOL was enabled. */
+   if (sc-xl_caps  XL_CAPS_PWRMGMT) {
+   sc-wol_power = xl_pci_wol_power;
+   sc-wol_power_arg = psc; 
+   }
+#endif
 }
 
 int
@@ -367,6 +365,22 @@
 {
u_int32_t   command;
struct xl_pci_softc *psc = (struct xl_pci_softc*)ppsc;
+   struct xl_softc *sc = psc-psc_softc;
+
+   XL_SEL_WIN(7);
+
+   /* Clear any pending PME events. */
+   CSR_READ_2(sc, XL_W7_BM_PME);
+
+   /* If WOL flag is not set make sure PME is disabled, and
+* return without doing anything. */
+   if ((sc-xl_flags  XL_FLAG_WOL) == 0) {
+   CSR_WRITE_2(sc, XL_W7_BM_PME, 0);
+   return;
+   }
+
+   CSR_WRITE_2(sc, XL_W7_BM_PME, XL_BM_PME_MAGIC);
+   CSR_WRITE_2(sc, XL_COMMAND, XL_CMD_RX_ENABLE);
 
/* Make sure power management is enabled, and set the card into
 * D3hot power state so it stays active after system shutdown. */



Re: wol for xl(4)

2011-06-22 Thread Thomas Gerlach
Stefan Sperling stsp at stsp.name writes:

 
 Can you please clarify with which code exactly you're seeing this problem?
 What are you running?
 Does it happens with the if_xl_pci.c hunk of my proposed diff, or without it?
 Or does it always happen even in plain -current?
 

ok, of course.
1) everything works fine with your latest patches, if i manually do an
ifconfig xl0 wol.

2) now i'd like to set the interface stuff in /etc/hostname.xl0. therefore,
i go with inet 192.168.0.2 255.255.255.0 192.168.0.255 wol.
(re)booting then results in those error messages i presented before

now what i found out so far is, that the problem seems to be with the
pci_conf_write call inside xl_pci_power in if_xl_pci.c
both the XL_PME_EN and XL_PSTATE_D3 state are to be set. i narrowed it down to
that call by try and error. so when you disable pci_conf_write, the error
disappears (of course no WOL then).
the problem is setting the XL_PSTATE_D3 bit.

it think, the error appears, because xl_stop is called inside xl_init
(both in xl.c). and xl_init is called _before_ xl_attach inside
xl_pci_attach (if_xl_pci.c), so the xl_wol(ifp, 0) of xl_attach call to
clear WOL flag doesn't work. somehow, this flag is set, and that's why it goes
down all the chain and pci_conf_write is called. however, since the system is
trying to bring the IF up, there's a conflict b/w bringing up and D3 power
state.
at least that's what i think...

the error appears with your patches only. that is, because -current
(checkout from yesterday) still has

if_xl_pci.c:

 command = pci_conf_read(pc, pa-pa_tag, XL_PCI_PWRMGMTCAP);
 if (command  XL_PME_CAP_D3_HOT) {
   sc-wol_power = xl_pci_wol_power;
   sc-wol_power_arg = psc; 
 }

so it never comes to register xl_pci_wol_power.


 This doesn't sound like a good idea.
 The PCI-specific layer of XL and the low-level layer in ic/ have to
 cooperate. Else you'd have to call PCI-specific routines from the code
 in ic/ which harms use of this driver with other buses.
 
 

i see your point. just got the idea from FreeBSD, it seems less confusing. :)

hope, this clears up the problem i see?


cheers



Re: wol for xl(4)

2011-06-22 Thread Thomas Gerlach
...crap! sorry, something went wrong here. :(



Re: wol for xl(4)

2011-06-22 Thread Thomas Gerlach
Stefan Sperling stsp at stsp.name writes:

 
 On Wed, Jun 22, 2011 at 11:43:27AM +, Thomas Gerlach wrote:
  ...crap! sorry, something went wrong here. :(
 
 I'm not sure what you mean went wrong.
 
 But in an effort to try to wrap this up, can you please try -current
 with just this diff and report back if that works? Thanks!
 
 Index: xl.c
 ===
 RCS file: /cvs/src/sys/dev/ic/xl.c,v
 retrieving revision 1.101
 diff -u -p -r1.101 xl.c
 --- xl.c  17 Apr 2011 20:52:43 -  1.101
 +++ xl.c  22 Jun 2011 13:10:24 -
 @@ -2373,9 +2373,13 @@ xl_stop(struct xl_softc *sc)
   xl_freetxrx(sc);
 
  #ifndef SMALL_KERNEL
 - /* Call upper layer WOL power routine if WOL is enabled. */
 - if ((sc-xl_flags  XL_FLAG_WOL)  sc-wol_power)
 + /* Re-enable RX and call upper layer WOL power routine
 +  * if WOL is enabled. */
 + if ((sc-xl_flags  XL_FLAG_WOL)  sc-wol_power) {
 + CSR_WRITE_2(sc, XL_COMMAND, XL_CMD_RX_ENABLE);
 + xl_wait(sc);
   sc-wol_power(sc-wol_power_arg);
 + }
  #endif
  }
 
 


my email-client had a problm with sending the mail. it looked very crappy, i
guess. had nothing to do with the driver...

ok, i will test your patch, likely not before tomorrow morning.
but i guess, -current with only this patch won't enable WOL at all. as i
mentioned before, -current still has the test on XL_PME_CAP_D3_HOT in order
to register xl_pci_wol_power in file if_xl_pci.c. only your latest patch
tests on XL_CAPS_PWRMGMT.

but i will give it a shot, using both test versions. :)



Re: wol for xl(4)

2011-06-22 Thread Thomas Gerlach
 Stefan Sperling stsp at stsp.name writes:
  Index: xl.c
  ===
  RCS file: /cvs/src/sys/dev/ic/xl.c,v
  retrieving revision 1.101
  diff -u -p -r1.101 xl.c
  --- xl.c17 Apr 2011 20:52:43 -  1.101
  +++ xl.c22 Jun 2011 13:10:24 -
  @@ -2373,9 +2373,13 @@ xl_stop(struct xl_softc *sc)
  xl_freetxrx(sc);
  
   #ifndef SMALL_KERNEL
  -   /* Call upper layer WOL power routine if WOL is enabled. */
  -   if ((sc-xl_flags  XL_FLAG_WOL)  sc-wol_power)
  +   /* Re-enable RX and call upper layer WOL power routine
  +* if WOL is enabled. */
  +   if ((sc-xl_flags  XL_FLAG_WOL)  sc-wol_power) {
  +   CSR_WRITE_2(sc, XL_COMMAND, XL_CMD_RX_ENABLE);
  +   xl_wait(sc);
  sc-wol_power(sc-wol_power_arg);
  +   }
   #endif
   }
  
  

ok, i had to try...and it happens as i expected:

1) applying only the patch listed above, to -current, wol won't work, since
xl_pci_wol_power is not registered.

2) applying the patch to if_xl_pci.c you send me last weekend (with testing on
the XL_PME_CAPS_PWRMGMT bit), xl_pci_wol_power is registered, but the error
messages appear during the boot process...
of course only when adding wol keyword to /etc/hostname.xl0


regards...



Re: wol for xl(4)

2011-06-19 Thread Thomas Gerlach
Richard Toohey richardtoohey at paradise.net.nz writes:

 
 On 17/06/2011, at 8:40 PM, Thomas Gerlach wrote:
 
  hello,
 
  i just confirmed wol is working with freebsd 8.2 standard installation on
 my
  box. So it must be the openbsd xl driver, which isn't working properly.
  i will try to fix it starting next week. :)
 
 
  cheers,
 
  thomas
 
 Hi, Thomas.
 
 This is the same point I reached with Stefan.
 
 http://marc.info/?l=openbsd-techm=130337513320970w=2
 
 I didn't have the coding smarts to progress any further ...
 
 Thanks.
 
 

hey guys,

i just had a look into the driver again, and i was able to get wol working now.
:)

basically, the missing point was to enable RX again. it is disabled in the
xl_stop routine (xl.c).
right now it's just a quick hack, and i will provide you with the patches, so
you can test it on your box.

i will attach them asap.


cheers,

thomas



Re: wol for xl(4)

2011-06-19 Thread Thomas Gerlach
Stefan Sperling stsp at stsp.name writes:

hi stefan,

oh, sorry, no. i just got back from the german southside festival this evening.
should explain why i missed it... ;)

seems you came to the same conclusion. fine. :) so i will test it then...



Re: wol for xl(4)

2011-06-19 Thread Thomas Gerlach
Stefan Sperling stsp at stsp.name writes:

 It would be interesting to know if just the first hunk, which
 re-enables RX, is enough.
 
 I don't have working xl wol hardware, so what I did was compare
 our driver to the FreeBSD driver taking blind guesses as to what
 could be wrong.
 
 So the diff I sent may be larger than needed.
 If you could help trim down the diff to the absolute minimum needed
 based on testing with hardware that would be great. Cheers!
 
 

I did exactly the same, I compared it to the FreeBSD driver. And I also
cleared the PME events by using CSR_READ_2. I think we're on the safe side if
we keep it.

Maybe we can omit the xl_wait(sc) calls, at least I don't see it in the
FreeBSD driver.


Regards...



Re: wol for xl(4)

2011-06-17 Thread Thomas Gerlach
hello,

i just confirmed wol is working with freebsd 8.2 standard installation on my
box. So it must be the openbsd xl driver, which isn't working properly.
i will try to fix it starting next week. :)


cheers,

thomas



Re: wol for xl(4)

2011-06-14 Thread Thomas Gerlach
Stefan Sperling stsp at openbsd.org writes:

 
 This is an attempt to add wol support to xl(4).
 
 Unfortunately, while I have an xl(4) card to test with none of the
 motherboards I have will do WOL with it since they all lack an
 on-board WOL connector :(
 
 So test reports are needed.
 Please also check whether WOL is disabled by default.
 

hi
i have an old ASUS A7N8X DELUXE Rev.2 motherboard with an on-board 3Com
3C920B-EMB NIC. i'm running the latest -current.
i tried wol, but it won't work with openbsd (although it works perfectly with
gentoo on the same box).

i had a look into the driver, and tried several approaches, none successful so
far.

1) first, the driver never put the NIC into D3 power state, since the test on
PXL_PME_CAP_D3_HOT was negative. 

---
if_xl_pci.c
if (command  XL_PME_CAP_D3_HOT) {
sc-wol_power = xl_pci_wol_power;
sc-wol_power_arg = psc; 
}
---

so i simply disabled the if above.
= xl_pci_wol_power is called now on shutdown.

2) next i had a look into xl_pci_wol_power. i realized that it does the power
state switch differently from the linux driver. thus, i tried to use
pci_set_powerstate (with proper arguments) instead. i took if_sf_pci.c as
an example (there you can see how pci_set_powerstate must be called).
= unfortunately no effect either.

3) i compared the register window write calls to that of the linux driver (set
win 5 / 7, set and enable rx filter with flags to accept broadcast frames,
etc.). i found nothing wrong about that. the only thing that IMO is different,
is that while the openbsd driver does all those things in different functions,
the linux driver does all within acpi_set_WOL.

4) a note on setting the rx filter (grep on rxfilt): the xl driver does this in
iff_905x (?) (sorry, don't have the sources available right now...) in file
xl.c. i checked and by default, this routine is never called in my case. thus,
i put the rxfilt-code into xl_wol (xl.c) right into the if (enable)
block...
= again no functional WOL...

i hope this helps, i will investigate further.
if you need any more specific detail, please let me know!


cheers,

thomas