summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/renesas/sh_eth.h
diff options
context:
space:
mode:
authorSergei Shtylyov <sergei.shtylyov@cogentembedded.com>2018-03-24 23:07:41 +0300
committerDavid S. Miller <davem@davemloft.net>2018-03-26 19:34:19 +0300
commit4ceedeb1b68e376ccfec9f8d2e46bcd541702aba (patch)
tree658ae8662c1eebb8a014aa4ecff73796c408dc53 /drivers/net/ethernet/renesas/sh_eth.h
parent93e9ad985038f269838c4c5deab4c84d87c7b5a7 (diff)
downloadlinux-4ceedeb1b68e376ccfec9f8d2e46bcd541702aba.tar.xz
sh_eth: add sh_eth_cpu_data::soft_reset() method
sh_eth_reset() performs a software reset which is implemented in a completely different way for the GEther-like controllers vs the other controllers due to a different layout of EDMR (and other factors) -- it therefore makes sense to convert this function to a mandatory sh_eth_cpu_data::soft_reset() method and thus get rid of the runtime controller type check via sh_eth_is_{gether|rz_fast_ether}(). Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/renesas/sh_eth.h')
-rw-r--r--drivers/net/ethernet/renesas/sh_eth.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/renesas/sh_eth.h b/drivers/net/ethernet/renesas/sh_eth.h
index 21047d58a93f..ff3520b0d86f 100644
--- a/drivers/net/ethernet/renesas/sh_eth.h
+++ b/drivers/net/ethernet/renesas/sh_eth.h
@@ -469,6 +469,9 @@ struct sh_eth_rxdesc {
/* This structure is used by each CPU dependency handling. */
struct sh_eth_cpu_data {
+ /* mandatory functions */
+ int (*soft_reset)(struct net_device *ndev);
+
/* optional functions */
void (*chip_reset)(struct net_device *ndev);
void (*set_duplex)(struct net_device *ndev);