Il giorno 29/gen/06, alle ore 20:36, Lennert Buytenhek ha scritto:

On Sun, Jan 29, 2006 at 06:54:54PM +0100, Daniele Venzano wrote:

+       if (wol->wolopts == 0) {
+               pci_read_config_dword(sis_priv->pci_dev, CFGPMCSR,
&cfgpmcsr);
+               cfgpmcsr |= ~PME_EN;

"cfgpmcsr &= ~PME_EN;"  ?

Since cfgpmcsr is initialized as 0 I don't think this is a problem.

Instead of turning the PME_EN bit off, you are turning every bit other
than PME_EN on, which means that once you turn on WOL, you won't be able
to turn it off again.. so let's fix it anyway?
Yes, you're right. CCed to Jeff for inclusion

Fix register setting bug that prevented turning off of WoL features in the sis900 driver.

Signed-off-by: Lennert Buytenhek <[EMAIL PROTECTED]>
Signed-off-by: Daniele Venzano <[EMAIL PROTECTED]>

--- linux-2.6.16-rc1/drivers/net/sis900.c.orig 2006-01-29 20:35:19.000000000 +0100 +++ linux-2.6.16-rc1/drivers/net/sis900.c 2006-01-29 20:34:52.000000000 +0100
@@ -2040,7 +2040,7 @@

        if (wol->wolopts == 0) {
                pci_read_config_dword(sis_priv->pci_dev, CFGPMCSR, &cfgpmcsr);
-               cfgpmcsr |= ~PME_EN;
+               cfgpmcsr &= ~PME_EN;
                pci_write_config_dword(sis_priv->pci_dev, CFGPMCSR, cfgpmcsr);
                outl(pmctrl_bits, pmctrl_addr);
                if (netif_msg_wol(sis_priv))

--
Daniele Venzano
http://www.brownhat.org

-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to