aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/igc/igc_main.c
diff options
context:
space:
mode:
authorFaizal Rahim <[email protected]>2025-05-19 07:19:07 +0000
committerTony Nguyen <[email protected]>2025-06-11 15:56:48 +0000
commite35ba6d3c6c3464cf12da6fd0b6380c90af81d27 (patch)
treebd6e9d8c055ab7ddf3eec0adeb94d8cfa61acc4b /drivers/net/ethernet/intel/igc/igc_main.c
parentigc: add DCTL prefix to related macros (diff)
downloadkernel-e35ba6d3c6c3464cf12da6fd0b6380c90af81d27.tar.gz
kernel-e35ba6d3c6c3464cf12da6fd0b6380c90af81d27.zip
igc: refactor TXDCTL macros to use FIELD_PREP and GEN_MASK
Refactor TXDCTL macro handling to use FIELD_PREP and GENMASK macros. This prepares the code for adding a new TXDCTL priority field in an upcoming patch. Verified that the macro values remain unchanged before and after refactoring. Reviewed-by: Simon Horman <[email protected]> Signed-off-by: Faizal Rahim <[email protected]> Tested-by: Mor Bar-Gabay <[email protected]> Signed-off-by: Tony Nguyen <[email protected]>
Diffstat (limited to 'drivers/net/ethernet/intel/igc/igc_main.c')
-rw-r--r--drivers/net/ethernet/intel/igc/igc_main.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c
index 4f1a8bc006c6..f3a312c9413b 100644
--- a/drivers/net/ethernet/intel/igc/igc_main.c
+++ b/drivers/net/ethernet/intel/igc/igc_main.c
@@ -749,11 +749,9 @@ static void igc_configure_tx_ring(struct igc_adapter *adapter,
wr32(IGC_TDH(reg_idx), 0);
writel(0, ring->tail);
- txdctl |= IGC_TXDCTL_PTHRESH;
- txdctl |= IGC_TXDCTL_HTHRESH << 8;
- txdctl |= IGC_TXDCTL_WTHRESH << 16;
+ txdctl |= IGC_TXDCTL_PTHRESH(8) | IGC_TXDCTL_HTHRESH(1) |
+ IGC_TXDCTL_WTHRESH(16) | IGC_TXDCTL_QUEUE_ENABLE;
- txdctl |= IGC_TXDCTL_QUEUE_ENABLE;
wr32(IGC_TXDCTL(reg_idx), txdctl);
}