]> git.hungrycats.org Git - linux/commitdiff
[PATCH] ohci bugfix for big-endian 64bit boxen
authorAlexander Viro <viro@www.linux.org.uk>
Wed, 6 Oct 2004 00:56:15 +0000 (17:56 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Wed, 6 Oct 2004 00:56:15 +0000 (17:56 -0700)
->dma can be a 64bit variable on 64bit boxen; its value will fit into 32 bits
just fine (due to dma mask).  However, cpu_to_le32p(&...) will break if we
are on a 64bit big-endian; we'll end up up passing it the address of upper
32 bits and get 0 instead of correct value.  Fix is trivial...

Signed-off-by: Al Viro <viro@parcelfarce.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/usb/host/ohci-q.c

index 8d2e40005f005c390aad5c7b96fa4ccf88a78dc3..fc6869a77d7ccdeb3d21c6fb2a39afd70d2c6e57 100644 (file)
@@ -156,7 +156,7 @@ static void periodic_link (struct ohci_hcd *ohci, struct ed *ed)
                                ed->hwNextED = *prev_p;
                        wmb ();
                        *prev = ed;
-                       *prev_p = cpu_to_le32p (&ed->dma);
+                       *prev_p = cpu_to_le32(ed->dma);
                        wmb();
                }
                ohci->load [i] += ed->load;