1. 31 3月, 2010 3 次提交
  2. 27 3月, 2010 1 次提交
  3. 07 3月, 2010 1 次提交
  4. 04 3月, 2010 1 次提交
    • A
      gianfar: Fix TX ring processing on SMP machines · 0eddba52
      Anton Vorontsov 提交于
      Starting with commit a3bc1f11 ("gianfar: Revive SKB
      recycling") gianfar driver sooner or later stops transmitting any
      packets on SMP machines.
      
      start_xmit() prepares new skb for transmitting, generally it does
      three things:
      
      1. sets up all BDs (marks them ready to send), except the first one.
      2. stores skb into tx_queue->tx_skbuff so that clean_tx_ring()
         would cleanup it later.
      3. sets up the first BD, i.e. marks it ready.
      
      Here is what clean_tx_ring() does:
      
      1. reads skbs from tx_queue->tx_skbuff
      2. checks if the *last* BD is ready. If it's still ready [to send]
         then it it isn't transmitted, so clean_tx_ring() returns.
         Otherwise it actually cleanups BDs. All is OK.
      
      Now, if there is just one BD, code flow:
      
      - start_xmit(): stores skb into tx_skbuff. Note that the first BD
        (which is also the last one) isn't marked as ready, yet.
      - clean_tx_ring(): sees that skb is not null, *and* its lstatus
        says that it is NOT ready (like if BD was sent), so it cleans
        it up (bad!)
      - start_xmit(): marks BD as ready [to send], but it's too late.
      
      We can fix this simply by reordering lstatus/tx_skbuff writes.
      Reported-by: NMartyn Welch <martyn.welch@ge.com>
      Bisected-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      Signed-off-by: NAnton Vorontsov <avorontsov@ru.mvista.com>
      Tested-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      Tested-by: NMartyn Welch <martyn.welch@ge.com>
      Cc: Sandeep Gopalpet <Sandeep.Kumar@freescale.com>
      Cc: Stable <stable@vger.kernel.org> [2.6.33]
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0eddba52
  5. 23 2月, 2010 1 次提交
  6. 13 2月, 2010 1 次提交
  7. 27 12月, 2009 1 次提交
    • S
      gianfar: Fix gianfar select_queue bogosity · f74dac08
      Sandeep Gopalpet 提交于
      The gfar_select_queue() function was used to set queue mapping
      only for forwarding/bridging applications and the condition
      for locally generated packets was completely ignored.
      
      The solution is to remove the gfar_select_queue() function and
      use skb_record_rx_queue to set queue mapping for
      forwarding/bridging applications. This will ensure that in case of
      forwarding/bridging applications txq = rxq will be selected and
      skb_tx_hash will be used to pick up a txq for locally generated packets.
      Signed-off-by: NSandeep Gopalpet <Sandeep.Kumar@freescale.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f74dac08
  8. 19 12月, 2009 2 次提交
  9. 09 12月, 2009 1 次提交
    • A
      gianfar: Fix build with CONFIG_NET_POLL_CONTROLLER=y · 43de004b
      Anton Vorontsov 提交于
      commit 46ceb60c ("gianfar: Add
      Multiple group Support") introduced the following build error
      with CONFIG_NET_POLL_CONTROLLER=y:
      
        CC      ggianfar.o
      ggianfar.c: In function 'gfar_netpoll':
      ggianfar.c:2653: error: invalid storage class for function 'gfar_interrupt'
      ggianfar.c:2652: warning: ISO C90 forbids mixed declarations and code
      ggianfar.c:2681: error: invalid storage class for function 'adjust_link'
      ggianfar.c:2764: error: invalid storage class for function 'gfar_set_multi'
      ggianfar.c:2855: error: invalid storage class for function 'gfar_clear_exact_match'
      ggianfar.c:2877: error: invalid storage class for function 'gfar_set_hash_for_addr'
      ggianfar.c:2898: error: invalid storage class for function 'gfar_set_mac_for_addr'
      ggianfar.c:2922: error: invalid storage class for function 'gfar_error'
      ggianfar.c:3020: warning: ISO C90 forbids mixed declarations and code
      ggianfar.c:3032: error: invalid storage class for function 'gfar_init'
      ggianfar.c:3037: error: invalid storage class for function 'gfar_exit'
      ggianfar.c:3041: error: initializer element is not constant
      ggianfar.c:3042: error: initializer element is not constant
      ggianfar.c:3042: warning: ISO C90 forbids mixed declarations and code
      ggianfar.c:3042: error: expected declaration or statement at end of input
      make[1]: *** [ggianfar.o] Error 1
      
      This patch fixes the issue.
      Reported-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NAnton Vorontsov <avorontsov@ru.mvista.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      43de004b
  10. 12 11月, 2009 4 次提交
  11. 08 11月, 2009 1 次提交
    • A
      gianfar: Fix compiler and sparse warnings · 18294ad1
      Anton Vorontsov 提交于
      commit fba4ed03 ("gianfar: Add Multiple
      Queue Support") introduced the following warnings:
      
        CHECK   gianfar.c
      gianfar.c:333:8: warning: incorrect type in assignment (different address spaces)
      gianfar.c:333:8:    expected unsigned int [usertype] *baddr
      gianfar.c:333:8:    got unsigned int [noderef] <asn:2>*<noident>
      [... 67 lines skipped ...]
      gianfar.c:2565:3: warning: incorrect type in argument 1 (different type sizes)
      gianfar.c:2565:3:    expected unsigned long const *addr
      gianfar.c:2565:3:    got unsigned int *<noident>
        CC      gianfar.o
      gianfar.c: In function 'gfar_probe':
      gianfar.c:985: warning: passing argument 1 of 'find_next_bit' from incompatible pointer type
      gianfar.c:985: warning: passing argument 1 of 'find_next_bit' from incompatible pointer type
      gianfar.c:993: warning: passing argument 1 of 'find_next_bit' from incompatible pointer type
      gianfar.c:993: warning: passing argument 1 of 'find_next_bit' from incompatible pointer type
      gianfar.c: In function 'gfar_configure_coalescing':
      gianfar.c:1680: warning: passing argument 1 of 'find_next_bit' from incompatible pointer type
      gianfar.c:1680: warning: passing argument 1 of 'find_next_bit' from incompatible pointer type
      gianfar.c:1688: warning: passing argument 1 of 'find_next_bit' from incompatible pointer type
      gianfar.c:1688: warning: passing argument 1 of 'find_next_bit' from incompatible pointer type
      gianfar.c: In function 'gfar_poll':
      gianfar.c:2565: warning: passing argument 1 of 'find_next_bit' from incompatible pointer type
      gianfar.c:2565: warning: passing argument 1 of 'find_next_bit' from incompatible pointer type
      gianfar.c:2566: warning: passing argument 2 of 'test_bit' from incompatible pointer type
      gianfar.c:2585: warning: passing argument 2 of 'set_bit' from incompatible pointer type
      
      Following warnings left unfixed (looks like sparse doesn't like
      locks in loops, so __acquires/__releases() doesn't help):
      
      gianfar.c:441:40: warning: context imbalance in 'lock_rx_qs': wrong count at exit
      gianfar.c:441:40:    context '<noident>': wanted 0, got 1
      gianfar.c:449:40: warning: context imbalance in 'lock_tx_qs': wrong count at exit
      gianfar.c:449:40:    context '<noident>': wanted 0, got 1
      gianfar.c:458:3: warning: context imbalance in 'unlock_rx_qs': __context__ statement expected different context
      gianfar.c:458:3:    context '<noident>': wanted >= 0, got -1
      gianfar.c:466:3: warning: context imbalance in 'unlock_tx_qs': __context__ statement expected different context
      gianfar.c:466:3:    context '<noident>': wanted >= 0, got -1
      Signed-off-by: NAnton Vorontsov <avorontsov@ru.mvista.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      18294ad1
  12. 03 11月, 2009 5 次提交
  13. 15 10月, 2009 1 次提交
  14. 13 10月, 2009 8 次提交
  15. 06 9月, 2009 1 次提交
    • D
      gianfar: Fix build. · d9d8e041
      David S. Miller 提交于
      Reported by Michael Guntsche <mike@it-loops.com>
      
      --------------------
      Commit
      38bddf04 gianfar: gfar_remove needs to call unregister_netdev()
      
      breaks the build of the gianfar driver because "dev" is undefined in
      this function. To quickly test rc9 I changed this to priv->ndev but I do
      not know if this is the correct one.
      --------------------
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d9d8e041
  16. 31 8月, 2009 1 次提交
    • T
      gianfar: gfar_remove needs to call unregister_netdev() · 38bddf04
      Toru UCHIYAMA 提交于
      This patch solves the problem that the Oops(BUG_ON) occurs by rmmod.
      
      	# rmmod gianfar_driver
      	------------[ cut here ]------------
      	Kernel BUG at c01fec48 [verbose debug info unavailable]
      	Oops: Exception in kernel mode, sig: 5 [#1]
      	MPC837x MDS
      	Modules linked in: gianfar_driver(-) usb_storage scsi_wait_scan
      	NIP: c01fec48 LR: c01febf4 CTR: c01feba8
      	REGS: dec5bd60 TRAP: 0700   Tainted: G        W   (2.6.31-rc2)
      	MSR: 00029032 <EE,ME,CE,IR,DR>  CR: 22000424  XER: 20000000
      	TASK = dec4cac0[1135] 'rmmod' THREAD: dec5a000
      	GPR00: 00000002 dec5be10 dec4cac0 dfba1820 c035d444 c035d478 ffffffff 00000000
      	GPR08: 0000002b 00000001 dfba193c 00000001 22000424 10019b34 1ffcb000 00000000
      	GPR16: 10012008 00000000 bf82ebe0 100017ec bf82ebec bf82ebe8 bf82ebd0 00000880
      	GPR24: 00000000 bf82ebf0 c03532f0 c03532e4 c036b594 dfba183c dfba1800 dfba1820
      	NIP [c01fec48] free_netdev+0xa0/0xb8
      	LR [c01febf4] free_netdev+0x4c/0xb8
      	Call Trace:
      	[dec5be10] [c01febf4] free_netdev+0x4c/0xb8 (unreliable)
      	[dec5be30] [e105f290] gfar_remove+0x50/0x68 [gianfar_driver]
      	[dec5be40] [c01ec534] of_platform_device_remove+0x30/0x44
      	[dec5be50] [c0181760] __device_release_driver+0x68/0xc8
      	[dec5be60] [c0181868] driver_detach+0xa8/0xac
      	[dec5be80] [c0180814] bus_remove_driver+0x9c/0xd8
      	[dec5bea0] [c0181efc] driver_unregister+0x60/0x98
      	[dec5beb0] [c01ec650] of_unregister_driver+0x14/0x24
      	[dec5bec0] [e10631bc] gfar_exit+0x18/0x4bc [gianfar_driver]
      	[dec5bed0] [c0047584] sys_delete_module+0x16c/0x228
      	[dec5bf40] [c00116bc] ret_from_syscall+0x0/0x38
      	--- Exception: c01 at 0xff3669c
      	    LR = 0x10000f34
      	Instruction dump:
      	409e0024 a07e00c0 7c63f050 4be74429 80010024 bba10014 38210020 7c0803a6
      	4e800020 68000003 3160ffff 7d2b0110 <0f090000> 38000004 387e01f0 901e01d4
      	---[ end trace 8c595bcd37230a0f ]---
      	 localhost kernel: ------------[ cut here ]------------
      
      Signed-off-by: Toru UCHIYAMA uchiyama.toru@jp.fujitsu.com
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      38bddf04
  17. 10 8月, 2009 1 次提交
  18. 23 7月, 2009 1 次提交
    • A
      gianfar: Revive fixed link support · 1db780f8
      Anton Vorontsov 提交于
      Since commit fe192a49 ("Rework gianfar
      driver to use of_mdio infrastructure") the fixed-link support is
      broken, the driver oopses at init_phy():
      
        Unable to handle kernel paging request for data at address 0x000000e4
        Faulting instruction address: 0xc01cf298
        Oops: Kernel access of bad area, sig: 11 [#1]
        [...]
        NIP [c01cf298] init_phy+0x80/0xdc
        LR [c01cf250] init_phy+0x38/0xdc
        Call Trace:
        [cf81fe80] [c01d1cf8] gfar_enet_open+0x6c/0x19c
        [cf81fea0] [c024494c] dev_open+0xfc/0x134
        [cf81fec0] [c0242edc] dev_change_flags+0x84/0x1ac
        [cf81fee0] [c0399ee0] ic_open_devs+0x168/0x2d8
        [cf81ff20] [c039b2e8] ip_auto_config+0x90/0x2a4
        [cf81ff60] [c0003884] do_one_initcall+0x34/0x1a8
      
      This patch fixes the oops, and removes phy_node checks, and adds a call
      to of_phy_connect_fixed_link() if a phy isn't attached..
      
      Also, remove an old fixed-link code that we don't use any longer.
      Signed-off-by: NAnton Vorontsov <avorontsov@ru.mvista.com>
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1db780f8
  19. 16 7月, 2009 1 次提交
  20. 13 7月, 2009 1 次提交
  21. 25 5月, 2009 1 次提交
  22. 28 4月, 2009 1 次提交
  23. 27 4月, 2009 1 次提交