This is a note to let you know that I've just added the patch titled
Subject: USB: update last_busy field correctly
to my gregkh-2.6 tree. Its filename is
usb-update-last_busy-field-correctly.patch
This tree can be found at
http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/patches/
>From [email protected] Mon Aug 20 09:19:22 2007
From: Alan Stern <[email protected]>
Date: Mon, 20 Aug 2007 12:18:39 -0400 (EDT)
Subject: USB: update last_busy field correctly
To: Greg KH <[email protected]>
Cc: USB development list <[email protected]>
Message-ID: <[email protected]>
This patch (as966) fixes a bug in the autosuspend code. The last_busy
field should be updated whenever any event occurs, not just events
that cause an autosuspend or an autoresume.
This partially fixes Bugzilla #8892.
Signed-off-by: Alan Stern <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
drivers/usb/core/driver.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
--- a/drivers/usb/core/driver.c
+++ b/drivers/usb/core/driver.c
@@ -1214,6 +1214,8 @@ static int usb_autopm_do_device(struct u
udev->auto_pm = 1;
udev->pm_usage_cnt += inc_usage_cnt;
WARN_ON(udev->pm_usage_cnt < 0);
+ if (inc_usage_cnt)
+ udev->last_busy = jiffies;
if (inc_usage_cnt >= 0 && udev->pm_usage_cnt > 0) {
if (udev->state == USB_STATE_SUSPENDED)
status = usb_resume_both(udev);
@@ -1222,8 +1224,6 @@ static int usb_autopm_do_device(struct u
else if (inc_usage_cnt)
udev->last_busy = jiffies;
} else if (inc_usage_cnt <= 0 && udev->pm_usage_cnt <= 0) {
- if (inc_usage_cnt)
- udev->last_busy = jiffies;
status = usb_suspend_both(udev, PMSG_SUSPEND);
}
usb_pm_unlock(udev);
@@ -1332,16 +1332,15 @@ static int usb_autopm_do_interface(struc
else {
udev->auto_pm = 1;
intf->pm_usage_cnt += inc_usage_cnt;
+ udev->last_busy = jiffies;
if (inc_usage_cnt >= 0 && intf->pm_usage_cnt > 0) {
if (udev->state == USB_STATE_SUSPENDED)
status = usb_resume_both(udev);
if (status != 0)
intf->pm_usage_cnt -= inc_usage_cnt;
- else if (inc_usage_cnt)
+ else
udev->last_busy = jiffies;
} else if (inc_usage_cnt <= 0 && intf->pm_usage_cnt <= 0) {
- if (inc_usage_cnt)
- udev->last_busy = jiffies;
status = usb_suspend_both(udev, PMSG_SUSPEND);
}
}
Patches currently in gregkh-2.6 which might be from [email protected] are
driver/sysfs-fix-locking-in-sysfs_lookup-and-sysfs_rename_dir.patch
driver/sysfs-remove-first-pass-at-shadow-directory-support.patch
driver/sysfs-cosmetic-changes-in-sysfs_lookup.patch
driver/sysfs-make-sysfs_add-remove_one-call-link-unlink_sibling-implictly.patch
driver/sysfs-make-sysfs_add_one-automatically-check-for-duplicate-entry.patch
driver/sysfs-make-sysfs_addrm_finish-return-void.patch
driver/sysfs-simplify-sysfs_rename_dir.patch
driver/sysfs-don-t-warn-on-removal-of-a-nonexistent-binary-file.patch
usb/usb-add-ep-enable.patch
usb/usb-add-direction-bit-to-urb-transfer_flags.patch
usb/usb-add-urb-ep.patch
usb/usb-address-0-handling-during-device-initialization.patch
usb/usb-avoid-urb-pipe-in-usbfs.patch
usb/usb-avoid-urb-pipe-in-usbmon.patch
usb/usb-avoid-using-urb-pipe-in-usbcore.patch
usb/usb-cdc-acm-fix-sysfs-attribute-registration-bug.patch
usb/usb-cleanup-for-previous-patches.patch
usb/usb-gadget-file-storage-gadget-cleanups.patch
usb/usb-separate-out-endpoint-queue-management-and-dma-mapping-routines.patch
usb/usb-update-spinlock-usage-for-root-hub-urbs.patch
usb/usb-stall-control-endpoint-when-file-storage-class-request-wvalue-0.patch
usb/usb-cleanups-for-g_file_storage.patch
usb/usb-don-t-touch-sysfs-stuff-when-altsetting-is-unchanged.patch
usb/usb-make-hcds-responsible-for-managing-endpoint-queues.patch
usb/usb-remove-debug-definition-from-dummy_hcd.patch
usb/usb-accept-1-byte-device-status-replies-fixing-some-b0rken-devices.patch
usb/usbmon-update-pipe-removal-to-suit-my-taste.patch
usb/usb-allow-retry-on-descriptor-fetch-errors.patch
usb/usb-storage-fix-bugs-in-the-disconnect-pathway.patch
usb/usb-g_file_storage-fix-bug-in-dma-buffer-handling.patch
usb/usb-update-last_busy-field-correctly.patch
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.