1. 16 1月, 2019 5 次提交
  2. 20 12月, 2018 1 次提交
  3. 19 12月, 2018 4 次提交
    • K
      net: phy: Fix the issue that netif always links up after resuming · 8742beb5
      Kunihiko Hayashi 提交于
      Even though the link is down before entering hibernation,
      there is an issue that the network interface always links up after resuming
      from hibernation.
      
      If the link is still down before enabling the network interface,
      and after resuming from hibernation, the phydev->state is forcibly set
      to PHY_UP in mdio_bus_phy_restore(), and the link becomes up.
      
      In suspend sequence, only if the PHY is attached, mdio_bus_phy_suspend()
      calls phy_stop_machine(), and mdio_bus_phy_resume() calls
      phy_start_machine().
      In resume sequence, it's enough to do the same as mdio_bus_phy_resume()
      because the state has been preserved.
      
      This patch fixes the issue by calling phy_start_machine() in
      mdio_bus_phy_restore() in the same way as mdio_bus_phy_resume().
      
      Fixes: bc87922f ("phy: Move PHY PM operations into phy_device")
      Suggested-by: NHeiner Kallweit <hkallweit1@gmail.com>
      Signed-off-by: NKunihiko Hayashi <hayashi.kunihiko@socionext.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8742beb5
    • H
      net: phy: remove unused code in phy_probe · 935b8a59
      Heiner Kallweit 提交于
      3c1bcc86 ("net: ethernet: Convert phydev advertize and supported
      from u32 to link mode") left some unused code in phy_probe(), remove it.
      Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      935b8a59
    • H
      net: phy: print stack trace in phy_error · fa7b28c1
      Heiner Kallweit 提交于
      So far phy_error() silently stops the PHY state machine. If the network
      driver doesn't inform about a  MDIO error then the user may wonder why
      his network is down. Let's print the stack trace to facilitate search
      for the root cause of the error.
      Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fa7b28c1
    • H
      net: phy: improve phy state checking · 2b3e88ea
      Heiner Kallweit 提交于
      Add helpers phy_is_started() and __phy_is_started() to avoid open-coded
      checks whether PHY has been started. To make the check easier move
      PHY_HALTED before PHY_UP in enum phy_state. Further improvements:
      
      phy_start_aneg():
      Return -EBUSY and print warning if function is called from a non-started
      state (DOWN, READY, HALTED). Better check because function is exported
      and drivers may use it incorrectly.
      
      phy_interrupt():
      Return IRQ_NONE also if state is DOWN or READY. We should never receive
      an interrupt in one of these states, but better play safe.
      
      phy_stop():
      Just return and print a warning if PHY is in a non-started state.
      This warning should help to identify drivers with unbalanced calls to
      phy_start() / phy_stop().
      
      phy_state_machine():
      Schedule state machine run only if PHY is in a started state.
      E.g. if state is READY we don't need the state machine, it will be
      started by phy_start().
      
      v2:
      - don't use __func__ within phy_warn_state
      v3:
      - use WARN() instead of printing error message to facilitate debugging
      Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com>
      Reviewed-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2b3e88ea
  4. 18 12月, 2018 1 次提交
  5. 09 12月, 2018 2 次提交
    • A
      net: phy: mdio-gpio: Add phy_ignore_ta_mask to platform data · dc9d38ce
      Andrew Lunn 提交于
      The Marvell 6390 Ethernet switch family does not perform MDIO
      turnaround correctly. Many hardware MDIO bus masters don't care about
      this, but the bitbangging implementation in Linux does by default. Add
      phy_ignore_ta_mask to the platform data so that the bitbangging code
      can be told which devices are known to get TA wrong.
      
      v2
      Reviewed-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      dc9d38ce
    • A
      net: phy: mdio-gpio: Add platform_data support for phy_mask · 04fa26ba
      Andrew Lunn 提交于
      It is sometimes necessary to instantiate a bit-banging MDIO bus as a
      platform device, without the aid of device tree.
      
      When device tree is being used, the bus is not scanned for devices,
      only those devices which are in device tree are probed. Without device
      tree, by default, all addresses on the bus are scanned. This may then
      find a device which is not a PHY, e.g. a switch. And the switch may
      have registers containing values which look like a PHY. So during the
      scan, a PHY device is wrongly created.
      
      After the bus has been registered, a search is made for
      mdio_board_info structures which indicates devices on the bus, and the
      driver which should be used for them. This is typically used to
      instantiate Ethernet switches from platform drivers.  However, if the
      scanning of the bus has created a PHY device at the same location as
      indicated into the board info for a switch, the switch device is not
      created, since the address is already busy.
      
      This can be avoided by setting the phy_mask of the mdio bus. This mask
      prevents addresses on the bus being scanned.
      
      v2
      Reviewed-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      04fa26ba
  6. 06 12月, 2018 4 次提交
  7. 05 12月, 2018 1 次提交
  8. 04 12月, 2018 6 次提交
  9. 30 11月, 2018 1 次提交
  10. 28 11月, 2018 1 次提交
  11. 24 11月, 2018 2 次提交
  12. 19 11月, 2018 5 次提交
  13. 18 11月, 2018 1 次提交
  14. 17 11月, 2018 3 次提交
  15. 16 11月, 2018 1 次提交
  16. 13 11月, 2018 1 次提交
  17. 12 11月, 2018 1 次提交