Add a function to report PCI-E link power saving mode status

Signed-off-by: Mallikarjuna R Chilakala <[EMAIL PROTECTED]>
Signed-off-by: Ganesh Venkatesan <[EMAIL PROTECTED]>
Signed-off-by: John Ronciak <[EMAIL PROTECTED]>

diff -up netdev-2.6/drivers/net/e1000/e1000_hw.c 
netdev-2.6.new/drivers/net/e1000/e1000_hw.c
--- netdev-2.6/drivers/net/e1000/e1000_hw.c     2005-08-04 17:44:43.000000000 
-0700
+++ netdev-2.6.new/drivers/net/e1000/e1000_hw.c 2005-08-04 17:44:45.000000000 
-0700
@@ -6773,3 +6773,26 @@ e1000_arc_subsystem_valid(struct e1000_h
 
 
 
+int32_t
+e1000_phy_misctst_get_info(struct e1000_hw *hw, uint16_t *enabled)
+{
+    int32_t ret_val;
+    uint16_t misctst_reg;
+
+    DEBUGFUNC("e1000_phy_misctst_get_info");
+
+    ret_val = e1000_read_phy_reg(hw, 0x0FF0, &misctst_reg);
+    if (ret_val)
+        return ret_val;
+
+    if (misctst_reg & 0x0002) {
+        DEBUGOUT("L1 ASPM disabled");
+        *enabled = FALSE;
+    } else {
+        DEBUGOUT("L1 ASPM enabled");
+        *enabled = TRUE;
+    }
+
+    return E1000_SUCCESS;
+}
+
diff -up netdev-2.6/drivers/net/e1000/e1000_hw.h 
netdev-2.6.new/drivers/net/e1000/e1000_hw.h
--- netdev-2.6/drivers/net/e1000/e1000_hw.h     2005-08-04 17:44:43.000000000 
-0700
+++ netdev-2.6.new/drivers/net/e1000/e1000_hw.h 2005-08-04 17:44:45.000000000 
-0700
@@ -311,6 +311,7 @@ int32_t e1000_get_cable_length(struct e1
 int32_t e1000_check_polarity(struct e1000_hw *hw, uint16_t *polarity);
 int32_t e1000_check_downshift(struct e1000_hw *hw);
 int32_t e1000_validate_mdi_setting(struct e1000_hw *hw);
+int32_t e1000_phy_misctst_get_info(struct e1000_hw *hw, uint16_t *enabled);
 
 /* EEPROM Functions */
 int32_t e1000_init_eeprom_params(struct e1000_hw *hw);
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to