Skip to content

Commit 67287d6

Browse files
Faizal Rahimanguy11
authored andcommitted
igc: rename I225_RXPBSIZE_DEFAULT and I225_TXPBSIZE_DEFAULT
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>
1 parent 19d6290 commit 67287d6

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

drivers/net/ethernet/intel/igc/igc_defines.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -396,9 +396,10 @@
396396
#define IGC_RCTL_PMCF 0x00800000 /* pass MAC control frames */
397397
#define IGC_RCTL_SECRC 0x04000000 /* Strip Ethernet CRC */
398398

399-
#define I225_RXPBSIZE_DEFAULT 0x000000A2 /* RXPBSIZE default */
400-
#define I225_TXPBSIZE_DEFAULT 0x04000014 /* TXPBSIZE default */
401-
#define IGC_RXPBS_CFG_TS_EN 0x80000000 /* Timestamp in Rx buffer */
399+
/* RXPBSIZE default value for Express and BMC buffer */
400+
#define IGC_RXPBSIZE_EXP_BMC_DEFAULT 0x000000A2
401+
#define IGC_TXPBSIZE_DEFAULT 0x04000014 /* TXPBSIZE default */
402+
#define IGC_RXPBS_CFG_TS_EN 0x80000000 /* Timestamp in Rx buffer */
402403

403404
#define IGC_TXPBSIZE_TSN 0x04145145 /* 5k bytes buffer for each queue */
404405

drivers/net/ethernet/intel/igc/igc_main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7159,8 +7159,8 @@ static int igc_probe(struct pci_dev *pdev,
71597159
}
71607160

71617161
/* configure RXPBSIZE and TXPBSIZE */
7162-
wr32(IGC_RXPBS, I225_RXPBSIZE_DEFAULT);
7163-
wr32(IGC_TXPBS, I225_TXPBSIZE_DEFAULT);
7162+
wr32(IGC_RXPBS, IGC_RXPBSIZE_EXP_BMC_DEFAULT);
7163+
wr32(IGC_TXPBS, IGC_TXPBSIZE_DEFAULT);
71647164

71657165
timer_setup(&adapter->watchdog_timer, igc_watchdog, 0);
71667166
timer_setup(&adapter->phy_info_timer, igc_update_phy_info, 0);

drivers/net/ethernet/intel/igc/igc_tsn.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ static int igc_tsn_disable_offload(struct igc_adapter *adapter)
136136
int i;
137137

138138
wr32(IGC_GTXOFFSET, 0);
139-
wr32(IGC_TXPBS, I225_TXPBSIZE_DEFAULT);
139+
wr32(IGC_TXPBS, IGC_TXPBSIZE_DEFAULT);
140140
wr32(IGC_DTXMXPKTSZ, IGC_DTXMXPKTSZ_DEFAULT);
141141

142142
if (igc_is_device_id_i226(hw))

0 commit comments

Comments
 (0)