<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.588   -&gt; 1.589  
#	drivers/usb/host/usb-uhci-q.c	1.1     -&gt; 1.2    
#	drivers/usb/host/usb-uhci-hcd.c	1.1     -&gt; 1.2    
#	drivers/usb/host/ehci-sched.c	1.11    -&gt; 1.12   
#	drivers/usb/host/usb-uhci.c	1.34    -&gt; 1.35   
#	drivers/usb/host/uhci.c	1.44    -&gt; 1.45   
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 02/05/22	david-b@pacbell.net	1.589
# [PATCH] hcds, remove urb-&gt;next
# 
# This makes the hcds stop expecting urb-&gt;next to exist.
# 
#         ehci-hcd ... remove obsolete sanity check
#         usb-uhci-hcd ... remove code (wouldn't be called)
# 
# Two "old style" drivers got updated too (uhci, usb-uhci)
# so that folk can use them in case of problems with their
# "new style" analogues.
# --------------------------------------------
#
diff -Nru a/drivers/usb/host/ehci-sched.c b/drivers/usb/host/ehci-sched.c
--- a/drivers/usb/host/ehci-sched.c	Wed May 22 13:52:16 2002
+++ b/drivers/usb/host/ehci-sched.c	Wed May 22 13:52:16 2002
@@ -964,15 +964,6 @@
 	if (urb-&gt;iso_frame_desc [0].offset != 0)
 		return -EINVAL;
 	
-	/*
-	 * NOTE doing this for now, anticipating periodic URB models
-	 * get updated to be "explicit resubmit".
-	 */
-	if (urb-&gt;next) {
-		dbg ("use explicit resubmit for ISO");
-		return -EINVAL;
-	}
-
 	/* allocate ITDs w/o locking anything */
 	status = itd_urb_transaction (ehci, urb, mem_flags);
 	if (status &lt; 0)
diff -Nru a/drivers/usb/host/uhci.c b/drivers/usb/host/uhci.c
--- a/drivers/usb/host/uhci.c	Wed May 22 13:52:16 2002
+++ b/drivers/usb/host/uhci.c	Wed May 22 13:52:16 2002
@@ -106,8 +106,6 @@
 /* to make sure it doesn't hog all of the bandwidth */
 #define DEPTH_INTERVAL	5
 
-#define MAX_URB_LOOP	2048		/* Maximum number of linked URB's */
-
 /*
  * Technically, updating td-&gt;status here is a race, but it's not really a
  * problem. The worst that can happen is that we set the IOC bit again
@@ -2296,8 +2294,7 @@
 	struct urb_priv *urbp;
 	struct usb_device *dev = urb-&gt;dev;
 	struct uhci *uhci = (struct uhci *)dev-&gt;bus-&gt;hcpriv;
-	int is_ring = 0, killed, resubmit_interrupt, status;
-	struct urb *nurb;
+	int killed, resubmit_interrupt, status;
 	unsigned long flags;
 
 	spin_lock_irqsave(&amp;urb-&gt;lock, flags);
@@ -2313,29 +2310,6 @@
 	resubmit_interrupt = (usb_pipetype(urb-&gt;pipe) == PIPE_INTERRUPT &amp;&amp;
 			urb-&gt;interval);
 
-	nurb = urb-&gt;next;
-	if (nurb &amp;&amp; !killed) {
-		int count = 0;
-
-		while (nurb &amp;&amp; nurb != urb &amp;&amp; count &lt; MAX_URB_LOOP) {
-			if (nurb-&gt;status == -ENOENT ||
-			    nurb-&gt;status == -ECONNABORTED ||
-			    nurb-&gt;status == -ECONNRESET) {
-				killed = 1;
-				break;
-			}
-
-			nurb = nurb-&gt;next;
-			count++;
-		}
-
-		if (count == MAX_URB_LOOP)
-			err("uhci_call_completion: too many linked URB's, loop? (first loop)");
-
-		/* Check to see if chain is a ring */
-		is_ring = (nurb == urb);
-	}
-
 	if (urbp-&gt;transfer_buffer_dma_handle)
 		pci_dma_sync_single(uhci-&gt;dev, urbp-&gt;transfer_buffer_dma_handle,
 			urb-&gt;transfer_buffer_length, usb_pipein(urb-&gt;pipe) ?
@@ -2370,15 +2344,10 @@
 		urb-&gt;dev = dev;
 		uhci_reset_interrupt(urb);
 	} else {
-		if (is_ring &amp;&amp; !killed) {
-			urb-&gt;dev = dev;
-			uhci_submit_urb(urb, GFP_ATOMIC);
-		} else {
-			/* We decrement the usage count after we're done */
-			/*  with everything */
-			usb_put_dev(dev);
-			usb_put_urb(urb);
-		}
+		/* We decrement the usage count after we're done */
+		/*  with everything */
+		usb_put_dev(dev);
+		usb_put_urb(urb);
 	}
 }
 
diff -Nru a/drivers/usb/host/usb-uhci-hcd.c b/drivers/usb/host/usb-uhci-hcd.c
--- a/drivers/usb/host/usb-uhci-hcd.c	Wed May 22 13:52:16 2002
+++ b/drivers/usb/host/usb-uhci-hcd.c	Wed May 22 13:52:16 2002
@@ -100,9 +100,6 @@
 //                   NO serviceable parts below!
 /*--------------------------------------------------------------------------*/
 
-// How much URBs with -&gt;next are walked
-#define MAX_NEXT_COUNT 2048
-
 static struct uhci *devs = NULL;
 
 /* used by userspace UHCI data structure dumper */
diff -Nru a/drivers/usb/host/usb-uhci-q.c b/drivers/usb/host/usb-uhci-q.c
--- a/drivers/usb/host/usb-uhci-q.c	Wed May 22 13:52:16 2002
+++ b/drivers/usb/host/usb-uhci-q.c	Wed May 22 13:52:16 2002
@@ -1215,10 +1215,9 @@
 // called with urb_list_lock set
 static int process_urb (struct uhci_hcd *uhci, struct list_head *p)
 {
-	struct urb *urb, *urbt;	
-	struct usb_device *usb_dev;
+	struct urb *urb;	
 	urb_priv_t *priv;
-	int type, n, ret = 0;
+	int type, ret = 0;
 
 	priv=list_entry (p,  urb_priv_t, urb_list);
 	urb=priv-&gt;urb;
@@ -1251,40 +1250,11 @@
 		uhci_free_priv(uhci, urb, urb-&gt;hcpriv);
 
 		if (type != PIPE_INTERRUPT) {  // process_interrupt does completion on its own		
-			// FIXME: How to detect killed URBs in a ring?			
-
-			if (type == PIPE_ISOCHRONOUS) {
-				for (n=0, urbt = urb-&gt;next; urbt &amp;&amp; (urbt != urb) &amp;&amp; (n&lt;MAX_NEXT_COUNT); urbt = urbt-&gt;next, n++)
-					continue;
-
-				if (urbt &amp;&amp; (n&lt;MAX_NEXT_COUNT)) {
-					usb_dev=urb-&gt;dev;
-					urb-&gt;dev = NULL;
-					spin_unlock(&amp;uhci-&gt;urb_list_lock);
-					if (urb-&gt;complete)
-						urb-&gt;complete (urb);
-
-					urb-&gt;dev=usb_dev;
-					uhci_urb_enqueue(&amp;uhci-&gt;hcd, urb, GFP_ATOMIC); // FIXME memflags!
-					spin_lock(&amp;uhci-&gt;urb_list_lock);					
-				}
-				else {
-					spin_unlock(&amp;uhci-&gt;urb_list_lock);
-					dbg("giveback iso urb %p, status %i, length %i\n", 
-					    urb, urb-&gt;status, urb-&gt;transfer_buffer_length);
-
-					usb_hcd_giveback_urb(&amp;uhci-&gt;hcd, urb);
-					spin_lock(&amp;uhci-&gt;urb_list_lock);
-				}
-			}
-			else {
-				spin_unlock(&amp;uhci-&gt;urb_list_lock);
-				dbg("giveback urb %p, status %i, length %i\n", 
-				    urb, urb-&gt;status, urb-&gt;transfer_buffer_length);
-
-				usb_hcd_giveback_urb(&amp;uhci-&gt;hcd, urb);
-				spin_lock(&amp;uhci-&gt;urb_list_lock);
-			}
+			spin_unlock(&amp;uhci-&gt;urb_list_lock);
+			dbg("giveback urb %p, status %i, length %i\n", 
+			    urb, urb-&gt;status, urb-&gt;transfer_buffer_length);
+			usb_hcd_giveback_urb(&amp;uhci-&gt;hcd, urb);
+			spin_lock(&amp;uhci-&gt;urb_list_lock);
 		}
 	}
 	return ret;
diff -Nru a/drivers/usb/host/usb-uhci.c b/drivers/usb/host/usb-uhci.c
--- a/drivers/usb/host/usb-uhci.c	Wed May 22 13:52:16 2002
+++ b/drivers/usb/host/usb-uhci.c	Wed May 22 13:52:16 2002
@@ -125,9 +125,6 @@
 _static int process_interrupt (uhci_t *s, struct urb *urb);
 _static int process_iso (uhci_t *s, struct urb *urb, int force);
 
-// How much URBs with -&gt;next are walked
-#define MAX_NEXT_COUNT 2048
-
 static uhci_t *devs = NULL;
 
 /* used by userspace UHCI data structure dumper */
@@ -2662,78 +2659,12 @@
 #endif
 
 		if ((usb_pipetype (urb-&gt;pipe) != PIPE_INTERRUPT)) {  // process_interrupt does completion on its own		
-			struct urb *next_urb = urb-&gt;next;
-			int is_ring = 0;
-			int contains_killed = 0;
-			int loop_count=0;
-			
-			if (next_urb) {
-				// Find out if the URBs are linked to a ring
-				while  (next_urb != NULL &amp;&amp; next_urb != urb &amp;&amp; loop_count &lt; MAX_NEXT_COUNT) {
-					if (next_urb-&gt;status == -ENOENT) {// killed URBs break ring structure &amp; resubmission
-						contains_killed = 1;
-						break;
-					}	
-					next_urb = next_urb-&gt;next;
-					loop_count++;
-				}
-				
-				if (loop_count == MAX_NEXT_COUNT)
-					err("process_urb: Too much linked URBs in ring detection!");
-
-				if (next_urb == urb)
-					is_ring=1;
-			}			
-
-			// Submit idle/non-killed URBs linked with urb-&gt;next
-			// Stop before the current URB				
 			
-			next_urb = urb-&gt;next;	
-			if (next_urb &amp;&amp; !contains_killed) {
-				int ret_submit;
-				next_urb = urb-&gt;next;	
-				
-				loop_count=0;
-				while (next_urb != NULL &amp;&amp; next_urb != urb &amp;&amp; loop_count &lt; MAX_NEXT_COUNT) {
-					if (next_urb-&gt;status != -EINPROGRESS) {
-					
-						if (next_urb-&gt;status == -ENOENT) 
-							break;
-
-						spin_unlock(&amp;s-&gt;urb_list_lock);
-
-						// FIXME!!!
-						// We need to know the real state, so 
-						// GFP_ATOMIC is probably not correct
-						ret_submit=uhci_submit_urb(next_urb, GFP_ATOMIC);
-						spin_lock(&amp;s-&gt;urb_list_lock);
-						
-						if (ret_submit)
-							break;						
-					}
-					loop_count++;
-					next_urb = next_urb-&gt;next;
-				}
-				if (loop_count == MAX_NEXT_COUNT)
-					err("process_urb: Too much linked URBs in resubmission!");
-			}
-
 			// Completion
 			if (urb-&gt;complete) {
-				int was_unlinked = (urb-&gt;status == -ENOENT);
 				urb-&gt;dev = NULL;
 				spin_unlock(&amp;s-&gt;urb_list_lock);
-
 				urb-&gt;complete ((struct urb *) urb);
-
-				// Re-submit the URB if ring-linked
-				if (is_ring &amp;&amp; !was_unlinked &amp;&amp; !contains_killed) {
-					urb-&gt;dev=usb_dev;
-					// FIXME!!!
-					// We need to know the real state, so 
-					// GFP_ATOMIC is probably not correct
-					uhci_submit_urb (urb, GFP_ATOMIC);
-				}
 				spin_lock(&amp;s-&gt;urb_list_lock);
 			}
 			
</pre></body></html>