lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Mon, 12 Jan 2015 03:13:48 +0000
From:	Shaohui Xie <Shaohui.Xie@...escale.com>
To:	Emilian Medve <Emilian.Medve@...escale.com>,
	"shh.xie@...il.com" <shh.xie@...il.com>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	"davem@...emloft.net" <davem@...emloft.net>
CC:	Andy Fleming <afleming@...il.com>
Subject: RE: [PATCH] net/fsl: Add mEMAC MDIO support to XGMAC MDIO

Hello Emil,

> -----Original Message-----
> From: Emil Medve [mailto:Emilian.Medve@...escale.com]
> Sent: Saturday, January 10, 2015 4:12 AM
> To: shh.xie@...il.com; netdev@...r.kernel.org; davem@...emloft.net
> Cc: Andy Fleming; Xie Shaohui-B21989
> Subject: Re: [PATCH] net/fsl: Add mEMAC MDIO support to XGMAC MDIO
> 
> Hello Shao-Hui,
> 
> 
> On 01/04/2015 03:36 AM, shh.xie@...il.com wrote:
> > From: Andy Fleming <afleming@...il.com>
> >
> > The Freescale mEMAC supports operating at 10/100/1000/10G, and its
> > associated MDIO controller is likewise capable of operating both
> > Clause 22 and Clause 45 MDIO buses. It is nearly identical to the MDIO
> > controller on the XGMAC, so we just modify that driver.
> >
> > Portions of this driver developed by:
> >
> > Sandeep Singh <sandeep@...escale.com>
> > Roy Zang <tie-fei.zang@...escale.com>
> >
> > Signed-off-by: Andy Fleming <afleming@...il.com>
> > Signed-off-by: Shaohui Xie <Shaohui.Xie@...escale.com>
> > ---
> >  drivers/net/ethernet/freescale/Kconfig      |  3 +-
> >  drivers/net/ethernet/freescale/xgmac_mdio.c | 64
> > ++++++++++++++++++++++++-----
> >  2 files changed, 55 insertions(+), 12 deletions(-)
> >
> > 	...
> >
> > diff --git a/drivers/net/ethernet/freescale/xgmac_mdio.c
> > b/drivers/net/ethernet/freescale/xgmac_mdio.c
> > index a352445..e0fc3d1 100644
> > --- a/drivers/net/ethernet/freescale/xgmac_mdio.c
> > +++ b/drivers/net/ethernet/freescale/xgmac_mdio.c
> >
> > 	...
> >
> > @@ -123,21 +144,39 @@ static int xgmac_mdio_write(struct mii_bus *bus,
> > int phy_id, int regnum, u16 val  static int xgmac_mdio_read(struct
> > mii_bus *bus, int phy_id, int regnum)  {
> >  	struct tgec_mdio_controller __iomem *regs = bus->priv;
> > -	uint16_t dev_addr = regnum >> 16;
> > +	uint16_t dev_addr;
> > +	uint32_t mdio_stat;
> >  	uint32_t mdio_ctl;
> >  	uint16_t value;
> >  	int ret;
> >
> > +	mdio_stat = in_be32(&regs->mdio_stat);
> > +	if (regnum & MII_ADDR_C45) {
> > +		dev_addr = (regnum >> 16) & 0x1f;
> > +		mdio_stat |= MDIO_STAT_ENC;
> > +	} else {
> > +		dev_addr = regnum & 0x1f;
> > +		mdio_stat = ~MDIO_STAT_ENC;
> 
> Shouldn't this be 'mdio_stat &= ~MDIO_STAT_ENC'?
[S.H] You are right! should be "mdio_stat &= ~MDIO_STAT_ENC".
We have this bug for a long time!

I'll post a patch to fix it.

Thanks!
Shaohui
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ