Re: [PATCH net] ravb: Add disable 10base
Hello. On 12/14/2015 9:49 PM, Florian Fainelli wrote: From: Kazuya MizuguchiEthernet AVB does not support 10 Mbps transfer speed. Signed-off-by: Kazuya Mizuguchi Signed-off-by: Yoshihiro Kaneko --- This patch is based on the master branch of David Miller's networking tree. drivers/net/ethernet/renesas/ravb_main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c index b69e0c2..467d416 100644 --- a/drivers/net/ethernet/renesas/ravb_main.c +++ b/drivers/net/ethernet/renesas/ravb_main.c @@ -905,6 +905,9 @@ static int ravb_phy_init(struct net_device *ndev) netdev_info(ndev, "limited PHY to 100Mbit/s\n"); } +/* 10BASE is not supported */ +phydev->supported &= ~PHY_10BT_FEATURES; I wonder if we should also modify 'phydev->advertising' like phy_set_max_speed() does... Yes, this is a good idea. If your PHY driver uses genphy_config_advert() this is taken care of for you, but in case you have a buggy PHY driver, you should just do this yourself here. OK, drivers/net/phy/micrel.c uses it for almost all chips. MBR, Sergei -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH net] ravb: Add disable 10base
From: Yoshihiro KanekoDate: Mon, 14 Dec 2015 00:15:58 +0900 > From: Kazuya Mizuguchi > > Ethernet AVB does not support 10 Mbps transfer speed. > > Signed-off-by: Kazuya Mizuguchi > Signed-off-by: Yoshihiro Kaneko Applied. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH net] ravb: Add disable 10base
Hello. On 12/13/2015 06:15 PM, Yoshihiro Kaneko wrote: From: Kazuya MizuguchiEthernet AVB does not support 10 Mbps transfer speed. Signed-off-by: Kazuya Mizuguchi Signed-off-by: Yoshihiro Kaneko --- This patch is based on the master branch of David Miller's networking tree. drivers/net/ethernet/renesas/ravb_main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c index b69e0c2..467d416 100644 --- a/drivers/net/ethernet/renesas/ravb_main.c +++ b/drivers/net/ethernet/renesas/ravb_main.c @@ -905,6 +905,9 @@ static int ravb_phy_init(struct net_device *ndev) netdev_info(ndev, "limited PHY to 100Mbit/s\n"); } + /* 10BASE is not supported */ + phydev->supported &= ~PHY_10BT_FEATURES; I wonder if we should also modify 'phydev->advertising' like phy_set_max_speed() does... MBR, Sergei -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH net] ravb: Add disable 10base
On 14/12/15 09:31, Sergei Shtylyov wrote: > Hello. > > On 12/13/2015 06:15 PM, Yoshihiro Kaneko wrote: > >> From: Kazuya Mizuguchi>> >> Ethernet AVB does not support 10 Mbps transfer speed. >> >> Signed-off-by: Kazuya Mizuguchi >> Signed-off-by: Yoshihiro Kaneko >> --- >> >> This patch is based on the master branch of David Miller's networking >> tree. >> >> drivers/net/ethernet/renesas/ravb_main.c | 3 +++ >> 1 file changed, 3 insertions(+) >> >> diff --git a/drivers/net/ethernet/renesas/ravb_main.c >> b/drivers/net/ethernet/renesas/ravb_main.c >> index b69e0c2..467d416 100644 >> --- a/drivers/net/ethernet/renesas/ravb_main.c >> +++ b/drivers/net/ethernet/renesas/ravb_main.c >> @@ -905,6 +905,9 @@ static int ravb_phy_init(struct net_device *ndev) >> netdev_info(ndev, "limited PHY to 100Mbit/s\n"); >> } >> >> +/* 10BASE is not supported */ >> +phydev->supported &= ~PHY_10BT_FEATURES; > >I wonder if we should also modify 'phydev->advertising' like > phy_set_max_speed() does... Yes, this is a good idea. If your PHY driver uses genphy_config_advert() this is taken care of for you, but in case you have a buggy PHY driver, you should just do this yourself here. -- Florian -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH net] ravb: Add disable 10base
On 13/12/15 20:53, Simon Horman wrote: > [Cc Florian] > > On Sun, Dec 13, 2015 at 08:17:48PM +0300, Sergei Shtylyov wrote: >> Hello. >> >> On 12/13/2015 06:15 PM, Yoshihiro Kaneko wrote: >> >>> From: Kazuya Mizuguchi>>> >>> Ethernet AVB does not support 10 Mbps transfer speed. >>> >>> Signed-off-by: Kazuya Mizuguchi >>> Signed-off-by: Yoshihiro Kaneko >>> --- >>> >>> This patch is based on the master branch of David Miller's networking >>> tree. >>> >>> drivers/net/ethernet/renesas/ravb_main.c | 3 +++ >>> 1 file changed, 3 insertions(+) >>> >>> diff --git a/drivers/net/ethernet/renesas/ravb_main.c >>> b/drivers/net/ethernet/renesas/ravb_main.c >>> index b69e0c2..467d416 100644 >>> --- a/drivers/net/ethernet/renesas/ravb_main.c >>> +++ b/drivers/net/ethernet/renesas/ravb_main.c >>> @@ -905,6 +905,9 @@ static int ravb_phy_init(struct net_device *ndev) >>> netdev_info(ndev, "limited PHY to 100Mbit/s\n"); >>> } >>> >>> + /* 10BASE is not supported */ >>> + phydev->supported &= ~PHY_10BT_FEATURES; >>> + >> >>Perhaps we need phy_set_min_speed() in addition to phy_set_max_speed()? > > FWIW, as the person who added phy_set_max_speed(), I think > that is sounds like a good idea. I am not opposed to the idea, but so far, it seems like setting the minimum supported speed was a little less frequent than setting the maximum speed. Feel free to submit a patch though if you think/know there are other drivers potentially using this. -- Florian -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH net] ravb: Add disable 10base
[Cc Florian] On Sun, Dec 13, 2015 at 08:17:48PM +0300, Sergei Shtylyov wrote: > Hello. > > On 12/13/2015 06:15 PM, Yoshihiro Kaneko wrote: > > >From: Kazuya Mizuguchi> > > >Ethernet AVB does not support 10 Mbps transfer speed. > > > >Signed-off-by: Kazuya Mizuguchi > >Signed-off-by: Yoshihiro Kaneko > >--- > > > >This patch is based on the master branch of David Miller's networking > >tree. > > > > drivers/net/ethernet/renesas/ravb_main.c | 3 +++ > > 1 file changed, 3 insertions(+) > > > >diff --git a/drivers/net/ethernet/renesas/ravb_main.c > >b/drivers/net/ethernet/renesas/ravb_main.c > >index b69e0c2..467d416 100644 > >--- a/drivers/net/ethernet/renesas/ravb_main.c > >+++ b/drivers/net/ethernet/renesas/ravb_main.c > >@@ -905,6 +905,9 @@ static int ravb_phy_init(struct net_device *ndev) > > netdev_info(ndev, "limited PHY to 100Mbit/s\n"); > > } > > > >+/* 10BASE is not supported */ > >+phydev->supported &= ~PHY_10BT_FEATURES; > >+ > >Perhaps we need phy_set_min_speed() in addition to phy_set_max_speed()? FWIW, as the person who added phy_set_max_speed(), I think that is sounds like a good idea. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH net] ravb: Add disable 10base
From: Kazuya MizuguchiEthernet AVB does not support 10 Mbps transfer speed. Signed-off-by: Kazuya Mizuguchi Signed-off-by: Yoshihiro Kaneko --- This patch is based on the master branch of David Miller's networking tree. drivers/net/ethernet/renesas/ravb_main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c index b69e0c2..467d416 100644 --- a/drivers/net/ethernet/renesas/ravb_main.c +++ b/drivers/net/ethernet/renesas/ravb_main.c @@ -905,6 +905,9 @@ static int ravb_phy_init(struct net_device *ndev) netdev_info(ndev, "limited PHY to 100Mbit/s\n"); } + /* 10BASE is not supported */ + phydev->supported &= ~PHY_10BT_FEATURES; + netdev_info(ndev, "attached PHY %d (IRQ %d) to driver %s\n", phydev->addr, phydev->irq, phydev->drv->name); -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH net] ravb: Add disable 10base
Hello. On 12/13/2015 06:15 PM, Yoshihiro Kaneko wrote: From: Kazuya MizuguchiEthernet AVB does not support 10 Mbps transfer speed. Signed-off-by: Kazuya Mizuguchi Signed-off-by: Yoshihiro Kaneko --- This patch is based on the master branch of David Miller's networking tree. drivers/net/ethernet/renesas/ravb_main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c index b69e0c2..467d416 100644 --- a/drivers/net/ethernet/renesas/ravb_main.c +++ b/drivers/net/ethernet/renesas/ravb_main.c @@ -905,6 +905,9 @@ static int ravb_phy_init(struct net_device *ndev) netdev_info(ndev, "limited PHY to 100Mbit/s\n"); } + /* 10BASE is not supported */ + phydev->supported &= ~PHY_10BT_FEATURES; + Perhaps we need phy_set_min_speed() in addition to phy_set_max_speed()? MBR, Sergei -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html