|
@@ -4663,6 +4663,7 @@ static void e1000_phy_read_status(struct e1000_adapter *adapter)
|
|
|
(adapter->hw.phy.media_type == e1000_media_type_copper)) {
|
|
|
int ret_val;
|
|
|
|
|
|
+ pm_runtime_get_sync(&adapter->pdev->dev);
|
|
|
ret_val = e1e_rphy(hw, MII_BMCR, &phy->bmcr);
|
|
|
ret_val |= e1e_rphy(hw, MII_BMSR, &phy->bmsr);
|
|
|
ret_val |= e1e_rphy(hw, MII_ADVERTISE, &phy->advertise);
|
|
@@ -4673,6 +4674,7 @@ static void e1000_phy_read_status(struct e1000_adapter *adapter)
|
|
|
ret_val |= e1e_rphy(hw, MII_ESTATUS, &phy->estatus);
|
|
|
if (ret_val)
|
|
|
e_warn("Error reading PHY register\n");
|
|
|
+ pm_runtime_put_sync(&adapter->pdev->dev);
|
|
|
} else {
|
|
|
/* Do not read PHY registers if link is not up
|
|
|
* Set values to typical power-on defaults
|