patch usb-remove-short-initial-timeout-for-device-descriptor-fetch.patch added to gregkh-2.6 tree

<[email protected]>
Newsgroups gmane.linux.usb.devel
Message-ID <[email protected]>
This is a note to let you know that I've just added the patch titled

     Subject: USB: remove short initial timeout for device descriptor fetch

to my gregkh-2.6 tree.  Its filename is

     usb-remove-short-initial-timeout-for-device-descriptor-fetch.patch

This tree can be found at 
    http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/patches/


>From [email protected] Fri May 11 07:19:08 2007
Date: Fri, 11 May 2007 10:19:04 -0400 (EDT)
From: Alan Stern <[email protected]>
To: Greg KH <[email protected]>
cc: [email protected], USB development list <[email protected]>
Subject: USB: remove short initial timeout for device descriptor fetch
Message-ID: <[email protected]>

This patch (as905) removes a micro-optimization from the hub port
initialization code.  Previously we had been using a short timeout on
the first attempt the read the device descriptor; now we will use the
standard timeout length.

It's not clear that the short timeout ever provided any benefit.  And
now we know of one case where it actually hurts: The device can't meet
the short timeout and then it gets terminally confused.

This fixes Bugzilla #8444.

Signed-off-by: Alan Stern <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 drivers/usb/core/hub.c |   13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)

--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -2131,14 +2131,9 @@ hub_port_init (struct usb_hub *hub, stru
 				continue;
 			}
 
-			/* Use a short timeout the first time through,
-			 * so that recalcitrant full-speed devices with
-			 * 8- or 16-byte ep0-maxpackets won't slow things
-			 * down tremendously by NAKing the unexpectedly
-			 * early status stage.  Also, retry on all errors;
-			 * some devices are flakey.
-			 * 255 is for WUSB devices, we actually need to use 512.
-			 * WUSB1.0[4.8.1].
+			/* Retry on all errors; some devices are flakey.
+			 * 255 is for WUSB devices, we actually need to use
+			 * 512 (WUSB1.0[4.8.1]).
 			 */
 			for (j = 0; j < 3; ++j) {
 				buf->bMaxPacketSize0 = 0;
@@ -2146,7 +2141,7 @@ hub_port_init (struct usb_hub *hub, stru
 					USB_REQ_GET_DESCRIPTOR, USB_DIR_IN,
 					USB_DT_DEVICE << 8, 0,
 					buf, GET_DESCRIPTOR_BUFSIZE,
-					(i ? USB_CTRL_GET_TIMEOUT : 1000));
+					USB_CTRL_GET_TIMEOUT);
 				switch (buf->bMaxPacketSize0) {
 				case 8: case 16: case 32: case 64: case 255:
 					if (buf->bDescriptorType ==


Patches currently in gregkh-2.6 which might be from [email protected] are

driver/ida-implement-idr-based-id-allocator.patch
driver/idr-fix-obscure-bug-in-allocation-path.patch
driver/idr-separate-out-idr_mark_full.patch
driver/sysfs-kill-unnecessary-attribute-owner.patch
driver/driver-core-make-devt_attr-and-uevent_attr-static.patch
driver/sysfs-consolidate-sysfs_dirent-creation-functions.patch
driver/sysfs-add-sysfs_dirent-s_name.patch
driver/sysfs-make-sysfs_dirent-s_element-a-union.patch
driver/sysfs-add-sysfs_dirent-s_parent.patch
driver/sysfs-allocate-inode-number-using-ida.patch
driver/sysfs-kill-attribute-file-orphaning.patch
driver/sysfs-fix-error-handling-in-binattr-write.patch
driver/sysfs-flatten-and-fix-sysfs_rename_dir-error-handling.patch
driver/sysfs-flatten-cleanup-paths-in-sysfs_add_link-and-create_dir.patch
driver/sysfs-implement-bin_buffer.patch
driver/sysfs-implement-kobj_sysfs_assoc_lock.patch
driver/sysfs-implement-sysfs_dirent-active-reference-and-immediate-disconnect.patch
driver/sysfs-make-sysfs_put-ignore-null-sd.patch
driver/sysfs-move-release_sysfs_dirent-to-dir.c.patch
driver/sysfs-reimplement-syfs_drop_dentry.patch
driver/sysfs-reimplement-symlink-using-sysfs_dirent-tree.patch
driver/sysfs-separate-out-sysfs_attach_dentry.patch
usb/usb-interface-pm-state.patch
usb/usb-remove-unneeded-warn_on.patch
usb/usb-implement-pm-freeze-and-prethaw.patch
usb/usb-make-the-autosuspend-workqueue-thread-freezable.patch
usb/usb-more-autosuspend-timer-stuff.patch
usb/usb-move-bus_suspend-and-bus_resume-method-calls.patch
usb/usb-set-the-correct-interrupt-interval-in-usb_bulk_msg.patch
usb/usb-don-t-unsuspend-for-a-new-connection.patch
usb/usb-make-hub-driver-s-release-more-robust.patch
usb/ehci-fix-problem-with-bios-handoff.patch
usb/usb-fix-race-between-autosuspend-and-unregister-for-root-hubs.patch
usb/usb-remove-locktree-routine-from-the-hub-driver.patch
usb/usb-remove-references-to-dev.power.power_state.patch
usb/ohci-fix-machine-check-in-ohci_hub_status_data.patch
usb/usb-remove-short-initial-timeout-for-device-descriptor-fetch.patch

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
[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.