aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/atlx
diff options
context:
space:
mode:
authorJay Cliburn <jacliburn@bellsouth.net>2008-05-09 23:12:06 -0400
committerJeff Garzik <jgarzik@redhat.com>2008-05-13 01:30:23 -0400
commitff772b27e5f65c1a186e9f0741f0d00ef7002799 (patch)
treeb6b14b9f4900ba8121af9f7ac81807822e6b7268 /drivers/net/atlx
parentf403ede70518c131ba8bebbacaf182927a58a315 (diff)
atl1: add PHY power save mode
Using vendor-provided magic, add code to enter power save mode on the PHY. We'll need this for suspend and wake-on-lan. Signed-off-by: Jay Cliburn <jacliburn@bellsouth.net> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/net/atlx')
-rw-r--r--drivers/net/atlx/atl1.c19
-rw-r--r--drivers/net/atlx/atlx.h3
2 files changed, 11 insertions, 11 deletions
diff --git a/drivers/net/atlx/atl1.c b/drivers/net/atlx/atl1.c
index 0afe522b8f7..3beb44e80ba 100644
--- a/drivers/net/atlx/atl1.c
+++ b/drivers/net/atlx/atl1.c
@@ -638,21 +638,18 @@ static s32 atl1_phy_leave_power_saving(struct atl1_hw *hw)
638} 638}
639 639
640/* 640/*
641 *TODO: do something or get rid of this 641 * Force the PHY into power saving mode using vendor magic.
642 */ 642 */
643#ifdef CONFIG_PM 643#ifdef CONFIG_PM
644static s32 atl1_phy_enter_power_saving(struct atl1_hw *hw) 644static void atl1_phy_enter_power_saving(struct atl1_hw *hw)
645{ 645{
646/* s32 ret_val; 646 atl1_write_phy_reg(hw, MII_DBG_ADDR, 0);
647 * u16 phy_data; 647 atl1_write_phy_reg(hw, MII_DBG_DATA, 0x124E);
648 */ 648 atl1_write_phy_reg(hw, MII_DBG_ADDR, 2);
649 atl1_write_phy_reg(hw, MII_DBG_DATA, 0x3000);
650 atl1_write_phy_reg(hw, MII_DBG_ADDR, 3);
651 atl1_write_phy_reg(hw, MII_DBG_DATA, 0);
649 652
650/*
651 ret_val = atl1_write_phy_reg(hw, ...);
652 ret_val = atl1_write_phy_reg(hw, ...);
653 ....
654*/
655 return 0;
656} 653}
657#endif 654#endif
658 655
diff --git a/drivers/net/atlx/atlx.h b/drivers/net/atlx/atlx.h
index 3be7c09734d..96721881ad6 100644
--- a/drivers/net/atlx/atlx.h
+++ b/drivers/net/atlx/atlx.h
@@ -460,6 +460,9 @@ MODULE_VERSION(ATLX_DRIVER_VERSION);
460#define MII_ATLX_PSSR_100MBS 0x4000 /* 01=100Mbs */ 460#define MII_ATLX_PSSR_100MBS 0x4000 /* 01=100Mbs */
461#define MII_ATLX_PSSR_1000MBS 0x8000 /* 10=1000Mbs */ 461#define MII_ATLX_PSSR_1000MBS 0x8000 /* 10=1000Mbs */
462 462
463#define MII_DBG_ADDR 0x1D
464#define MII_DBG_DATA 0x1E
465
463/* PCI Command Register Bit Definitions */ 466/* PCI Command Register Bit Definitions */
464#define PCI_REG_COMMAND 0x04 /* PCI Command Register */ 467#define PCI_REG_COMMAND 0x04 /* PCI Command Register */
465#define CMD_IO_SPACE 0x0001 468#define CMD_IO_SPACE 0x0001