Skip to content
/ linux Public
forked from torvalds/linux

Commit

Permalink
net: hisilicon: Add an rx_desc to adapt HI13X1_GMAC
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
xiaojiangfeng authored and davem330 committed Jul 9, 2019
1 parent b9162d2 commit 58f3409
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions drivers/net/ethernet/hisilicon/hip04_eth.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 58f3409

Please sign in to comment.