<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;"># This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
#	           ChangeSet	1.427   -&gt; 1.428  
#	  drivers/usb/uhci.h	1.7     -&gt; 1.8    
#	  drivers/usb/uhci.c	1.25    -&gt; 1.26   
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 02/02/27	johannes@erdfelt.com	1.428
# uhci.c, speed improvements
# 
# Basically, the patch turns switching off FSBR into a lazy operation with
# the assumption there will be another transfer shortly afterwards. This
# works wonders for usb-storage for instance.
# --------------------------------------------
#
diff -Nru a/drivers/usb/uhci.c b/drivers/usb/uhci.c
--- a/drivers/usb/uhci.c	Wed Feb 27 15:44:35 2002
+++ b/drivers/usb/uhci.c	Wed Feb 27 15:44:35 2002
@@ -53,11 +53,11 @@
 #include &lt;asm/irq.h&gt;
 #include &lt;asm/system.h&gt;
 
+#include "hcd.h"
 #include "uhci.h"
 
 #include &lt;linux/pm.h&gt;
 
-
 /*
  * Version Information
  */
@@ -65,7 +65,6 @@
 #define DRIVER_AUTHOR "Linus 'Frodo Rabbit' Torvalds, Johannes Erdfelt, Randy Dunlap, Georg Acher, Deti Fliegl, Thomas Sailer, Roman Weissgaerber"
 #define DRIVER_DESC "USB Universal Host Controller Interface driver"
 
-
 /*
  * debug = 0, no debugging messages
  * debug = 1, dump failed URB's except for stalls
@@ -100,6 +99,7 @@
 
 /* If a transfer is still active after this much time, turn off FSBR */
 #define IDLE_TIMEOUT	(HZ / 20)	/* 50 ms */
+#define FSBR_DELAY	(HZ / 20)	/* 50 ms */
 
 #define MAX_URB_LOOP	2048		/* Maximum number of linked URB's */
 
@@ -766,7 +766,7 @@
 	if ((!(urb-&gt;transfer_flags &amp; USB_NO_FSBR)) &amp;&amp; urbp-&gt;fsbr) {
 		urbp-&gt;fsbr = 0;
 		if (!--uhci-&gt;fsbr)
-			uhci-&gt;skel_term_qh-&gt;link = UHCI_PTR_TERM;
+			uhci-&gt;fsbrtimeout = jiffies + FSBR_DELAY;
 	}
 
 	spin_unlock_irqrestore(&amp;uhci-&gt;frame_list_lock, flags);
@@ -2029,6 +2029,12 @@
 
 		u-&gt;transfer_flags |= USB_ASYNC_UNLINK | USB_TIMEOUT_KILLED;
 		uhci_unlink_urb(u);
+	}
+
+	/* Really disable FSBR */
+	if (!uhci-&gt;fsbr &amp;&amp; uhci-&gt;fsbrtimeout &amp;&amp; time_after_eq(jiffies, uhci-&gt;fsbrtimeout)) {
+		uhci-&gt;fsbrtimeout = 0;
+		uhci-&gt;skel_term_qh-&gt;link = UHCI_PTR_TERM;
 	}
 
 	/* enter global suspend if nothing connected */
diff -Nru a/drivers/usb/uhci.h b/drivers/usb/uhci.h
--- a/drivers/usb/uhci.h	Wed Feb 27 15:44:35 2002
+++ b/drivers/usb/uhci.h	Wed Feb 27 15:44:35 2002
@@ -309,6 +309,7 @@
 	spinlock_t frame_list_lock;
 	struct uhci_frame_list *fl;		/* P: uhci-&gt;frame_list_lock */
 	int fsbr;				/* Full speed bandwidth reclamation */
+	unsigned long fsbrtimeout;		/* FSBR delay */
 	int is_suspended;
 
 	/* Main list of URB's currently controlled by this HC */
</pre></body></html>