]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
staging: et131x: Clean up the phy coma stuff
authorAlan Cox <alan@linux.intel.com>
Tue, 1 Feb 2011 15:41:58 +0000 (15:41 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 4 Feb 2011 21:01:01 +0000 (13:01 -0800)
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/et131x/et1310_phy.c
drivers/staging/et131x/et1310_pm.c
drivers/staging/et131x/et131x_adapter.h
drivers/staging/et131x/et131x_initpci.c

index 5eab21ac00f44dcd4a78edafe364287134ba07c3..a0ec75ed90e1c0a86889cfe6058b1a82f8a503c7 100644 (file)
@@ -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) {
                                /*
index 2b6b295486569407896c4ff61946ad986a37ab59..2bc19448d2e21b10ed326c559aff0ef3ccf01024 100644 (file)
@@ -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);
index 430947b396730d0f2a3669424efccb9adc67f873..025d4c40a18ea161a08aa751c06a78f2d0872a8d 100644 (file)
@@ -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 */
index 4d13e7fdfa6101baaec32ef422de1585e5180eaa..50237acd6985f4f905e034b375a7dab008df5a52 100644 (file)
@@ -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
         *