test patch, sungem wake-on-lan for 2.6.9+sleep
Subsystems (4)
Colin Leroy
maintainerPATCH 1/1 test patch, sungem wake-on-lan for 2.6.9+sleep
Hi,
this patch is a port of Ben's sungem WOL patch that applies on top of 2.6.9 + Ben's sleep patch. It also has 2.6.10-rc2's therm_adt746x.
hth
Signature · 1 line
Colin
arch/ppc/platforms/pmac_feature.c +4 -1
@@ -1688,8 +1688,11 @@*/ save_unin_clock_ctl =UN_IN (UNI_N_CLOCK_CNTL ); +/* Note: do not switch GMAC off, driver does it when necessary, WOL must keep it +* enabled ! +*/ UN_OUT (UNI_N_CLOCK_CNTL , save_unin_clock_ctl & - ~(UNI_N_CLOCK_CNTL_GMAC |UNI_N_CLOCK_CNTL_FW /*|UNI_N_CLOCK_CNTL_PCI*/ )); + ~(/*UNI_N_CLOCK_CNTL_GMAC|*/ UNI_N_CLOCK_CNTL_FW /*|UNI_N_CLOCK_CNTL_PCI*/ ));udelay (100 );UN_OUT (UNI_N_HWINIT_STATE ,UNI_N_HWINIT_STATE_SLEEPING );UN_OUT (UNI_N_POWER_MGT ,UNI_N_POWER_MGT_SLEEP );
drivers/macintosh/therm_adt746x.c +160 -111
400 lines not on this page · raw message
drivers/net/sungem.c +537 -439
1,434 lines not on this page · raw message
drivers/net/sungem.h +40 -4
69 lines not on this page · raw message
drivers/net/sungem_phy.c +10 -19
@@ -98,25 +98,15 @@ data &= ~MII_BCM5201_MULTIPHY_SUPERISOLATE ;phy_write (phy,MII_BCM5201_MULTIPHY , data); +phy_write (phy,MII_BCM5201_INTERRUPT ,0 ); +return 0 ; } -static int bcm5201_suspend (struct mii_phy * phy,int wol_options) +static int bcm5201_suspend (struct mii_phy * phy) { -if (!wol_options) -phy_write (phy,MII_BCM5201_INTERRUPT ,0 ); - -/* Here's a strange hack used by both MacOS 9 and X */ -phy_write (phy,MII_LPA ,phy_read (phy,MII_LPA )); - -if (!wol_options) { -#if 0 /* Commented out in Darwin... someone has those dawn docs ? */ - u16 val = phy_read(phy, MII_BCM5201_AUXMODE2) -phy_write (phy,MII_BCM5201_AUXMODE2 , - val & ~MII_BCM5201_AUXMODE2_LOWPOWER ); -#endif -phy_write (phy,MII_BCM5201_MULTIPHY ,MII_BCM5201_MULTIPHY_SUPERISOLATE ); - } +phy_write (phy,MII_BCM5201_INTERRUPT ,0 ); +phy_write (phy,MII_BCM5201_MULTIPHY ,MII_BCM5201_MULTIPHY_SUPERISOLATE );return 0 ; }
@@ -144,9 +134,10 @@return 0 ; } -static int bcm5221_suspend (struct mii_phy * phy,int wol_options) +static int bcm5221_suspend (struct mii_phy * phy) {u16 data; + data =phy_read (phy,MII_BCM5221_TEST );phy_write (phy,MII_BCM5221_TEST , data |MII_BCM5221_TEST_ENABLE_SHADOWS );
@@ -187,7 +178,7 @@return 0 ; } -static int bcm5400_suspend (struct mii_phy * phy,int wol_options) +static int bcm5400_suspend (struct mii_phy * phy) {#if 0 /* Commented out in Darwin... someone has those dawn docs ? */ phy_write (phy,MII_BMCR ,BMCR_PDOWN );
@@ -243,7 +234,7 @@return 0 ; } -static int bcm5401_suspend (struct mii_phy * phy,int wol_options) +static int bcm5401_suspend (struct mii_phy * phy) {#if 0 /* Commented out in Darwin... someone has those dawn docs ? */ phy_write (phy,MII_BMCR ,BMCR_PDOWN );
@@ -280,7 +271,7 @@return 0 ; } -static int bcm5411_suspend (struct mii_phy * phy,int wol_options) +static int bcm5411_suspend (struct mii_phy * phy) {phy_write (phy,MII_BMCR ,BMCR_PDOWN );
drivers/net/sungem_phy.h +1 -1
@@ -7,7 +7,7 @@struct mii_phy_ops {int (*init)(struct mii_phy *phy); -int (*suspend)(struct mii_phy *phy,int wol_options); +int (*suspend)(struct mii_phy *phy);int (*setup_aneg)(struct mii_phy *phy,u32 advertise);int (*setup_forced)(struct mii_phy *phy,int speed,int fd);int (*poll_link)(struct mii_phy *phy);