# 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.547   -> 1.548  
#	drivers/usb/host/ohci-q.c	1.19    -> 1.20   
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 02/08/28	david-b@pacbell.net	1.548
# [PATCH] ohci on sparc64
# 
# DaveM noticed he needed a pci_dma_sync_single() after the
# DMA conversion late in 32 ; here's the patch.
# 
# FYI this driver was previously having to unmap/remap in
# that location, this is an improvement!  :)
# --------------------------------------------
#
diff -Nru a/drivers/usb/host/ohci-q.c b/drivers/usb/host/ohci-q.c
--- a/drivers/usb/host/ohci-q.c	Wed Aug 28 23:20:23 2002
+++ b/drivers/usb/host/ohci-q.c	Wed Aug 28 23:20:23 2002
@@ -79,6 +79,12 @@
 		urb->status = 0;
 	spin_unlock_irqrestore (&urb->lock, flags);
 
+	if (!(urb->transfer_flags & URB_NO_DMA_MAP)
+			&& usb_pipein (urb->pipe))
+		pci_dma_sync_single (hc->hcd.pdev, urb->transfer_dma,
+				urb->transfer_buffer_length,
+				PCI_DMA_FROMDEVICE);
+
 #ifdef OHCI_VERBOSE_DEBUG
 	urb_print (urb, "INTR", usb_pipeout (urb->pipe));
 #endif
@@ -92,6 +98,8 @@
 	if (urb_priv->state != URB_DEL)
 		urb->status = -EINPROGRESS;
 	spin_unlock (&urb->lock);
+
+	/* syncing with PCI_DMA_TODEVICE is evidently trouble... */
 
 	spin_lock (&hc->lock);
 	td_submit_urb (hc, urb);
