Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1665270

RE: [PATCH net-next 6/9] net: hns3: Add MDIO support to HNS3 Ethernet driver for hip08 SoC

From Salil Mehta <salil.mehta@huawei.com>
Newsgroups linux.kernel
Subject RE: [PATCH net-next 6/9] net: hns3: Add MDIO support to HNS3 Ethernet driver for hip08 SoC
Date 2017-06-14 01:10 +0200
Message-ID <tS36F-5KM-1@gated-at.bofh.it> (permalink)
References <tQFzr-1TZ-3@gated-at.bofh.it> <tQFzr-1TZ-11@gated-at.bofh.it> <tQTVM-2TS-13@gated-at.bofh.it> <tS1Hz-4L9-1@gated-at.bofh.it> <tS2Nj-5pl-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi Andrew,

> -----Original Message-----
> From: Andrew Lunn [mailto:andrew@lunn.ch]
> Sent: Tuesday, June 13, 2017 11:41 PM
> To: Salil Mehta
> Cc: Florian Fainelli; davem@davemloft.net; Zhuangyuzeng (Yisen);
> huangdaode; lipeng (Y); mehta.salil.lnk@gmail.com;
> netdev@vger.kernel.org; linux-kernel@vger.kernel.org; Linuxarm
> Subject: Re: [PATCH net-next 6/9] net: hns3: Add MDIO support to HNS3
> Ethernet driver for hip08 SoC
> 
> > > Hum why do you do this? mdiobus_register() will scan through your
> bus
> > > provided that you set an appropriate phy_mask value (here you tell
> it
> > > not to) and you already provide the PHY address to scan for
> > >
> > I know this looks weird but the reason why it appears as it is in
> code is:
> >
> > mdiobus_register() calls mdiobus_scan(). If you see below code leg
> function
> > get_phy_device() assumes to be having supporting Clause 22 so its
> input
> > parameter 'is_c45' is always 'false'.
> >
> > struct phy_device *mdiobus_scan(struct mii_bus *bus, int addr)
> > {
> > 	struct phy_device *phydev;
> > 	int err;
> >
> > 	phydev = get_phy_device(bus, addr, false);
> > 	if (IS_ERR(phydev))                ^^^^^
> > 		return phydev;
> > 	[...]
> > }
> >
> > Therefore, to support C45 device we did below:
> >
> > * disabled the autoscan/mdiobus_scan() Of the PHY devices using the
> >   phy_mask(= ~0)
> > * Now, did almost the same thing what mdiobus_scan does i.e.
> >     * get_phy_device but with is_c45 (=true/false)
> >     * register the above phy device with phy_device_register()
> >
> > There could be some gap in my understanding, please help to correct
> this?
> 
> So this is the question i was asking Florian
> 
> Rather than hack around limitations of the core, you should fix the
> core. I think we should make the core first try probing using c45. If
> that comes back with an error, or does not find a device, try the
> probe using c22.
I can take this activity but please allow me to do this as a separate activity
and not part of this driver Up-streaming activity.

Since I would be touching the core, lots of drivers will get impacted and will
have to wait till everyone gives clean signal. This will impact our internal
deadlines. But as I said I am eager to cooperate & contribute :)

Thanks
Salil
> 
>       Andrew

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH net-next 6/9] net: hns3: Add MDIO support to HNS3 Ethernet driver for hip08 SoC Salil Mehta <salil.mehta@huawei.com> - 2017-06-10 05:50 +0200
  Re: [PATCH net-next 6/9] net: hns3: Add MDIO support to HNS3 Ethernet  driver for hip08 SoC Florian Fainelli <f.fainelli@gmail.com> - 2017-06-10 21:10 +0200
    Re: [PATCH net-next 6/9] net: hns3: Add MDIO support to HNS3  Ethernet driver for hip08 SoC Andrew Lunn <andrew@lunn.ch> - 2017-06-11 04:50 +0200
      RE: [PATCH net-next 6/9] net: hns3: Add MDIO support to HNS3  Ethernet driver for hip08 SoC Salil Mehta <salil.mehta@huawei.com> - 2017-06-13 22:50 +0200
        Re: [PATCH net-next 6/9] net: hns3: Add MDIO support to HNS3  Ethernet driver for hip08 SoC Andrew Lunn <andrew@lunn.ch> - 2017-06-13 23:20 +0200
    RE: [PATCH net-next 6/9] net: hns3: Add MDIO support to HNS3  Ethernet driver for hip08 SoC Salil Mehta <salil.mehta@huawei.com> - 2017-06-13 23:40 +0200
      Re: [PATCH net-next 6/9] net: hns3: Add MDIO support to HNS3  Ethernet driver for hip08 SoC Andrew Lunn <andrew@lunn.ch> - 2017-06-14 00:50 +0200
        RE: [PATCH net-next 6/9] net: hns3: Add MDIO support to HNS3  Ethernet driver for hip08 SoC Salil Mehta <salil.mehta@huawei.com> - 2017-06-14 01:10 +0200
          Re: [PATCH net-next 6/9] net: hns3: Add MDIO support to HNS3  Ethernet driver for hip08 SoC Andrew Lunn <andrew@lunn.ch> - 2017-06-14 03:20 +0200
            RE: [PATCH net-next 6/9] net: hns3: Add MDIO support to HNS3  Ethernet driver for hip08 SoC Salil Mehta <salil.mehta@huawei.com> - 2017-06-17 13:20 +0200

csiph-web