1. 19 10月, 2019 3 次提交
    • D
      net: bcmgenet: reset 40nm EPHY on energy detect · 25382b99
      Doug Berger 提交于
      The EPHY integrated into the 40nm Set-Top Box devices can falsely
      detect energy when connected to a disabled peer interface. When the
      peer interface is enabled the EPHY will detect and report the link
      as active, but on occasion may get into a state where it is not
      able to exchange data with the connected GENET MAC. This issue has
      not been observed when the link parameters are auto-negotiated;
      however, it has been observed with a manually configured link.
      
      It has been empirically determined that issuing a soft reset to the
      EPHY when energy is detected prevents it from getting into this bad
      state.
      
      Fixes: 1c1008c7 ("net: bcmgenet: add main driver file")
      Signed-off-by: NDoug Berger <opendmb@gmail.com>
      Acked-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      25382b99
    • D
      net: bcmgenet: soft reset 40nm EPHYs before MAC init · 1f515486
      Doug Berger 提交于
      It turns out that the "Workaround for putting the PHY in IDDQ mode"
      used by the internal EPHYs on 40nm Set-Top Box chips when powering
      down puts the interface to the GENET MAC in a state that can cause
      subsequent MAC resets to be incomplete.
      
      Rather than restore the forced soft reset when powering up internal
      PHYs, this commit moves the invocation of phy_init_hw earlier in
      the MAC initialization sequence to just before the MAC reset in the
      open and resume functions. This allows the interface to be stable
      and allows the MAC resets to be successful.
      
      The bcmgenet_mii_probe() function is split in two to accommodate
      this. The new function bcmgenet_mii_connect() handles the first
      half of the functionality before the MAC initialization, and the
      bcmgenet_mii_config() function is extended to provide the remaining
      PHY configuration following the MAC initialization.
      
      Fixes: 484bfa15 ("Revert "net: bcmgenet: Software reset EPHY after power on"")
      Signed-off-by: NDoug Berger <opendmb@gmail.com>
      Acked-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1f515486
    • D
      net: bcmgenet: don't set phydev->link from MAC · 7de48402
      Doug Berger 提交于
      When commit 28b2e0d2 ("net: phy: remove parameter new_link from
      phy_mac_interrupt()") removed the new_link parameter it set the
      phydev->link state from the MAC before invoking phy_mac_interrupt().
      
      However, once commit 88d6272a ("net: phy: avoid unneeded MDIO
      reads in genphy_read_status") was added this initialization prevents
      the proper determination of the connection parameters by the function
      genphy_read_status().
      
      This commit removes that initialization to restore the proper
      functionality.
      
      Fixes: 88d6272a ("net: phy: avoid unneeded MDIO reads in genphy_read_status")
      Signed-off-by: NDoug Berger <opendmb@gmail.com>
      Acked-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7de48402
  2. 16 10月, 2019 2 次提交
  3. 01 9月, 2019 1 次提交
  4. 23 8月, 2019 1 次提交
  5. 22 8月, 2019 1 次提交
  6. 26 7月, 2019 1 次提交
  7. 19 7月, 2019 1 次提交
  8. 26 6月, 2019 4 次提交
  9. 19 6月, 2019 1 次提交
  10. 21 5月, 2019 1 次提交
  11. 08 5月, 2019 1 次提交
  12. 02 4月, 2019 1 次提交
    • F
      net: move skb->xmit_more hint to softnet data · 6b16f9ee
      Florian Westphal 提交于
      There are two reasons for this.
      
      First, the xmit_more flag conceptually doesn't fit into the skb, as
      xmit_more is not a property related to the skb.
      Its only a hint to the driver that the stack is about to transmit another
      packet immediately.
      
      Second, it was only done this way to not have to pass another argument
      to ndo_start_xmit().
      
      We can place xmit_more in the softnet data, next to the device recursion.
      The recursion counter is already written to on each transmit. The "more"
      indicator is placed right next to it.
      
      Drivers can use the netdev_xmit_more() helper instead of skb->xmit_more
      to check the "more packets coming" hint.
      
      skb->xmit_more is retained (but always 0) to not cause build breakage.
      
      This change takes care of the simple s/skb->xmit_more/netdev_xmit_more()/
      conversions.  Remaining drivers are converted in the next patches.
      Suggested-by: NEric Dumazet <edumazet@google.com>
      Signed-off-by: NFlorian Westphal <fw@strlen.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6b16f9ee
  13. 05 2月, 2019 1 次提交
    • L
      net: phy: fixed-phy: Drop GPIO from fixed_phy_add() · 5468e82f
      Linus Walleij 提交于
      All users of the fixed_phy_add() pass -1 as GPIO number
      to the fixed phy driver, and all users of fixed_phy_register()
      pass -1 as GPIO number as well, except for the device
      tree MDIO bus.
      
      Any new users should create a proper device and pass the
      GPIO as a descriptor associated with the device so delete
      the GPIO argument from the calls and drop the code looking
      requesting a GPIO in fixed_phy_add().
      
      In fixed phy_register(), investigate the "fixed-link"
      node and pick the GPIO descriptor from "link-gpios" if
      this property exists. Move the corresponding code out
      of of_mdio.c as the fixed phy code anyways requires
      OF to be in use.
      Tested-by: NAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5468e82f
  14. 24 11月, 2018 1 次提交
  15. 18 11月, 2018 2 次提交
  16. 12 11月, 2018 1 次提交
  17. 09 11月, 2018 1 次提交
  18. 03 11月, 2018 1 次提交
    • D
      net: bcmgenet: protect stop from timeout · 09e805d2
      Doug Berger 提交于
      A timing hazard exists when the network interface is stopped that
      allows a watchdog timeout to be processed by a separate core in
      parallel. This creates the potential for the timeout handler to
      wake the queues while the driver is shutting down, or access
      registers after their clocks have been removed.
      
      The more common case is that the watchdog timeout will produce a
      warning message which doesn't lead to a crash. The chances of this
      are greatly increased by the fact that bcmgenet_netif_stop stops
      the transmit queues which can easily precipitate a watchdog time-
      out because of stale trans_start data in the queues.
      
      This commit corrects the behavior by ensuring that the watchdog
      timeout is disabled before enterring bcmgenet_netif_stop. There
      are currently only two users of the bcmgenet_netif_stop function:
      close and suspend.
      
      The close case already handles the issue by exiting the RUNNING
      state before invoking the driver close service.
      
      The suspend case now performs the netif_device_detach to exit the
      PRESENT state before the call to bcmgenet_netif_stop rather than
      after it.
      
      These behaviors prevent any future scheduling of the driver timeout
      service during the window. The netif_tx_stop_all_queues function
      in bcmgenet_netif_stop is replaced with netif_tx_disable to ensure
      synchronization with any transmit or timeout threads that may
      already be executing on other cores.
      
      For symmetry, the netif_device_attach call upon resume is moved to
      after the call to bcmgenet_netif_start. Since it wakes the transmit
      queues it is not necessary to invoke netif_tx_start_all_queues from
      bcmgenet_netif_start so it is moved into the driver open service.
      
      Fixes: 1c1008c7 ("net: bcmgenet: add main driver file")
      Signed-off-by: NDoug Berger <opendmb@gmail.com>
      Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      09e805d2
  19. 24 10月, 2018 1 次提交
    • J
      net: bcmgenet: fix OF child-node lookup · d397dbe6
      Johan Hovold 提交于
      Use the new of_get_compatible_child() helper to lookup the mdio child
      node instead of using of_find_compatible_node(), which searches the
      entire tree from a given start node and thus can return an unrelated
      (i.e. non-child) node.
      
      This also addresses a potential use-after-free (e.g. after probe
      deferral) as the tree-wide helper drops a reference to its first
      argument (i.e. the node of the device being probed).
      
      Fixes: aa09677c ("net: bcmgenet: add MDIO routines")
      Cc: stable <stable@vger.kernel.org>     # 3.15
      Cc: David S. Miller <davem@davemloft.net>
      Reviewed-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NJohan Hovold <johan@kernel.org>
      Signed-off-by: NRob Herring <robh@kernel.org>
      d397dbe6
  20. 16 10月, 2018 1 次提交
  21. 13 9月, 2018 2 次提交
  22. 30 8月, 2018 1 次提交
  23. 24 4月, 2018 1 次提交
  24. 04 4月, 2018 1 次提交
  25. 30 3月, 2018 2 次提交
  26. 26 3月, 2018 1 次提交
  27. 16 1月, 2018 1 次提交
  28. 01 11月, 2017 1 次提交
  29. 27 10月, 2017 1 次提交
  30. 26 10月, 2017 2 次提交