1. 14 3月, 2017 1 次提交
  2. 06 3月, 2017 1 次提交
  3. 25 2月, 2017 1 次提交
  4. 20 2月, 2017 2 次提交
  5. 10 2月, 2017 2 次提交
  6. 09 2月, 2017 1 次提交
  7. 08 2月, 2017 3 次提交
  8. 07 2月, 2017 1 次提交
  9. 03 2月, 2017 4 次提交
    • M
      net: phy: Fix lack of reference count on PHY driver · cafe8df8
      Mao Wenan 提交于
      There is currently no reference count being held on the PHY driver,
      which makes it possible to remove the PHY driver module while the PHY
      state machine is running and polling the PHY. This could cause crashes
      similar to this one to show up:
      
      [   43.361162] BUG: unable to handle kernel NULL pointer dereference at 0000000000000140
      [   43.361162] IP: phy_state_machine+0x32/0x490
      [   43.361162] PGD 59dc067
      [   43.361162] PUD 0
      [   43.361162]
      [   43.361162] Oops: 0000 [#1] SMP
      [   43.361162] Modules linked in: dsa_loop [last unloaded: broadcom]
      [   43.361162] CPU: 0 PID: 1299 Comm: kworker/0:3 Not tainted 4.10.0-rc5+ #415
      [   43.361162] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996),
      BIOS Ubuntu-1.8.2-1ubuntu2 04/01/2014
      [   43.361162] Workqueue: events_power_efficient phy_state_machine
      [   43.361162] task: ffff880006782b80 task.stack: ffffc90000184000
      [   43.361162] RIP: 0010:phy_state_machine+0x32/0x490
      [   43.361162] RSP: 0018:ffffc90000187e18 EFLAGS: 00000246
      [   43.361162] RAX: 0000000000000000 RBX: ffff8800059e53c0 RCX:
      ffff880006a15c60
      [   43.361162] RDX: ffff880006782b80 RSI: 0000000000000000 RDI:
      ffff8800059e5428
      [   43.361162] RBP: ffffc90000187e48 R08: ffff880006a15c40 R09:
      0000000000000000
      [   43.361162] R10: 0000000000000000 R11: 0000000000000000 R12:
      ffff8800059e5428
      [   43.361162] R13: ffff8800059e5000 R14: 0000000000000000 R15:
      ffff880006a15c40
      [   43.361162] FS:  0000000000000000(0000) GS:ffff880006a00000(0000)
      knlGS:0000000000000000
      [   43.361162] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [   43.361162] CR2: 0000000000000140 CR3: 0000000005979000 CR4:
      00000000000006f0
      [   43.361162] Call Trace:
      [   43.361162]  process_one_work+0x1b4/0x3e0
      [   43.361162]  worker_thread+0x43/0x4d0
      [   43.361162]  ? __schedule+0x17f/0x4e0
      [   43.361162]  kthread+0xf7/0x130
      [   43.361162]  ? process_one_work+0x3e0/0x3e0
      [   43.361162]  ? kthread_create_on_node+0x40/0x40
      [   43.361162]  ret_from_fork+0x29/0x40
      [   43.361162] Code: 56 41 55 41 54 4c 8d 67 68 53 4c 8d af 40 fc ff ff
      48 89 fb 4c 89 e7 48 83 ec 08 e8 c9 9d 27 00 48 8b 83 60 ff ff ff 44 8b
      73 98 <48> 8b 90 40 01 00 00 44 89 f0 48 85 d2 74 08 4c 89 ef ff d2 8b
      
      Keep references on the PHY driver module right before we are going to
      utilize it in phy_attach_direct(), and conversely when we don't use it
      anymore in phy_detach().
      Signed-off-by: NMao Wenan <maowenan@huawei.com>
      [florian: rebase, rework commit message]
      Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      cafe8df8
    • A
      net: phy: marvell: Add support for 88e1545 PHY · 60f06fde
      Andrew Lunn 提交于
      The 88e1545 PHYs are discrete Marvell PHYs, found in a quad package on
      the zii-devel-b board. Add support for it to the Marvell PHY driver.
      Signed-off-by: NAndrew Lunn <andrew@lunn.ch>
      Reviewed-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      60f06fde
    • A
      net: phy: Marvell: Add mv88e6390 internal PHY · e4cf8a38
      Andrew Lunn 提交于
      The mv88e6390 Ethernet switch has internal PHYs. These PHYs don't have
      an model ID in the ID2 register. So the MDIO driver in the switch
      intercepts reads to this register, and returns the switch family ID.
      Extend the Marvell PHY driver by including this ID, and treat the PHY
      as a 88E1540.
      Signed-off-by: NAndrew Lunn <andrew@lunn.ch>
      Reviewed-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e4cf8a38
    • A
      xgene_enet: remove bogus forward declarations · 1f3d6209
      Arnd Bergmann 提交于
      The device match tables for both the xgene_enet driver and its phy driver
      have forward declarations that declare an array without a length, leading
      to a clang warning when they are not followed by an actual defitinition:
      
      drivers/net/ethernet/apm/xgene/../../../phy/mdio-xgene.h:135:34: warning: tentative array definition assumed to have one element
      drivers/net/ethernet/apm/xgene/xgene_enet_main.c:33:36: warning: tentative array definition assumed to have one element
      
      The declarations for the mdio driver are even in a header file, so they
      cause duplicate definitions of the tables for each file that includes
      them.
      
      This removes all four forward declarations and moves the actual
      definitions up a little, so they are in front of their first user. For
      the OF match tables, this means having to remove the #ifdef around them,
      and passing the actual structure into of_match_device(). This has no
      effect on the generated object code though, as the of_match_device
      function has an empty stub that does not evaluate its argument, and
      the symbol gets dropped either way.
      
      Fixes: 43b3cf66 ("drivers: net: phy: xgene: Add MDIO driver")
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1f3d6209
  10. 02 2月, 2017 1 次提交
    • R
      net: phy: broadcom: rehook BCM54612E specific init · 62e13097
      Rafał Miłecki 提交于
      This extra BCM54612E code in PHY driver isn't really aneg specific. Even
      without it aneg works OK but the problem is no packets pass through PHY.
      
      Moreover putting this code inside config_aneg callback didn't allow
      resuming PHY correctly. When driver called phy_stop and phy_start it was
      putting PHY machine into RESUMING state. After that machine was
      switching into AN and NOLINK without ever calling phy_start_aneg. This
      prevented this extra setup from being called and PHY didn't work.
      
      This change has been verified to fix network on BCM47186B0 SoC device
      with BCM54612E.
      Signed-off-by: NRafał Miłecki <rafal@milecki.pl>
      Reviewed-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      62e13097
  11. 30 1月, 2017 1 次提交
  12. 28 1月, 2017 2 次提交
  13. 26 1月, 2017 4 次提交
  14. 25 1月, 2017 2 次提交
  15. 24 1月, 2017 1 次提交
  16. 23 1月, 2017 2 次提交
  17. 21 1月, 2017 1 次提交
  18. 19 1月, 2017 1 次提交
  19. 18 1月, 2017 1 次提交
  20. 17 1月, 2017 1 次提交
  21. 13 1月, 2017 3 次提交
  22. 11 1月, 2017 1 次提交
    • R
      net: phy: marvell: fix Marvell 88E1512 used in SGMII mode · a13c0652
      Russell King 提交于
      When an Marvell 88E1512 PHY is connected to a nic in SGMII mode, the
      fiber page is used for the SGMII host-side connection.  The PHY driver
      notices that SUPPORTED_FIBRE is set, so it tries reading the fiber page
      for the link status, and ends up reading the MAC-side status instead of
      the outgoing (copper) link.  This leads to incorrect results reported
      via ethtool.
      
      If the PHY is connected via SGMII to the host, ignore the fiber page.
      However, continue to allow the existing power management code to
      suspend and resume the fiber page.
      
      Fixes: 6cfb3bcc ("Marvell phy: check link status in case of fiber link.")
      Signed-off-by: NRussell King <rmk+kernel@armlinux.org.uk>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a13c0652
  23. 10 1月, 2017 2 次提交
    • J
      net: phy: Add Meson GXL PHY hardware dependency · 2ebae8bd
      Jean Delvare 提交于
      As I understand it the Meson GXL PHY driver is only useful on one
      architecture so only make it visible on that architecture.
      Signed-off-by: NJean Delvare <jdelvare@suse.de>
      Fixes: 7334b3e4 ("net: phy: Add Meson GXL Internal PHY driver")
      Cc: Neil Armstrong <narmstrong@baylibre.com>
      Cc: Florian Fainelli <f.fainelli@gmail.com>
      Cc: Andrew Lunn <andrew@lunn.ch>
      Cc: David S. Miller <davem@davemloft.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2ebae8bd
    • Z
      phy state machine: failsafe leave invalid RUNNING state · 811a9191
      Zefir Kurtisi 提交于
      While in RUNNING state, phy_state_machine() checks for link changes by
      comparing phydev->link before and after calling phy_read_status().
      This works as long as it is guaranteed that phydev->link is never
      changed outside the phy_state_machine().
      
      If in some setups this happens, it causes the state machine to miss
      a link loss and remain RUNNING despite phydev->link being 0.
      
      This has been observed running a dsa setup with a process continuously
      polling the link states over ethtool each second (SNMPD RFC-1213
      agent). Disconnecting the link on a phy followed by a ETHTOOL_GSET
      causes dsa_slave_get_settings() / dsa_slave_get_link_ksettings() to
      call phy_read_status() and with that modify the link status - and
      with that bricking the phy state machine.
      
      This patch adds a fail-safe check while in RUNNING, which causes to
      move to CHANGELINK when the link is gone and we are still RUNNING.
      Signed-off-by: NZefir Kurtisi <zefir.kurtisi@neratec.com>
      Reviewed-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      811a9191
  24. 09 1月, 2017 1 次提交