1. 24 4月, 2018 1 次提交
  2. 07 4月, 2018 1 次提交
  3. 07 3月, 2018 1 次提交
  4. 05 3月, 2018 1 次提交
  5. 11 1月, 2018 1 次提交
  6. 09 1月, 2018 1 次提交
  7. 04 1月, 2018 2 次提交
    • R
      net: phy: convert read-modify-write to phy_modify() · fea23fb5
      Russell King 提交于
      Convert read-modify-write sequences in at803x, Marvell and core phylib
      to use phy_modify() to ensure safety.
      Signed-off-by: NRussell King <rmk+kernel@armlinux.org.uk>
      Reviewed-by: NAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fea23fb5
    • R
      net: phy: marvell: fix paged access races · 424ca4c5
      Russell King 提交于
      For paged accesses to be truely safe, we need to hold the bus lock to
      prevent anyone else gaining access to the registers while we modify
      them.
      
      The phydev->lock mutex does not do this: userspace via the MII ioctl
      can still sneak in and read or write any register while we are on a
      different page, and the suspend/resume methods can be called by a
      thread different to the thread polling the phy status.
      
      Races have been observed with mvneta on SolidRun Clearfog with phylink,
      particularly between the phylib worker reading the PHYs status, and
      the thread resuming mvneta, calling phy_start() which then calls
      through to m88e1121_config_aneg_rgmii_delays(), which tries to
      read-modify-write the MSCR register:
      
      	CPU0			CPU1
      	marvell_read_status_page()
      	marvell_set_page(phydev, MII_MARVELL_FIBER_PAGE)
      	...
      				m88e1121_config_aneg_rgmii_delays()
      				set_page(MII_MARVELL_MSCR_PAGE)
      				phy_read(phydev, MII_88E1121_PHY_MSCR_REG)
      	marvell_set_page(phydev, MII_MARVELL_COPPER_PAGE);
      	...
      				phy_write(phydev, MII_88E1121_PHY_MSCR_REG)
      
      The result of this is we end up writing the copper page register 21,
      which causes the copper PHY to be disabled, and the link partner sees
      the link immediately go down.
      
      Solve this by taking the bus lock instead of the PHY lock, thereby
      preventing other accesses to the PHY while we are accessing other PHY
      pages.
      Signed-off-by: NRussell King <rmk+kernel@armlinux.org.uk>
      Reviewed-by: NAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      424ca4c5
  8. 19 12月, 2017 2 次提交
  9. 14 12月, 2017 1 次提交
  10. 02 12月, 2017 1 次提交
  11. 01 11月, 2017 1 次提交
  12. 05 8月, 2017 1 次提交
  13. 01 8月, 2017 7 次提交
  14. 03 7月, 2017 1 次提交
  15. 13 6月, 2017 1 次提交
  16. 05 6月, 2017 1 次提交
  17. 01 6月, 2017 1 次提交
  18. 27 5月, 2017 4 次提交
  19. 25 5月, 2017 1 次提交
  20. 18 5月, 2017 6 次提交
  21. 10 3月, 2017 1 次提交
  22. 03 2月, 2017 2 次提交
  23. 25 1月, 2017 1 次提交
    • A
      phy: marvell: remove conflicting initializer · 18702414
      Arnd Bergmann 提交于
      One line was apparently pasted incorrectly during a new feature patch:
      
      drivers/net/phy/marvell.c:2090:15: error: initialized field overwritten [-Werror=override-init]
         .features = PHY_GBIT_FEATURES,
      
      I'm removing the extraneous line here to avoid the W=1 warning and restore
      the previous flags value, and I'm slightly reordering the lines for consistency
      to make it less likely to happen again in the future. The ordering in the
      array is still not the same as in the structure definition, instead I picked
      the order that is most common in this file and that seems to make more sense
      here.
      
      Fixes: 0b04680f ("phy: marvell: Add support for temperature sensor")
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Reviewed-by: NAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      18702414