1. 21 1月, 2010 9 次提交
    • S
      USB: Fix duplicate sysfs problem after device reset. · 04a723ea
      Sarah Sharp 提交于
      Borislav Petkov reports issues with duplicate sysfs endpoint files after a
      resume from a hibernate.  It turns out that the code to support alternate
      settings under xHCI has issues when a device with a non-default alternate
      setting is reset during the hibernate:
      
      [  427.681810] Restarting tasks ...
      [  427.681995] hub 1-0:1.0: state 7 ports 6 chg 0004 evt 0000
      [  427.682019] usb usb3: usb resume
      [  427.682030] ohci_hcd 0000:00:12.0: wakeup root hub
      [  427.682191] hub 1-0:1.0: port 2, status 0501, change 0000, 480 Mb/s
      [  427.682205] usb 1-2: usb wakeup-resume
      [  427.682226] usb 1-2: finish reset-resume
      [  427.682886] done.
      [  427.734658] ehci_hcd 0000:00:12.2: port 2 high speed
      [  427.734663] ehci_hcd 0000:00:12.2: GetStatus port 2 status 001005 POWER sig=se0 PE CONNECT
      [  427.746682] hub 3-0:1.0: hub_reset_resume
      [  427.746693] hub 3-0:1.0: trying to enable port power on non-switchable hub
      [  427.786715] usb 1-2: reset high speed USB device using ehci_hcd and address 2
      [  427.839653] ehci_hcd 0000:00:12.2: port 2 high speed
      [  427.839666] ehci_hcd 0000:00:12.2: GetStatus port 2 status 001005 POWER sig=se0 PE CONNECT
      [  427.847717] ohci_hcd 0000:00:12.0: GetStatus roothub.portstatus [1] = 0x00010100 CSC PPS
      [  427.915497] hub 1-2:1.0: remove_intf_ep_devs: if: ffff88022f9e8800 ->ep_devs_created: 1
      [  427.915774] hub 1-2:1.0: remove_intf_ep_devs: bNumEndpoints: 1
      [  427.915934] hub 1-2:1.0: if: ffff88022f9e8800: endpoint devs removed.
      [  427.916158] hub 1-2:1.0: create_intf_ep_devs: if: ffff88022f9e8800 ->ep_devs_created: 0, ->unregistering: 0
      [  427.916434] hub 1-2:1.0: create_intf_ep_devs: bNumEndpoints: 1
      [  427.916609]  ep_81: create, parent hub
      [  427.916632] ------------[ cut here ]------------
      [  427.916644] WARNING: at fs/sysfs/dir.c:477 sysfs_add_one+0x82/0x96()
      [  427.916649] Hardware name: System Product Name
      [  427.916653] sysfs: cannot create duplicate filename '/devices/pci0000:00/0000:00:12.2/usb1/1-2/1-2:1.0/ep_81'
      [  427.916658] Modules linked in: binfmt_misc kvm_amd kvm powernow_k8 cpufreq_ondemand cpufreq_powersave cpufreq_userspace freq_table cpufreq_conservative ipv6 vfat fat
      +8250_pnp 8250 pcspkr ohci_hcd serial_core k10temp edac_core
      [  427.916694] Pid: 278, comm: khubd Not tainted 2.6.33-rc2-00187-g08d869aa-dirty #13
      [  427.916699] Call Trace:
      
      The problem is caused by a mismatch between the USB core's view of the
      device state and the USB device and xHCI host's view of the device state.
      
      After the device reset and re-configuration, the device and the xHCI host
      think they are using alternate setting 0 of all interfaces.  However, the
      USB core keeps track of the old state, which may include non-zero
      alternate settings.  It uses intf->cur_altsetting to keep the endpoint
      sysfs files for the old state across the reset.
      
      The bandwidth allocation functions need to know what the xHCI host thinks
      the current alternate settings are, so original patch set
      intf->cur_altsetting to the alternate setting 0.  This caused duplicate
      endpoint files to be created.
      
      The solution is to not set intf->cur_altsetting before calling
      usb_set_interface() in usb_reset_and_verify_device().  Instead, we add a
      new flag to struct usb_interface to tell usb_hcd_alloc_bandwidth() to use
      alternate setting 0 as the currently installed alternate setting.
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      Tested-by: NBorislav Petkov <petkovbb@googlemail.com>
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      04a723ea
    • G
      USB: add speed values for USB 3.0 and wireless controllers · b132b04e
      Greg Kroah-Hartman 提交于
      These controllers say "unknown" for their speed in sysfs, which
      obviously isn't correct.
      Reported-by: NKurt Garloff <garloff@novell.com>
      Cc: Sarah Sharp <sarah.a.sharp@linux.intel.com>
      Cc: David Vrabel <david.vrabel@csr.com>
      Cc: stable <stable@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      b132b04e
    • A
      USB: add missing delay during remote wakeup · 49d0f078
      Alan Stern 提交于
      This patch (as1330) fixes a bug in khbud's handling of remote
      wakeups.  When a device sends a remote-wakeup request, the parent hub
      (or the host controller driver, for directly attached devices) begins
      the resume sequence and notifies khubd when the sequence finishes.  At
      this point the port's SUSPEND feature is automatically turned off.
      
      However the device needs an additional 10-ms resume-recovery time
      (TRSMRCY in the USB spec).  Khubd does not wait for this delay if the
      SUSPEND feature is off, and as a result some devices fail to behave
      properly following a remote wakeup.  This patch adds the missing
      delay to the remote-wakeup path.
      
      It also extends the resume-signalling delay used by ehci-hcd and
      uhci-hcd from 20 ms (the value in the spec) to 25 ms (the value we use
      for non-remote-wakeup resumes).  The extra time appears to help some
      devices.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Cc: stable <stable@kernel.org>
      Cc: Rickard Bellini <rickard.bellini@ericsson.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      
      49d0f078
    • A
      USB: EHCI & UHCI: fix race between root-hub suspend and port resume · cec3a53c
      Alan Stern 提交于
      This patch (as1321) fixes a problem with EHCI and UHCI root-hub
      suspends: If the suspend occurs while a port is trying to resume, the
      resume doesn't finish and simply gets lost.  When remote wakeup is
      enabled, this is undesirable behavior.
      
      The patch checks first to see if any port resumes are in progress, and
      if they are then it fails the root-hub suspend with -EBUSY.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Cc: stable <stable@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      cec3a53c
    • A
      USB: EHCI: fix handling of unusual interrupt intervals · 1b9a38bf
      Alan Stern 提交于
      This patch (as1320) fixes two problems related to interrupt-URB
      scheduling in ehci-hcd.
      
      	URBs with an interval of 2 or 4 microframes aren't handled.
      	For the time being, the patch reduces to interval to 1 uframe.
      
      	URBs are constrained to have an interval no larger than 1024
      	frames by usb_submit_urb().  But some EHCI controllers allow
      	use of a schedule as short as 256 frames; for these
      	controllers we may have to decrease the interval to the
      	actual schedule length.
      
      The second problem isn't very significant since few devices expose
      interrupt endpoints with an interval larger than 256 frames.  But the
      first problem is critical; it will prevent the kernel from working
      with devices having interrupt intervals of 2 or 4 uframes.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Cc: stable <stable@kernel.org>
      Tested-by: NGlynn Farrow <farrowg@sg.ibm.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      1b9a38bf
    • O
      USB: Don't use GFP_KERNEL while we cannot reset a storage device · acbe2feb
      Oliver Neukum 提交于
      Memory allocations with GFP_KERNEL can cause IO to a storage
      device which can fail resulting in a need to reset the device.
      Therefore GFP_KERNEL cannot be safely used between usb_lock_device()
      and usb_unlock_device(). Replace by GFP_NOIO.
      Signed-off-by: NOliver Neukum <oliver@neukum.org>
      Cc: stable <stable@kernel.org>
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      acbe2feb
    • A
      USB: fix bitmask merge error · a91b593e
      Alan Stern 提交于
      This patch adds a mask bit which was mistakenly omitted from the
      as1311 patch (usb-storage: add BAD_SENSE flag).
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Cc: stable <stable@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      a91b593e
    • J
      usb: serial: fix memory leak in generic driver · 25915302
      Johan Hovold 提交于
      Fix a regression introduced by commit
      715b1dc0 ("USB: usb_debug,
      usb_generic_serial: implement multi urb write").
      
      URB transfer buffer was never freed when using multi-urb writes. 
      Currently the only driver enabling multi-urb writes is usb_debug.
      Signed-off-by: NJohan Hovold <jhovold@gmail.com>
      Cc: Greg KH <greg@kroah.com>
      Acked-by: NJason Wessel <jason.wessel@windriver.com>
      Cc: stable <stable@kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      25915302
    • S
      USB: serial: fix USB serial fix kfifo_len locking · 25719e6b
      Stefani Seibold 提交于
      This patch fix a possible race bug in drivers/usb/serial/generic with
      the new kfifo API.
      
      Please apply it to the 2.6.33-rc* tree.
      Signed-off-by: NStefani Seibold <stefani@seibold.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      25719e6b
  2. 19 1月, 2010 11 次提交
  3. 18 1月, 2010 14 次提交
  4. 17 1月, 2010 6 次提交
    • M
      V4L/DVB (13851): Fix Input dependency for Mantis · fcd89de3
      Manu Abraham 提交于
      >
      >
      >
      > CONFIG_INPUT=n
      
      As reported by Randy Dunlap <randy.dunlap@oracle.com>:
      > ERROR: "ir_input_register" [drivers/media/dvb/mantis/mantis_core.ko] undefined!
      > ERROR: "ir_input_unregister" [drivers/media/dvb/mantis/mantis_core.ko] undefined!
      > ERROR: "ir_input_init" [drivers/media/dvb/mantis/mantis_core.ko] undefined!
      > ERROR: "input_free_device" [drivers/media/dvb/mantis/mantis_core.ko] undefined!
      > ERROR: "input_allocate_device" [drivers/media/dvb/mantis/mantis_core.ko] undefined!
      Signed-off-by: NManu Abraham <manu@linuxtv.org>
      Acked-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      fcd89de3
    • M
      V4L/DVB(13824a): mantis: Fix __devexit bad annotations · 4cf0b3f1
      Mauro Carvalho Chehab 提交于
      WARNING: drivers/media/dvb/mantis/built-in.o(.devinit.text+0x13d7): Section mismatch in reference from the function mantis_pci_probe() to the function .devexit.text:mantis_i2c_exit()
      The function __devinit mantis_pci_probe() references
      a function __devexit mantis_i2c_exit().
      This is often seen when error handling in the init function
      uses functionality in the exit path.
      The fix is often to remove the __devexit annotation of
      mantis_i2c_exit() so it may be used outside an exit section.
      
      WARNING: drivers/media/dvb/mantis/built-in.o(.devinit.text+0x1433): Section mismatch in reference from the function mantis_pci_probe() to the function .devexit.text:mantis_pci_exit()
      The function __devinit mantis_pci_probe() references
      a function __devexit mantis_pci_exit().
      This is often seen when error handling in the init function
      uses functionality in the exit path.
      The fix is often to remove the __devexit annotation of
      mantis_pci_exit() so it may be used outside an exit section.
      
      WARNING: drivers/media/dvb/mantis/built-in.o(.devinit.text+0x185e): Section mismatch in reference from the function hopper_pci_probe() to the function
      .devexit.text:mantis_i2c_exit()
      The function __devinit hopper_pci_probe() references
      a function __devexit mantis_i2c_exit().
      This is often seen when error handling in the init function
      uses functionality in the exit path.
      The fix is often to remove the __devexit annotation of
      mantis_i2c_exit() so it may be used outside an exit section.
      
      WARNING: drivers/media/dvb/mantis/built-in.o(.devinit.text+0x18ba): Section mismatch in reference from the function hopper_pci_probe() to the function .devexit.text:mantis_pci_exit()
      The function __devinit hopper_pci_probe() references
      a function __devexit mantis_pci_exit().
      This is often seen when error handling in the init function
      uses functionality in the exit path.
      The fix is often to remove the __devexit annotation of
      mantis_pci_exit() so it may be used outside an exit section.
      
      WARNING: drivers/media/dvb/built-in.o(.devinit.text+0x68b8): Section mismatch in reference from the function mantis_pci_probe() to the function .devexit.text:mantis_i2c_exit()
      The function __devinit mantis_pci_probe() references
      a function __devexit mantis_i2c_exit().
      This is often seen when error handling in the init function
      uses functionality in the exit path.
      The fix is often to remove the __devexit annotation of
      mantis_i2c_exit() so it may be used outside an exit section.
      
      WARNING: drivers/media/dvb/built-in.o(.devinit.text+0x6914): Section mismatch in reference from the function mantis_pci_probe() to the function .devexit.text:mantis_pci_exit()
      The function __devinit mantis_pci_probe() references
      a function __devexit mantis_pci_exit().
      This is often seen when error handling in the init function
      uses functionality in the exit path.
      The fix is often to remove the __devexit annotation of
      mantis_pci_exit() so it may be used outside an exit section.
      
      WARNING: drivers/media/dvb/built-in.o(.devinit.text+0x6d3f): Section mismatch in reference from the function hopper_pci_probe() to the function .devexit.text:mantis_i2c_exit()
      The function __devinit hopper_pci_probe() references
      a function __devexit mantis_i2c_exit().
      This is often seen when error handling in the init function
      uses functionality in the exit path.
      The fix is often to remove the __devexit annotation of
      mantis_i2c_exit() so it may be used outside an exit section.
      
      WARNING: drivers/media/dvb/built-in.o(.devinit.text+0x6d9b): Section mismatch in reference from the function hopper_pci_probe() to the function .devexit.text:mantis_pci_exit()
      The function __devinit hopper_pci_probe() references
      a function __devexit mantis_pci_exit().
      This is often seen when error handling in the init function
      uses functionality in the exit path.
      The fix is often to remove the __devexit annotation of
      mantis_pci_exit() so it may be used outside an exit section.
      
      WARNING: drivers/media/built-in.o(.devinit.text+0x14634): Section mismatch in reference from the function mantis_pci_probe() to the function .devexit.text:mantis_i2c_exit()
      The function __devinit mantis_pci_probe() references
      a function __devexit mantis_i2c_exit().
      This is often seen when error handling in the init function
      uses functionality in the exit path.
      The fix is often to remove the __devexit annotation of
      mantis_i2c_exit() so it may be used outside an exit section.
      
      WARNING: drivers/media/built-in.o(.devinit.text+0x14690): Section mismatch in reference from the function mantis_pci_probe() to the function .devexit.text:mantis_pci_exit()
      The function __devinit mantis_pci_probe() references
      a function __devexit mantis_pci_exit().
      This is often seen when error handling in the init function
      uses functionality in the exit path.
      The fix is often to remove the __devexit annotation of
      mantis_pci_exit() so it may be used outside an exit section.
      
      WARNING: drivers/media/built-in.o(.devinit.text+0x14abb): Section mismatch in reference from the function hopper_pci_probe() to the function .devexit.text:mantis_i2c_exit()
      The function __devinit hopper_pci_probe() references
      a function __devexit mantis_i2c_exit().
      This is often seen when error handling in the init function
      uses functionality in the exit path.
      The fix is often to remove the __devexit annotation of
      mantis_i2c_exit() so it may be used outside an exit section.
      
      WARNING: drivers/media/built-in.o(.devinit.text+0x14b17): Section mismatch in reference from the function hopper_pci_probe() to the function .devexit.text:mantis_pci_exit()
      The function __devinit hopper_pci_probe() references
      a function __devexit mantis_pci_exit().
      This is often seen when error handling in the init function
      uses functionality in the exit path.
      The fix is often to remove the __devexit annotation of
      mantis_pci_exit() so it may be used outside an exit section.
      Acked-by: NManu Abraham <manu@linuxtv.org>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      4cf0b3f1
    • M
      V4L/DVB (13808b): mantis: replace DMA_nnBIT_MASK to DMA_BIT_MASK(32) · 184ac753
      Mauro Carvalho Chehab 提交于
      drivers/media/dvb/mantis/mantis_pci.c: In function ‘mantis_pci_init’:
      drivers/media/dvb/mantis/mantis_pci.c:76: warning: ‘DMA_nnBIT_MASK’ is deprecated
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      184ac753
    • M
    • M
      V4L/DVB(13808a): mantis: convert it to the new ir-core register/unregister functions · 9c0832e3
      Mauro Carvalho Chehab 提交于
      Fix a merge conflict between mantis and IR cleanups
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      9c0832e3
    • M