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]
Message-ID: <9848F2DB572E5649BA045B288BE08FBE016ACCFC@039-SN2MPN1-023.039d.mgd.msft.net>
Date:	Wed, 11 Sep 2013 01:17:19 +0000
From:	Duan Fugang-B38611 <B38611@...escale.com>
To:	Sascha Hauer <s.hauer@...gutronix.de>
CC:	"shawn.guo@...aro.org" <shawn.guo@...aro.org>,
	"davem@...emloft.net" <davem@...emloft.net>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	"bhutchings@...arflare.com" <bhutchings@...arflare.com>,
	"stephen@...workplumber.org" <stephen@...workplumber.org>,
	Li Frank-B20596 <B20596@...escale.com>
Subject: RE: [PATCH] net: fec: fix phy reset operation to let imx6sl evk work

From: Sascha Hauer [mailto:s.hauer@...gutronix.de]
Data: Wednesday, September 11, 2013 2:49 AM

> To: Duan Fugang-B38611
> Cc: shawn.guo@...aro.org; davem@...emloft.net; netdev@...r.kernel.org;
> bhutchings@...arflare.com; stephen@...workplumber.org; Li Frank-B20596
> Subject: Re: [PATCH] net: fec: fix phy reset operation to let imx6sl evk
> work
> 
> On Tue, Sep 10, 2013 at 05:07:33PM +0800, Fugang Duan wrote:
> > diff --git a/drivers/net/ethernet/freescale/fec_main.c
> > b/drivers/net/ethernet/freescale/fec_main.c
> > index f9aacf5..0c17df2 100644
> > --- a/drivers/net/ethernet/freescale/fec_main.c
> > +++ b/drivers/net/ethernet/freescale/fec_main.c
> > @@ -61,6 +61,7 @@
> >  #include "fec.h"
> >
> >  static void set_multicast_list(struct net_device *ndev);
> > +static void fec_enet_reset_phy(struct platform_device *pdev);
> 
> Please move the function up and remove the prototype.
Ok, i will do it. Thanks.

> 
> > @@ -1780,6 +1781,10 @@ fec_enet_open(struct net_device *ndev)
> >  	phy_start(fep->phy_dev);
> >  	netif_start_queue(ndev);
> >  	fep->opened = 1;
> > +
> > +	/* reset phy */
> > +	fec_enet_reset_phy(fep->pdev);
> 
> Drop this comment. It's very redundant to the function name.
Thanks, I will remove the comment.

> 
> > +static void fec_enet_reset_phy(struct platform_device *pdev)
> >  {
> > -	/*
> > -	 * In case of platform probe, the reset has been done
> > -	 * by machine code.
> > -	 */
> > +	struct net_device *ndev = platform_get_drvdata(pdev);
> > +	struct fec_enet_private *fep = netdev_priv(ndev);
> > +
> > +	/* check GPIO valid to avoid kernel print warning when no gpio reset
> */
> > +	if (gpio_is_valid(fep->phy_reset_gpio)) {
> > +		gpio_set_value(fep->phy_reset_gpio, 0);
> > +		msleep(fep->reset_duration);
> > +		gpio_set_value(fep->phy_reset_gpio, 1);
> > +	}
> 
> Drop the comment. It's obvious why it's a good idea to check for a valid
> gpio.

Thanks, I will remove the comments.

--
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