1. 26 8月, 2013 1 次提交
  2. 16 8月, 2013 1 次提交
    • S
      usb: Don't fail port power resume on device disconnect. · d49dad3e
      Sarah Sharp 提交于
      Userspace can tell the kernel to power off any USB port, including ones
      that are visible and connectible to users.  When an attached USB device
      goes into suspend, the port will be powered off if the
      pm_qos_no_port_poweroff file for its port is set to 0, the device does
      not have remote wakeup enabled, and the device is marked as persistent.
      
      If the user disconnects the USB device while the port is powered off,
      the current code does not handle that properly.  If you disconnect a
      device, and then run `lsusb -v -s` for the device, the device disconnect
      does not get handled by the USB core.  The runtime resume of the port
      fails, because hub_port_debounce_be_connected() returns -ETIMEDOUT.
      
      This means the port resume fails and khubd doesn't handle the USB device
      disconnect.  This leaves the device listed in lsusb, and the port's
      runtime_status will be permanently marked as "error".
      
      Fix this by ignoring the return value of hub_port_debounce_be_connected.
      Users can disconnect USB devices while the ports are powered off, and we
      must be able to handle that.
      
      This patch should be backported to kernels as old as 3.9, that
      contain the commit ad493e5e "usb: add
      usb port auto power off mechanism"
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      Cc: Lan Tianyu <tianyu.lan@intel.com>
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      d49dad3e
  3. 19 6月, 2013 1 次提交
  4. 04 6月, 2013 1 次提交
  5. 02 4月, 2013 1 次提交
  6. 29 3月, 2013 1 次提交
    • A
      USB: remove CONFIG_USB_SUSPEND option · 84ebc102
      Alan Stern 提交于
      This patch (as1675) removes the CONFIG_USB_SUSPEND option, essentially
      replacing it everywhere with CONFIG_PM_RUNTIME (except for one place
      in hub.c, where it is replaced with CONFIG_PM because the code needs
      to be used in both runtime and system PM).  The net result is code
      shrinkage and simplification.
      
      There's very little point in keeping CONFIG_USB_SUSPEND because almost
      everybody enables it.  The few that don't will find that the usbcore
      module has gotten somewhat bigger and they will have to take active
      measures if they want to prevent hubs from being runtime suspended.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      CC: Peter Chen <peter.chen@freescale.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      84ebc102
  7. 29 1月, 2013 1 次提交
  8. 26 1月, 2013 5 次提交
  9. 21 1月, 2013 2 次提交
    • L
      usb: Add "portX/connect_type" attribute to expose usb port's connect type · cef7468c
      Lan Tianyu 提交于
      Some platforms provide usb port connect types through ACPI. This
      patch is to add this new attribute to expose these information
      to user space.
      Acked-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NLan Tianyu <tianyu.lan@intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      cef7468c
    • L
      usb: fix compilation error and warning of driver/usb/core/port.c on arm and blackfin · 9f7344fb
      Lan Tianyu 提交于
      This patch is to fix compilation error and warning on the arm and blackfin.
      Add linux/slab.h head file to driver/usb/core/port.c. These are reported
      from 0-DAY kernel build testing backend.
      
      head:   6e30d7cb
      commit: 6e30d7cb [26/26] usb: Add driver/usb/core/(port.c,hub.h) files
      config: make ARCH=arm at91_dt_defconfig
      
      All error/warnings:
      
         drivers/usb/core/port.c: In function 'usb_port_device_release':
      >> drivers/usb/core/port.c:25:2: error: implicit declaration of function 'kfree' [-Werror=implicit-function-declaration]
         drivers/usb/core/port.c: In function 'usb_hub_create_port_device':
      >> drivers/usb/core/port.c:38:2: error: implicit declaration of function 'kzalloc' [-Werror=implicit-function-declaration]
      >> drivers/usb/core/port.c:38:40: error: 'GFP_KERNEL' undeclared (first use in this function)
         drivers/usb/core/port.c:38:40: note: each undeclared identifier is reported only once for each function it appears in
         cc1: some warnings being treated as errors
      
      head:   6e30d7cb
      commit: 6e30d7cb [26/26] usb: Add driver/usb/core/(port.c,hub.h) files
      config: make ARCH=blackfin BF526-EZBRD_defconfig
      
      All warnings:
      
         drivers/usb/core/port.c: In function 'usb_port_device_release':
         drivers/usb/core/port.c:25:2: error: implicit declaration of function 'kfree' [-Werror=implicit-function-declaration]
         drivers/usb/core/port.c: In function 'usb_hub_create_port_device':
         drivers/usb/core/port.c:38:2: error: implicit declaration of function 'kzalloc' [-Werror=implicit-function-declaration]
      >> drivers/usb/core/port.c:38:11: warning: assignment makes pointer from integer without a cast [enabled by default]
         cc1: some warnings being treated as errors
      Reported-by: NFengguang Wu <wfg@linux.intel.com>
      Signed-off-by: NLan Tianyu <tianyu.lan@intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      9f7344fb
  10. 19 1月, 2013 1 次提交