From: Sarah Sharp Date: Thu, 30 Dec 2010 06:03:07 +0000 (-0800) Subject: usb: Always return 0 or -EBUSY to the runtime PM core. X-Git-Tag: v2.6.39-rc1~472^2~38 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=db7c7c0aeef51dba12d877875b8deb78d9886647;p=pandora-kernel.git usb: Always return 0 or -EBUSY to the runtime PM core. The PM core reacts badly when the return code from usb_runtime_suspend() is not 0, -EAGAIN, or -EBUSY. The PM core regards this as a fatal error, and refuses to run anymore PM helper functions. In particular, usbfs_open() and other usbfs functions will fail because the PM core will return an error code when usb_autoresume_device() is called. This causes libusb and/or lsusb to either hang or segfault. If a USB device cannot suspend for some reason (e.g. a hub doesn't report it has remote wakeup capabilities), we still want lsusb and other userspace programs to work. So return -EBUSY, which will fill people's log files with failed tries, but will ensure userspace still works. Signed-off-by: Sarah Sharp --- Reading git-diff-tree failed