1. 04 Sep, 2009 19 commits
  2. 03 Sep, 2009 13 commits
    • Eric Dumazet's avatar
      net: Remove debugging code · 55f9d678
      Eric Dumazet authored
      Remove a debugging aid I accidently left in previous 'cleanup' patch
      Signed-off-by: default avatarEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      55f9d678
    • Eric Dumazet's avatar
      vlan: enable multiqueue xmits · 2f8bc32b
      Eric Dumazet authored
      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: default avatarEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2f8bc32b
    • Eric Dumazet's avatar
      net: net/core/dev.c cleanups · d1b19dff
      Eric Dumazet authored
      Pure style cleanup patch before surgery :)
      Signed-off-by: default avatarEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d1b19dff
    • Karl Hiramoto's avatar
      atm/br2684: netif_stop_queue() when atm device busy and netif_wake_queue()... · 137742cf
      Karl Hiramoto authored
      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: default avatarKarl Hiramoto <karl@hiramoto.org>
      Signed-off-by: default avatarChas Williams <chas@cmf.nrl.navy.mil>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      137742cf
    • Uwe Kleine-König's avatar
      fec: don't enable irqs in hard irq context · 81538e74
      Uwe Kleine-König authored
      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: default avatarUwe 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: default avatarGreg Ungerer <gerg@uclinux.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      81538e74
    • Uwe Kleine-König's avatar
      fec: fix recursive locking of mii_lock · 84177a20
      Uwe Kleine-König authored
      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: default avatarUwe 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: default avatarGreg Ungerer <gerg@uclinux.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      84177a20
    • Ralf Baechle's avatar
      NET: Fix possible corruption in bpqether driver · 3eb00275
      Ralf Baechle authored
      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: default avatarRalf Baechle <ralf@linux-mips.org>
      Reported-by: default avatarJann Traschewski <jann@gmx.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3eb00275
    • roel kluin's avatar
      WARNING: some request_irq() failures ignored in el2_open() · ab08999d
      roel kluin authored
      Request_irq() may fail in different ways, handle accordingly.
      Signed-off-by: default avatarRoel Kluin <roel.kluin@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ab08999d
    • Wu Fengguang's avatar
      tcp: replace hard coded GFP_KERNEL with sk_allocation · aa133076
      Wu Fengguang authored
      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: default avatarWu Fengguang <fengguang.wu@intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      aa133076
    • Ajit Khaparde's avatar
      net/ethtool: Add support for the ethtool feature to flash firmware image from a specified file. · 05c6a8d7
      Ajit Khaparde authored
      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: default avatarAjit Khaparde <ajitk@serverengines.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      05c6a8d7
    • Eric Dumazet's avatar
      drivers: Kill now superfluous ->last_rx stores · 451f1443
      Eric Dumazet authored
      The generic packet receive code takes care of setting
      netdev->last_rx when necessary, for the sake of the
      bonding ARP monitor.
      Signed-off-by: default avatarEric Dumazet <eric.dumazet@gmail.com>
      Acked-by: default avatarNeil Horman <nhorman@txudriver.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      451f1443
    • Eric Dumazet's avatar
      ip: Report qdisc packet drops · 6ce9e7b5
      Eric Dumazet authored
      Christoph Lameter pointed out that packet drops at qdisc level where not
      accounted in SNMP counters. Only if application sets IP_RECVERR, drops
      are reported to user (-ENOBUFS errors) and SNMP counters updated.
      
      IP_RECVERR is used to enable extended reliable error message passing,
      but these are not needed to update system wide SNMP stats.
      
      This patch changes things a bit to allow SNMP counters to be updated,
      regardless of IP_RECVERR being set or not on the socket.
      
      Example after an UDP tx flood
      # netstat -s 
      ...
      IP:
          1487048 outgoing packets dropped
      ...
      Udp:
      ...
          SndbufErrors: 1487048
      
      
      send() syscalls, do however still return an OK status, to not
      break applications.
      
      Note : send() manual page explicitly says for -ENOBUFS error :
      
       "The output queue for a network interface was full.
        This generally indicates that the interface has stopped sending,
        but may be caused by transient congestion.
        (Normally, this does not occur in Linux. Packets are just silently
        dropped when a device queue overflows.) "
      
      This is not true for IP_RECVERR enabled sockets : a send() syscall
      that hit a qdisc drop returns an ENOBUFS error.
      
      Many thanks to Christoph, David, and last but not least, Alexey !
      Signed-off-by: default avatarEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6ce9e7b5
    • Eric Dumazet's avatar
      vlan: multiqueue vlan device · 2e59af3d
      Eric Dumazet authored
      vlan devices are currently not multi-queue capable.
      
      We can do that with a new rtnl_link_ops method,
      get_tx_queues(), called from rtnl_create_link()
      
      This new method gets num_tx_queues/real_num_tx_queues
      from real device.
      
      register_vlan_device() is also handled.
      Signed-off-by: default avatarEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2e59af3d
  3. 02 Sep, 2009 8 commits
    • Neil Horman's avatar
      net: drop_monitor: make last_rx timestamp private · 5848cc09
      Neil Horman authored
      It was recently pointed out to me that the last_rx field of the
      net_device structure wasn't updated regularly.  In fact only the
      bonding driver really uses it currently.  Since the drop_monitor code
      relies on the last_rx field to detect drops on recevie in hardware, We
      need to find a more reliable way to rate limit our drop checks (so
      that we don't check for drops on every frame recevied, which would be
      inefficient.  This patch makes a last_rx timestamp that is private to
      the drop monitor code and is updated for every device that we track.
      Signed-off-by: default avatarNeil Horman <nhorman@tuxdriver.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5848cc09
    • David S. Miller's avatar
    • Vivek Natarajan's avatar
    • Bob Copeland's avatar
      cfg80211: fix looping soft lockup in find_ie() · fcc6cb0c
      Bob Copeland authored
      The find_ie() function uses a size_t for the len parameter, and
      directly uses len as a loop variable.  If any received packets
      are malformed, it is possible for the decrease of len to overflow,
      and since the result is unsigned, the loop will not terminate.
      Change it to a signed int so the loop conditional works for
      negative values.
      
      This fixes the following soft lockup:
      
      [38573.102007] BUG: soft lockup - CPU#0 stuck for 61s! [phy0:2230]
      [38573.102007] Modules linked in: aes_i586 aes_generic fuse af_packet ipt_REJECT xt_tcpudp nf_conntrack_ipv4 nf_defrag_ipv4 xt_state iptable_filter ip_tables x_tables acpi_cpufreq binfmt_misc dm_mirror dm_region_hash dm_log dm_multipath dm_mod kvm_intel kvm uinput i915 arc4 ecb drm snd_hda_codec_idt ath5k snd_hda_intel hid_apple mac80211 usbhid appletouch snd_hda_codec snd_pcm ath cfg80211 snd_timer i2c_algo_bit ohci1394 video snd processor ieee1394 rfkill ehci_hcd sg sky2 backlight snd_page_alloc uhci_hcd joydev output ac thermal button battery sr_mod applesmc cdrom input_polldev evdev unix [last unloaded: scsi_wait_scan]
      [38573.102007] irq event stamp: 2547724535
      [38573.102007] hardirqs last  enabled at (2547724534): [<c1002ffc>] restore_all_notrace+0x0/0x18
      [38573.102007] hardirqs last disabled at (2547724535): [<c10038f4>] apic_timer_interrupt+0x28/0x34
      [38573.102007] softirqs last  enabled at (92950144): [<c103ab48>] __do_softirq+0x108/0x210
      [38573.102007] softirqs last disabled at (92950274): [<c1348e74>] _spin_lock_bh+0x14/0x80
      [38573.102007]
      [38573.102007] Pid: 2230, comm: phy0 Tainted: G        W  (2.6.31-rc7-wl #8) MacBook1,1
      [38573.102007] EIP: 0060:[<f8ea2d50>] EFLAGS: 00010292 CPU: 0
      [38573.102007] EIP is at cmp_ies+0x30/0x180 [cfg80211]
      [38573.102007] EAX: 00000082 EBX: 00000000 ECX: ffffffc1 EDX: d8efd014
      [38573.102007] ESI: ffffff7c EDI: 0000004d EBP: eee2dc50 ESP: eee2dc3c
      [38573.102007]  DS: 007b ES: 007b FS: 00d8 GS: 0000 SS: 0068
      [38573.102007] CR0: 8005003b CR2: d8efd014 CR3: 01694000 CR4: 000026d0
      [38573.102007] DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000
      [38573.102007] DR6: ffff0ff0 DR7: 00000400
      [38573.102007] Call Trace:
      [38573.102007]  [<f8ea2f8d>] cmp_bss+0xed/0x100 [cfg80211]
      [38573.102007]  [<f8ea33e4>] cfg80211_bss_update+0x84/0x410 [cfg80211]
      [38573.102007]  [<f8ea3884>] cfg80211_inform_bss_frame+0x114/0x180 [cfg80211]
      [38573.102007]  [<f97255ff>] ieee80211_bss_info_update+0x4f/0x180 [mac80211]
      [38573.102007]  [<f972b118>] ieee80211_rx_bss_info+0x88/0xf0 [mac80211]
      [38573.102007]  [<f9739297>] ? ieee802_11_parse_elems+0x27/0x30 [mac80211]
      [38573.102007]  [<f972b224>] ieee80211_rx_mgmt_probe_resp+0xa4/0x1c0 [mac80211]
      [38573.102007]  [<f972bc59>] ieee80211_sta_rx_queued_mgmt+0x919/0xc50 [mac80211]
      [38573.102007]  [<c1009707>] ? sched_clock+0x27/0xa0
      [38573.102007]  [<c1009707>] ? sched_clock+0x27/0xa0
      [38573.102007]  [<c105ffd0>] ? mark_held_locks+0x60/0x80
      [38573.102007]  [<c1348be5>] ? _spin_unlock_irqrestore+0x55/0x70
      [38573.102007]  [<c134baa5>] ? sub_preempt_count+0x85/0xc0
      [38573.102007]  [<c1348bce>] ? _spin_unlock_irqrestore+0x3e/0x70
      [38573.102007]  [<c12c1c0f>] ? skb_dequeue+0x4f/0x70
      [38573.102007]  [<f972c021>] ieee80211_sta_work+0x91/0xb80 [mac80211]
      [38573.102007]  [<c1009707>] ? sched_clock+0x27/0xa0
      [38573.102007]  [<c134baa5>] ? sub_preempt_count+0x85/0xc0
      [38573.102007]  [<c10479af>] worker_thread+0x18f/0x320
      [38573.102007]  [<c104794e>] ? worker_thread+0x12e/0x320
      [38573.102007]  [<c1348be5>] ? _spin_unlock_irqrestore+0x55/0x70
      [38573.102007]  [<f972bf90>] ? ieee80211_sta_work+0x0/0xb80 [mac80211]
      [38573.102007]  [<c104cbb0>] ? autoremove_wake_function+0x0/0x50
      [38573.102007]  [<c1047820>] ? worker_thread+0x0/0x320
      [38573.102007]  [<c104c854>] kthread+0x84/0x90
      [38573.102007]  [<c104c7d0>] ? kthread+0x0/0x90
      [38573.102007]  [<c1003ab7>] kernel_thread_helper+0x7/0x10
      
      Cc: stable@kernel.org
      Signed-off-by: default avatarBob Copeland <me@bobcopeland.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      fcc6cb0c
    • Luis R. Rodriguez's avatar
      wireless: remove mac80211 rate selection extra menu · abd8ea22
      Luis R. Rodriguez authored
      We can just display this upon enabling mac80211 with an
      'if MAC80211 != n' check.
      
      Cc: Johannes Berg <johannes@sipsolutions.net>
      Signed-off-by: default avatarLuis R. Rodriguez <lrodriguez@atheros.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      abd8ea22
    • Luis R. Rodriguez's avatar
      wireless: update reg debug kconfig entry · 253850c1
      Luis R. Rodriguez authored
      Refer to the wireless wiki for more information.
      Signed-off-by: default avatarLuis R. Rodriguez <lrodriguez@atheros.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      253850c1
    • Luis R. Rodriguez's avatar
      wireless: update top level wireless driver entry · 44175272
      Luis R. Rodriguez authored
      Change it to a menuconfig to give it some documentation, to
      refer users to our wireless wiki for extra resources and
      documentation. It seems our wiki is still obscure to some.
      Signed-off-by: default avatarLuis R. Rodriguez <lrodriguez@atheros.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      44175272
    • Stephen Hemminger's avatar
      net: file_operations should be const · 5ca1b998
      Stephen Hemminger authored
      All instances of file_operations should be const.
      Signed-off-by: default avatarStephen Hemminger <shemminger@vyatta.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5ca1b998