lkml.org 
[lkml]   [2006]   [Feb]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
SubjectRe: [PATCH] Add Wake on LAN support to sis900 (2)
Date
Attached you find the patch that fixes two bugs in the WoL  
implementation of sis900. The first causes hangs on some system on
driver load, the second causes troubles when disabling WoL support.
Both fixes are one liner and really simple. Patch is against latest
netdev-2.6 tree.

Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Daniele Venzano <venza@brownhat.org>

--- new/drivers/net/sis900.c.old 2006-02-24 10:46:06.000000000 +0100
+++ new/drivers/net/sis900.c 2006-02-24 09:57:57.000000000 +0100
@@ -540,7 +540,7 @@ static int __devinit sis900_probe(struct
printk("%2.2x.\n", net_dev->dev_addr[i]);

/* Detect Wake on Lan support */
- ret = inl(CFGPMC & PMESP);
+ ret = (inl(net_dev->base_addr + CFGPMC) & PMESP) >> 27;
if (netif_msg_probe(sis_priv) && (ret & PME_D3C) == 0)
printk(KERN_INFO "%s: Wake on LAN only available from suspend to RAM.", net_dev->name);

@@ -2040,7 +2040,7 @@ static int sis900_set_wol(struct net_dev

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))
\
 
 \ /
  Last update: 2006-02-24 11:06    [W:0.058 / U:0.908 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site