OSDN Git Service

net: axienet: make the 64b addresable DMA depends on 64b archectures
authorAndy Chiu <andy.chiu@sifive.com>
Mon, 13 Jun 2022 03:42:01 +0000 (11:42 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 13 Jun 2022 11:36:55 +0000 (12:36 +0100)
commit00be43a74ca262267ceb96c0c5e3f51d3a56342e
tree66af9e2cb947d5f9af8dfec023fedec4686032b2
parenta5b00f5b78b7adb9f6f37381da2a54db6d37cd11
net: axienet: make the 64b addresable DMA depends on 64b archectures

Currently it is not safe to config the IP as 64-bit addressable on 32-bit
archectures, which cannot perform a double-word store on its descriptor
pointers. The pointer is 64-bit wide if the IP is configured as 64-bit,
and the device would process the partially updated pointer on some
states if the pointer was updated via two store-words. To prevent such
condition, we force a probe fail if we discover that the IP has 64-bit
capability but it is not running on a 64-Bit kernel.

This is a series of patch (1/2). The next patch must be applied in order
to make 64b DMA safe on 64b archectures.

Signed-off-by: Andy Chiu <andy.chiu@sifive.com>
Reported-by: Max Hsu <max.hsu@sifive.com>
Reviewed-by: Greentime Hu <greentime.hu@sifive.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/xilinx/xilinx_axienet.h
drivers/net/ethernet/xilinx/xilinx_axienet_main.c