]> git.dujemihanovic.xyz Git - linux.git/commitdiff
net: lan966x: use FDMA library symbols
authorDaniel Machon <daniel.machon@microchip.com>
Thu, 5 Sep 2024 08:06:30 +0000 (10:06 +0200)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 10 Sep 2024 09:04:16 +0000 (11:04 +0200)
Include and use the new FDMA header, which now provides the required
masks and bit offsets for operating on the DCB's and DB's.

Signed-off-by: Daniel Machon <daniel.machon@microchip.com>
Reviewed-by: Horatiu Vultur <horatiu.vultur@microchip.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/microchip/lan966x/Makefile
drivers/net/ethernet/microchip/lan966x/lan966x_main.h

index 3b6ac331691d0b317cc95e77578a7a0f2c0372b7..4cdbe263502cbc282d8fd1eb1ab1abef448cfa1c 100644 (file)
@@ -20,3 +20,4 @@ lan966x-switch-$(CONFIG_DEBUG_FS) += lan966x_vcap_debugfs.o
 
 # Provide include files
 ccflags-y += -I$(srctree)/drivers/net/ethernet/microchip/vcap
+ccflags-y += -I$(srctree)/drivers/net/ethernet/microchip/fdma
index f8bebbcf77b2df5dc0ad61328ee7fa6fd734e99f..4d2aa775fbfda7396a7fb833f983b5b91ebf7a9b 100644 (file)
@@ -16,6 +16,7 @@
 #include <net/switchdev.h>
 #include <net/xdp.h>
 
+#include <fdma_api.h>
 #include <vcap_api.h>
 #include <vcap_api_client.h>
 
 
 #define FDMA_RX_DCB_MAX_DBS            1
 #define FDMA_TX_DCB_MAX_DBS            1
-#define FDMA_DCB_INFO_DATAL(x)         ((x) & GENMASK(15, 0))
-
-#define FDMA_DCB_STATUS_BLOCKL(x)      ((x) & GENMASK(15, 0))
-#define FDMA_DCB_STATUS_SOF            BIT(16)
-#define FDMA_DCB_STATUS_EOF            BIT(17)
-#define FDMA_DCB_STATUS_INTR           BIT(18)
-#define FDMA_DCB_STATUS_DONE           BIT(19)
-#define FDMA_DCB_STATUS_BLOCKO(x)      (((x) << 20) & GENMASK(31, 20))
-#define FDMA_DCB_INVALID_DATA          0x1
 
 #define FDMA_XTR_CHANNEL               6
 #define FDMA_INJ_CHANNEL               0