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>] [day] [month] [year] [list]
Date:	Wed, 19 Feb 2014 10:41:54 +0800
From:	hayeswang <hayeswang@...ltek.com>
To:	'Florian Fainelli' <f.fainelli@...il.com>
CC:	'netdev' <netdev@...r.kernel.org>, <nic_swsd@...ltek.com>,
	<linux-kernel@...r.kernel.org>,
	'linux-usb' <linux-usb@...r.kernel.org>
Subject: RE: [PATCH net-next 07/14] r8152: combine PHY reset with set_speed

 Florian Fainelli [mailto:f.fainelli@...il.com] 
> Sent: Wednesday, February 19, 2014 1:19 AM
> To: Hayes Wang
> Cc: netdev; nic_swsd@...ltek.com; 
> linux-kernel@...r.kernel.org; linux-usb
> Subject: Re: [PATCH net-next 07/14] r8152: combine PHY reset 
> with set_speed
[...]
> > +static void rtl_phy_reset(struct r8152 *tp)
> > +{
> > +       u16 data;
> > +       int i;
> > +
> > +       clear_bit(PHY_RESET, &tp->flags);
> > +
> > +       data = r8152_mdio_read(tp, MII_BMCR);
> > +
> > +       /* don't reset again before the previous one complete */
> > +       if (data & BMCR_RESET)
> > +               return;
> > +
> > +       data |= BMCR_RESET;
> > +       r8152_mdio_write(tp, MII_BMCR, data);
> > +
> > +       for (i = 0; i < 50; i++) {
> > +               msleep(20);
> > +               if ((r8152_mdio_read(tp, MII_BMCR) & 
> BMCR_RESET) == 0)
> > +                       break;
> > +       }
> > +}
> 
> If you implemented libphy in the driver you would not have to
> duplicate that and you could use "phy_init_hw()" or
> genphy_soft_reset() to perform the BMCR-based software reset.

Thanks for you suggestion. I would study about those.
 
Best Regards,
Hayes


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists