1. 11 May, 2010 17 commits
    • Hidetoshi Seto's avatar
      PCI: aerdrv: make aer_{en,dis}able_rootport static · 843f4697
      Hidetoshi Seto authored
      These functions are only called from init/remove path of aerdrv,
      so move them from aerdrv_core.c to aerdrv.c, to make them static.
      Signed-off-by: default avatarHidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
      Reviewed-by: default avatarKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
      Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
      843f4697
    • Hidetoshi Seto's avatar
      PCI: aerdrv: cleanup inconsistent functions · 460d298d
      Hidetoshi Seto authored
      This cleanup solves some minor naming issues by removing unuseful
      function aer_delete_rootport() and by renaming disable_root_aer()
      to aer_disable_rootport().
      
      - Inconsistent location of alloc & free:
         The struct rpc is allocated in aer_alloc_rpc() at aerdrv.c
         while it is implicitly freed in aer_delete_rootport() at
         aerdrv_core.c.
      
      - Inconsistent function name:
         It makes a bit confusion that aer_delete_rootport() is seemed
         to be paired with aer_enable_rootport(), i.e. there is neither
         "add" against "delete" nor "disable" against "enable".
      Signed-off-by: default avatarHidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
      Reviewed-by: default avatarKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
      Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
      460d298d
    • Hidetoshi Seto's avatar
      PCI: aerdrv: RsvdP of PCI_ERR_ROOT_COMMAND · c6d34edd
      Hidetoshi Seto authored
      Handle preserved bits properly.
      Signed-off-by: default avatarHidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
      Reviewed-by: default avatarKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
      Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
      c6d34edd
    • Hidetoshi Seto's avatar
    • Michal Schmidt's avatar
      PCI: return correct value when writing to the "reset" attribute · 447c5dd7
      Michal Schmidt authored
      A successful write() to the "reset" sysfs attribute should return the
      number of bytes written, not 0. Otherwise userspace (bash) retries the
      write over and over again.
      Acked-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Acked-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      Signed-off-by: default avatarMichal Schmidt <mschmidt@redhat.com>
      Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
      447c5dd7
    • Jesse Barnes's avatar
      PCI: change PCI_MSI help text to recommend enabling · 3196180a
      Jesse Barnes authored
      Most current machines have no problem with this, and in fact many devices and
      features work best (or only!) with MSI.
      Reported-by: default avatarPetteri Räty <betelgeuse@gentoo.org>
      Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
      3196180a
    • Alan Cox's avatar
      resource: shared I/O region support · 8b6d043b
      Alan Cox authored
      SuperIO devices share regions and use lock/unlock operations to chip
      select.  We therefore need to be able to request a resource and wait for
      it to be freed by whichever other SuperIO device currently hogs it.
      Right now you have to poll which is horrible.
      
      Add a MUXED field to IO port resources. If the MUXED field is set on the
      resource and on the request (via request_muxed_region) then we block
      until the previous owner of the muxed resource releases their region.
      
      This allows us to implement proper resource sharing and locking for
      superio chips using code of the form
      
      enable_my_superio_dev() {
      	request_muxed_region(0x44, 0x02, "superio:watchdog");
      	outb() ..sequence to enable chip
      }
      
      disable_my_superio_dev() {
      	outb() .. sequence of disable chip
      	release_region(0x44, 0x02);
      }
      Signed-off-by: default avatarGiel van Schijndel <me@mortis.eu>
      Signed-off-by: default avatarAlan Cox <alan@linux.intel.com>
      Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
      8b6d043b
    • Thomas Gleixner's avatar
      x86/PCI: Convert pci_config_lock to raw_spinlock · d19f61f0
      Thomas Gleixner authored
      pci_config_lock must be a real spinlock in preempt-rt. Convert it to
      raw_spinlock. No change for !RT kernels.
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
      d19f61f0
    • Thomas Gleixner's avatar
      PCI: Convert pci_lock to raw_spinlock · 511dd98c
      Thomas Gleixner authored
      pci_lock must be a real spinlock in preempt-rt. Convert it to
      raw_spinlock. No change for !RT kernels.
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
      511dd98c
    • Alan Stern's avatar
      PCI: clearing wakeup flags not needed · 52b265a1
      Alan Stern authored
      This patch (as1353) removes a couple of unnecessary assignments from
      the PCI core.  The should_wakeup flag is naturally initialized to 0;
      there's no need to clear it.
      Acked-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
      52b265a1
    • Alex Chiang's avatar
      PCI: create function symlinks in /sys/bus/pci/slots/N/ · 75568f80
      Alex Chiang authored
      Create convenience symlinks in sysfs, linking slots to device
      functions, and vice versa. These links make it easier for users to
      figure out which devices actually live in what slots.
      
      For example:
      
      sapphire:/sys/bus/pci/slots # ls
      1  10  2  3  4  5  6  7  8  9
      
      sapphire:/sys/bus/pci/slots # ls -l 3
      total 0
      -r--r--r-- 1 root root 65536 Aug 18 14:10 address
      lrwxrwxrwx 1 root root     0 Aug 18 14:10 function0 ->
      ../../../../devices/pci0000:23/0000:23:01.0
      lrwxrwxrwx 1 root root     0 Aug 18 14:10 function1 ->
      ../../../../devices/pci0000:23/0000:23:01.1
      
      sapphire:/sys/bus/pci/slots # ls -l 3/function0/slot
      lrwxrwxrwx 1 root root 0 Aug 18 14:13 3/function0/slot ->
      ../../../bus/pci/slots/3
      
      The original form of this patch was written by Matthew Wilcox,
      and was enhanced to include links from the sysfs slots/ directory
      pointing back at the device functions.
      
      Cc: willy@linux.intel.com
      Signed-off-by: default avatarAlex Chiang <achiang@hp.com>
      Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
      75568f80
    • Linus Torvalds's avatar
      fc2a093e
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 · 9fc282ba
      Linus Torvalds authored
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
        net: Fix FDDI and TR config checks in ipv4 arp and LLC.
        IPv4: unresolved multicast route cleanup
        mac80211: remove association work when processing deauth request
        ar9170: wait for asynchronous firmware loading
        ipv4: udp: fix short packet and bad checksum logging
        phy: Fix initialization in micrel driver.
        sctp: Fix a race between ICMP protocol unreachable and connect()
        veth: Dont kfree_skb() after dev_forward_skb()
        IPv6: fix IPV6_RECVERR handling of locally-generated errors
        net/gianfar: drop recycled skbs on MTU change
        iwlwifi: work around passive scan issue
      9fc282ba
    • David Howells's avatar
      CacheFiles: Fix occasional EIO on call to vfs_unlink() · c61ea31d
      David Howells authored
      Fix an occasional EIO returned by a call to vfs_unlink():
      
      	[ 4868.465413] CacheFiles: I/O Error: Unlink failed
      	[ 4868.465444] FS-Cache: Cache cachefiles stopped due to I/O error
      	[ 4947.320011] CacheFiles: File cache on md3 unregistering
      	[ 4947.320041] FS-Cache: Withdrawing cache "mycache"
      	[ 5127.348683] FS-Cache: Cache "mycache" added (type cachefiles)
      	[ 5127.348716] CacheFiles: File cache on md3 registered
      	[ 7076.871081] CacheFiles: I/O Error: Unlink failed
      	[ 7076.871130] FS-Cache: Cache cachefiles stopped due to I/O error
      	[ 7116.780891] CacheFiles: File cache on md3 unregistering
      	[ 7116.780937] FS-Cache: Withdrawing cache "mycache"
      	[ 7296.813394] FS-Cache: Cache "mycache" added (type cachefiles)
      	[ 7296.813432] CacheFiles: File cache on md3 registered
      
      What happens is this:
      
       (1) A cached NFS file is seen to have become out of date, so NFS retires the
           object and immediately acquires a new object with the same key.
      
       (2) Retirement of the old object is done asynchronously - so the lookup/create
           to generate the new object may be done first.
      
           This can be a problem as the old object and the new object must exist at
           the same point in the backing filesystem (i.e. they must have the same
           pathname).
      
       (3) The lookup for the new object sees that a backing file already exists,
           checks to see whether it is valid and sees that it isn't.  It then deletes
           that file and creates a new one on disk.
      
       (4) The retirement phase for the old file is then performed.  It tries to
           delete the dentry it has, but ext4_unlink() returns -EIO because the inode
           attached to that dentry no longer matches the inode number associated with
           the filename in the parent directory.
      
      The trace below shows this quite well.
      
      	[md5sum] ==> __fscache_relinquish_cookie(ffff88002d12fb58{NFS.fh,ffff88002ce62100},1)
      	[md5sum] ==> __fscache_acquire_cookie({NFS.server},{NFS.fh},ffff88002ce62100)
      
      NFS has retired the old cookie and asked for a new one.
      
      	[kslowd] ==> fscache_object_state_machine({OBJ52,OBJECT_ACTIVE,24})
      	[kslowd] <== fscache_object_state_machine() [->OBJECT_DYING]
      	[kslowd] ==> fscache_object_state_machine({OBJ53,OBJECT_INIT,0})
      	[kslowd] <== fscache_object_state_machine() [->OBJECT_LOOKING_UP]
      	[kslowd] ==> fscache_object_state_machine({OBJ52,OBJECT_DYING,24})
      	[kslowd] <== fscache_object_state_machine() [->OBJECT_RECYCLING]
      
      The old object (OBJ52) is going through the terminal states to get rid of it,
      whilst the new object - (OBJ53) - is coming into being.
      
      	[kslowd] ==> fscache_object_state_machine({OBJ53,OBJECT_LOOKING_UP,0})
      	[kslowd] ==> cachefiles_walk_to_object({ffff88003029d8b8},OBJ53,@68,)
      	[kslowd] lookup '@68'
      	[kslowd] next -> ffff88002ce41bd0 positive
      	[kslowd] advance
      	[kslowd] lookup 'Es0g00og0_Nd_XCYe3BOzvXrsBLMlN6aw16M1htaA'
      	[kslowd] next -> ffff8800369faac8 positive
      
      The new object has looked up the subdir in which the file would be in (getting
      dentry ffff88002ce41bd0) and then looked up the file itself (getting dentry
      ffff8800369faac8).
      
      	[kslowd] validate 'Es0g00og0_Nd_XCYe3BOzvXrsBLMlN6aw16M1htaA'
      	[kslowd] ==> cachefiles_bury_object(,'@68','Es0g00og0_Nd_XCYe3BOzvXrsBLMlN6aw16M1htaA')
      	[kslowd] remove ffff8800369faac8 from ffff88002ce41bd0
      	[kslowd] unlink stale object
      	[kslowd] <== cachefiles_bury_object() = 0
      
      It then checks the file's xattrs to see if it's valid.  NFS says that the
      auxiliary data indicate the file is out of date (obvious to us - that's why NFS
      ditched the old version and got a new one).  CacheFiles then deletes the old
      file (dentry ffff8800369faac8).
      
      	[kslowd] redo lookup
      	[kslowd] lookup 'Es0g00og0_Nd_XCYe3BOzvXrsBLMlN6aw16M1htaA'
      	[kslowd] next -> ffff88002cd94288 negative
      	[kslowd] create -> ffff88002cd94288{ffff88002cdaf238{ino=148247}}
      
      CacheFiles then redoes the lookup and gets a negative result in a new dentry
      (ffff88002cd94288) which it then creates a file for.
      
      	[kslowd] ==> cachefiles_mark_object_active(,OBJ53)
      	[kslowd] <== cachefiles_mark_object_active() = 0
      	[kslowd] === OBTAINED_OBJECT ===
      	[kslowd] <== cachefiles_walk_to_object() = 0 [148247]
      	[kslowd] <== fscache_object_state_machine() [->OBJECT_AVAILABLE]
      
      The new object is then marked active and the state machine moves to the
      available state - at which point NFS can start filling the object.
      
      	[kslowd] ==> fscache_object_state_machine({OBJ52,OBJECT_RECYCLING,20})
      	[kslowd] ==> fscache_release_object()
      	[kslowd] ==> cachefiles_drop_object({OBJ52,2})
      	[kslowd] ==> cachefiles_delete_object(,OBJ52{ffff8800369faac8})
      
      The old object, meanwhile, goes on with being retired.  If allocation occurs
      first, cachefiles_delete_object() has to wait for dir->d_inode->i_mutex to
      become available before it can continue.
      
      	[kslowd] ==> cachefiles_bury_object(,'@68','Es0g00og0_Nd_XCYe3BOzvXrsBLMlN6aw16M1htaA')
      	[kslowd] remove ffff8800369faac8 from ffff88002ce41bd0
      	[kslowd] unlink stale object
      	EXT4-fs warning (device sda6): ext4_unlink: Inode number mismatch in unlink (148247!=148193)
      	CacheFiles: I/O Error: Unlink failed
      	FS-Cache: Cache cachefiles stopped due to I/O error
      
      CacheFiles then tries to delete the file for the old object, but the dentry it
      has (ffff8800369faac8) no longer points to a valid inode for that directory
      entry, and so ext4_unlink() returns -EIO when de->inode does not match i_ino.
      
      	[kslowd] <== cachefiles_bury_object() = -5
      	[kslowd] <== cachefiles_delete_object() = -5
      	[kslowd] <== fscache_object_state_machine() [->OBJECT_DEAD]
      	[kslowd] ==> fscache_object_state_machine({OBJ53,OBJECT_AVAILABLE,0})
      	[kslowd] <== fscache_object_state_machine() [->OBJECT_ACTIVE]
      
      (Note that the above trace includes extra information beyond that produced by
      the upstream code).
      
      The fix is to note when an object that is being retired has had its object
      deleted preemptively by a replacement object that is being created, and to
      skip the second removal attempt in such a case.
      Reported-by: default avatarGreg M <gregm@servu.net.au>
      Reported-by: default avatarMark Moseley <moseleymark@gmail.com>
      Reported-by: default avatarRomain DEGEZ <romain.degez@smartjog.com>
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      c61ea31d
    • Alex Chiang's avatar
      ACPI: sleep: eliminate duplicate entries in acpisleep_dmi_table[] · 7d6fb7bd
      Alex Chiang authored
      Duplicate entries ended up acpisleep_dmi_table[] by accident.
      They don't hurt functionality, but they are ugly, so let's get
      rid of them.
      
      Cc: stable@kernel.org
      Signed-off-by: default avatarAlex Chiang <achiang@canonical.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      7d6fb7bd
    • David S. Miller's avatar
    • Jean Delvare's avatar
      drm/radeon: Fix 3 regressions - since buffer rework · c9ff04c9
      Jean Delvare authored
      Commit b4fe9454 introduced 3 bugs,
      fix them:
      
      * Use the right command dword for second packet offset in
        RADEON_CNTL_PAINT/BITBLT_MULTI.
      * Don't leak memory if drm_buffer_copy_from_user() fails.
      * Don't call drm_buffer_unprocessed() unless drm_buffer_alloc() and
        drm_buffer_copy_from_user() have been called successfully first.
      Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
      Cc: Pauli Nieminen <suokkos@gmail.com>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      c9ff04c9
  2. 10 May, 2010 10 commits
  3. 07 May, 2010 13 commits
    • Alan Stern's avatar
      HID: fix suspend crash by moving initializations earlier · fde4e2f7
      Alan Stern authored
      Although the usbhid driver allocates its usbhid structure in the probe
      routine, several critical fields in that structure don't get
      initialized until usbhid_start().  However if report descriptor
      parsing fails then usbhid_start() is never called.  This leads to
      problems during system suspend -- the system will freeze.
      
      This patch (as1378) fixes the bug by moving the initialization
      statements up into usbhid_probe().
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Reported-by: default avatarBruno Prémont <bonbons@linux-vserver.org>
      Tested-By: default avatarBruno Prémont <bonbons@linux-vserver.org>
      Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
      fde4e2f7
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://neil.brown.name/md · f1c448e0
      Linus Torvalds authored
      * 'for-linus' of git://neil.brown.name/md:
        md: restore ability of spare drives to spin down.
        md/raid6: Fix raid-6 read-error correction in degraded state
      f1c448e0
    • Linus Torvalds's avatar
      Merge branch 'urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6 · 2c32b1da
      Linus Torvalds authored
      * 'urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6:
        pcmcia: fix compilation after 16bit state locking changes
        pcmcia: order userspace suspend and resume requests
        pcmcia: avoid pccard_validate_cis failure in resume callpath
      2c32b1da
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block · 48fe37cb
      Linus Torvalds authored
      * 'for-linus' of git://git.kernel.dk/linux-2.6-block:
        blk-cgroup: Fix an RCU warning in blkiocg_create()
        blk-cgroup: Fix RCU correctness warning in cfq_init_queue()
        drbd: don't expose failed local READ to upper layers
      48fe37cb
    • Linus Torvalds's avatar
      Merge branch 'drm-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6 · e33b3e75
      Linus Torvalds authored
      * 'drm-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
        drm/ttm: Remove the ttm_bo_block_reservation() function.
        drm/ttm: Remove some leftover debug messages.
        drm/radeon: async event synchronization for drmWaitVblank
      e33b3e75
    • Stijn Tintel's avatar
      virtio: initialize earlier · e2dbe06c
      Stijn Tintel authored
      Move initialization of the virtio framework before the initialization of
      mtd, so that block2mtd can be used on virtio-based block devices.
      
      Addresses https://bugzilla.kernel.org/show_bug.cgi?id=15644Signed-off-by: default avatarStijn Tintel <stijn@linux-ipv6.be>
      Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
      Cc: stable@kernel.org
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      e2dbe06c
    • Linus Torvalds's avatar
      Merge branch 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6 · 91677467
      Linus Torvalds authored
      * 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6:
        NFS: Fix RCU issues in the NFSv4 delegation code
        NFSv4: Fix the locking in nfs_inode_reclaim_delegation()
      91677467
    • Linus Torvalds's avatar
      Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6 · 4a225331
      Linus Torvalds authored
      * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6:
        ACPI: sleep: init_set_sci_en_on_resume for Dell Studio 155x
        ACPI: fix acpi_hest_firmware_first_pci() caused oops
        sbshc: acpi_device_class "smbus_host_controller" too long
        power_meter: acpi_device_class "power_meter_resource" too long
        acpi_pad: "processor_aggregator" name too long
        PNP: don't check for conflicts with bridge windows
        ACPI: DMI init_set_sci_en_on_resume for multiple Lenovo ThinkPads
        PNPACPI: compute Address Space length rather than using _LEN
        ACPI: silence kmemcheck false positive
      4a225331
    • Linus Torvalds's avatar
      Merge branch 'v4l_for_2.6.34' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6 · 417a9ef1
      Linus Torvalds authored
      * 'v4l_for_2.6.34' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6:
        V4L/DVB: pxa_camera: move fifo reset direct before dma start
        V4L/DVB: video: testing unsigned for less than 0
        V4L/DVB: mx1-camera: compile fix
        V4L/DVB: budget: Oops: "BUG: unable to handle kernel NULL pointer 	dereference"
        V4L/DVB: ngene: Workaround for stuck DiSEqC pin
        V4L/DVB: saa7146: fix regression of the av7110/budget-av driver
        V4L/DVB: v4l: fix config dependencies: mxb and saa7191 are V4L2 drivers, not V4L1
        V4L/DVB: feature-removal: announce videotext.h removal
        V4L/DVB: V4L - vpfe capture - fix for kernel crash
        V4L/DVB: gspca: make usb id 0461:0815 get handled by the right driver
        V4L/DVB: gspca - stv06xx: Remove the 046d:08da from the stv06xx driver
        V4L/DVB: gspca - sn9c20x: Correct onstack wait_queue_head declaration
        V4L/DVB: saa7146: fix up bytesperline if it is an impossible value
        V4L/DVB: V4L: vpfe_capture - free ccdc_lock when memory allocation fails
        V4L/DVB: V4L - Makfile:Removed duplicate entry of davinci
        V4L/DVB: omap24xxcam: potential buffer overflow
      417a9ef1
    • Linus Torvalds's avatar
      Merge branch 'core-fixes-for-linus' of... · 91bc482e
      Linus Torvalds authored
      Merge branch 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
      
      * 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
        rcu: create rcu_my_thread_group_empty() wrapper
        memcg: css_id() must be called under rcu_read_lock()
        cgroup: Check task_lock in task_subsys_state()
        sched: Fix an RCU warning in print_task()
        cgroup: Fix an RCU warning in alloc_css_id()
        cgroup: Fix an RCU warning in cgroup_path()
        KEYS: Fix an RCU warning in the reading of user keys
        KEYS: Fix an RCU warning
      91bc482e
    • Reinette Chatre's avatar
      mac80211: remove association work when processing deauth request · 79733a86
      Reinette Chatre authored
      In https://bugzilla.kernel.org/show_bug.cgi?id=15794 a user encountered the
      following:
      
      [18967.469098] wlan0: authenticated
      [18967.472527] wlan0: associate with 00:1c:10:b8:e3:ea (try 1)
      [18967.472585] wlan0: deauthenticating from 00:1c:10:b8:e3:ea by local choice (reason=3)
      [18967.672057] wlan0: associate with 00:1c:10:b8:e3:ea (try 2)
      [18967.872357] wlan0: associate with 00:1c:10:b8:e3:ea (try 3)
      [18968.072960] wlan0: association with 00:1c:10:b8:e3:ea timed out
      [18968.076890] ------------[ cut here ]------------
      [18968.076898] WARNING: at net/wireless/mlme.c:341 cfg80211_send_assoc_timeout+0xa8/0x140()
      [18968.076900] Hardware name: GX628
      [18968.076924] Pid: 1408, comm: phy0 Not tainted 2.6.34-rc4-00082-g250541fc-dirty #3
      [18968.076926] Call Trace:
      [18968.076931]  [<ffffffff8103459e>] ?  warn_slowpath_common+0x6e/0xb0
      [18968.076934]  [<ffffffff8157c2d8>] ?  cfg80211_send_assoc_timeout+0xa8/0x140
      [18968.076937]  [<ffffffff8103ff8b>] ? mod_timer+0x10b/0x180
      [18968.076940]  [<ffffffff8158f0fc>] ?  ieee80211_assoc_done+0xbc/0xc0
      [18968.076943]  [<ffffffff81590d53>] ?  ieee80211_work_work+0x553/0x11c0
      [18968.076945]  [<ffffffff8102d931>] ? finish_task_switch+0x41/0xb0
      [18968.076948]  [<ffffffff81590800>] ?  ieee80211_work_work+0x0/0x11c0
      [18968.076951]  [<ffffffff810476fb>] ? worker_thread+0x13b/0x210
      [18968.076954]  [<ffffffff8104b6b0>] ?  autoremove_wake_function+0x0/0x30
      [18968.076956]  [<ffffffff810475c0>] ? worker_thread+0x0/0x210
      [18968.076959]  [<ffffffff8104b21e>] ? kthread+0x8e/0xa0
      [18968.076962]  [<ffffffff810031f4>] ?  kernel_thread_helper+0x4/0x10
      [18968.076964]  [<ffffffff8104b190>] ? kthread+0x0/0xa0
      [18968.076966]  [<ffffffff810031f0>] ?  kernel_thread_helper+0x0/0x10
      [18968.076968] ---[ end trace 8aa6265f4b1adfe0 ]---
      
      As explained by Johannes Berg <johannes@sipsolutions.net>:
      
      We authenticate successfully, and then userspace requests association.
      Then we start that process, but the AP doesn't respond. While we're
      still waiting for an AP response, userspace asks for a deauth. We do
      the deauth, but don't abort the association work. Then once the
      association work times out we tell cfg80211, but it no longer wants
      to know since for all it is concerned we accepted the deauth that
      also kills the association attempt.
      
      Fix this by, upon receipt of deauth request, removing the association work
      and continuing to send the deauth.
      
      Unfortunately the user reporting the issue is not able to reproduce this
      problem anymore and cannot verify this fix. This seems like a well understood
      issue though and I thus present the patch.
      Bug-identified-by: default avatarJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: default avatarReinette Chatre <reinette.chatre@intel.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      79733a86
    • Christian Lamparter's avatar
      ar9170: wait for asynchronous firmware loading · 160b8242
      Christian Lamparter authored
      This patch fixes a regression introduced by the following patch:
      "ar9170: load firmware asynchronously"
      
      When we kick off a firmware loading request and then unbind,
      or disconnect the usb device right away, we get into trouble:
      
      > ------------[ cut here ]------------
      > WARNING: at lib/kref.c:44 kref_get+0x1c/0x20()
      > Hardware name: 18666GU
      > Modules linked in: ar9170usb [...]
      > Pid: 6588, comm: firmware/ar9170 Not tainted 2.6.34-rc5-wl #43
      > Call Trace:
      > [<c102b05e>] ? warn_slowpath_common+0x6e/0xb0
      > [<c117c93c>] ? kref_get+0x1c/0x20
      > [<c102b0b3>] ? warn_slowpath_null+0x13/0x20
      > [<c117c93c>] ? kref_get+0x1c/0x20
      > [<c117bb2f>] ? kobject_get+0xf/0x20
      > [<c124d630>] ? get_device+0x10/0x20
      > [<c124e5a0>] ? device_add+0x60/0x530
      > [<c117b8b5>] ? kobject_init+0x25/0xa0
      > [<c12569f9>] ? _request_firmware+0x139/0x3e0
      > [<c1256cc0>] ? request_firmware_work_func+0x20/0x70
      > [<c1256ca0>] ? request_firmware_work_func+0x0/0x70
      > [<c103ff24>] ? kthread+0x74/0x80
      > [<c103feb0>] ? kthread+0x0/0x80
      > [<c1003136>] ? kernel_thread_helper+0x6/0x10
      >---[ end trace 2d50bd818f64a1b7 ]---
      - followed by a random Oops -
      
      Avoid that by waiting for the firmware loading to finish
      (whether successfully or not) before the unbind in
      ar9170_usb_disconnect.
      Reported-by: default avatarJohannes Berg <johannes@sipsolutions.net>
      Bug-fixed-by: default avatarJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: default avatarChristian Lamparter <chunkeey@googlemail.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      160b8242
    • NeilBrown's avatar
      md: restore ability of spare drives to spin down. · 1176568d
      NeilBrown authored
      Some time ago we stopped the clean/active metadata updates
      from being written to a 'spare' device in most cases so that
      it could spin down and say spun down.  Device failure/removal
      etc are still recorded on spares.
      
      However commit 51d5668c broke this 50% of the time,
      depending on whether the event count is even or odd.
      The change log entry said:
      
         This means that the alignment between 'odd/even' and
          'clean/dirty' might take a little longer to attain,
      
      how ever the code makes no attempt to create that alignment, so it
      could take arbitrarily long.
      
      So when we find that clean/dirty is not aligned with odd/even,
      force a second metadata-update immediately.  There are already cases
      where a second metadata-update is needed immediately (e.g. when a
      device fails during the metadata update).  We just piggy-back on that.
      Reported-by: default avatarJoe Bryant <tenminjoe@yahoo.com>
      Signed-off-by: default avatarNeilBrown <neilb@suse.de>
      Cc: stable@kernel.org
      1176568d