1. 01 11月, 2014 2 次提交
    • L
      drivers: net: cpsw: Support ALLMULTI and fix IFF_PROMISC in switch mode · 1e5c4bc4
      Lennart Sorensen 提交于
      The cpsw driver did not support the IFF_ALLMULTI flag which makes dynamic
      multicast routing not work.  Related to this, when enabling IFF_PROMISC
      in switch mode, all registered multicast addresses are flushed, resulting
      in only broadcast and unicast traffic being received.
      
      A new cpsw_ale_set_allmulti function now scans through the ALE entry
      table and adds/removes the host port from the unregistered multicast
      port mask of each vlan entry depending on the state of IFF_ALLMULTI.
      In promiscious mode, cpsw_ale_set_allmulti is used to force reception
      of all multicast traffic in addition to the unicast and broadcast traffic.
      
      With this change dynamic multicast and promiscious mode both work in
      switch mode.
      Signed-off-by: NLen Sorensen <lsorense@csclub.uwaterloo.ca>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1e5c4bc4
    • L
      drivers: net: cpsw: Fix broken loop condition in switch mode · 6f979eb3
      Lennart Sorensen 提交于
      0d961b3b (drivers: net: cpsw: fix buggy
      loop condition) accidentally fixed a loop comparison in too many places
      while fixing a real bug.
      
      It was correct to fix the dual_emac mode section since there 'i' is used
      as an index into priv->slaves which is a 0 based array.
      
      However the other two changes (which are only used in switch mode)
      are wrong since there 'i' is actually the ALE port number, and port 0
      is the host port, while port 1 and up are the slave ports.
      
      Putting the loop condition back in the switch mode section fixes it.
      
      A comment has been added to point out the intent clearly to avoid future
      confusion.  Also a comment is fixed that said the opposite of what was
      actually happening.
      Signed-off-by: NLen Sorensen <lsorense@csclub.uwaterloo.ca>
      Acked-by: NHeiko Schocher <hs@denx.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6f979eb3
  2. 29 10月, 2014 1 次提交
  3. 15 10月, 2014 1 次提交
  4. 30 9月, 2014 3 次提交
  5. 14 9月, 2014 1 次提交
  6. 11 9月, 2014 1 次提交
  7. 10 9月, 2014 1 次提交
  8. 09 9月, 2014 1 次提交
  9. 06 9月, 2014 1 次提交
    • D
      net: ethernet: cpsw: improve interrupt lookup logic in cpsw_probe() · c2b32e58
      Daniel Mack 提交于
      Simplify the interrupt resource lookup code in cpsw_probe() by the
      following:
      
       * Only look at the first member of the resource. As the driver only
         works for DT-enabled platforms anyway, a resource of type
         IORESOURCE_IRQ will only contain one single entry
         (res->start == res->end), so there is no need for the iteration.
      
       * Add a bounds check to avoid overflows if we are passed more than
         ARRAY_SIZE(priv->irqs_table) resources.
      
       * Assign 'ret' with the return value of devm_request_irq() so that
         cpsw_probe() returns the appropriate error code.
      
       * If devm_request_irq() fails, report the error code in the log
         message.
      Signed-off-by: NDaniel Mack <zonque@gmail.com>
      Acked-by: NMugunthan V N <mugunthanvnm@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c2b32e58
  10. 25 7月, 2014 1 次提交
  11. 23 7月, 2014 1 次提交
  12. 16 7月, 2014 1 次提交
  13. 22 6月, 2014 1 次提交
  14. 16 5月, 2014 2 次提交
  15. 14 5月, 2014 1 次提交
  16. 10 5月, 2014 3 次提交
  17. 06 5月, 2014 2 次提交
  18. 12 4月, 2014 2 次提交
    • M
      drivers: net: cpsw: enable interrupts after napi enable and clearing previous interrupts · f63a975e
      Mugunthan V N 提交于
      When the Ethernet interface is put down and up with heavy Ethernet
      traffic, then there is prossibility of an interrupt waiting in irq
      controller to be processed, so when the interface is brought up again
      just after enable interrupt, it goes to ISR due to the previous
      unhandled interrutp and in ISR napi is not scheduled as the napi
      is not enabled in ndo_open which results in disabled interrupt for
      CPSW and no packets are received in cpsw. So this patch moves enabling
      of interupts after napi_enable and clearing CPDMA interrupts.
      Signed-off-by: NMugunthan V N <mugunthanvnm@ti.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f63a975e
    • M
      drivers: net: cpsw: discard all packets received when interface is down · 16e5c57d
      Mugunthan V N 提交于
      When the Ethernet interface is brought down during high Ethernet traffic,
      then cpsw creates the following warn dump. When cpdma has already processed
      the packet then the status will be greater than 0, so the cpsw_rx_handler
      considers that the interface is up and try to resubmit one more rx buffer
      to cpdma which fails as the DMA is in teardown process. This can be avoided
      by checking the interface state and then process the received packet, if the
      interface is down just discard and free the skb and return.
      
      [ 2823.104591] WARNING: CPU: 0 PID: 1823 at drivers/net/ethernet/ti/cpsw.c:711 cpsw_rx_handler+0x148/0x164()
      [ 2823.114654] Modules linked in:
      [ 2823.117872] CPU: 0 PID: 1823 Comm: ifconfig Tainted: G        W     3.14.0-11992-gf34c4a35 #11
      [ 2823.126860] [<c0014b5c>] (unwind_backtrace) from [<c00117e4>] (show_stack+0x10/0x14)
      [ 2823.135030] [<c00117e4>] (show_stack) from [<c0533a9c>] (dump_stack+0x80/0x9c)
      [ 2823.142619] [<c0533a9c>] (dump_stack) from [<c003f0e0>] (warn_slowpath_common+0x6c/0x90)
      [ 2823.151141] [<c003f0e0>] (warn_slowpath_common) from [<c003f120>] (warn_slowpath_null+0x1c/0x24)
      [ 2823.160336] [<c003f120>] (warn_slowpath_null) from [<c03caeb0>] (cpsw_rx_handler+0x148/0x164)
      [ 2823.169314] [<c03caeb0>] (cpsw_rx_handler) from [<c03c730c>] (__cpdma_chan_free+0x90/0xa8)
      [ 2823.178028] [<c03c730c>] (__cpdma_chan_free) from [<c03c7418>] (__cpdma_chan_process+0xf4/0x134)
      [ 2823.187279] [<c03c7418>] (__cpdma_chan_process) from [<c03c7560>] (cpdma_chan_stop+0xb4/0x17c)
      [ 2823.196349] [<c03c7560>] (cpdma_chan_stop) from [<c03c766c>] (cpdma_ctlr_stop+0x44/0x9c)
      [ 2823.204872] [<c03c766c>] (cpdma_ctlr_stop) from [<c03cb708>] (cpsw_ndo_stop+0x154/0x188)
      [ 2823.213321] [<c03cb708>] (cpsw_ndo_stop) from [<c046f0ec>] (__dev_close_many+0x84/0xc8)
      [ 2823.221761] [<c046f0ec>] (__dev_close_many) from [<c046f158>] (__dev_close+0x28/0x3c)
      [ 2823.230012] [<c046f158>] (__dev_close) from [<c0474ca8>] (__dev_change_flags+0x88/0x160)
      [ 2823.238483] [<c0474ca8>] (__dev_change_flags) from [<c0474da0>] (dev_change_flags+0x18/0x48)
      [ 2823.247316] [<c0474da0>] (dev_change_flags) from [<c04d12c4>] (devinet_ioctl+0x61c/0x6e0)
      [ 2823.255884] [<c04d12c4>] (devinet_ioctl) from [<c045c660>] (sock_ioctl+0x68/0x2a4)
      [ 2823.263789] [<c045c660>] (sock_ioctl) from [<c0125fe4>] (do_vfs_ioctl+0x78/0x61c)
      [ 2823.271629] [<c0125fe4>] (do_vfs_ioctl) from [<c01265ec>] (SyS_ioctl+0x64/0x74)
      [ 2823.279284] [<c01265ec>] (SyS_ioctl) from [<c000e580>] (ret_fast_syscall+0x0/0x48)
      Signed-off-by: NMugunthan V N <mugunthanvnm@ti.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      16e5c57d
  19. 10 4月, 2014 1 次提交
  20. 18 3月, 2014 1 次提交
    • B
      net: cpsw: do not register cpts twice · b085f311
      Benedikt Spranger 提交于
      commit f280e89a (drivers: net: cpsw: fix for cpsw crash when build as modules)
      moved cpts_register()/cpts_unregister() to  ndo_open()/ndo_stop(), but failed
      to remove cpts_register in cpsw_probe() which leads to a double registration
      and the following debug object splat.
      
      [   18.991902] ODEBUG: init active (active state 0) object type: timer_list hint: delayed_work_timer_fn+0x0/0x2c
      [   19.082249] [<c0059e80>] (init_timer_key) from [<c04965d4>] (cpts_register+0x1f0/0x2c4)
      [   19.090642] [<c04965d4>] (cpts_register) from [<c04931dc>] (cpsw_ndo_open+0x780/0x81c)
      [   19.098948] [<c04931dc>] (cpsw_ndo_open) from [<c0599c2c>] (__dev_open+0xb4/0x118)
      Signed-off-by: NBenedikt Spranger <b.spranger@linutronix.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b085f311
  21. 11 3月, 2014 1 次提交
  22. 04 3月, 2014 1 次提交
  23. 17 2月, 2014 1 次提交
  24. 14 2月, 2014 2 次提交
  25. 31 1月, 2014 1 次提交
  26. 24 1月, 2014 1 次提交
  27. 23 12月, 2013 1 次提交
    • M
      drivers: net : cpsw: pass proper device name while requesting irq · db850559
      Mugunthan V N 提交于
      During checking the interrupts with "cat /proc/interrupts", it is showing
      device name as (null), this change was done with commit id aa1a15e2 where
      request_irq is changed to devm_request_irq also changing the irq name from
      platform device name to net device name, but the net device is not
      registered at this point with the network frame work, so devm_request_irq
      is called with device name as NULL, by which it is showed as "(null)" in
      "cat /proc/interrupts". So this patch changes back irq name to platform
      device name itself in devm_request_irq so that the device name shows as
      below.
      
      Previous to this patch
      root@am335x-evm:~# cat /proc/interrupts
                 CPU0
       28:       2265      INTC  12  edma
       30:         80      INTC  14  edma_error
       56:          0      INTC  40  (null)
       57:       1794      INTC  41  (null)
       58:          7      INTC  42  (null)
       59:          0      INTC  43  (null)
      
      With this patch
      root@am335x-evm:~# cat /proc/interrupts
                 CPU0
       28:        213      INTC  12  edma
       30:          9      INTC  14  edma_error
       56:          0      INTC  40  4a100000.ethernet
       57:      16097      INTC  41  4a100000.ethernet
       58:      11964      INTC  42  4a100000.ethernet
       59:          0      INTC  43  4a100000.ethernet
      Signed-off-by: NMugunthan V N <mugunthanvnm@ti.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      db850559
  28. 19 12月, 2013 1 次提交
  29. 13 12月, 2013 1 次提交
  30. 12 12月, 2013 1 次提交
  31. 03 12月, 2013 1 次提交