1. 30 4月, 2018 2 次提交
  2. 23 4月, 2018 1 次提交
  3. 19 4月, 2018 19 次提交
  4. 17 4月, 2018 1 次提交
  5. 27 3月, 2018 1 次提交
    • H
      r8169: fix setting driver_data after register_netdev · 19c9ea36
      Heiner Kallweit 提交于
      pci_set_drvdata() is called only after registering the net_device,
      therefore we could run into a NPE if one of the functions using
      driver_data is called before it's set.
      
      Fix this by calling pci_set_drvdata() before registering the
      net_device.
      
      This fix is a candidate for stable. As far as I can see the
      bug has been there in kernel version 3.2 already, therefore
      I can't provide a reference which commit is fixed by it.
      
      The fix may need small adjustments per kernel version because
      due to other changes the label which is jumped to if
      register_netdev() fails has changed over time.
      Reported-by: NDavid Miller <davem@davemloft.net>
      Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      19c9ea36
  6. 22 3月, 2018 4 次提交
  7. 05 3月, 2018 2 次提交
  8. 01 3月, 2018 2 次提交
  9. 28 2月, 2018 1 次提交
    • H
      r8169: improve interrupt handling · 6c6aa15f
      Heiner Kallweit 提交于
      This patch improves few aspects of interrupt handling:
      - update to current interrupt allocation API
        (use pci_alloc_irq_vectors() instead of deprecated pci_enable_msi())
      - this implicitly will allocate a MSI-X interrupt if available
      - get rid of flag RTL_FEATURE_MSI
      - remove some dead code, intentionally disabling (unreliable) MSI
        being partially available on old PCI chips.
      
      The patch works fine on a RTL8168evl (chip version 34) and on a
      RTL8169SB (chip version 04).
      Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6c6aa15f
  10. 24 2月, 2018 2 次提交
    • H
      r8169: simplify and improve check for dash · 9dbe7896
      Heiner Kallweit 提交于
      r8168_check_dash() returns false anyway for all chip versions not
      supporting dash. So we can simplify the check conditions.
      
      In addition change the check functions to return bool instead of int,
      because they actually return a bool value.
      Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9dbe7896
    • H
      r8169: disable WOL per default · 7edf6d31
      Heiner Kallweit 提交于
      Currently, if BIOS enables WOL in the chip, settings are inconsistent
      because the device isn't marked as wakeup-enabled (if not done
      explicitly via userspace tools). This causes issues with suspend/
      resume because mdio_bus_phy_may_suspend() checks whether device is
      wakeup-enabled. In detail MDIO bus access in phy_suspend() can fail
      because the MDIO bus is disabled.
      
      In the history of the driver we find two competing approaches:
      8f9d5138 "r8169: remember WOL preferences on driver load" prefers
      to preserve what the BIOS may have set, whilst bde135a6
      "r8169: only enable PCI wakeups when WOL is active" disabled PCI
      wakeup per default to work around a bug on one platform.
      
      Seems like nobody complained after the latter patch about non-working
      WOL, what makes me think that nobody uses WOL w/o configuring it
      explicitly.
      
      My opinion:
      Vast majority of users doesn't use WOL even if the BIOS enables it in
      the chip. And having WOL being active keeps the PHY(s) from powering
      down if being idle.
      If somebody needs WOL, he can enable it during boot, e.g. by
      configuring systemd.link/WakeOnLan.
      
      Therefore, to make WOL consistent again, disable it per default.
      Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7edf6d31
  11. 22 2月, 2018 1 次提交
  12. 21 2月, 2018 1 次提交
  13. 31 1月, 2018 1 次提交
  14. 26 1月, 2018 1 次提交
  15. 10 1月, 2018 1 次提交
    • H
      r8169: improve runtime pm in general and suspend unused ports · a92a0849
      Heiner Kallweit 提交于
      So far rpm doesn't cover cases like unused ports which are never
      brought up. If they are active at probe time they remain in this state.
      Included in this patch:
      
      - Let the idle notification check whether we can suspend and let it
        schedule the suspend. This way we don't need to have calls to
        pm_schedule_suspend in different places.
      
      - At the end of rtl_open and rtl_init_one send an idle notification
        to allow suspending if the link is down. If a cable is plugged in
        aneg is finished before the suspend timer expires and the suspend
        request is cancelled.
      
      - Change rtl8169_runtime_suspend to power down the chip if the
        interface is down.
      
      Successfully tested on a RTL8168evl (mac version 34).
      Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a92a0849