1. 11 8月, 2016 1 次提交
  2. 10 8月, 2016 1 次提交
    • N
      ravb: add sleep PM suspend/resume support · 0184165b
      Niklas Söderlund 提交于
      The interface would not function after the system had been woken up
      after have been suspended (echo mem > /sys/power/state) cycle. The
      reason for this is that all device registers have been reset to its
      default values. This patch adds sleep suspend and resume functions that
      detached the interface at suspend and restore the registers and reattach
      the interface at resume.
      
      Only the registers that are only configured at probe time needs to be
      explicitly restored by the resume handler. All other registers are
      reconfigured by either reopening the device in the resume handler (if
      the device was running when the system was suspended) or when the
      interface is opened by a user at a later time.
      Signed-off-by: NNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0184165b
  3. 02 8月, 2016 1 次提交
  4. 20 7月, 2016 1 次提交
  5. 02 6月, 2016 3 次提交
  6. 18 5月, 2016 1 次提交
  7. 10 5月, 2016 1 次提交
  8. 04 5月, 2016 1 次提交
  9. 14 4月, 2016 2 次提交
  10. 05 4月, 2016 1 次提交
    • K
      ravb: Add dma queue interrupt support · f51bdc23
      Kazuya Mizuguchi 提交于
      This patch supports the following interrupts.
      
      - One interrupt for multiple (timestamp, error, gPTP)
      - One interrupt for emac
      - Four interrupts for dma queue (best effort rx/tx, network control rx/tx)
      
      This patch improve efficiency of the interrupt handler by adding the
      interrupt handler corresponding to each interrupt source described
      above. Additionally, it reduces the number of times of the access to
      EthernetAVB IF.
      Also this patch prevent this driver depends on the whim of a boot loader.
      
      [ykaneko0929@gmail.com: define bit names of registers]
      [ykaneko0929@gmail.com: add comment for gen3 only registers]
      [ykaneko0929@gmail.com: fix coding style]
      [ykaneko0929@gmail.com: update changelog]
      [ykaneko0929@gmail.com: gen3: fix initialization of interrupts]
      [ykaneko0929@gmail.com: gen3: fix clearing interrupts]
      [ykaneko0929@gmail.com: gen3: add helper function for request_irq()]
      [ykaneko0929@gmail.com: gen3: remove IRQF_SHARED flag for request_irq()]
      [ykaneko0929@gmail.com: revert ravb_close() and ravb_ptp_stop()]
      [ykaneko0929@gmail.com: avoid calling free_irq() to non-hooked interrupts]
      [ykaneko0929@gmail.com: make NC/BE interrupt handler a function]
      [ykaneko0929@gmail.com: make timestamp interrupt handler a function]
      [ykaneko0929@gmail.com: timestamp interrupt is handled in multiple
       interrupt handler instead of dma queue interrupt handler]
      Signed-off-by: NKazuya Mizuguchi <kazuya.mizuguchi.ks@renesas.com>
      Signed-off-by: NYoshihiro Kaneko <ykaneko0929@gmail.com>
      Acked-by: NSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f51bdc23
  11. 28 3月, 2016 1 次提交
  12. 19 3月, 2016 1 次提交
  13. 04 3月, 2016 1 次提交
  14. 18 2月, 2016 1 次提交
  15. 17 2月, 2016 2 次提交
  16. 10 2月, 2016 1 次提交
  17. 12 1月, 2016 1 次提交
  18. 08 1月, 2016 2 次提交
  19. 16 12月, 2015 1 次提交
  20. 15 12月, 2015 2 次提交
  21. 06 12月, 2015 2 次提交
  22. 04 12月, 2015 2 次提交
  23. 21 11月, 2015 1 次提交
  24. 19 11月, 2015 1 次提交
    • S
      ravb: fix WARNING in __free_irq() · 508dc064
      Sergei Shtylyov 提交于
      When the R8A7795 support was  added to the driver, little attention was paid
      to the ravb_open() error path: free_irq()  for the EMAC interrupt was called
      uncoditionally, unlike request_irq(), and in  a wrong order as well...
      As a result, on the R-Car gen2 SoCs I started getting the following in case
      of a device  opening error:
      
      WARNING: CPU: 0 PID: 1 at kernel/irq/manage.c:1448 __free_irq+0x8c/0x228()
      Trying to free already-free IRQ 0
      Modules linked in:
      CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.4.0-rc1-dirty #1005
      Hardware name: Generic R8A7791 (Flattened Device Tree)
      Backtrace:
      [<c0013818>] (dump_backtrace) from [<c00139b4>] (show_stack+0x18/0x1c)
       r6:c063cdd6 r5:00000009 r4:00000000 r3:00204140
      [<c001399c>] (show_stack) from [<c022a578>] (dump_stack+0x74/0x90)
      [<c022a504>] (dump_stack) from [<c0025f04>] (warn_slowpath_common+0x8c/0xb8)
       r4:ef04fd38 r3:c0714770
      [<c0025e78>] (warn_slowpath_common) from [<c0025fd4>] (warn_slowpath_fmt+0x38/0x40)
       r8:ee8ad800 r7:ef0030a0 r6:00000000 r5:00000000 r4:ef003040
      [<c0025fa0>] (warn_slowpath_fmt) from [<c0064cc0>] (__free_irq+0x8c/0x228)
       r3:00000000 r2:c063ce9f
      [<c0064c34>] (__free_irq) from [<c0064ecc>] (free_irq+0x70/0xa4)
       r10:0000016b r8:00000000 r7:00000000 r6:ee8ad800 r5:00000000 r4:ef003040
      [<c0064e5c>] (free_irq) from [<c033472c>] (ravb_open+0x224/0x274)
       r7:fffffffe r6:00000000 r5:fffffffe r4:ee8ad800
      [<c0334508>] (ravb_open) from [<c041ac78>] (__dev_open+0x84/0x104)
       r7:ee8ad830 r6:c0566334 r5:00000000 r4:ee8ad800
      [<c041abf4>] (__dev_open) from [<c041af08>] (__dev_change_flags+0x94/0x13c)
       r7:00001002 r6:00000001 r5:00001003 r4:ee8ad800
      [<c041ae74>] (__dev_change_flags) from [<c041afe8>] (dev_change_flags+0x20/0x50)
       r7:c072e6e0 r6:00000138 r5:00001002 r4:ee8ad800
      [<c041afc8>] (dev_change_flags) from [<c06ec06c>] (ip_auto_config+0x174/0xfb8)
       r8:00001002 r7:c072e6e0 r6:c0703344 r5:00000001 r4:ee8ad800 r3:00000101
      [<c06ebef8>] (ip_auto_config) from [<c000a810>] (do_one_initcall+0x100/0x1cc)
       r10:c06fb83c r9:00000000 r8:c06ebef8 r7:c0736000 r6:c0710918 r5:c0710918
       r4:ef2f8f80
      [<c000a710>] (do_one_initcall) from [<c06ccddc>] (kernel_init_freeable+0x11c/0x1
      ec)
       r10:c06fb83c r9:00000000 r8:0000009a r7:c0736000 r6:c0706bf0 r5:c06fb834
       r4:00000007
      [<c06cccc0>] (kernel_init_freeable) from [<c0514c54>] (kernel_init+0x14/0xec)
       r10:00000000 r8:00000000 r7:00000000 r6:00000000 r5:c0514c40 r4:c0736000
      [<c0514c40>] (kernel_init) from [<c0010458>] (ret_from_fork+0x14/0x3c)
       r4:00000000 r3:ef04e000
      
      Fix up the free_irq() call order and add a new label on the error path.
      
      Fixes: 22d4df8f ("ravb: Add support for r8a7795 SoC")
      Signed-off-by: NSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
      Acked-by: NSimon Horman <horms+renesas@verge.net.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      508dc064
  25. 17 11月, 2015 2 次提交
  26. 03 11月, 2015 1 次提交
  27. 03 10月, 2015 2 次提交
  28. 29 8月, 2015 1 次提交
  29. 27 7月, 2015 1 次提交
    • S
      ravb: minimize TX data copying · 2f45d190
      Sergei Shtylyov 提交于
      Renesas Ethernet AVB controller requires that all data are aligned on 4-byte
      boundary.  While it's  easily achievable for  the RX  data with  the help of
      skb_reserve() (we even align on 128-byte boundary as recommended by the manual),
      we  can't  do the same with the TX data, and it always comes  unaligned from
      the networking core. Originally we solved it an easy way, copying all packet
      to  a  preallocated  aligned buffer; however, it's enough to copy only up to
      3 first bytes from each packet, doing the transfer using 2 TX descriptors
      instead of just 1. Here's an implementation of the new  TX algorithm that
      significantly reduces the driver's memory requirements.
      Signed-off-by: NSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2f45d190
  30. 22 7月, 2015 1 次提交
    • S
      ravb: fix ring memory allocation · d8b48911
      Sergei Shtylyov 提交于
      The driver is written as if it can adapt to a low memory situation  allocating
      less RX  skbs and TX aligned buffers than the respective RX/TX ring sizes.  In
      reality  though  the driver  would malfunction in this case. Stop being overly
      smart and just fail in such situation -- this is achieved by moving the memory
      allocation from ravb_ring_format() to ravb_ring_init().
      
      We leave dma_map_single() calls in place but make their failure non-fatal
      by marking the corresponding RX descriptors  with zero data size which should
      prevent DMA to an invalid addresses.
      Signed-off-by: NSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d8b48911