From: Alan Cox <alan@xxxxxxxxxxxxxxx> Signed-off-by: Alan Cox <alan@xxxxxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx> --- drivers/staging/et131x/et1310_phy.c | 4 ++-- drivers/staging/et131x/et1310_pm.c | 8 ++++---- drivers/staging/et131x/et131x_adapter.h | 27 +++++++++++++-------------- drivers/staging/et131x/et131x_initpci.c | 8 ++++---- 4 files changed, 23 insertions(+), 24 deletions(-) diff --git a/drivers/staging/et131x/et1310_phy.c b/drivers/staging/et131x/et1310_phy.c index 5eab21a..a0ec75e 100644 --- a/drivers/staging/et131x/et1310_phy.c +++ b/drivers/staging/et131x/et1310_phy.c @@ -740,7 +740,7 @@ void et131x_Mii_check(struct et131x_adapter *etdev, if (bmsr_ints.bits.link_status) { if (bmsr.bits.link_status) { - etdev->PoMgmt.TransPhyComaModeOnBoot = 20; + etdev->boot_coma = 20; /* Update our state variables and indicate the * connected state @@ -831,7 +831,7 @@ void et131x_Mii_check(struct et131x_adapter *etdev, etdev->linkspeed = speed; etdev->duplex_mode = duplex; - etdev->PoMgmt.TransPhyComaModeOnBoot = 20; + etdev->boot_coma = 20; if (etdev->linkspeed == TRUEPHY_SPEED_10MBPS) { /* diff --git a/drivers/staging/et131x/et1310_pm.c b/drivers/staging/et131x/et1310_pm.c index 2b6b295..2bc1944 100644 --- a/drivers/staging/et131x/et1310_pm.c +++ b/drivers/staging/et131x/et1310_pm.c @@ -116,8 +116,8 @@ void EnablePhyComa(struct et131x_adapter *etdev) /* Save the GbE PHY speed and duplex modes. Need to restore this * when cable is plugged back in */ - etdev->PoMgmt.PowerDownSpeed = etdev->AiForceSpeed; - etdev->PoMgmt.PowerDownDuplex = etdev->AiForceDpx; + etdev->pdown_speed = etdev->AiForceSpeed; + etdev->pdown_duplex = etdev->AiForceDpx; /* Stop sending packets. */ spin_lock_irqsave(&etdev->send_hw_lock, flags); @@ -153,8 +153,8 @@ void DisablePhyComa(struct et131x_adapter *etdev) /* Restore the GbE PHY speed and duplex modes; * Reset JAGCore; re-configure and initialize JAGCore and gigE PHY */ - etdev->AiForceSpeed = etdev->PoMgmt.PowerDownSpeed; - etdev->AiForceDpx = etdev->PoMgmt.PowerDownDuplex; + etdev->AiForceSpeed = etdev->pdown_speed; + etdev->AiForceDpx = etdev->pdown_duplex; /* Re-initialize the send structures */ et131x_init_send(etdev); diff --git a/drivers/staging/et131x/et131x_adapter.h b/drivers/staging/et131x/et131x_adapter.h index 430947b..025d4c4 100644 --- a/drivers/staging/et131x/et131x_adapter.h +++ b/drivers/staging/et131x/et131x_adapter.h @@ -145,19 +145,6 @@ typedef struct _ce_stats_t { u32 InterruptStatus; } CE_STATS_t, *PCE_STATS_t; -typedef struct _MP_POWER_MGMT { - /* variable putting the phy into coma mode when boot up with no cable - * plugged in after 5 seconds - */ - u8 TransPhyComaModeOnBoot; - - /* Next two used to save power information at power down. This - * information will be used during power up to set up parts of Power - * Management in JAGCore - */ - u16 PowerDownSpeed; - u8 PowerDownDuplex; -} MP_POWER_MGMT, *PMP_POWER_MGMT; /* The private adapter structure */ struct et131x_adapter { @@ -223,7 +210,19 @@ struct et131x_adapter { /* Minimize init-time */ struct timer_list ErrorTimer; - MP_POWER_MGMT PoMgmt; + + /* variable putting the phy into coma mode when boot up with no cable + * plugged in after 5 seconds + */ + u8 boot_coma; + + /* Next two used to save power information at power down. This + * information will be used during power up to set up parts of Power + * Management in JAGCore + */ + u16 pdown_speed; + u8 pdown_duplex; + u32 CachedMaskValue; /* Xcvr status at last poll */ diff --git a/drivers/staging/et131x/et131x_initpci.c b/drivers/staging/et131x/et131x_initpci.c index 4d13e7f..50237ac 100644 --- a/drivers/staging/et131x/et131x_initpci.c +++ b/drivers/staging/et131x/et131x_initpci.c @@ -276,11 +276,11 @@ void et131x_error_timer_handler(unsigned long data) if (!etdev->Bmsr.bits.link_status && etdev->RegistryPhyComa && - etdev->PoMgmt.TransPhyComaModeOnBoot < 11) { - etdev->PoMgmt.TransPhyComaModeOnBoot++; + etdev->boot_coma < 11) { + etdev->boot_coma++; } - if (etdev->PoMgmt.TransPhyComaModeOnBoot == 10) { + if (etdev->boot_coma == 10) { if (!etdev->Bmsr.bits.link_status && etdev->RegistryPhyComa) { if ((pm_csr & ET_PM_PHY_SW_COMA) == 0) { @@ -728,7 +728,7 @@ static int __devinit et131x_pci_setup(struct pci_dev *pdev, /* Initialize variable for counting how long we do not have link status */ - adapter->PoMgmt.TransPhyComaModeOnBoot = 0; + adapter->boot_coma = 0; /* We can enable interrupts now * -- 1.7.4.1 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/devel