diff options
author | Jiangfeng Xiao <xiaojiangfeng@huawei.com> | 2019-07-09 06:31:10 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-07-10 00:29:26 +0300 |
commit | 58f34098cf37cbd88e83a4ad8461fad37212559a (patch) | |
tree | c718d3d63f309802176ad8c5b81f3ad8b0c5f64f | |
parent | b9162d20ed493bc0d5ea3016647d636628e1f9d5 (diff) | |
download | linux-58f34098cf37cbd88e83a4ad8461fad37212559a.tar.xz |
net: hisilicon: Add an rx_desc to adapt HI13X1_GMAC
HI13X1 changed the offsets and bitmaps for rx_desc
registers in the same peripheral device on different
models of the hip04_eth.
Signed-off-by: Jiangfeng Xiao <xiaojiangfeng@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/hisilicon/hip04_eth.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/net/ethernet/hisilicon/hip04_eth.c b/drivers/net/ethernet/hisilicon/hip04_eth.c index c578934a2336..780fc462cc36 100644 --- a/drivers/net/ethernet/hisilicon/hip04_eth.c +++ b/drivers/net/ethernet/hisilicon/hip04_eth.c @@ -171,11 +171,20 @@ struct tx_desc { } __aligned(64); struct rx_desc { +#if defined(CONFIG_HI13X1_GMAC) + u32 reserved1[3]; + u16 pkt_len; + u16 reserved_16; + u32 reserved2[6]; + u32 pkt_err; + u32 reserved3[5]; +#else u16 reserved_16; u16 pkt_len; u32 reserve1[3]; u32 pkt_err; u32 reserve2[4]; +#endif }; struct hip04_priv { |