OSDN Git Service

net: mscc: ocelot: create a helper for changing the port MTU
authorVladimir Oltean <vladimir.oltean@nxp.com>
Thu, 14 Nov 2019 15:03:23 +0000 (17:03 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 15 Nov 2019 20:32:16 +0000 (12:32 -0800)
commitfa914e9c4d9485f06b3676791a74587d2642fca3
tree9969f8136d451e16349e9b25cd7d5e59297dc32b
parent5bc9d2e6e7d546548ae1a7cd3de37672db4075ce
net: mscc: ocelot: create a helper for changing the port MTU

Since in an NPI/DSA setup, not all ports will have the same MTU, we need
to make sure the watermarks for pause frames and/or tail dropping logic
that existed in the driver is still coherent for the new MTU values.

We need to do this because the NPI (aka external CPU) port needs an
increased MTU for the DSA tag. This will be done in a future patch.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mscc/ocelot.c