1. 04 9月, 2009 30 次提交
  2. 03 9月, 2009 10 次提交
    • E
      net: Remove debugging code · 55f9d678
      Eric Dumazet 提交于
      Remove a debugging aid I accidently left in previous 'cleanup' patch
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      55f9d678
    • E
      vlan: enable multiqueue xmits · 2f8bc32b
      Eric Dumazet 提交于
      vlan_dev_hard_start_xmit() & vlan_dev_hwaccel_hard_start_xmit()
      select txqueue number 0, instead of using index provided by
      skb_get_queue_mapping().
      
      This is not correct after commit 2e59af3d
      [vlan: multiqueue vlan device] because
      txq->tx_packets  & txq->tx_bytes changes are performed on
      a single location, and not the right locking.
      
      Fix is to take the appropriate struct netdev_queue pointer
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2f8bc32b
    • E
      net: net/core/dev.c cleanups · d1b19dff
      Eric Dumazet 提交于
      Pure style cleanup patch before surgery :)
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d1b19dff
    • K
      atm/br2684: netif_stop_queue() when atm device busy and netif_wake_queue()... · 137742cf
      Karl Hiramoto 提交于
      atm/br2684: netif_stop_queue() when atm device busy and netif_wake_queue() when we can send packets again.
      
      This patch removes the call to dev_kfree_skb() when the atm device is busy.
      Calling dev_kfree_skb() causes heavy packet loss then the device is under
      heavy load, the more correct behavior should be to stop the upper layers,
      then when the lower device can queue packets again wake the upper layers.
      Signed-off-by: NKarl Hiramoto <karl@hiramoto.org>
      Signed-off-by: NChas Williams <chas@cmf.nrl.navy.mil>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      137742cf
    • U
      fec: don't enable irqs in hard irq context · 81538e74
      Uwe Kleine-König 提交于
      fec_enet_mii, fec_enet_rx and fec_enet_tx are both only called by
      fec_enet_interrupt in interrupt context.  So they must not use
      spin_lock_irq/spin_unlock_irq.
      
      This fixes:
      	WARNING: at kernel/lockdep.c:2140 trace_hardirqs_on_caller+0x130/0x194()
      	...
      Signed-off-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Cc: Greg Ungerer <gerg@uclinux.org>
      Cc: Ben Hutchings <ben@decadent.org.uk>
      Cc: Patrick McHardy <kaber@trash.net>
      Cc: Sascha Hauer <s.hauer@pengutronix.de>
      Cc: Matt Waddel <Matt.Waddel@freescale.com>
      Cc: netdev@vger.kernel.org
      Cc: Tim Sander <tim01@vlsi.informatik.tu-darmstadt.de>
      Acked-by: NGreg Ungerer <gerg@uclinux.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      81538e74
    • U
      fec: fix recursive locking of mii_lock · 84177a20
      Uwe Kleine-König 提交于
      mii_discover_phy is only called by fec_enet_mii (via mip->mii_func).  So
      &fep->mii_lock is already held and mii_discover_phy must not call
      mii_queue which locks &fep->mii_lock, too.
      
      This was noticed by lockdep:
      
      	=============================================
      	[ INFO: possible recursive locking detected ]
      	2.6.31-rc8-00038-g37d0892c #109
      	---------------------------------------------
      	swapper/1 is trying to acquire lock:
      	 (&fep->mii_lock){-.....}, at: [<c01569f8>] mii_queue+0x2c/0xcc
      
      	but task is already holding lock:
      	 (&fep->mii_lock){-.....}, at: [<c0156328>] fec_enet_interrupt+0x78/0x460
      
      	other info that might help us debug this:
      	2 locks held by swapper/1:
      	 #0:  (rtnl_mutex){+.+.+.}, at: [<c0183534>] rtnl_lock+0x18/0x20
      	 #1:  (&fep->mii_lock){-.....}, at: [<c0156328>] fec_enet_interrupt+0x78/0x460
      
      	stack backtrace:
      	Backtrace:
      	[<c00226fc>] (dump_backtrace+0x0/0x108) from [<c01eac14>] (dump_stack+0x18/0x1c)
      	 r6:c781d118 r5:c03e41d8 r4:00000001
      	[<c01eabfc>] (dump_stack+0x0/0x1c) from [<c005bae4>] (__lock_acquire+0x1a20/0x1a88)
      	[<c005a0c4>] (__lock_acquire+0x0/0x1a88) from [<c005bbac>] (lock_acquire+0x60/0x74)
      	[<c005bb4c>] (lock_acquire+0x0/0x74) from [<c01edda8>] (_spin_lock_irqsave+0x54/0x68)
      	 r7:60000093 r6:c01569f8 r5:c785e468 r4:00000000
      	[<c01edd54>] (_spin_lock_irqsave+0x0/0x68) from [<c01569f8>] (mii_queue+0x2c/0xcc)
      	 r7:c785e468 r6:c0156b24 r5:600a0000 r4:c785e000
      	[<c01569cc>] (mii_queue+0x0/0xcc) from [<c0156b78>] (mii_discover_phy+0x54/0xa8)
      	 r8:00000002 r7:00000032 r6:c785e000 r5:c785e360 r4:c785e000
      	[<c0156b24>] (mii_discover_phy+0x0/0xa8) from [<c0156354>] (fec_enet_interrupt+0xa4/0x460)
      	 r5:c785e360 r4:c077a170
      	[<c01562b0>] (fec_enet_interrupt+0x0/0x460) from [<c0066674>] (handle_IRQ_event+0x48/0x120)
      	[<c006662c>] (handle_IRQ_event+0x0/0x120) from [<c0068438>] (handle_level_irq+0x94/0x11c)
      	...
      Signed-off-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Cc: Greg Ungerer <gerg@uclinux.org>
      Cc: Ben Hutchings <ben@decadent.org.uk>
      Cc: Patrick McHardy <kaber@trash.net>
      Cc: Sascha Hauer <s.hauer@pengutronix.de>
      Cc: Matt Waddel <Matt.Waddel@freescale.com>
      Cc: netdev@vger.kernel.org
      Cc: Tim Sander <tim01@vlsi.informatik.tu-darmstadt.de>
      Acked-by: NGreg Ungerer <gerg@uclinux.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      84177a20
    • R
      NET: Fix possible corruption in bpqether driver · 3eb00275
      Ralf Baechle 提交于
      The bpq ether driver is modifying the data art of the skb by first
      dropping the KISS byte (a command byte for the radio) then prepending the
      length + 4 of the remaining AX.25 packet to be transmitted as a little
      endian 16-bit number.  If the high byte of the length has a different
      value than the dropped KISS byte users of clones of the skb may observe
      this as corruption.  This was observed with by running listen(8) -a which
      uses a packet socket which clones transmit packets.  The corruption will
      then typically be displayed for as a KISS "TX Delay" command for AX.25
      packets in the range of 252..508 bytes or any other KISS command for
      yet larger packets.
      
      Fixed by using skb_cow to create a private copy should the skb be cloned.
      Using skb_cow also allows us to cleanup the old logic to ensure sufficient
      headroom in the skb.
      
      While at it, replace a return of 0 from bpq_xmit with the proper constant
      NETDEV_TX_OK which is now being used everywhere else in this function.
      
      Affected: all 2.2, 2.4 and 2.6 kernels.
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      Reported-by: NJann Traschewski <jann@gmx.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3eb00275
    • R
      WARNING: some request_irq() failures ignored in el2_open() · ab08999d
      roel kluin 提交于
      Request_irq() may fail in different ways, handle accordingly.
      Signed-off-by: NRoel Kluin <roel.kluin@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ab08999d
    • W
      tcp: replace hard coded GFP_KERNEL with sk_allocation · aa133076
      Wu Fengguang 提交于
      This fixed a lockdep warning which appeared when doing stress
      memory tests over NFS:
      
      	inconsistent {RECLAIM_FS-ON-W} -> {IN-RECLAIM_FS-W} usage.
      
      	page reclaim => nfs_writepage => tcp_sendmsg => lock sk_lock
      
      	mount_root => nfs_root_data => tcp_close => lock sk_lock =>
      			tcp_send_fin => alloc_skb_fclone => page reclaim
      
      David raised a concern that if the allocation fails in tcp_send_fin(), and it's
      GFP_ATOMIC, we are going to yield() (which sleeps) and loop endlessly waiting
      for the allocation to succeed.
      
      But fact is, the original GFP_KERNEL also sleeps. GFP_ATOMIC+yield() looks
      weird, but it is no worse the implicit sleep inside GFP_KERNEL. Both could
      loop endlessly under memory pressure.
      
      CC: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
      CC: David S. Miller <davem@davemloft.net>
      CC: Herbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NWu Fengguang <fengguang.wu@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      aa133076
    • A
      net/ethtool: Add support for the ethtool feature to flash firmware image from a specified file. · 05c6a8d7
      Ajit Khaparde 提交于
      This patch adds support to flash a firmware image to a device using ethtool.
      The driver gets the filename of the firmware image and flashes the image
      using the request firmware path.
      
      The region "on the chip" to be flashed can be specified by an option.
      It is upto the device driver to enumerate the region number passed by ethtool,
      to the region to be flashed.
      
      The default behavior is to flash all the regions on the chip.
      Signed-off-by: NAjit Khaparde <ajitk@serverengines.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      05c6a8d7