1. 22 Jun, 2020 4 commits
  2. 21 Jun, 2020 31 commits
  3. 20 Jun, 2020 5 commits
    • Gustavo A. R. Silva's avatar
      net/sched: cls_u32: Use struct_size() in kzalloc() · c5eb179e
      Gustavo A. R. Silva authored
      Make use of the struct_size() helper instead of an open-coded version
      in order to avoid any potential type mistakes.
      
      This code was detected with the help of Coccinelle and, audited and
      fixed manually.
      Signed-off-by: default avatarGustavo A. R. Silva <gustavoars@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c5eb179e
    • Gustavo A. R. Silva's avatar
      taprio: Use struct_size() in kzalloc() · 11a33de2
      Gustavo A. R. Silva authored
      Make use of the struct_size() helper instead of an open-coded version
      in order to avoid any potential type mistakes. Also, remove unnecessary
      variable _size_.
      
      This code was detected with the help of Coccinelle and, audited and
      fixed manually.
      Signed-off-by: default avatarGustavo A. R. Silva <gustavoars@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      11a33de2
    • David S. Miller's avatar
      Merge branch 'Clause-45-PHY-probing-improvements' · 1075a474
      David S. Miller authored
      Russell King says:
      
      ====================
      Clause 45 PHY probing improvements
      
      Last time this series was posted back in May, Florian reviewed the
      patches, which was the only feedback I received.  I'm now posting
      them without the RFC tag.
      
      This series aims to improve the probing for Clause 45 PHYs.
      
      The first four patches clean up get_phy_device() and called functions,
      updating the kernel doc, adding information about the various error
      return values.
      
      We then provide better kerneldoc for get_phy_device(), describing what
      is going on, and more importantly what the various return codes mean.
      
      Patch 6 adds support for probing MMDs >= 8 to check for their presence.
      
      Patch 7 changes get_phy_c45_ids() to only set the returned
      devices_in_package if we successfully find a PHY.
      
      Patch 8 splits the use of "devices in package" from the "mmds present".
      
      Patch 9 expands our ID reading to cover the other MMDs.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1075a474
    • Russell King's avatar
      net: phy: read MMD ID from all present MMDs · 389a3389
      Russell King authored
      Expand the device_ids[] array to allow all MMD IDs to be read rather
      than just the first 8 MMDs, but only read the ID if the MDIO_STAT2
      register reports that a device really is present here for these new
      devices to maintain compatibility with our current behaviour.  Note
      that only a limited number of devices have MDIO_STAT2.
      
      88X3310 PHY vendor MMDs do are marked as present in the
      devices_in_package, but do not contain IEE 802.3 compatible register
      sets in their lower space.  This avoids reading incorrect values as MMD
      identifiers.
      Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      389a3389
    • Russell King's avatar
      net: phy: split devices_in_package · 320ed3bf
      Russell King authored
      We have two competing requirements for the devices_in_package field.
      We want to use it as a bit array indicating which MMDs are present, but
      we also want to know if the Clause 22 registers are present.
      
      Since "devices in package" is a term used in the 802.3 specification,
      keep this as the as-specified values read from the PHY, and introduce
      a new member "mmds_present" to indicate which MMDs are actually
      present in the PHY, derived from the "devices in package" value.
      Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      320ed3bf