Date: | 2011-06-07 00:34:14 (12 years 9 months ago) |
---|---|
Author: | Maarten ter Huurne |
Commit: | 997934523b9da03a20ede8fd49c736522ded20be |
Message: | MIPS: JZ4740: USB: Fix packet read/write functions. The read_packet() and write_packet() functions were recently converted to use memcpy_fromio() and memcpy_toio(). However, the FIFO register is only a single address while memcpy increases the address. Fixed by using readsl() and writesl() instead. |
Files: |
drivers/usb/gadget/jz4740_udc.c (2 diffs) |
Change Details
drivers/usb/gadget/jz4740_udc.c | ||
---|---|---|
257 | 257 | |
258 | 258 | DEBUG("Write %d (count %d), fifo %x\n", length, count, ep->fifo); |
259 | 259 | |
260 | memcpy_toio(fifo, buf, length); | |
260 | writesl(fifo, buf, length >> 2); | |
261 | writesb(fifo, &buf[length - (length & 3)], length & 3); | |
261 | 262 | |
262 | 263 | return length; |
263 | 264 | } |
... | ... | |
277 | 278 | length = count; |
278 | 279 | req->req.actual += length; |
279 | 280 | |
280 | memcpy_fromio(buf, fifo, length); | |
281 | DEBUG("Read %d, fifo %x\n", length, ep->fifo); | |
282 | ||
283 | readsl(fifo, buf, length >> 2); | |
284 | readsb(fifo, &buf[length - (length & 3)], length & 3); | |
281 | 285 | |
282 | 286 | return length; |
283 | 287 | } |
Branches:
ben-wpan
ben-wpan-stefan
5396a9238205f20f811ea57898980d3ca82df0b6
jz-2.6.34
jz-2.6.34-rc5
jz-2.6.34-rc6
jz-2.6.34-rc7
jz-2.6.35
jz-2.6.36
jz-2.6.37
jz-2.6.38
jz-2.6.39
jz-3.0
jz-3.1
jz-3.11
jz-3.12
jz-3.13
jz-3.15
jz-3.16
jz-3.18-dt
jz-3.2
jz-3.3
jz-3.4
jz-3.5
jz-3.6
jz-3.6-rc2-pwm
jz-3.9
jz-3.9-clk
jz-3.9-rc8
jz47xx
jz47xx-2.6.38
master
Tags:
od-2011-09-04
od-2011-09-18
v2.6.34-rc5
v2.6.34-rc6
v2.6.34-rc7
v3.9