119
119
#define XAXIDMA_IRQ_ERROR_MASK 0x00004000 /* Error interrupt */
120
120
#define XAXIDMA_IRQ_ALL_MASK 0x00007000 /* All interrupts */
121
121
122
- /* Default TX/RX Threshold and waitbound values for SGDMA mode */
122
+ /* Default TX/RX Threshold and delay timer values for SGDMA mode */
123
123
#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
127
127
128
128
#define XAXIDMA_BD_CTRL_TXSOF_MASK 0x08000000 /* First tx packet */
129
129
#define XAXIDMA_BD_CTRL_TXEOF_MASK 0x04000000 /* Last tx packet */
@@ -385,6 +385,7 @@ struct axidma_bd {
385
385
* @phy_node: Pointer to device node structure
386
386
* @phylink: Pointer to phylink instance
387
387
* @phylink_config: phylink configuration settings
388
+ * @napi: NAPI control structure
388
389
* @pcs_phy: Reference to PCS/PMA PHY if used
389
390
* @pcs: phylink pcs structure for PCS PHY
390
391
* @switch_x_sgmii: Whether switchable 1000BaseX/SGMII mode is enabled in the core
@@ -395,6 +396,7 @@ struct axidma_bd {
395
396
* @regs_start: Resource start for axienet device addresses
396
397
* @regs: Base address for the axienet_local device address space
397
398
* @dma_regs: Base address for the axidma device address space
399
+ * @rx_dma_cr: Nominal content of RX DMA control register
398
400
* @dma_err_task: Work structure to process Axi DMA errors
399
401
* @tx_irq: Axidma TX IRQ number
400
402
* @rx_irq: Axidma RX IRQ number
@@ -423,7 +425,9 @@ struct axidma_bd {
423
425
* @csum_offload_on_tx_path: Stores the checksum selection on TX side.
424
426
* @csum_offload_on_rx_path: Stores the checksum selection on RX side.
425
427
* @coalesce_count_rx: Store the irq coalesce on RX side.
428
+ * @coalesce_usec_rx: IRQ coalesce delay for RX
426
429
* @coalesce_count_tx: Store the irq coalesce on TX side.
430
+ * @coalesce_usec_tx: IRQ coalesce delay for TX
427
431
*/
428
432
struct axienet_local {
429
433
struct net_device * ndev ;
@@ -434,6 +438,8 @@ struct axienet_local {
434
438
struct phylink * phylink ;
435
439
struct phylink_config phylink_config ;
436
440
441
+ struct napi_struct napi ;
442
+
437
443
struct mdio_device * pcs_phy ;
438
444
struct phylink_pcs pcs ;
439
445
@@ -449,6 +455,8 @@ struct axienet_local {
449
455
void __iomem * regs ;
450
456
void __iomem * dma_regs ;
451
457
458
+ u32 rx_dma_cr ;
459
+
452
460
struct work_struct dma_err_task ;
453
461
454
462
int tx_irq ;
@@ -476,7 +484,9 @@ struct axienet_local {
476
484
int csum_offload_on_rx_path ;
477
485
478
486
u32 coalesce_count_rx ;
487
+ u32 coalesce_usec_rx ;
479
488
u32 coalesce_count_tx ;
489
+ u32 coalesce_usec_tx ;
480
490
};
481
491
482
492
/**
0 commit comments