This is an automated email from the ASF dual-hosted git repository. xiaoxiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 84895c8e702a2bc52a7d0ccfee0c102a8a3a3fe9 Author: zhanghongyu <[email protected]> AuthorDate: Fri Jul 18 16:16:57 2025 +0800 Revert "e1000: add polling mode support for tx/rx" Remove the previously supported polling mode. If necessary in the future, switch to a new solution for implementation. Signed-off-by: zhanghongyu <[email protected]> --- drivers/net/e1000.c | 50 +++++++++++++++++++------------------------------- 1 file changed, 19 insertions(+), 31 deletions(-) diff --git a/drivers/net/e1000.c b/drivers/net/e1000.c index bb9debaf6f1..707980757a5 100644 --- a/drivers/net/e1000.c +++ b/drivers/net/e1000.c @@ -58,8 +58,8 @@ /* Packet buffer size */ -#define E1000_PKTBUF_SIZE 2048 -#define E1000_RCTL_BSIZE E1000_RCTL_BSIZE_2048 +#define E1000_PKTBUF_SIZE 2048 +#define E1000_RCTL_BSIZE E1000_RCTL_BSIZE_2048 /* TX and RX descriptors */ @@ -73,8 +73,8 @@ * It's hard to tell how many spare buffers is needed, for now it's set to 8. */ -#define E1000_TX_QUOTA (E1000_TX_DESC - 1) -#define E1000_RX_QUOTA (E1000_RX_DESC + CONFIG_NET_E1000_RXSPARE) +#define E1000_TX_QUOTA E1000_TX_DESC +#define E1000_RX_QUOTA (E1000_RX_DESC + CONFIG_NET_E1000_RXSPARE) /* NOTE: CONFIG_IOB_ALIGNMENT must match system D-CACHE line size */ @@ -88,39 +88,30 @@ /* PCI BARs */ -#define E1000_MMIO_BAR 0 -#define E1000_FLASH_BAR 1 -#define E1000_IO_BAR 2 -#define E1000_MSIX_BAR 3 +#define E1000_MMIO_BAR 0 +#define E1000_FLASH_BAR 1 +#define E1000_IO_BAR 2 +#define E1000_MSIX_BAR 3 /* E1000 interrupts */ -#if CONFIG_NETDEV_WORK_THREAD_POLLING_PERIOD > 0 -# define E1000_INTERRUPTS (E1000_IC_LSC) -#else -# define E1000_INTERRUPTS (E1000_IC_RXO | E1000_IC_RXT0 | \ - E1000_IC_RXDMT0 | E1000_IC_LSC | \ - E1000_IC_TXDW) -#endif +#define E1000_INTERRUPTS (E1000_IC_RXO | E1000_IC_RXT0 | \ + E1000_IC_RXDMT0 | E1000_IC_LSC | \ + E1000_IC_TXDW) /* For MSI-X we allocate all interrupts to MSI-X vector 0 */ -#if CONFIG_NETDEV_WORK_THREAD_POLLING_PERIOD > 0 -# define E1000_MSIX_INTERRUPTS (E1000_IC_OTHER) -# define E1000_MSIX_IVAR (E1000_IVAR_OTHER_EN) -#else -# define E1000_MSIX_INTERRUPTS (E1000_IC_RXQ0 | \ - E1000_IC_TXQ0 | \ - E1000_IC_OTHER) -# define E1000_MSIX_IVAR (E1000_IVAR_RXQ0_EN | \ - E1000_IVAR_TXQ0_EN | \ - E1000_IVAR_OTHER_EN) -#endif +#define E1000_MSIX_INTERRUPTS (E1000_IC_RXQ0 | \ + E1000_IC_TXQ0 | \ + E1000_IC_OTHER) +#define E1000_MSIX_IVAR (E1000_IVAR_RXQ0_EN | \ + E1000_IVAR_TXQ0_EN | \ + E1000_IVAR_OTHER_EN) /* NIC specific Flags */ -#define E1000_RESET_BROKEN (1 << 0) -#define E1000_HAS_MSIX (1 << 1) +#define E1000_RESET_BROKEN (1 << 0) +#define E1000_HAS_MSIX (1 << 1) /***************************************************************************** * Private Types @@ -301,9 +292,6 @@ static const struct netdev_ops_s g_e1000_ops = .addmac = e1000_addmac, .rmmac = e1000_rmmac, #endif -#if CONFIG_NETDEV_WORK_THREAD_POLLING_PERIOD > 0 - .reclaim = e1000_txdone, -#endif }; /*****************************************************************************
