Skip to content

Commit e378f49

Browse files
vladimirolteankuba-moo
authored andcommitted
net: enetc: make sure all traffic classes can send large frames
The enetc driver does not implement .ndo_change_mtu, instead it configures the MAC register field PTC{Traffic Class}MSDUR[MAXSDU] statically to a large value during probe time. The driver used to configure only the max SDU for traffic class 0, and that was fine while the driver could only use traffic class 0. But with the introduction of mqprio, sending a large frame into any other TC than 0 is broken. This patch fixes that by replicating per traffic class the static configuration done in enetc_configure_port_mac(). Fixes: cbe9e83 ("enetc: Enable TC offloading with mqprio") Reported-by: Richie Pearn <[email protected]> Signed-off-by: Vladimir Oltean <[email protected]> Reviewed-by: <Claudiu Manoil <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent fb8dc5f commit e378f49

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

drivers/net/ethernet/freescale/enetc/enetc_pf.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -517,10 +517,13 @@ static void enetc_port_si_configure(struct enetc_si *si)
517517

518518
static void enetc_configure_port_mac(struct enetc_hw *hw)
519519
{
520+
int tc;
521+
520522
enetc_port_wr(hw, ENETC_PM0_MAXFRM,
521523
ENETC_SET_MAXFRM(ENETC_RX_MAXFRM_SIZE));
522524

523-
enetc_port_wr(hw, ENETC_PTCMSDUR(0), ENETC_MAC_MAXFRM_SIZE);
525+
for (tc = 0; tc < 8; tc++)
526+
enetc_port_wr(hw, ENETC_PTCMSDUR(tc), ENETC_MAC_MAXFRM_SIZE);
524527

525528
enetc_port_wr(hw, ENETC_PM0_CMD_CFG, ENETC_PM0_CMD_PHY_TX_EN |
526529
ENETC_PM0_CMD_TXP | ENETC_PM0_PROMISC);

0 commit comments

Comments
 (0)