net: dsa: mv88e6xxx: implement USXGMII mode for mv88e6393x
Subsystems (4)
PATCH v4 1/1 net: dsa: mv88e6xxx: implement USXGMII mode for mv88e6393x
From: Michal Smulski <[email protected]>
Enable USXGMII mode for mv88e6393x chips. Tested on Marvell 88E6191X.
--- drivers/net/dsa/mv88e6xxx/chip.c | 3 +- drivers/net/dsa/mv88e6xxx/port.c | 3 ++ drivers/net/dsa/mv88e6xxx/serdes.c | 70 +++++++++++++++++++++++++++++- drivers/net/dsa/mv88e6xxx/serdes.h | 13 ++++++ 4 files changed, 85 insertions(+), 4 deletions(-)
drivers/net/dsa/mv88e6xxx/chip.c +1 -2
@@ -806,8 +806,7 @@ static void mv88e6393x_phylink_get_caps(struct mv88e6xxx_chip *chip, int port,__set_bit (PHY_INTERFACE_MODE_2500BASEX , supported);__set_bit (PHY_INTERFACE_MODE_5GBASER , supported);__set_bit (PHY_INTERFACE_MODE_10GBASER , supported); -/* FIXME: USXGMII is not supported yet */ -/* __set_bit(PHY_INTERFACE_MODE_USXGMII, supported); */ +__set_bit (PHY_INTERFACE_MODE_USXGMII , supported); config->mac_capabilities |=MAC_2500FD |MAC_5000FD |MAC_10000FD ;
drivers/net/dsa/mv88e6xxx/port.c +3 -0
@@ -554,6 +554,9 @@ static int mv88e6xxx_port_set_cmode(struct mv88e6xxx_chip *chip, int port,case PHY_INTERFACE_MODE_10GBASER : cmode =MV88E6393X_PORT_STS_CMODE_10GBASER ;break ; +case PHY_INTERFACE_MODE_USXGMII : + cmode =MV88E6393X_PORT_STS_CMODE_USXGMII ; +break ;default : cmode =0 ; }
drivers/net/dsa/mv88e6xxx/serdes.c +68 -2
112 lines not on this page · raw message
drivers/net/dsa/mv88e6xxx/serdes.h +13 -0
@@ -48,6 +48,19 @@#define MV88E6393X_10G_INT_LINK_CHANGE BIT(2)#define MV88E6393X_10G_INT_STATUS 0x9001 +/* USXGMII */ +#define MV88E6390_USXGMII_LP_STATUS 0xf0a2 +#define MV88E6390_USXGMII_PHY_STATUS 0xf0a6 +#define MV88E6390_USXGMII_PHY_STATUS_SPEED_MASK GENMASK(11, 9) +#define MV88E6390_USXGMII_PHY_STATUS_SPEED_5000 0xa00 +#define MV88E6390_USXGMII_PHY_STATUS_SPEED_2500 0x800 +#define MV88E6390_USXGMII_PHY_STATUS_SPEED_10000 0x600 +#define MV88E6390_USXGMII_PHY_STATUS_SPEED_1000 0x400 +#define MV88E6390_USXGMII_PHY_STATUS_SPEED_100 0x200 +#define MV88E6390_USXGMII_PHY_STATUS_SPEED_10 0x000 +#define MV88E6390_USXGMII_PHY_STATUS_DUPLEX_FULL BIT(12) +#define MV88E6390_USXGMII_PHY_STATUS_LINK BIT(15) +/* 1000BASE-X and SGMII */ #define MV88E6390_SGMII_BMCR (0x2000 + MII_BMCR)#define MV88E6390_SGMII_BMSR (0x2000 + MII_BMSR)
Signature · 1 line
2.34.1
Jakub Kicinski
maintainerQuoted 3 lines · On Wed, 31 May 2023 10:47:20 -0700 [email protected] wrote:
From: Michal Smulski <[email protected]>
Enable USXGMII mode for mv88e6393x chips. Tested on Marvell 88E6191X.
Doesn't seem to apply to net-next, and the CC list is definitely way too short. You must CC people who responded to previous version of the patch and the maintainers.
Failed to apply patch:
Applying: net: dsa: mv88e6xxx: implement USXGMII mode for mv88e6393x Using index info to reconstruct a base tree...
M drivers/net/dsa/mv88e6xxx/chip.c
M drivers/net/dsa/mv88e6xxx/port.c
Falling back to patching base and 3-way merge...
Auto-merging drivers/net/dsa/mv88e6xxx/port.c
Auto-merging drivers/net/dsa/mv88e6xxx/chip.c
CONFLICT (content): Merge conflict in drivers/net/dsa/mv88e6xxx/chip.c Recorded preimage for 'drivers/net/dsa/mv88e6xxx/chip.c'
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch Patch failed at 0001 net: dsa: mv88e6xxx: implement USXGMII mode for mv88e6393x When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Signature · 1 line
pw-bot: cr
Both of your suggestions are excellent.
It appears that there were a few changes made to chip.c and port.c since I submitted this patch. I re-generated this patch against latest state of net-next(main) as v5 and will email to all maintainers and anyone who else who commented on this patch.
Regards,
Michal
-----Original Message-----
From: Jakub Kicinski <[email protected]>
Sent: Wednesday, May 31, 2023 10:57 PM
To: [email protected]
Cc: [email protected]; Michal Smulski <[email protected]>
Subject: Re: [PATCH net-next v4] net: dsa: mv88e6xxx: implement USXGMII mode for mv88e6393x
CAUTION: This email is originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
Quoted 3 lines · On Wed, 31 May 2023 10:47:20 -0700 [email protected] wrote:
From: Michal Smulski <[email protected]>
Enable USXGMII mode for mv88e6393x chips. Tested on Marvell 88E6191X.
Doesn't seem to apply to net-next, and the CC list is definitely way too short. You must CC people who responded to previous version of the patch and the maintainers.
Failed to apply patch:
Applying: net: dsa: mv88e6xxx: implement USXGMII mode for mv88e6393x Using index info to reconstruct a base tree...
M drivers/net/dsa/mv88e6xxx/chip.c
M drivers/net/dsa/mv88e6xxx/port.c
Falling back to patching base and 3-way merge...
Auto-merging drivers/net/dsa/mv88e6xxx/port.c
Auto-merging drivers/net/dsa/mv88e6xxx/chip.c
CONFLICT (content): Merge conflict in drivers/net/dsa/mv88e6xxx/chip.c Recorded preimage for 'drivers/net/dsa/mv88e6xxx/chip.c'
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch Patch failed at 0001 net: dsa: mv88e6xxx: implement USXGMII mode for mv88e6393x When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
--
pw-bot: cr