* fec_main.c patch ENGR00275371 (2013-10-30) prevents use of MII ioctls
@ 2016-02-19 15:16 Carlos Sánchez de La Lama
0 siblings, 0 replies; only message in thread
From: Carlos Sánchez de La Lama @ 2016-02-19 15:16 UTC (permalink / raw)
To: meta-freescale; +Cc: Luwei Zhou, Jason Liu
Hi all,
I was trying so use MII ioctls (SIOCGMIIPHY & SIOG{G,M}MIIREG) to access
registers of the PHY attached to FEC MAC in an iMX6 using Freescale
BSP. I noticed they were failing, so after some debug I found that this
patch (author and commiter cc'ed):
http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/commit/drivers/net/ethernet/freescale/fec_main.c?h=imx_3.10.17_1.0.0_ga&id=8eeda5ac98beb9e43f5a76ae77af3251c0b97ec8
includes the following modification:
@@ -1656,8 +1677,11 @@ static int fec_enet_ioctl(struct net_device
*ndev, struct ifreq *rq, int cmd)
if (!phydev)
return -ENODEV;
- if (cmd == SIOCSHWTSTAMP && fep->bufdesc_ex)
+ if (((cmd == SIOCSHWTSTAMP) || ((cmd >= PTP_ENBL_TXTS_IOCTL) &&
+ (cmd <= PTP_FLUSH_TIMESTAMP))) && fep->bufdesc_ex)
return fec_ptp_ioctl(ndev, rq, cmd);
+ else if (fep->bufdesc_ex)
+ return -ENODEV;
return phy_mii_ioctl(phydev, rq, cmd);
}
which effectively prevents phy_mii_ioctl to be reached (the code will
always return through one of the if/else branches). The code in the repo
seems to be unchanged since that patch.
After removing else branch on my local sources, I am able to use the
ioctls.
BR
Carlos
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-02-19 15:16 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-19 15:16 fec_main.c patch ENGR00275371 (2013-10-30) prevents use of MII ioctls Carlos Sánchez de La Lama
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.