1. 22 Jun, 2012 1 commit
    • françois romieu's avatar
      r8169: RxConfig hack for the 8168evl. · eb2dc35d
      françois romieu authored
      The 8168evl (RTL_GIGA_MAC_VER_34) based Gigabyte GA-990FXA motherboards
      are very prone to NETDEV watchdog problems without this change. See
      https://bugzilla.kernel.org/show_bug.cgi?id=42899 for instance.
      
      I don't know why it *works*. It's depressingly effective though.
      
      For the record:
      - the problem may go along IOMMU (AMD-Vi) errors but it really looks
        like a red herring.
      - the patch sets the RX_MULTI_EN bit. If the 8168c doc is any guide,
        the chipset now fetches several Rx descriptors at a time.
      - long ago the driver ignored the RX_MULTI_EN bit.
        e542a226
      
       changed the RxConfig
        settings. Whatever the problem it's now labeled a regression.
      - Realtek's own driver can identify two different 8168evl devices
        (CFG_METHOD_16 and CFG_METHOD_17) where the r8169 driver only
        sees one. It sucks.
      Signed-off-by: default avatarFrancois Romieu <romieu@fr.zoreil.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      eb2dc35d
  2. 10 Jun, 2012 1 commit
    • françois romieu's avatar
      r8169: avoid NAPI scheduling delay. · 7dbb4918
      françois romieu authored
      
      
      While reworking the r8169 driver a few months ago to perform the
      smallest amount of work in the irq handler, I took care of avoiding
      any irq mask register operation in the slow work dedicated user
      context thread. The slow work thread scheduled an extra round of NAPI
      work which would ultimately set the irq mask register as required,
      thus keeping such irq mask operations in the NAPI handler.
      It would eventually race with the irq handler and delay NAPI execution
      for - assuming no further irq - a whole ksoftirqd period. Mildly a
      problem for rare link changes or corner case PCI events.
      
      The race was always lost after the last bh disabling lock had been
      removed from the work thread and people started wondering where those
      pesky "NOHZ: local_softirq_pending 08" messages came from.
      
      Actually the irq mask register _can_ be set up directly in the slow
      work thread.
      Signed-off-by: default avatarFrancois Romieu <romieu@fr.zoreil.com>
      Reported-by: default avatarDave Jones <davej@redhat.com>
      Tested-by: default avatarMarc Dionne <marc.c.dionne@gmail.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Hayes Wang <hayeswang@realtek.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7dbb4918
  3. 01 Jun, 2012 1 commit
  4. 08 May, 2012 1 commit
  5. 17 Apr, 2012 7 commits
  6. 04 Apr, 2012 1 commit
  7. 03 Apr, 2012 1 commit
  8. 28 Mar, 2012 2 commits
  9. 11 Mar, 2012 1 commit
  10. 10 Mar, 2012 8 commits
  11. 06 Mar, 2012 1 commit
    • françois romieu's avatar
      r8169: runtime resume before shutdown. · 2a15cd2f
      françois romieu authored
      
      
      With runtime PM, if the ethernet cable is disconnected, the device is
      transitioned to D3 state to conserve energy. If the system is shutdown
      in this state, any register accesses in rtl_shutdown are dropped on
      the floor. As the device was programmed by .runtime_suspend() to wake
      on link changes, it is thus brought back up as soon as the link recovers.
      
      Resuming every suspended device through the driver core would slow things
      down and it is not clear how many devices really need it now.
      
      Original report and D0 transition patch by Sameer Nanda. Patch has been
      changed to comply with advices by Rafael J. Wysocki and the PM folks.
      Reported-by: default avatarSameer Nanda <snanda@chromium.org>
      Signed-off-by: default avatarFrancois Romieu <romieu@fr.zoreil.com>
      Cc: Rafael J. Wysocki <rjw@sisk.pl>
      Cc: Hayes Wang <hayeswang@realtek.com>
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Acked-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2a15cd2f
  12. 05 Mar, 2012 2 commits
  13. 02 Mar, 2012 1 commit
  14. 24 Feb, 2012 2 commits
  15. 31 Jan, 2012 6 commits
  16. 27 Jan, 2012 4 commits
    • Francois Romieu's avatar
      r8169: remove work from irq handler. · da78dbff
      Francois Romieu authored
      The irq handler was a mess.
      
      See 7ab87ff4 ("via-rhine: move work from
      irq handler to softirq and beyond") for similar changes. One can notice:
      - all non-napi tasks are explicitely scheduled trough a single work queue.
      - hiding software tx queue start behind the rtl_hw_start method is mildly
        natural. Move it in the caller where needed.
      - as can be seen from the heavy use of bh disabling locks, the driver is
        not safe for irq context messages with netconsole. It is still quite
        usable for general messaging though. Tested ok with concurrent registers
        dump (ethtool -d) + background traffic + "echo t > /proc/sysrq-trigger".
      
      Tested with old PCI chipset, PCIe 8168 and 810x:
      - XID 0c900800 RTL8168evl/8111evl
      - XID 18000000 RTL8168b/8111b
      - XID 98000000 RTL8169sc/8110sc
      - XID 083000c0 RTL8168d/8111d
      - XID 081000c0 RTL8168d/8111d
      - XID 00b00000 RTL8105e
      - XID 04a00000 RTL8102e
      
      As a side note, the comments in f11a377b
      
      
      ("r8169: avoid losing MSI interrupts") does not seem completely clear: if
      I hack the driver further to stop acking the irq link event bit, MSI
      interrupts keep being delivered (RTL8168b/8111b, XID 18000000).
      Signed-off-by: default avatarFrancois Romieu <romieu@fr.zoreil.com>
      Cc: Hayes Wang <hayeswang@realtek.com>
      da78dbff
    • Francois Romieu's avatar
      r8169: missing barriers. · 1e874e04
      Francois Romieu authored
      
      Signed-off-by: default avatarFrancois Romieu <romieu@fr.zoreil.com>
      Cc: Hayes Wang <hayeswang@realtek.com>
      1e874e04
    • Francois Romieu's avatar
      r8169: irq mask helpers. · 9085cdfa
      Francois Romieu authored
      
      Signed-off-by: default avatarFrancois Romieu <romieu@fr.zoreil.com>
      Cc: Hayes Wang <hayeswang@realtek.com>
      9085cdfa
    • Francois Romieu's avatar
      r8169: factor out IntrMask writes. · 3e990ff5
      Francois Romieu authored
      
      Signed-off-by: default avatarFrancois Romieu <romieu@fr.zoreil.com>
      Cc: Hayes Wang <hayeswang@realtek.com>
      3e990ff5