e1000: fix power down of fiber serdes link

When stopping interface, only shutdown method for copper cable was called.

Signed-off-by: Shelton Chia <jiaxt@sinogrid.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
This commit is contained in:
Shelton Chia 2015-03-07 11:57:38 +08:00 committed by Thomas Monjalon
parent 880dcec287
commit 74144773b9

View File

@ -945,7 +945,10 @@ eth_igb_stop(struct rte_eth_dev *dev)
}
/* Power down the phy. Needed to make the link go Down */
e1000_power_down_phy(hw);
if (hw->phy.media_type == e1000_media_type_copper)
e1000_power_down_phy(hw);
else
e1000_shutdown_fiber_serdes_link(hw);
igb_dev_clear_queues(dev);