diff mbox series

[9/9] net: dsa: mv88e6071: Set .set_max_frame_size callback

Message ID 20221108082330.2086671-10-lukma@denx.de (mailing list archive)
State Changes Requested
Delegated to: Netdev Maintainers
Headers show
Series net: dsa: Add support for mv88e6020 and mv88e6071 | expand

Checks

Context Check Description
netdev/tree_selection success Guessed tree name to be net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix warning Target tree name not specified in the subject
netdev/cover_letter success Series has a cover letter
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers success CCed 9 of 9 maintainers
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 7 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Lukasz Majewski Nov. 8, 2022, 8:23 a.m. UTC
The .set_max_frame_size is now set to the
mv88e6185_g1_set_max_frame_size() function.

The global switch control register (0x4 offset) used
as well as the bit (10) are the same.

The only difference is the misleading suffix (1632)
as the mv88e6071/mv88e6020 supports 2048 bytes
as a maximal size of the frame.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
---
 drivers/net/dsa/mv88e6xxx/chip.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Andrew Lunn Nov. 8, 2022, 2:03 p.m. UTC | #1
On Tue, Nov 08, 2022 at 09:23:30AM +0100, Lukasz Majewski wrote:
> The .set_max_frame_size is now set to the
> mv88e6185_g1_set_max_frame_size() function.
> 
> The global switch control register (0x4 offset) used
> as well as the bit (10) are the same.
> 
> The only difference is the misleading suffix (1632)
> as the mv88e6071/mv88e6020 supports 2048 bytes
> as a maximal size of the frame.

Are you really sure that different members of the 6250 family have
different maximum frame sizes?

Marvells GPL DSDT SDK has:

#define G1_DEV_88ESPANNAK_FAMILY  (DEV_88E3020 | DEV_88E6020 | DEV_88E6070 | DEV_88E6071 | DEV_88E6220  | DEV_88E6250 )

The differences within a family tend to be the number of ports, if PTP
is provided, if AVB is provided etc.

   Andrew
Lukasz Majewski Nov. 10, 2022, 4 p.m. UTC | #2
Hi Andrew,

> On Tue, Nov 08, 2022 at 09:23:30AM +0100, Lukasz Majewski wrote:
> > The .set_max_frame_size is now set to the
> > mv88e6185_g1_set_max_frame_size() function.
> > 
> > The global switch control register (0x4 offset) used
> > as well as the bit (10) are the same.
> > 
> > The only difference is the misleading suffix (1632)
> > as the mv88e6071/mv88e6020 supports 2048 bytes
> > as a maximal size of the frame.  
> 
> Are you really sure that different members of the 6250 family have
> different maximum frame sizes?
> 
> Marvells GPL DSDT SDK has:
> 
> #define G1_DEV_88ESPANNAK_FAMILY  (DEV_88E3020 | DEV_88E6020 |
> DEV_88E6070 | DEV_88E6071 | DEV_88E6220  | DEV_88E6250 )

From the above list - all but 88E3020 are from the same IC "family"
(they are listed in the same documentation pdf). They all have the 2048
B max packet size.

I've re-used the mv88e6185_g1_set_max_frame_size, as it does the job

> 
> The differences within a family tend to be the number of ports, if PTP
> is provided, if AVB is provided etc.
> 
>    Andrew




Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de
diff mbox series

Patch

diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c
index 1aba9d15a5e0..ce7723d1ffbe 100644
--- a/drivers/net/dsa/mv88e6xxx/chip.c
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
@@ -4998,6 +4998,7 @@  static const struct mv88e6xxx_ops mv88e6071_ops = {
 	.vtu_loadpurge = mv88e6185_g1_vtu_loadpurge,
 	.avb_ops = &mv88e6352_avb_ops,
 	.ptp_ops = &mv88e6250_ptp_ops,
+	.set_max_frame_size = mv88e6185_g1_set_max_frame_size,
 };
 
 static const struct mv88e6xxx_ops mv88e6290_ops = {