|
398 | 398 |
|
399 | 399 | /* RXPBSIZE default value for Express and BMC buffer */ |
400 | 400 | #define IGC_RXPBSIZE_EXP_BMC_DEFAULT 0x000000A2 |
401 | | -#define IGC_TXPBSIZE_DEFAULT 0x04000014 /* TXPBSIZE default */ |
402 | 401 | #define IGC_RXPBS_CFG_TS_EN 0x80000000 /* Timestamp in Rx buffer */ |
403 | 402 |
|
404 | | -#define IGC_TXPBSIZE_TSN 0x04145145 /* 5k bytes buffer for each queue */ |
| 403 | +/* Mask for TX packet buffer size */ |
| 404 | +#define IGC_TXPB0SIZE_MASK GENMASK(5, 0) |
| 405 | +#define IGC_TXPB1SIZE_MASK GENMASK(11, 6) |
| 406 | +#define IGC_TXPB2SIZE_MASK GENMASK(17, 12) |
| 407 | +#define IGC_TXPB3SIZE_MASK GENMASK(23, 18) |
| 408 | +/* Mask for OS to BMC packet buffer size */ |
| 409 | +#define IGC_OS2BMCPBSIZE_MASK GENMASK(29, 24) |
| 410 | +/* TX Packet buffer size in KB */ |
| 411 | +#define IGC_TXPB0SIZE(x) FIELD_PREP(IGC_TXPB0SIZE_MASK, (x)) |
| 412 | +#define IGC_TXPB1SIZE(x) FIELD_PREP(IGC_TXPB1SIZE_MASK, (x)) |
| 413 | +#define IGC_TXPB2SIZE(x) FIELD_PREP(IGC_TXPB2SIZE_MASK, (x)) |
| 414 | +#define IGC_TXPB3SIZE(x) FIELD_PREP(IGC_TXPB3SIZE_MASK, (x)) |
| 415 | +/* OS to BMC packet buffer size in KB */ |
| 416 | +#define IGC_OS2BMCPBSIZE(x) FIELD_PREP(IGC_OS2BMCPBSIZE_MASK, (x)) |
| 417 | +/* Default value following I225/I226 SW User Manual Section 8.3.2 */ |
| 418 | +#define IGC_TXPBSIZE_DEFAULT ( \ |
| 419 | + IGC_TXPB0SIZE(20) | IGC_TXPB1SIZE(0) | IGC_TXPB2SIZE(0) | \ |
| 420 | + IGC_TXPB3SIZE(0) | IGC_OS2BMCPBSIZE(4)) |
| 421 | +#define IGC_TXPBSIZE_TSN ( \ |
| 422 | + IGC_TXPB0SIZE(5) | IGC_TXPB1SIZE(5) | IGC_TXPB2SIZE(5) | \ |
| 423 | + IGC_TXPB3SIZE(5) | IGC_OS2BMCPBSIZE(4)) |
405 | 424 |
|
406 | 425 | #define IGC_DTXMXPKTSZ_TSN 0x19 /* 1600 bytes of max TX DMA packet size */ |
407 | 426 | #define IGC_DTXMXPKTSZ_DEFAULT 0x98 /* 9728-byte Jumbo frames */ |
|
0 commit comments