[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1391526492.7871.8.camel@e37108.spectralink.com>
Date: Tue, 4 Feb 2014 15:08:16 +0000
From: Sørensen, Stefan
<Stefan.Sorensen@...ctralink.com>
To: "ben@...adent.org.uk" <ben@...adent.org.uk>
CC: "davem@...emloft.net" <davem@...emloft.net>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"mugunthanvnm@...com" <mugunthanvnm@...com>
Subject: Re: [PATCH] net:cpsw: Pass unhandled ioctl's on to generic phy ioctl
On Tue, 2014-02-04 at 10:50 +0000, Ben Hutchings wrote:
> > This patch allows the use of a generic timestamping phy connected
> > to the cpsw if CPTS support is not enabled.
>
> What if CPTS support is enabled in the driver, but this particular
> machine doesn't have it and uses a timestamping PHY instead?
That would not work, the CPTS will grab the SIOC{G,S}HWTSTAMP. I'm not
sure how that could be configured at runtime, other than a private
ethtool flag.
Also it seem as the situation with a timestamping MAC and a timestamping
PHY could deliver bogus ethtool timestamping info, as it will come from
the PHY if available, but the timestamping will be handled by the MAC.
> > case SIOCGMIIPHY:
> > data->phy_id = priv->slaves[slave_no].phy->addr;
>
> It looks like this existing code is broken, as the phy pointer can be
> NULL!
Right, but that code can go away since SIOCGMIIPHY is also handled by
phy_mii_ioctl. I will delete that case in the next version.
> > + return phy_mii_ioctl(priv->slaves[slave_no].phy, req, cmd);
>
> This presumably also enables SIOC{G,S}MIIREG, but you didn't mention
> that.
Yes, I will add that to the commit log in the next version.
Stefan
Powered by blists - more mailing lists