]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
igc: rename I225_RXPBSIZE_DEFAULT and I225_TXPBSIZE_DEFAULT
authorFaizal Rahim <faizal.abdul.rahim@linux.intel.com>
Tue, 18 Mar 2025 03:07:33 +0000 (23:07 -0400)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Fri, 18 Apr 2025 15:43:10 +0000 (08:43 -0700)
Rename RX and TX packet buffer size macros in preparation for an
upcoming patch that will refactor buffer size handling using FIELD_PREP
and GENMASK.

Changes:
- Rename I225_RXPBSIZE_DEFAULT to IGC_RXPBSIZE_EXP_BMC_DEFAULT.
  The EXP_BMC suffix explicitly indicates Express and BMC buffer
  default values, improving readability and reusability for the
  upcoming changes, while also better reflecting the current buffer
  allocations.
- Rename I225_TXPBSIZE_DEFAULT to IGC_TXPBSIZE_DEFAULT.

These registers apply to both i225 and i226, so using the IGC prefix
aligns with existing macro naming conventions.

Signed-off-by: Faizal Rahim <faizal.abdul.rahim@linux.intel.com>
Tested-by: Mor Bar-Gabay <morx.bar.gabay@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/igc/igc_defines.h
drivers/net/ethernet/intel/igc/igc_main.c
drivers/net/ethernet/intel/igc/igc_tsn.c

index d19325b0e6e0ba684abbe10482fecce92e405420..34b3b1a7610e6213e4b36b04f64133187f37c552 100644 (file)
 #define IGC_RCTL_PMCF          0x00800000 /* pass MAC control frames */
 #define IGC_RCTL_SECRC         0x04000000 /* Strip Ethernet CRC */
 
-#define I225_RXPBSIZE_DEFAULT  0x000000A2 /* RXPBSIZE default */
-#define I225_TXPBSIZE_DEFAULT  0x04000014 /* TXPBSIZE default */
-#define IGC_RXPBS_CFG_TS_EN    0x80000000 /* Timestamp in Rx buffer */
+/* RXPBSIZE default value for Express and BMC buffer */
+#define IGC_RXPBSIZE_EXP_BMC_DEFAULT   0x000000A2
+#define IGC_TXPBSIZE_DEFAULT           0x04000014 /* TXPBSIZE default */
+#define IGC_RXPBS_CFG_TS_EN            0x80000000 /* Timestamp in Rx buffer */
 
 #define IGC_TXPBSIZE_TSN       0x04145145 /* 5k bytes buffer for each queue */
 
index 27771c6ab6d7c6848fe2a4696231b12c01db97d5..9d9661632ae79de0f6d7504b808d8a28e386eff5 100644 (file)
@@ -7159,8 +7159,8 @@ static int igc_probe(struct pci_dev *pdev,
        }
 
        /* configure RXPBSIZE and TXPBSIZE */
-       wr32(IGC_RXPBS, I225_RXPBSIZE_DEFAULT);
-       wr32(IGC_TXPBS, I225_TXPBSIZE_DEFAULT);
+       wr32(IGC_RXPBS, IGC_RXPBSIZE_EXP_BMC_DEFAULT);
+       wr32(IGC_TXPBS, IGC_TXPBSIZE_DEFAULT);
 
        timer_setup(&adapter->watchdog_timer, igc_watchdog, 0);
        timer_setup(&adapter->phy_info_timer, igc_update_phy_info, 0);
index 1e44374ca1ffbb86e9893266c590f318984ef574..498741d83ca64bb2fe13aa2ac9884b153199b679 100644 (file)
@@ -136,7 +136,7 @@ static int igc_tsn_disable_offload(struct igc_adapter *adapter)
        int i;
 
        wr32(IGC_GTXOFFSET, 0);
-       wr32(IGC_TXPBS, I225_TXPBSIZE_DEFAULT);
+       wr32(IGC_TXPBS, IGC_TXPBSIZE_DEFAULT);
        wr32(IGC_DTXMXPKTSZ, IGC_DTXMXPKTSZ_DEFAULT);
 
        if (igc_is_device_id_i226(hw))