1. 18 3月, 2020 6 次提交
  2. 15 3月, 2020 4 次提交
  3. 13 3月, 2020 1 次提交
  4. 10 3月, 2020 3 次提交
  5. 07 3月, 2020 1 次提交
  6. 05 3月, 2020 3 次提交
  7. 04 3月, 2020 2 次提交
    • H
      phylink: Improve error message when validate failed · 20d8bb0d
      Hauke Mehrtens 提交于
      This should improve the error message when the PHY validate in the MAC
      driver failed. I ran into this problem multiple times that I put wrong
      interface values into the device tree and was searching why it is
      failing with -22 (-EINVAL). This should make it easier to spot the
      problem.
      Signed-off-by: NHauke Mehrtens <hauke@hauke-m.de>
      Acked-by: NRussell King <rmk+kernel@armlinux.org.uk>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      20d8bb0d
    • J
      net: phy: bcm63xx: fix OOPS due to missing driver name · 43de81b0
      Jonas Gorski 提交于
      719655a1 ("net: phy: Replace phy driver features u32 with link_mode
      bitmap") was a bit over-eager and also removed the second phy driver's
      name, resulting in a nasty OOPS on registration:
      
      [    1.319854] CPU 0 Unable to handle kernel paging request at virtual address 00000000, epc == 804dd50c, ra == 804dd4f0
      [    1.330859] Oops[#1]:
      [    1.333138] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.4.22 #0
      [    1.339217] $ 0   : 00000000 00000001 87ca7f00 805c1874
      [    1.344590] $ 4   : 00000000 00000047 00585000 8701f800
      [    1.349965] $ 8   : 8701f800 804f4a5c 00000003 64726976
      [    1.355341] $12   : 00000001 00000000 00000000 00000114
      [    1.360718] $16   : 87ca7f80 00000000 00000000 80639fe4
      [    1.366093] $20   : 00000002 00000000 806441d0 80b90000
      [    1.371470] $24   : 00000000 00000000
      [    1.376847] $28   : 87c1e000 87c1fda0 80b90000 804dd4f0
      [    1.382224] Hi    : d1c8f8da
      [    1.385180] Lo    : 5518a480
      [    1.388182] epc   : 804dd50c kset_find_obj+0x3c/0x114
      [    1.393345] ra    : 804dd4f0 kset_find_obj+0x20/0x114
      [    1.398530] Status: 10008703 KERNEL EXL IE
      [    1.402833] Cause : 00800008 (ExcCode 02)
      [    1.406952] BadVA : 00000000
      [    1.409913] PrId  : 0002a075 (Broadcom BMIPS4350)
      [    1.414745] Modules linked in:
      [    1.417895] Process swapper/0 (pid: 1, threadinfo=(ptrval), task=(ptrval), tls=00000000)
      [    1.426214] Stack : 87cec000 80630000 80639370 80640658 80640000 80049af4 80639fe4 8063a0d8
      [    1.434816]         8063a0d8 802ef078 00000002 00000000 806441d0 80b90000 8063a0d8 802ef114
      [    1.443417]         87cea0de 87c1fde0 00000000 804de488 87cea000 8063a0d8 8063a0d8 80334e48
      [    1.452018]         80640000 8063984c 80639bf4 00000000 8065de48 00000001 8063a0d8 80334ed0
      [    1.460620]         806441d0 80b90000 80b90000 802ef164 8065dd70 80620000 80b90000 8065de58
      [    1.469222]         ...
      [    1.471734] Call Trace:
      [    1.474255] [<804dd50c>] kset_find_obj+0x3c/0x114
      [    1.479141] [<802ef078>] driver_find+0x1c/0x44
      [    1.483665] [<802ef114>] driver_register+0x74/0x148
      [    1.488719] [<80334e48>] phy_driver_register+0x9c/0xd0
      [    1.493968] [<80334ed0>] phy_drivers_register+0x54/0xe8
      [    1.499345] [<8001061c>] do_one_initcall+0x7c/0x1f4
      [    1.504374] [<80644ed8>] kernel_init_freeable+0x1d4/0x2b4
      [    1.509940] [<804f4e24>] kernel_init+0x10/0xf8
      [    1.514502] [<80018e68>] ret_from_kernel_thread+0x14/0x1c
      [    1.520040] Code: 1060000c  02202025  90650000 <90810000> 24630001  14250004  24840001  14a0fffb  90650000
      [    1.530061]
      [    1.531698] ---[ end trace d52f1717cd29bdc8 ]---
      
      Fix it by readding the name.
      
      Fixes: 719655a1 ("net: phy: Replace phy driver features u32 with link_mode bitmap")
      Signed-off-by: NJonas Gorski <jonas.gorski@gmail.com>
      Acked-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      43de81b0
  8. 02 3月, 2020 2 次提交
  9. 28 2月, 2020 3 次提交
  10. 27 2月, 2020 3 次提交
  11. 25 2月, 2020 1 次提交
    • J
      mdio_bus: Add generic mdio_find_bus() · ce69e216
      Jeremy Linton 提交于
      It appears most ethernet drivers follow one of two main strategies
      for mdio bus/phy management. A monolithic model where the net driver
      itself creates, probes and uses the phy, and one where an external
      mdio/phy driver instantiates the mdio bus/phy and the net driver
      only attaches to a known phy. Usually in this latter model the phys
      are discovered via DT relationships or simply phy name/address
      hardcoding.
      
      This is a shame because modern well behaved mdio buses are self
      describing and can be probed. The mdio layer itself is fully capable
      of this, yet there isn't a clean way for a standalone net driver
      to attach and enumerate the discovered devices. This is because
      outside of of_mdio_find_bus() there isn't a straightforward way
      to acquire the mii_bus pointer.
      
      So, lets add a mdio_find_bus which can return the mii_bus based
      only on its name.
      Signed-off-by: NJeremy Linton <jeremy.linton@arm.com>
      Acked-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ce69e216
  12. 24 2月, 2020 1 次提交
    • F
      net: phy: Avoid multiple suspends · 503ba7c6
      Florian Fainelli 提交于
      It is currently possible for a PHY device to be suspended as part of a
      network device driver's suspend call while it is still being attached to
      that net_device, either via phy_suspend() or implicitly via phy_stop().
      
      Later on, when the MDIO bus controller get suspended, we would attempt
      to suspend again the PHY because it is still attached to a network
      device.
      
      This is both a waste of time and creates an opportunity for improper
      clock/power management bugs to creep in.
      
      Fixes: 803dd9c7 ("net: phy: avoid suspending twice a PHY")
      Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      503ba7c6
  13. 22 2月, 2020 1 次提交
    • D
      net: phy: dp83867: Add speed optimization feature · cd26d72d
      Dan Murphy 提交于
      Set the speed optimization bit on the DP83867 PHY.
      This feature can also be strapped on the 64 pin PHY devices
      but the 48 pin devices do not have the strap pin available to enable
      this feature in the hardware.  PHY team suggests to have this bit set.
      
      With this bit set the PHY will auto negotiate and report the link
      parameters in the PHYSTS register.  This register provides a single
      location within the register set for quick access to commonly accessed
      information.
      
      In this case when auto negotiation is on the PHY core reads the bits
      that have been configured or if auto negotiation is off the PHY core
      reads the BMCR register and sets the phydev parameters accordingly.
      
      This Giga bit PHY can throttle the speed to 100Mbps or 10Mbps to accomodate a
      4-wire cable.  If this should occur the PHYSTS register contains the
      current negotiated speed and duplex mode.
      
      In overriding the genphy_read_status the dp83867_read_status will do a
      genphy_read_status to setup the LP and pause bits.  And then the PHYSTS
      register is read and the phydev speed and duplex mode settings are
      updated.
      Signed-off-by: NDan Murphy <dmurphy@ti.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      cd26d72d
  14. 20 2月, 2020 4 次提交
    • F
      net: phy: broadcom: Wire suspend/resume for BCM54810 · fe26821f
      Florian Fainelli 提交于
      The BCM54810 PHY can use the standard BMCR Power down suspend, but needs
      a custom resume routine which first clear the Power down bit, and then
      re-initializes the PHY. While in low-power mode, the PHY only accepts
      writes to the BMCR register. The datasheet clearly says it:
      
      Reads or writes to any MII register other than MII Control register
      (address 00h) while the device is in the standby power-down mode may
      cause unpredictable results.
      Reviewed-by: NAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fe26821f
    • F
      net: phy: broadcom: Have bcm54xx_adjust_rxrefclk() check for flags · cb64da3a
      Florian Fainelli 提交于
      bcm54xx_adjust_rxrefclk() already checks for PHY_BRCM_AUTO_PWRDWN_ENABLE
      and PHY_BRCM_DIS_TXCRXC_NOENRGY in order to set the appropriate bit. The
      situation is a bit more complicated with the flag
      PHY_BRCM_RX_REFCLK_UNUSED but essentially amounts to the same situation.
      
      The default setting for the 125MHz clock is to be on for all PHYs and
      we still treat BCM50610 and BCM50610M specifically with the polarity of
      the bit reversed.
      Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Reviewed-by: NAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      cb64da3a
    • F
      net: phy: broadcom: Allow BCM54810 to use bcm54xx_adjust_rxrefclk() · 0ececcfc
      Florian Fainelli 提交于
      The function bcm54xx_adjust_rxrefclk() works correctly on the BCM54810
      PHY, allow this device ID to proceed through.
      Reviewed-by: NAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0ececcfc
    • P
      phy: avoid unnecessary link-up delay in polling mode · e96bd2d3
      Petr Oros 提交于
      commit 93c09704 ("net: phy: consider latched link-down status in
      polling mode") removed double-read of latched link-state register for
      polling mode from genphy_update_link(). This added extra ~1s delay into
      sequence link down->up.
      Following scenario:
       - After boot link goes up
       - phy_start() is called triggering an aneg restart, hence link goes
         down and link-down info is latched.
       - After aneg has finished link goes up. In phy_state_machine is checked
         link state but it is latched "link is down". The state machine is
         scheduled after one second and there is detected "link is up". This
         extra delay can be avoided when we keep link-state register double read
         in case when link was down previously.
      
      With this solution we don't miss a link-down event in polling mode and
      link-up is faster.
      
      Details about this quirky behavior on Realtek phy:
      Without patch:
      T0:    aneg is started, link goes down, link-down status is latched
      T0+3s: state machine runs, up-to-date link-down is read
      T0+4s: state machine runs, aneg is finished (BMSR_ANEGCOMPLETE==1),
             here i read link-down (BMSR_LSTATUS==0),
      T0+5s: state machine runs, aneg is finished (BMSR_ANEGCOMPLETE==1),
             up-to-date link-up is read (BMSR_LSTATUS==1),
             phydev->link goes up, state change PHY_NOLINK to PHY_RUNNING
      
      With patch:
      T0:    aneg is started, link goes down, link-down status is latched
      T0+3s: state machine runs, up-to-date link-down is read
      T0+4s: state machine runs, aneg is finished (BMSR_ANEGCOMPLETE==1),
             first BMSR read: BMSR_ANEGCOMPLETE==1 and BMSR_LSTATUS==0,
             second BMSR read: BMSR_ANEGCOMPLETE==1 and BMSR_LSTATUS==1,
             phydev->link goes up, state change PHY_NOLINK to PHY_RUNNING
      Signed-off-by: NPetr Oros <poros@redhat.com>
      Reviewed-by: NHeiner Kallweit <hkallweit1@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e96bd2d3
  15. 19 2月, 2020 2 次提交
  16. 18 2月, 2020 1 次提交
  17. 17 2月, 2020 2 次提交