diff options
author | Wei Yang <w90p710@gmail.com> | 2012-07-24 22:13:59 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-07-25 18:24:13 -0400 |
commit | 6d8d2dd8ad92ec89f540e73b7a46c5835a7a06a6 (patch) | |
tree | f28674234bae0bfb9c6da669a3f85fb9abe6cafb /drivers/net | |
parent | eabfbe6230ee7363681e7a561948d362b87169f0 (diff) |
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>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_ethtool.c | 1 | ||||
-rw-r--r-- | drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_ethtool.c b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_ethtool.c index 9dbf38c10a68..24b787be6062 100644 --- a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_ethtool.c +++ b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_ethtool.c | |||
@@ -129,7 +129,6 @@ static int pch_gbe_set_settings(struct net_device *netdev, | |||
129 | hw->mac.link_duplex = ecmd->duplex; | 129 | hw->mac.link_duplex = ecmd->duplex; |
130 | hw->phy.autoneg_advertised = ecmd->advertising; | 130 | hw->phy.autoneg_advertised = ecmd->advertising; |
131 | hw->mac.autoneg = ecmd->autoneg; | 131 | hw->mac.autoneg = ecmd->autoneg; |
132 | pch_gbe_hal_phy_sw_reset(hw); | ||
133 | 132 | ||
134 | /* reset the link */ | 133 | /* reset the link */ |
135 | if (netif_running(adapter->netdev)) { | 134 | if (netif_running(adapter->netdev)) { |
diff --git a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c index b1006563f736..8e0e5f0fb4fd 100644 --- a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c +++ b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c | |||
@@ -1988,6 +1988,7 @@ int pch_gbe_up(struct pch_gbe_adapter *adapter) | |||
1988 | void pch_gbe_down(struct pch_gbe_adapter *adapter) | 1988 | void pch_gbe_down(struct pch_gbe_adapter *adapter) |
1989 | { | 1989 | { |
1990 | struct net_device *netdev = adapter->netdev; | 1990 | struct net_device *netdev = adapter->netdev; |
1991 | struct pci_dev *pdev = adapter->pdev; | ||
1991 | struct pch_gbe_rx_ring *rx_ring = adapter->rx_ring; | 1992 | struct pch_gbe_rx_ring *rx_ring = adapter->rx_ring; |
1992 | 1993 | ||
1993 | /* signal that we're down so the interrupt handler does not | 1994 | /* signal that we're down so the interrupt handler does not |
@@ -2004,7 +2005,8 @@ void pch_gbe_down(struct pch_gbe_adapter *adapter) | |||
2004 | netif_carrier_off(netdev); | 2005 | netif_carrier_off(netdev); |
2005 | netif_stop_queue(netdev); | 2006 | netif_stop_queue(netdev); |
2006 | 2007 | ||
2007 | pch_gbe_reset(adapter); | 2008 | if ((pdev->error_state) && (pdev->error_state != pci_channel_io_normal)) |
2009 | pch_gbe_reset(adapter); | ||
2008 | pch_gbe_clean_tx_ring(adapter, adapter->tx_ring); | 2010 | pch_gbe_clean_tx_ring(adapter, adapter->tx_ring); |
2009 | pch_gbe_clean_rx_ring(adapter, adapter->rx_ring); | 2011 | pch_gbe_clean_rx_ring(adapter, adapter->rx_ring); |
2010 | 2012 | ||