forked from openwrt/openwrt
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kernel: move mv88e6xxx fix to generic backports
The backports introduced in commit d407565 ("kernel: backport phylink changes from mainline Linux") broke the mv88e6xxx DSA driver. A backport to fix this was added to the kirkwood target, but as it is used in multiple targets, and there's a kmod package for it, the fix should be in generic backports. This fixes the switch on the WatchGuard Firebox M300 when running the 6.1 testing kernel. There is no need to backport the fix for the 6.6 kernel, as it was included in 6.6.5. Signed-off-by: Stijn Tintel <[email protected]>
- Loading branch information
Showing
7 changed files
with
15 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,7 +51,7 @@ Signed-off-by: David S. Miller <[email protected]> | |
static int mv88e6352_get_port4_serdes_cmode(struct mv88e6xxx_chip *chip) | ||
{ | ||
u16 reg, val; | ||
@@ -4498,7 +4510,7 @@ static const struct mv88e6xxx_ops mv88e6 | ||
@@ -4489,7 +4501,7 @@ static const struct mv88e6xxx_ops mv88e6 | ||
.vtu_loadpurge = mv88e6352_g1_vtu_loadpurge, | ||
.stu_getnext = mv88e6352_g1_stu_getnext, | ||
.stu_loadpurge = mv88e6352_g1_stu_loadpurge, | ||
|
@@ -60,7 +60,7 @@ Signed-off-by: David S. Miller <[email protected]> | |
}; | ||
|
||
static const struct mv88e6xxx_ops mv88e6172_ops = { | ||
@@ -4599,7 +4611,7 @@ static const struct mv88e6xxx_ops mv88e6 | ||
@@ -4590,7 +4602,7 @@ static const struct mv88e6xxx_ops mv88e6 | ||
.vtu_loadpurge = mv88e6352_g1_vtu_loadpurge, | ||
.stu_getnext = mv88e6352_g1_stu_getnext, | ||
.stu_loadpurge = mv88e6352_g1_stu_loadpurge, | ||
|
@@ -69,7 +69,7 @@ Signed-off-by: David S. Miller <[email protected]> | |
}; | ||
|
||
static const struct mv88e6xxx_ops mv88e6176_ops = { | ||
@@ -5256,7 +5268,7 @@ static const struct mv88e6xxx_ops mv88e6 | ||
@@ -5247,7 +5259,7 @@ static const struct mv88e6xxx_ops mv88e6 | ||
.vtu_loadpurge = mv88e6352_g1_vtu_loadpurge, | ||
.stu_getnext = mv88e6352_g1_stu_getnext, | ||
.stu_loadpurge = mv88e6352_g1_stu_loadpurge, | ||
|
@@ -78,7 +78,7 @@ Signed-off-by: David S. Miller <[email protected]> | |
}; | ||
|
||
static const struct mv88e6xxx_ops mv88e6351_ops = { | ||
@@ -5302,7 +5314,7 @@ static const struct mv88e6xxx_ops mv88e6 | ||
@@ -5293,7 +5305,7 @@ static const struct mv88e6xxx_ops mv88e6 | ||
.stu_loadpurge = mv88e6352_g1_stu_loadpurge, | ||
.avb_ops = &mv88e6352_avb_ops, | ||
.ptp_ops = &mv88e6352_ptp_ops, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,7 +44,7 @@ Signed-off-by: Jakub Kicinski <[email protected]> | |
__set_bit(PHY_INTERFACE_MODE_MII, config->supported_interfaces); | ||
} else { | ||
if (cmode < ARRAY_SIZE(mv88e6185_phy_interface_modes) && | ||
@@ -839,7 +837,7 @@ static void mv88e6xxx_get_caps(struct ds | ||
@@ -851,7 +849,7 @@ static void mv88e6xxx_get_caps(struct ds | ||
chip->info->ops->phylink_get_caps(chip, port, config); | ||
mv88e6xxx_reg_unlock(chip); | ||
|
||
|
@@ -53,7 +53,7 @@ Signed-off-by: Jakub Kicinski <[email protected]> | |
__set_bit(PHY_INTERFACE_MODE_INTERNAL, | ||
config->supported_interfaces); | ||
/* Internal ports with no phy-mode need GMII for PHYLIB */ | ||
@@ -860,7 +858,7 @@ static void mv88e6xxx_mac_config(struct | ||
@@ -872,7 +870,7 @@ static void mv88e6xxx_mac_config(struct | ||
|
||
mv88e6xxx_reg_lock(chip); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,7 @@ Signed-off-by: Jakub Kicinski <[email protected]> | |
|
||
--- a/drivers/net/dsa/mv88e6xxx/chip.c | ||
+++ b/drivers/net/dsa/mv88e6xxx/chip.c | ||
@@ -5944,7 +5944,8 @@ static const struct mv88e6xxx_info mv88e | ||
@@ -5956,7 +5956,8 @@ static const struct mv88e6xxx_info mv88e | ||
.name = "Marvell 88E6191X", | ||
.num_databases = 4096, | ||
.num_ports = 11, /* 10 + Z80 */ | ||
|
@@ -30,7 +30,7 @@ Signed-off-by: Jakub Kicinski <[email protected]> | |
.max_vid = 8191, | ||
.max_sid = 63, | ||
.port_base_addr = 0x0, | ||
@@ -5967,7 +5968,8 @@ static const struct mv88e6xxx_info mv88e | ||
@@ -5979,7 +5980,8 @@ static const struct mv88e6xxx_info mv88e | ||
.name = "Marvell 88E6193X", | ||
.num_databases = 4096, | ||
.num_ports = 11, /* 10 + Z80 */ | ||
|
@@ -40,7 +40,7 @@ Signed-off-by: Jakub Kicinski <[email protected]> | |
.max_vid = 8191, | ||
.max_sid = 63, | ||
.port_base_addr = 0x0, | ||
@@ -6286,7 +6288,8 @@ static const struct mv88e6xxx_info mv88e | ||
@@ -6298,7 +6300,8 @@ static const struct mv88e6xxx_info mv88e | ||
.name = "Marvell 88E6393X", | ||
.num_databases = 4096, | ||
.num_ports = 11, /* 10 + Z80 */ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,7 +24,7 @@ Signed-off-by: Jakub Kicinski <[email protected]> | |
|
||
--- a/drivers/net/dsa/mv88e6xxx/chip.c | ||
+++ b/drivers/net/dsa/mv88e6xxx/chip.c | ||
@@ -3328,7 +3328,7 @@ static int mv88e6xxx_setup_port(struct m | ||
@@ -3340,7 +3340,7 @@ static int mv88e6xxx_setup_port(struct m | ||
caps = pl_config.mac_capabilities; | ||
|
||
if (chip->info->ops->port_max_speed_mode) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,7 +26,7 @@ Signed-off-by: Jakub Kicinski <[email protected]> | |
|
||
--- a/drivers/net/dsa/mv88e6xxx/chip.c | ||
+++ b/drivers/net/dsa/mv88e6xxx/chip.c | ||
@@ -797,6 +797,8 @@ static void mv88e6393x_phylink_get_caps( | ||
@@ -809,6 +809,8 @@ static void mv88e6393x_phylink_get_caps( | ||
unsigned long *supported = config->supported_interfaces; | ||
bool is_6191x = | ||
chip->info->prod_num == MV88E6XXX_PORT_SWITCH_ID_PROD_6191X; | ||
|
@@ -35,7 +35,7 @@ Signed-off-by: Jakub Kicinski <[email protected]> | |
|
||
mv88e6xxx_translate_cmode(chip->ports[port].cmode, supported); | ||
|
||
@@ -811,13 +813,17 @@ static void mv88e6393x_phylink_get_caps( | ||
@@ -823,13 +825,17 @@ static void mv88e6393x_phylink_get_caps( | ||
/* 6191X supports >1G modes only on port 10 */ | ||
if (!is_6191x || port == 10) { | ||
__set_bit(PHY_INTERFACE_MODE_2500BASEX, supported); | ||
|
@@ -58,7 +58,7 @@ Signed-off-by: Jakub Kicinski <[email protected]> | |
} | ||
} | ||
|
||
@@ -6231,6 +6237,32 @@ static const struct mv88e6xxx_info mv88e | ||
@@ -6243,6 +6249,32 @@ static const struct mv88e6xxx_info mv88e | ||
.ptp_support = true, | ||
.ops = &mv88e6352_ops, | ||
}, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,7 @@ Signed-off-by: Tobias Waldekranz <[email protected]> | |
|
||
--- a/drivers/net/dsa/mv88e6xxx/chip.c | ||
+++ b/drivers/net/dsa/mv88e6xxx/chip.c | ||
@@ -7025,6 +7025,7 @@ static int mv88e6xxx_register_switch(str | ||
@@ -7037,6 +7037,7 @@ static int mv88e6xxx_register_switch(str | ||
ds->ops = &mv88e6xxx_switch_ops; | ||
ds->ageing_time_min = chip->info->age_time_coeff; | ||
ds->ageing_time_max = chip->info->age_time_coeff * U8_MAX; | ||
|