net/pch_gpe: Cannot disable ethernet autonegation
When attempting to disable ethernet autonegation via ethtool, the pch_gpe driver will set software reset bit of PHY chip, But control register of PHY chip of FRI2 will reenable ethernet autonegation. Signed-off-by: Wei Yang <w90p710@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
eabfbe6230
commit
6d8d2dd8ad
|
@ -129,7 +129,6 @@ static int pch_gbe_set_settings(struct net_device *netdev,
|
||||||
hw->mac.link_duplex = ecmd->duplex;
|
hw->mac.link_duplex = ecmd->duplex;
|
||||||
hw->phy.autoneg_advertised = ecmd->advertising;
|
hw->phy.autoneg_advertised = ecmd->advertising;
|
||||||
hw->mac.autoneg = ecmd->autoneg;
|
hw->mac.autoneg = ecmd->autoneg;
|
||||||
pch_gbe_hal_phy_sw_reset(hw);
|
|
||||||
|
|
||||||
/* reset the link */
|
/* reset the link */
|
||||||
if (netif_running(adapter->netdev)) {
|
if (netif_running(adapter->netdev)) {
|
||||||
|
|
|
@ -1988,6 +1988,7 @@ int pch_gbe_up(struct pch_gbe_adapter *adapter)
|
||||||
void pch_gbe_down(struct pch_gbe_adapter *adapter)
|
void pch_gbe_down(struct pch_gbe_adapter *adapter)
|
||||||
{
|
{
|
||||||
struct net_device *netdev = adapter->netdev;
|
struct net_device *netdev = adapter->netdev;
|
||||||
|
struct pci_dev *pdev = adapter->pdev;
|
||||||
struct pch_gbe_rx_ring *rx_ring = adapter->rx_ring;
|
struct pch_gbe_rx_ring *rx_ring = adapter->rx_ring;
|
||||||
|
|
||||||
/* signal that we're down so the interrupt handler does not
|
/* signal that we're down so the interrupt handler does not
|
||||||
|
@ -2004,6 +2005,7 @@ void pch_gbe_down(struct pch_gbe_adapter *adapter)
|
||||||
netif_carrier_off(netdev);
|
netif_carrier_off(netdev);
|
||||||
netif_stop_queue(netdev);
|
netif_stop_queue(netdev);
|
||||||
|
|
||||||
|
if ((pdev->error_state) && (pdev->error_state != pci_channel_io_normal))
|
||||||
pch_gbe_reset(adapter);
|
pch_gbe_reset(adapter);
|
||||||
pch_gbe_clean_tx_ring(adapter, adapter->tx_ring);
|
pch_gbe_clean_tx_ring(adapter, adapter->tx_ring);
|
||||||
pch_gbe_clean_rx_ring(adapter, adapter->rx_ring);
|
pch_gbe_clean_rx_ring(adapter, adapter->rx_ring);
|
||||||
|
|
Loading…
Reference in a new issue