1. 15 1月, 2011 3 次提交
    • Z
      xhci: Do not run xhci_cleanup_msix with irq disabled · 40a9fb17
      Zhang Rui 提交于
      when unloading xhci_hcd, I got:
      [  134.856813] xhci_hcd 0000:02:00.0: remove, state 4
      [  134.858140] usb usb3: USB disconnect, address 1
      [  134.874956] xhci_hcd 0000:02:00.0: Host controller not halted, aborting reset.
      [  134.876351] BUG: sleeping function called from invalid context at kernel/mutex.c:85
      [  134.877657] in_atomic(): 0, irqs_disabled(): 1, pid: 1451, name: modprobe
      [  134.878975] Pid: 1451, comm: modprobe Not tainted 2.6.37-rc5+ #162
      [  134.880298] Call Trace:
      [  134.881602]  [<ffffffff8104156a>] __might_sleep+0xeb/0xf0
      [  134.882921]  [<ffffffff814763dc>] mutex_lock+0x24/0x50
      [  134.884229]  [<ffffffff810a745c>] free_desc+0x2e/0x5f
      [  134.885538]  [<ffffffff810a74c8>] irq_free_descs+0x3b/0x71
      [  134.886853]  [<ffffffff8102584d>] free_irq_at+0x31/0x36
      [  134.888167]  [<ffffffff8102723f>] destroy_irq+0x69/0x71
      [  134.889486]  [<ffffffff8102747a>] native_teardown_msi_irq+0xe/0x10
      [  134.890820]  [<ffffffff8124c382>] default_teardown_msi_irqs+0x57/0x80
      [  134.892158]  [<ffffffff8124be46>] free_msi_irqs+0x8b/0xe9
      [  134.893504]  [<ffffffff8124cd46>] pci_disable_msix+0x35/0x39
      [  134.894844]  [<ffffffffa01b444a>] xhci_cleanup_msix+0x31/0x51 [xhci_hcd]
      [  134.896186]  [<ffffffffa01b4b3a>] xhci_stop+0x3a/0x80 [xhci_hcd]
      [  134.897521]  [<ffffffff81341dd4>] usb_remove_hcd+0xfd/0x14a
      [  134.898859]  [<ffffffff813500ae>] usb_hcd_pci_remove+0x5c/0xc6
      [  134.900193]  [<ffffffff8123c606>] pci_device_remove+0x3f/0x91
      [  134.901535]  [<ffffffff812e7ea4>] __device_release_driver+0x83/0xd9
      [  134.902899]  [<ffffffff812e8571>] driver_detach+0x86/0xad
      [  134.904222]  [<ffffffff812e7d56>] bus_remove_driver+0xb2/0xd8
      [  134.905540]  [<ffffffff812e8633>] driver_unregister+0x6c/0x74
      [  134.906839]  [<ffffffff8123c8e4>] pci_unregister_driver+0x44/0x89
      [  134.908121]  [<ffffffffa01b940e>] xhci_unregister_pci+0x15/0x17 [xhci_hcd]
      [  134.909396]  [<ffffffffa01bd7d2>] xhci_hcd_cleanup+0xe/0x10 [xhci_hcd]
      [  134.910652]  [<ffffffff8107fcd1>] sys_delete_module+0x1ca/0x23b
      [  134.911882]  [<ffffffff81123932>] ? path_put+0x22/0x26
      [  134.913104]  [<ffffffff8109a800>] ? audit_syscall_entry+0x2c/0x148
      [  134.914333]  [<ffffffff8100ac82>] system_call_fastpath+0x16/0x1b
      [  134.915658] xhci_hcd 0000:02:00.0: USB bus 3 deregistered
      [  134.916465] xhci_hcd 0000:02:00.0: PCI INT A disabled
      
      and the same issue when xhci_suspend is invoked.  (Note from Sarah: That's
      fixed by Andiry's patch before this, by synchronizing the irqs rather than
      freeing them on suspend.)
      
      Do not run xhci_cleanup_msix with irq disabled.
      
      This patch should be queued for the 2.6.37 stable tree.
      Signed-off-by: NZhang Rui <rui.zhang@intel.com>
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      Cc: stable@kernel.org
      40a9fb17
    • A
      xHCI: synchronize irq in xhci_suspend() · 0029227f
      Andiry Xu 提交于
      Synchronize the interrupts instead of free them in xhci_suspend(). This will
      prevent a double free when the host is suspended and then the card removed.
      
      Set the flag hcd->msix_enabled when using MSI-X, and check the flag in
      suspend_common(). MSI-X synchronization will be handled by xhci_suspend(),
      and MSI/INTx will be synchronized in suspend_common().
      
      This patch should be queued for the 2.6.37 stable tree.
      Reported-by: NMatthew Garrett <mjg@redhat.com>
      Signed-off-by: NAndiry Xu <andiry.xu@amd.com>
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      Cc: stable@kernel.org
      0029227f
    • S
      xhci: Resume bus on any port status change. · 7111ebc9
      Sarah Sharp 提交于
      The original code that resumed the USB bus on a port status change would
      only do so when there was a device connected to the port.  If a device was
      just disconnected, the event would be queued for khubd, but khubd wouldn't
      run.  That would leave the connect status change (CSC) bit set.
      
      If a USB device was plugged into that same port, the xHCI host controller
      would set the current connect status (CCS) bit.  But since the CSC bit was
      already set, it would not generate an interrupt for a port status change
      event.  That would mean the user could "Safely Remove" a device, have the
      bus suspend, disconnect the device, re-plug it in, and then the device
      would never be enumerated.
      
      Plugging in a different device on another port would cause the bus to
      resume, and khubd would notice the re-connected device.  Running lsusb
      would also resume the bus, leading users to report the problem "went away"
      when using diagnostic tools.
      
      The solution is to resume the bus when a port status change event is
      received, regardless of the port status.
      
      Thank you very much to Maddog for helping me track down this Heisenbug.
      
      This patch should be queued for the 2.6.37 stable tree.
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      Reported-by: NJon 'maddog' Hall <maddog@li.org>
      Tested-by: NAndiry Xu <andiry.xu@amd.com>
      Cc: stable@kernel.org
      7111ebc9
  2. 11 1月, 2011 1 次提交
  3. 07 1月, 2011 3 次提交
    • N
      fs: dcache remove dcache_lock · b5c84bf6
      Nick Piggin 提交于
      dcache_lock no longer protects anything. remove it.
      Signed-off-by: NNick Piggin <npiggin@kernel.dk>
      b5c84bf6
    • N
      fs: dcache scale subdirs · 2fd6b7f5
      Nick Piggin 提交于
      Protect d_subdirs and d_child with d_lock, except in filesystems that aren't
      using dcache_lock for these anyway (eg. using i_mutex).
      
      Note: if we change the locking rule in future so that ->d_child protection is
      provided only with ->d_parent->d_lock, it may allow us to reduce some locking.
      But it would be an exception to an otherwise regular locking scheme, so we'd
      have to see some good results. Probably not worthwhile.
      Signed-off-by: NNick Piggin <npiggin@kernel.dk>
      2fd6b7f5
    • N
      fs: dcache scale d_unhashed · da502956
      Nick Piggin 提交于
      Protect d_unhashed(dentry) condition with d_lock. This means keeping
      DCACHE_UNHASHED bit in synch with hash manipulations.
      Signed-off-by: NNick Piggin <npiggin@kernel.dk>
      da502956
  4. 03 1月, 2011 1 次提交
  5. 29 12月, 2010 1 次提交
    • D
      ueagle-atm: fix PHY signal initialization race · 12f188f2
      Dan Williams 提交于
      A race exists when initializing ueagle-atm devices where the generic atm
      device may not yet be created before the driver attempts to initialize
      it's PHY signal state, which checks whether the atm device has been
      created or not.  This often causes the sysfs 'carrier' attribute to be
      '1' even though no signal has actually been found.
      
      uea_probe
         usbatm_usb_probe
            driver->bind (uea_bind)
               uea_boot
                  kthread_run(uea_kthread)     uea_kthread
            usbatm_atm_init                       uea_start_reset
               atm_dev_register                      UPDATE_ATM_SIGNAL
      
      UPDATE_ATM_SIGNAL checks whether the ATM device has been created and if
      not, will not update the PHY signal state.  Because of the race that
      does not always happen in time, and the PHY signal state remains
      ATM_PHY_SIG_FOUND even though no signal exists.
      
      To fix the race, just create the kthread during initialization, and only
      after initialization is complete, start the thread that reboots the
      device and initializes PHY state.
      
      [ 3030.490931] uea_probe: calling usbatm_usb_probe
      [ 3030.490946] ueagle-atm 8-2:1.0: usbatm_usb_probe: trying driver ueagle-atm with vendor=1110, product=9031, ifnum  0
      [ 3030.493691] uea_bind: setting usbatm
      [ 3030.496932] usb 8-2: [ueagle-atm] using iso mode
      [ 3030.497283] ueagle-atm 8-2:1.0: usbatm_usb_probe: using 3021 byte buffer for rx channel 0xffff880125953508
         <kthread already started before usbatm_usb_probe() has returned>
      [ 3030.497292] usb 8-2: [ueagle-atm] (re)booting started
         <UPDATE_ATM_SIGNAL checks whether ATM device has been created yet before setting PHY state>
      [ 3030.497298] uea_start_reset: atm dev (null)
         <and since it hasn't been created yet PHY state is not set>
      [ 3030.497306] ueagle-atm 8-2:1.0: usbatm_usb_probe: using 3392 byte buffer for tx channel 0xffff8801259535b8
      [ 3030.497374] usbatm_usb_probe: about to init
      [ 3030.497379] usbatm_usb_probe: calling usbatm_atm_init
         <atm device finally gets created>
      [ 3030.497384] usbatm_atm_init: creating atm device!
      Signed-off-by: NDan Williams <dcbw@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      12f188f2
  6. 24 12月, 2010 3 次提交
  7. 22 12月, 2010 1 次提交
    • M
      USB: add support for Dream Cheeky DL100B Webmail Notifier (1d34:0004) · 73bc7d31
      Melchior FRANZ 提交于
      So far the USBLED driver only supports Delcom's "USB Visual Signal
      Indicator" (http://www.delcomproducts.com/products_USBLMP.asp). The
      driver generates virtual files "red", "green", and "blue" under the
      device's /sys/ directory, where color values can be read from and
      written to.
      
      This patch adds support for Dream Cheeky's "DL100B Webmail Notifier"
      (http://www.dreamcheeky.com/webmail-notifier -- available from several
      shops, such as http://www.conrad.at/ce/de/product/777048/USB-WEBMAIL).
      This device isn't as pretty as Delcom's, but it's *far* cheaper, and
      its 3 LEDs can be set in 32 brightness steps each. The grey envelope
      contour can easily be removed, leaving a rather neutral white box (with
      a few small holes), which is useful for generic signalling purposes.
      Of course, the small circuit board can easily be put into a prettier
      case.
      
      The DL100B device pretends to be a HID, but the HID descriptor shows
      that it's not overly useful as such (see below). The patch therefore
      removes the "HID-ness" (hid-core.c, hid-ids.h), and adds the necessary
      commands to usbled.c. The protocol info comes from the developer's
      manual that Dream Cheeky kindly provided (815DeveloperManual.pdf).
      
      HID descriptor:
      
        0: 05 01   Usage Page 'Generic Desktop Controls'
        2: 09 10   Usage 'Reserved'
        4: a1 01   Collection 'Application (mouse, keyboard)'
        6: 05 00           Usage Page 'Undefined'
        8: 19 10           Usage Minimum = 16
       10: 29 11           Usage Maximum = 17
       12: 15 00           Logical Minimum = 0
       14: 25 0f           Logical Maximum = 15
       16: 75 08           Report Size = 8
       18: 95 08           Report Count = 8
       20: 91 02           Output data *var abs lin pref-state null-pos non-vol bit-field
       22: 19 10           Usage Minimum = 16
       24: 29 11           Usage Maximum = 17
       26: 15 00           Logical Minimum = 0
       28: 25 0f           Logical Maximum = 15
       30: 75 08           Report Size = 8
       32: 95 08           Report Count = 8
       34: 81 00           Input data array abs lin pref-state null-pos non-vol bit-field
       36: c0      End Collection
      Signed-off-by: NMelchior FRANZ <mfranz@aon.at>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      73bc7d31
  8. 17 12月, 2010 16 次提交
  9. 16 12月, 2010 5 次提交
  10. 15 12月, 2010 1 次提交
    • T
      workqueue: convert cancel_rearming_delayed_work[queue]() users to cancel_delayed_work_sync() · afe2c511
      Tejun Heo 提交于
      cancel_rearming_delayed_work[queue]() has been superceded by
      cancel_delayed_work_sync() quite some time ago.  Convert all the
      in-kernel users.  The conversions are completely equivalent and
      trivial.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Acked-by: N"David S. Miller" <davem@davemloft.net>
      Acked-by: NGreg Kroah-Hartman <gregkh@suse.de>
      Acked-by: NEvgeniy Polyakov <zbr@ioremap.net>
      Cc: Jeff Garzik <jgarzik@pobox.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
      Cc: netdev@vger.kernel.org
      Cc: Anton Vorontsov <cbou@mail.ru>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: "J. Bruce Fields" <bfields@fieldses.org>
      Cc: Neil Brown <neilb@suse.de>
      Cc: Alex Elder <aelder@sgi.com>
      Cc: xfs-masters@oss.sgi.com
      Cc: Christoph Lameter <cl@linux-foundation.org>
      Cc: Pekka Enberg <penberg@cs.helsinki.fi>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: netfilter-devel@vger.kernel.org
      Cc: Trond Myklebust <Trond.Myklebust@netapp.com>
      Cc: linux-nfs@vger.kernel.org
      afe2c511
  11. 11 12月, 2010 5 次提交