Messages in this thread | | | Date | Mon, 2 Jan 2023 20:58:02 +0100 | From | Andrew Lunn <> | Subject | Re: [PATCH v3 1/3] dsa: marvell: Provide per device information about max frame size |
| |
On Mon, Jan 02, 2023 at 04:02:07PM +0100, Lukasz Majewski wrote: > Different Marvell DSA switches support different size of max frame > bytes to be sent. > > For example mv88e6185 supports max 1632 bytes, which is now in-driver > standard value. On the other hand - mv88e6250 supports 2048 bytes. > > As this value is internal and may be different for each switch IC, > new entry in struct mv88e6xxx_info has been added to store it. > > Signed-off-by: Lukasz Majewski <lukma@denx.de> > > --- > Changes for v2: > - Define max_frame_size with default value of 1632 bytes, > - Set proper value for the mv88e6250 switch SoC (linkstreet) family > > Changes for v3: > - Add default value for 1632B of the max frame size (to avoid problems > with not defined values)
I would add a WARN_ON_ONCE(!chip->info->max_frame_size) so a missing value is detected. You can then skip the complexity of a default.
Andrew
| |