<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.541   -&gt; 1.542  
#	drivers/usb/host/ehci-q.c	1.12    -&gt; 1.13   
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 02/04/22	david-b@pacbell.net	1.542
# [PATCH] Re: PATCH: 2.5.8 ehci, submit errors
# 
# Oh, and for non-x86 platforms with interesting pci
# mapping, this tweak to one new routine would be
# important in a particular error path I've yet to see ... :)
# --------------------------------------------
#
diff -Nru a/drivers/usb/host/ehci-q.c b/drivers/usb/host/ehci-q.c
--- a/drivers/usb/host/ehci-q.c	Mon Apr 22 14:28:10 2002
+++ b/drivers/usb/host/ehci-q.c	Mon Apr 22 14:28:10 2002
@@ -426,23 +426,25 @@
 		list_del (&amp;qtd-&gt;qtd_list);
 		if (unmapped != 2) {
 			int	direction;
+			size_t	size;
 
 			/* for ctrl unmap twice: SETUP and DATA;
 			 * else (bulk, intr) just once: DATA
 			 */
-			if (!unmapped++ &amp;&amp; usb_pipecontrol (urb-&gt;pipe))
+			if (!unmapped++ &amp;&amp; usb_pipecontrol (urb-&gt;pipe)) {
 				direction = PCI_DMA_TODEVICE;
-			else {
+				size = sizeof (struct usb_ctrlrequest);
+			} else {
 				direction = usb_pipein (urb-&gt;pipe)
 					? PCI_DMA_FROMDEVICE
 					: PCI_DMA_TODEVICE;
+				size = qtd-&gt;urb-&gt;transfer_buffer_length;
 				unmapped++;
 			}
 			if (qtd-&gt;buf_dma)
 				pci_unmap_single (ehci-&gt;hcd.pdev,
 					qtd-&gt;buf_dma,
-					qtd-&gt;urb-&gt;transfer_buffer_length,
-					direction);
+					size, direction);
 		}
 		ehci_qtd_free (ehci, qtd);
 	}
</pre></body></html>