* [PATCH 1/2] net: phy: Add BaseT1 auto-negotiation constants
@ 2023-12-18 22:18 Dimitri Fedrau
2023-12-18 22:18 ` [PATCH 2/2] net: phy: Support 100BT1 and 1000BT1 linkmode advertisements Dimitri Fedrau
2023-12-18 23:45 ` [PATCH 1/2] net: phy: Add BaseT1 auto-negotiation constants Andrew Lunn
0 siblings, 2 replies; 5+ messages in thread
From: Dimitri Fedrau @ 2023-12-18 22:18 UTC (permalink / raw)
Cc: Dimitri Fedrau, Andrew Lunn, Heiner Kallweit, Russell King,
netdev, linux-kernel
Added constants for advertising 100BT1 and 1000BT1 in register BASE-T1
auto-negotiation advertisement register [31:16] (Register 7.515)
Signed-off-by: Dimitri Fedrau <dima.fedrau@gmail.com>
---
include/uapi/linux/mdio.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/uapi/linux/mdio.h b/include/uapi/linux/mdio.h
index d03863da180e..020ccc810d23 100644
--- a/include/uapi/linux/mdio.h
+++ b/include/uapi/linux/mdio.h
@@ -348,6 +348,8 @@
/* BASE-T1 auto-negotiation advertisement register [31:16] */
#define MDIO_AN_T1_ADV_M_B10L 0x4000 /* device is compatible with 10BASE-T1L */
+#define MDIO_AN_T1_ADV_M_1000BT1 0x0080 /* advertise 1000BASE-T1 */
+#define MDIO_AN_T1_ADV_M_100BT1 0x0020 /* advertise 100BASE-T1 */
#define MDIO_AN_T1_ADV_M_MST 0x0010 /* advertise master preference */
/* BASE-T1 auto-negotiation advertisement register [47:32] */
--
2.39.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] net: phy: Support 100BT1 and 1000BT1 linkmode advertisements
2023-12-18 22:18 [PATCH 1/2] net: phy: Add BaseT1 auto-negotiation constants Dimitri Fedrau
@ 2023-12-18 22:18 ` Dimitri Fedrau
2023-12-18 23:45 ` [PATCH 1/2] net: phy: Add BaseT1 auto-negotiation constants Andrew Lunn
1 sibling, 0 replies; 5+ messages in thread
From: Dimitri Fedrau @ 2023-12-18 22:18 UTC (permalink / raw)
Cc: Dimitri Fedrau, Andrew Lunn, Heiner Kallweit, Russell King,
netdev, linux-kernel
Extend helper function linkmode_adv_to_mii_t1_adv_m_t to support
100BT1 and 1000BT1 linkmode advertisements.
Signed-off-by: Dimitri Fedrau <dima.fedrau@gmail.com>
---
include/linux/mdio.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/include/linux/mdio.h b/include/linux/mdio.h
index 007fd9c3e4b6..322c7a5092e4 100644
--- a/include/linux/mdio.h
+++ b/include/linux/mdio.h
@@ -408,6 +408,10 @@ static inline u32 linkmode_adv_to_mii_t1_adv_m_t(unsigned long *advertising)
if (linkmode_test_bit(ETHTOOL_LINK_MODE_10baseT1L_Full_BIT, advertising))
result |= MDIO_AN_T1_ADV_M_B10L;
+ if (linkmode_test_bit(ETHTOOL_LINK_MODE_100baseT1_Full_BIT, advertising))
+ result |= MDIO_AN_T1_ADV_M_100BT1;
+ if (linkmode_test_bit(ETHTOOL_LINK_MODE_1000baseT1_Full_BIT, advertising))
+ result |= MDIO_AN_T1_ADV_M_1000BT1;
return result;
}
--
2.39.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] net: phy: Add BaseT1 auto-negotiation constants
2023-12-18 22:18 [PATCH 1/2] net: phy: Add BaseT1 auto-negotiation constants Dimitri Fedrau
2023-12-18 22:18 ` [PATCH 2/2] net: phy: Support 100BT1 and 1000BT1 linkmode advertisements Dimitri Fedrau
@ 2023-12-18 23:45 ` Andrew Lunn
2023-12-19 9:28 ` Dimitri Fedrau
1 sibling, 1 reply; 5+ messages in thread
From: Andrew Lunn @ 2023-12-18 23:45 UTC (permalink / raw)
To: Dimitri Fedrau; +Cc: Heiner Kallweit, Russell King, netdev, linux-kernel
On Mon, Dec 18, 2023 at 11:18:13PM +0100, Dimitri Fedrau wrote:
> Added constants for advertising 100BT1 and 1000BT1 in register BASE-T1
> auto-negotiation advertisement register [31:16] (Register 7.515)
Hi Dimitri
These two patches look good, but...
Please take a read of:
https://www.kernel.org/doc/html/latest/process/maintainer-netdev.html#netdev-faq
Also, its normal to include a user for new APIs. Do you have a driver
which will make use of this to advertisement modes?
Thanks
Andrew
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] net: phy: Add BaseT1 auto-negotiation constants
2023-12-18 23:45 ` [PATCH 1/2] net: phy: Add BaseT1 auto-negotiation constants Andrew Lunn
@ 2023-12-19 9:28 ` Dimitri Fedrau
2023-12-19 16:01 ` Andrew Lunn
0 siblings, 1 reply; 5+ messages in thread
From: Dimitri Fedrau @ 2023-12-19 9:28 UTC (permalink / raw)
To: Andrew Lunn
Cc: Heiner Kallweit, Russell King, netdev, linux-kernel,
Stefan Eichenberger
Am Tue, Dec 19, 2023 at 12:45:01AM +0100 schrieb Andrew Lunn:
> On Mon, Dec 18, 2023 at 11:18:13PM +0100, Dimitri Fedrau wrote:
> > Added constants for advertising 100BT1 and 1000BT1 in register BASE-T1
> > auto-negotiation advertisement register [31:16] (Register 7.515)
>
> Hi Dimitri
>
> These two patches look good, but...
>
> Please take a read of:
>
> https://www.kernel.org/doc/html/latest/process/maintainer-netdev.html#netdev-faq
>
I probably should have sent them with subject-prefix "PATCH net-next" !?
> Also, its normal to include a user for new APIs. Do you have a driver
> which will make use of this to advertisement modes?
>
Yes, I'm currently trying to push a driver for the Marvell88Q2220
100BASE-T1/1000BASE-T1 PHY. It supports autonegotiation and with an
additional patch to function genphy_c45_baset1_an_config_aneg which is
not part of the series it is possible to set the advertised speed.
I probably should send all patches as a series including the driver ?
> Thanks
> Andrew
Best regards,
Dimitri
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] net: phy: Add BaseT1 auto-negotiation constants
2023-12-19 9:28 ` Dimitri Fedrau
@ 2023-12-19 16:01 ` Andrew Lunn
0 siblings, 0 replies; 5+ messages in thread
From: Andrew Lunn @ 2023-12-19 16:01 UTC (permalink / raw)
To: Dimitri Fedrau
Cc: Heiner Kallweit, Russell King, netdev, linux-kernel,
Stefan Eichenberger
> Yes, I'm currently trying to push a driver for the Marvell88Q2220
> 100BASE-T1/1000BASE-T1 PHY. It supports autonegotiation and with an
> additional patch to function genphy_c45_baset1_an_config_aneg which is
> not part of the series it is possible to set the advertised speed.
> I probably should send all patches as a series including the driver ?
Yes, please do send it all together as one patchset.
Andrew
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-12-19 16:01 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-18 22:18 [PATCH 1/2] net: phy: Add BaseT1 auto-negotiation constants Dimitri Fedrau
2023-12-18 22:18 ` [PATCH 2/2] net: phy: Support 100BT1 and 1000BT1 linkmode advertisements Dimitri Fedrau
2023-12-18 23:45 ` [PATCH 1/2] net: phy: Add BaseT1 auto-negotiation constants Andrew Lunn
2023-12-19 9:28 ` Dimitri Fedrau
2023-12-19 16:01 ` Andrew Lunn
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).