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