aboutsummaryrefslogtreecommitdiff
path: root/drivers/staging/et131x
diff options
context:
space:
mode:
authorAlan Cox <alan@linux.intel.com>2011-02-01 15:41:58 +0000
committerGreg Kroah-Hartman <gregkh@suse.de>2011-02-04 13:01:01 -0800
commit64b728319bed41ef14462a1a504c65656e5a50a4 (patch)
tree3729a71dcf1101667a264b7df8917a549be6766e /drivers/staging/et131x
parentae3a08aab5e0700d3f80162bed07a2157bd304f4 (diff)
staging: et131x: Clean up the phy coma stuff
Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/et131x')
-rw-r--r--drivers/staging/et131x/et1310_phy.c4
-rw-r--r--drivers/staging/et131x/et1310_pm.c8
-rw-r--r--drivers/staging/et131x/et131x_adapter.h27
-rw-r--r--drivers/staging/et131x/et131x_initpci.c8
4 files changed, 23 insertions, 24 deletions
diff --git a/drivers/staging/et131x/et1310_phy.c b/drivers/staging/et131x/et1310_phy.c
index 5eab21ac00f4..a0ec75ed90e1 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 2b6b29548656..2bc19448d2e2 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 430947b39673..025d4c40a18e 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 4d13e7fdfa61..50237acd6985 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
*