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] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 13 Nov 2014 08:57:14 +0100
From:	Enric Balletbo Serra <eballetbo@...il.com>
To:	David Miller <davem@...emloft.net>
Cc:	netdev@...r.kernel.org,
	Steve Glendinning <steve.glendinning@...well.net>,
	Javier Martinez Canillas <javier@...hile0.org>,
	Enrico Butera <ebutera@...il.com>
Subject: Re: [PATCH] smsc911x: power-up phydev before doing a software reset.

Hi,

2014-11-12 0:30 GMT+01:00 David Miller <davem@...emloft.net>:
> From: Enric Balletbo i Serra <eballetbo@...ebcn.com>
> Date: Mon, 10 Nov 2014 19:23:09 +0100
>
>> With commit be9dad1f9f26604fb ("net: phy: suspend phydev when going
>> to HALTED"), the PHY device will be put in a low-power mode using
>> BMCR_PDOWN if the the interface is set down. The smsc911x driver does
>> a software_reset opening the device driver (ndo_open). In such case,
>> the PHY must be powered-up before access to any register and before
>> calling the software_reset function. Otherwise, as the PHY is powered
>> down the software reset fails and the interface can not be enabled
>> again.
>>
>> This patch fixes this scenario that is easy to reproduce setting down
>> the network interface and setting up again.
>>
>>     $ ifconfig eth0 down
>>     $ ifconfig eth0 up
>>     ifconfig: SIOCSIFFLAGS: Input/output error
>>
>> Signed-off-by: Enric Balletbo i Serra <eballetbo@...ebcn.com>
>  ...
>> +             mdelay(1);
>
> As per Javier's feedback, please convert this to usleep_range()
> if you agree that this can only be invoked from process context.
>

Yes, I'm agree. I'll send version 2 of the patch changing this. Also
there are other places that use the mdelay family intead of
usleep_range() and can only be invoked from process context. Maybe
would be interesting send another patch changing this.

Cheers,
   Enric

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