summaryrefslogtreecommitdiff
path: root/drivers/staging/octeon/octeon-ethernet.h
diff options
context:
space:
mode:
authorAaro Koskinen <aaro.koskinen@iki.fi>2016-02-11 23:02:26 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-02-12 03:40:02 (GMT)
commit710086dbbbeb8ac22dc04ad5c9426b8cabac735c (patch)
treee07d879a91a49d0653ed61f60a66b791c346f735 /drivers/staging/octeon/octeon-ethernet.h
parent1d5047c981f2e5a0fe6003c98b9c742c349d75a3 (diff)
downloadlinux-710086dbbbeb8ac22dc04ad5c9426b8cabac735c.tar.xz
staging: octeon: refactor rgmii 10 mbps preamble error checking
Refactor RGMII 10 Mbps preamble error checking. The current implementation does not work correctly in phydev mode since only the link status changes trigger the callback, and if we stay on 10 Mbps operation the periodic checks for error counters are never done. Provide a periodic worker also during the phydev operation, and notify the link status changes through the phydev instead of the inband status change interrupt. This also has the benefit that we don't need to use legacy CVMX MDIO calls to check the PHY state, and we can avoid races that trigger bogus "Using 10Mbps with software preamble removal" logs when interfaces are being bringed up. It also avoids some corner-case crashes when the in-band interrupt triggers while the interface is being taken down. Tested on EdgeRouter Lite & D-Link DSR-1000N. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/octeon/octeon-ethernet.h')
-rw-r--r--drivers/staging/octeon/octeon-ethernet.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/staging/octeon/octeon-ethernet.h b/drivers/staging/octeon/octeon-ethernet.h
index fdf24d1..5b4fdd2 100644
--- a/drivers/staging/octeon/octeon-ethernet.h
+++ b/drivers/staging/octeon/octeon-ethernet.h
@@ -41,20 +41,18 @@ struct octeon_ethernet {
/* Device statistics */
struct net_device_stats stats;
struct phy_device *phydev;
+ unsigned int last_speed;
unsigned int last_link;
/* Last negotiated link state */
u64 link_info;
/* Called periodically to check link status */
void (*poll)(struct net_device *dev);
struct delayed_work port_periodic_work;
- struct work_struct port_work; /* may be unused. */
struct device_node *of_node;
};
int cvm_oct_free_work(void *work_queue_entry);
-int cvm_oct_rgmii_init(struct net_device *dev);
-void cvm_oct_rgmii_uninit(struct net_device *dev);
int cvm_oct_rgmii_open(struct net_device *dev);
int cvm_oct_sgmii_init(struct net_device *dev);