summaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ehci.h
diff options
context:
space:
mode:
authorDavid Brownell <david-b@pacbell.net>2007-05-17 12:21:19 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2007-07-12 16:29:47 -0700
commit9c033e810eef0aff6d4d3bf028aa1e583c074f93 (patch)
treeb7dfa412f7882fa90fd6bb8c5e8cbc2185bd12cf /drivers/usb/host/ehci.h
parent04d06ad0f1fdb499af84ae3d7969e2136a462f38 (diff)
downloadlinux-9c033e810eef0aff6d4d3bf028aa1e583c074f93.tar.bz2
USB: ehci refcounts work on ppc7448
Remove atomic operations on the reference counter for EHCI queue heads. On various platforms (including ppc7448), atomic operations are unusable with dma-coherent memory. Signed-off-by: Steven J. Hill <sjhill1@rockwellcollins.com> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/host/ehci.h')
-rw-r--r--drivers/usb/host/ehci.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h
index 79ad2af5ef6a..6ef9d775775b 100644
--- a/drivers/usb/host/ehci.h
+++ b/drivers/usb/host/ehci.h
@@ -457,7 +457,14 @@ struct ehci_qh {
struct ehci_qh *reclaim; /* next to reclaim */
struct ehci_hcd *ehci;
- struct kref kref;
+
+ /*
+ * Do NOT use atomic operations for QH refcounting. On some CPUs
+ * (PPC7448 for example), atomic operations cannot be performed on
+ * memory that is cache-inhibited (i.e. being used for DMA).
+ * Spinlocks are used to protect all QH fields.
+ */
+ u32 refcount;
unsigned stamp;
u8 qh_state;