119119#define XAXIDMA_IRQ_ERROR_MASK 0x00004000 /* Error interrupt */
120120#define XAXIDMA_IRQ_ALL_MASK 0x00007000 /* All interrupts */
121121
122- /* Default TX/RX Threshold and waitbound values for SGDMA mode */
122+ /* Default TX/RX Threshold and delay timer values for SGDMA mode */
123123#define XAXIDMA_DFT_TX_THRESHOLD 24
124- #define XAXIDMA_DFT_TX_WAITBOUND 254
125- #define XAXIDMA_DFT_RX_THRESHOLD 24
126- #define XAXIDMA_DFT_RX_WAITBOUND 254
124+ #define XAXIDMA_DFT_TX_USEC 50
125+ #define XAXIDMA_DFT_RX_THRESHOLD 1
126+ #define XAXIDMA_DFT_RX_USEC 50
127127
128128#define XAXIDMA_BD_CTRL_TXSOF_MASK 0x08000000 /* First tx packet */
129129#define XAXIDMA_BD_CTRL_TXEOF_MASK 0x04000000 /* Last tx packet */
@@ -385,6 +385,7 @@ struct axidma_bd {
385385 * @phy_node: Pointer to device node structure
386386 * @phylink: Pointer to phylink instance
387387 * @phylink_config: phylink configuration settings
388+ * @napi: NAPI control structure
388389 * @pcs_phy: Reference to PCS/PMA PHY if used
389390 * @pcs: phylink pcs structure for PCS PHY
390391 * @switch_x_sgmii: Whether switchable 1000BaseX/SGMII mode is enabled in the core
@@ -395,6 +396,7 @@ struct axidma_bd {
395396 * @regs_start: Resource start for axienet device addresses
396397 * @regs: Base address for the axienet_local device address space
397398 * @dma_regs: Base address for the axidma device address space
399+ * @rx_dma_cr: Nominal content of RX DMA control register
398400 * @dma_err_task: Work structure to process Axi DMA errors
399401 * @tx_irq: Axidma TX IRQ number
400402 * @rx_irq: Axidma RX IRQ number
@@ -423,7 +425,9 @@ struct axidma_bd {
423425 * @csum_offload_on_tx_path: Stores the checksum selection on TX side.
424426 * @csum_offload_on_rx_path: Stores the checksum selection on RX side.
425427 * @coalesce_count_rx: Store the irq coalesce on RX side.
428+ * @coalesce_usec_rx: IRQ coalesce delay for RX
426429 * @coalesce_count_tx: Store the irq coalesce on TX side.
430+ * @coalesce_usec_tx: IRQ coalesce delay for TX
427431 */
428432struct axienet_local {
429433 struct net_device * ndev ;
@@ -434,6 +438,8 @@ struct axienet_local {
434438 struct phylink * phylink ;
435439 struct phylink_config phylink_config ;
436440
441+ struct napi_struct napi ;
442+
437443 struct mdio_device * pcs_phy ;
438444 struct phylink_pcs pcs ;
439445
@@ -449,6 +455,8 @@ struct axienet_local {
449455 void __iomem * regs ;
450456 void __iomem * dma_regs ;
451457
458+ u32 rx_dma_cr ;
459+
452460 struct work_struct dma_err_task ;
453461
454462 int tx_irq ;
@@ -476,7 +484,9 @@ struct axienet_local {
476484 int csum_offload_on_rx_path ;
477485
478486 u32 coalesce_count_rx ;
487+ u32 coalesce_usec_rx ;
479488 u32 coalesce_count_tx ;
489+ u32 coalesce_usec_tx ;
480490};
481491
482492/**
0 commit comments