Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1437292

Re: [PATCH 2/2] net: ethernet: bcmgenet: use phy_ethtool_{get|set}_link_ksettings

From Florian Fainelli <f.fainelli@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH 2/2] net: ethernet: bcmgenet: use phy_ethtool_{get|set}_link_ksettings
Date 2016-07-05 23:20 +0200
Message-ID <rRFV7-8fV-11@gated-at.bofh.it> (permalink)
References <rQREZ-1Wu-5@gated-at.bofh.it> <rQREZ-1Wu-3@gated-at.bofh.it> <rRla2-3od-41@gated-at.bofh.it> <rRqjn-6tZ-5@gated-at.bofh.it> <rRFLs-8bM-25@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 07/05/2016 02:07 PM, Philippe Reynes wrote:
> Hi Florian,
> 
> On 05/07/16 06:30, Florian Fainelli wrote:
>> Le 04/07/2016 16:03, David Miller a écrit :
>>> From: Philippe Reynes<tremyfr@gmail.com>
>>> Date: Sun,  3 Jul 2016 17:33:57 +0200
>>>
>>>> There are two generics functions phy_ethtool_{get|set}_link_ksettings,
>>>> so we can use them instead of defining the same code in the driver.
>>>>
>>>> Signed-off-by: Philippe Reynes<tremyfr@gmail.com>
>>>
>>> Applied.
>>>
>>
>> The transformation is not equivalent, we lost the checks on
>> netif_running() in the process, and those are here for a reason, if the
>> interface is down and therefore clock gated, MDIO accesses to the PHY
>> will simply fail outright and cause bus errors.
> 
> Oh, I see, I've missed this. Sorry for this mistake.
> We should revert this path.

Well, maybe better than that, actually put the check in the generic
functions, because if the link is down, aka netif_running() returns
false, link parameters cannot be reliably queried and they are invalid.
-- 
Florian

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 2/2] net: ethernet: bcmgenet: use phy_ethtool_{get|set}_link_ksettings Philippe Reynes <tremyfr@gmail.com> - 2016-07-03 17:40 +0200
  Re: [PATCH 2/2] net: ethernet: bcmgenet: use  phy_ethtool_{get|set}_link_ksettings David Miller <davem@davemloft.net> - 2016-07-05 01:10 +0200
    Re: [PATCH 2/2] net: ethernet: bcmgenet: use  phy_ethtool_{get|set}_link_ksettings Florian Fainelli <f.fainelli@gmail.com> - 2016-07-05 06:40 +0200
      Re: [PATCH 2/2] net: ethernet: bcmgenet: use phy_ethtool_{get|set}_link_ksettings Philippe Reynes <tremyfr@gmail.com> - 2016-07-05 23:10 +0200
        Re: [PATCH 2/2] net: ethernet: bcmgenet: use  phy_ethtool_{get|set}_link_ksettings Florian Fainelli <f.fainelli@gmail.com> - 2016-07-05 23:20 +0200
          Re: [PATCH 2/2] net: ethernet: bcmgenet: use  phy_ethtool_{get|set}_link_ksettings Ben Hutchings <ben@decadent.org.uk> - 2016-07-05 23:50 +0200
        Re: [PATCH 2/2] net: ethernet: bcmgenet: use  phy_ethtool_{get|set}_link_ksettings Florian Fainelli <f.fainelli@gmail.com> - 2016-07-08 03:30 +0200

csiph-web