1. 24 6月, 2015 1 次提交
  2. 23 6月, 2015 4 次提交
  3. 10 5月, 2015 1 次提交
  4. 01 5月, 2015 5 次提交
  5. 28 3月, 2015 1 次提交
  6. 19 3月, 2015 1 次提交
  7. 18 3月, 2015 1 次提交
  8. 06 3月, 2015 1 次提交
    • M
      net: eth: xgene: fix booting with devicetree · b0ab0afa
      Mark Salter 提交于
      Commit de7b5b3d ("net: eth: xgene: change APM X-Gene SoC platform
      ethernet to support ACPI") breaks booting with devicetree with UEFI
      firmware. In that case, I get:
      
      Unhandled fault: synchronous external abort (0x96000010) at 0xfffffc0000620010
       Internal error: : 96000010 [#1] SMP
       Modules linked in: vfat fat xfs libcrc32c ahci_xgene libahci_platform libahci
       CPU: 7 PID: 634 Comm: NetworkManager Not tainted 4.0.0-rc1+ #4
       Hardware name: AppliedMicro Mustang/Mustang, BIOS 1.1.0-rh-0.14 Mar  1 2015
       task: fffffe03d4c7e100 ti: fffffe03d4e24000 task.ti: fffffe03d4e24000
       PC is at xgene_enet_rd_mcx_mac.isra.11+0x58/0xd4
       LR is at xgene_gmac_tx_enable+0x2c/0x50
       pc : [<fffffe000069d6fc>] lr : [<fffffe000069dcc4>] pstate: 80000145
       sp : fffffe03d4e27590
       x29: fffffe03d4e27590 x28: 0000000000000000
       x27: fffffe03d4e277c0 x26: fffffe03da8fda10
       x25: fffffe03d4e2760c x24: fffffe03d49e28c0
       x23: fffffc0000620004 x22: 0000000000000000
       x21: fffffc0000620000 x20: fffffc0000620010
       x19: 000000000000000b x18: 000003ffd4a96020
       x17: 000003ff7fc1f7a0 x16: fffffe000079b9cc
       x15: 0000000000000000 x14: 0000000000000000
       x13: 0000000000000000 x12: fffffe03d4e24000
       x11: fffffe03d4e27da0 x10: 0000000000000001
       x9 : 0000000000000000 x8 : fffffe03d4e27a20
       x7 : 0000000000000000 x6 : 00000000ffffffef
       x5 : fffffe000105f7d0 x4 : fffffe00007ca8c8
       x3 : fffffe03d4e2760c x2 : 0000000000000000
       x1 : fffffc0000620000 x0 : 0000000040000000
      
       Process NetworkManager (pid: 634, stack limit = 0xfffffe03d4e24028)
       Stack: (0xfffffe03d4e27590 to 0xfffffe03d4e28000)
       ...
       Call trace:
       [<fffffe000069d6fc>] xgene_enet_rd_mcx_mac.isra.11+0x58/0xd4
       [<fffffe000069dcc0>] xgene_gmac_tx_enable+0x28/0x50
       [<fffffe00006a112c>] xgene_enet_open+0x2c/0x130
       [<fffffe00007b9254>] __dev_open+0xc8/0x148
       [<fffffe00007b956c>] __dev_change_flags+0x90/0x158
       [<fffffe00007b9664>] dev_change_flags+0x30/0x70
       [<fffffe00007c8ab8>] do_setlink+0x278/0x870
       [<fffffe00007c95bc>] rtnl_newlink+0x404/0x6a8
       [<fffffe00007c8040>] rtnetlink_rcv_msg+0x98/0x218
       [<fffffe00007e78e4>] netlink_rcv_skb+0xe0/0xf8
       [<fffffe00007c7f94>] rtnetlink_rcv+0x30/0x44
       [<fffffe00007e6f2c>] netlink_unicast+0xfc/0x210
       [<fffffe00007e75b8>] netlink_sendmsg+0x498/0x5ac
       [<fffffe00007990b8>] do_sock_sendmsg+0xa4/0xcc
       [<fffffe000079a958>] ___sys_sendmsg+0x1fc/0x208
       [<fffffe000079b984>] __sys_sendmsg+0x4c/0x94
       [<fffffe000079b9f8>] SyS_sendmsg+0x2c/0x3c
      
      The problem here is that the enet hw clocks are not getting
      initialized because of a test to avoid the initialization if
      UEFI is used to boot. This is an incorrect test. When booting
      with UEFI and devicetree, the kernel must still initialize
      the enet hw clocks. If booting with ACPI, the clock hw is
      not exposed to the kernel and it is that case where we want
      to avoid initializing clocks.
      Signed-off-by: NMark Salter <msalter@redhat.com>
      Acked-by: NFeng Kan <fkan@apm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b0ab0afa
  9. 05 3月, 2015 1 次提交
  10. 12 2月, 2015 1 次提交
  11. 31 1月, 2015 1 次提交
    • I
      drivers: net: xgene: fix: Out of order descriptor bytes read · ecf6ba83
      Iyappan Subramanian 提交于
      This patch fixes the following kernel crash,
      
      	WARNING: CPU: 2 PID: 0 at net/ipv4/tcp_input.c:3079 tcp_clean_rtx_queue+0x658/0x80c()
      	Call trace:
      	[<fffffe0000096b7c>] dump_backtrace+0x0/0x184
      	[<fffffe0000096d10>] show_stack+0x10/0x1c
      	[<fffffe0000685ea0>] dump_stack+0x74/0x98
      	[<fffffe00000b44e0>] warn_slowpath_common+0x88/0xb0
      	[<fffffe00000b461c>] warn_slowpath_null+0x14/0x20
      	[<fffffe00005b5c1c>] tcp_clean_rtx_queue+0x654/0x80c
      	[<fffffe00005b6228>] tcp_ack+0x454/0x688
      	[<fffffe00005b6ca8>] tcp_rcv_established+0x4a4/0x62c
      	[<fffffe00005bf4b4>] tcp_v4_do_rcv+0x16c/0x350
      	[<fffffe00005c225c>] tcp_v4_rcv+0x8e8/0x904
      	[<fffffe000059d470>] ip_local_deliver_finish+0x100/0x26c
      	[<fffffe000059dad8>] ip_local_deliver+0xac/0xc4
      	[<fffffe000059d6c4>] ip_rcv_finish+0xe8/0x328
      	[<fffffe000059dd3c>] ip_rcv+0x24c/0x38c
      	[<fffffe0000563950>] __netif_receive_skb_core+0x29c/0x7c8
      	[<fffffe0000563ea4>] __netif_receive_skb+0x28/0x7c
      	[<fffffe0000563f54>] netif_receive_skb_internal+0x5c/0xe0
      	[<fffffe0000564810>] napi_gro_receive+0xb4/0x110
      	[<fffffe0000482a2c>] xgene_enet_process_ring+0x144/0x338
      	[<fffffe0000482d18>] xgene_enet_napi+0x1c/0x50
      	[<fffffe0000565454>] net_rx_action+0x154/0x228
      	[<fffffe00000b804c>] __do_softirq+0x110/0x28c
      	[<fffffe00000b8424>] irq_exit+0x8c/0xc0
      	[<fffffe0000093898>] handle_IRQ+0x44/0xa8
      	[<fffffe000009032c>] gic_handle_irq+0x38/0x7c
      	[...]
      
      Software writes poison data into the descriptor bytes[15:8] and upon
      receiving the interrupt, if those bytes are overwritten by the hardware with
      the valid data, software also reads bytes[7:0] and executes receive/tx
      completion logic.
      
      If the CPU executes the above two reads in out of order fashion, then the
      bytes[7:0] will have older data and causing the kernel panic.  We have to
      force the order of the reads and thus this patch introduces read memory
      barrier between these reads.
      Signed-off-by: NIyappan Subramanian <isubramanian@apm.com>
      Signed-off-by: NKeyur Chudgar <kchudgar@apm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ecf6ba83
  12. 13 1月, 2015 1 次提交
  13. 07 1月, 2015 1 次提交
  14. 05 11月, 2014 2 次提交
    • I
      drivers: net: xgene: fix: Use separate resources · bdd330f0
      Iyappan Subramanian 提交于
      This patch fixes the following kernel crash during SGMII based 1GbE probe.
      
      	BUG: Bad page state in process swapper/0  pfn:40fe6ad
      	page:ffffffbee37a75d8 count:-1 mapcount:0 mapping:          (null) index:0x0
      	flags: 0x0()
      	page dumped because: nonzero _count
      	Modules linked in:
      	CPU: 0 PID: 0 Comm: swapper/0 Not tainted 3.17.0+ #7
      	Call trace:
      	[<ffffffc000087fa0>] dump_backtrace+0x0/0x12c
      	[<ffffffc0000880dc>] show_stack+0x10/0x1c
      	[<ffffffc0004d981c>] dump_stack+0x74/0xc4
      	[<ffffffc00012fe70>] bad_page+0xd8/0x128
      	[<ffffffc000133000>] get_page_from_freelist+0x4b8/0x640
      	[<ffffffc000133260>] __alloc_pages_nodemask+0xd8/0x834
      	[<ffffffc0004194f8>] __netdev_alloc_frag+0x124/0x1b8
      	[<ffffffc00041bfdc>] __netdev_alloc_skb+0x90/0x10c
      	[<ffffffc00039ff30>] xgene_enet_refill_bufpool+0x11c/0x280
      	[<ffffffc0003a11a4>] xgene_enet_process_ring+0x168/0x340
      	[<ffffffc0003a1498>] xgene_enet_napi+0x1c/0x50
      	[<ffffffc00042b454>] net_rx_action+0xc8/0x18c
      	[<ffffffc0000b0880>] __do_softirq+0x114/0x24c
      	[<ffffffc0000b0c34>] irq_exit+0x94/0xc8
      	[<ffffffc0000e68a0>] __handle_domain_irq+0x8c/0xf4
      	[<ffffffc000081288>] gic_handle_irq+0x30/0x7c
      
      This was due to hardware resource sharing conflict with the firmware. This
      patch fixes this crash by using resources (descriptor ring, prefetch buffer)
      that are not shared.
      Signed-off-by: NIyappan Subramanian <isubramanian@apm.com>
      Signed-off-by: NKeyur Chudgar <kchudgar@apm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      bdd330f0
    • I
      drivers: net: xgene: Backward compatibility with older firmware · c3f4465d
      Iyappan Subramanian 提交于
      This patch adds support when used with older firmware (<= 1.13.28).
      
      - Added xgene_ring_mgr_init() to check whether ring manager is initialized
      - Calling xgene_ring_mgr_init() from xgene_port_ops.reset()
      - To handle errors, changed the return type of xgene_port_ops.reset()
      Signed-off-by: NIyappan Subramanian <isubramanian@apm.com>
      Signed-off-by: NKeyur Chudgar <kchudgar@apm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c3f4465d
  15. 28 10月, 2014 1 次提交
  16. 26 10月, 2014 1 次提交
  17. 15 10月, 2014 3 次提交
  18. 11 10月, 2014 3 次提交
  19. 02 9月, 2014 1 次提交
    • G
      drivers: net: NET_XGENE should depend on HAS_DMA · e148e1bf
      Geert Uytterhoeven 提交于
      If NO_DMA=y:
      
      drivers/built-in.o: In function `xgene_enet_delete_ring':
      xgene_enet_main.c:(.text+0x28755a): undefined reference to `dma_free_coherent'
      drivers/built-in.o: In function `xgene_enet_setup_tx_desc':
      xgene_enet_main.c:(.text+0x287774): undefined reference to `dma_map_single'
      xgene_enet_main.c:(.text+0x287780): undefined reference to `dma_mapping_error'
      drivers/built-in.o: In function `xgene_enet_tx_completion':
      xgene_enet_main.c:(.text+0x2878e6): undefined reference to `dma_unmap_single'
      drivers/built-in.o: In function `xgene_enet_refill_bufpool':
      xgene_enet_main.c:(.text+0x2879d4): undefined reference to `dma_map_single'
      xgene_enet_main.c:(.text+0x2879e0): undefined reference to `dma_mapping_error'
      drivers/built-in.o: In function `xgene_enet_rx_frame':
      xgene_enet_main.c:(.text+0x287aaa): undefined reference to `dma_unmap_single'
      drivers/built-in.o: In function `xgene_enet_free_desc_ring':
      xgene_enet_main.c:(.text+0x287f98): undefined reference to `dma_free_coherent'
      drivers/built-in.o: In function `xgene_enet_create_desc_ring':
      xgene_enet_main.c:(.text+0x28808e): undefined reference to `dma_alloc_coherent'
      drivers/built-in.o: In function `xgene_enet_probe':
      xgene_enet_main.c:(.text+0x2883d4): undefined reference to `dma_set_mask'
      xgene_enet_main.c:(.text+0x2883ec): undefined reference to `dma_supported'
      Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e148e1bf
  20. 23 8月, 2014 1 次提交
  21. 15 8月, 2014 1 次提交
    • T
      net: xgene: Check negative return value of xgene_enet_get_ring_size() · 9b9ba821
      Tobias Klauser 提交于
      xgene_enet_get_ring_size() returns a negative value in case of an error,
      but its only caller in xgene_enet_create_desc_ring() currently uses the
      return value directly as u32. Instead, check for a negative value first and
      error out in case. Also move the call to xgene_enet_get_ring_size() before
      devm_kzalloc() so we don't need to free anything in the error path.
      
      This fixes the following issue reported by the Coverity Scanner:
      
      ** CID 1231336:  Improper use of negative value  (NEGATIVE_RETURNS)
      /drivers/net/ethernet/apm/xgene/xgene_enet_main.c: 596 in xgene_enet_create_desc_ring()
      Signed-off-by: NTobias Klauser <tklauser@distanz.ch>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9b9ba821
  22. 12 8月, 2014 1 次提交