projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
34f32c9
)
USB: musb: be careful with 64K+ transfer lengths (gadget side)
author
Felipe Balbi
<
[email protected]
>
Sat, 21 Feb 2009 23:29:42 +0000
(15:29 -0800)
committer
Greg Kroah-Hartman
<
[email protected]
>
Fri, 27 Feb 2009 22:40:51 +0000
(14:40 -0800)
request->actual is an unsigned and we should use the same
variable type for fifo_count otherwise we might lose some
data if request->length >= 64kbytes.
[
[email protected]
: fix compiler warning ]
Signed-off-by: Felipe Balbi <
[email protected]
>
Signed-off-by: David Brownell <
[email protected]
>
Signed-off-by: Greg Kroah-Hartman <
[email protected]
>
drivers/usb/musb/musb_gadget.c
patch
|
blob
|
history
diff --git
a/drivers/usb/musb/musb_gadget.c
b/drivers/usb/musb/musb_gadget.c
index 4ea305387981655db2aca1858fe4c5fe6b9011a2..c7ebd0867fcca9281ecf25abc130c91389444240 100644
(file)
--- a/
drivers/usb/musb/musb_gadget.c
+++ b/
drivers/usb/musb/musb_gadget.c
@@
-575,7
+575,7
@@
static void rxstate(struct musb *musb, struct musb_request *req)
struct usb_request *request = &req->request;
struct musb_ep *musb_ep = &musb->endpoints[epnum].ep_out;
void __iomem *epio = musb->endpoints[epnum].regs;
- u
16
fifo_count = 0;
+ u
nsigned
fifo_count = 0;
u16 len = musb_ep->packet_sz;
csr = musb_readw(epio, MUSB_RXCSR);
@@
-687,7
+687,7
@@
static void rxstate(struct musb *musb, struct musb_request *req)
len, fifo_count,
musb_ep->packet_sz);
- fifo_count = min
(
len, fifo_count);
+ fifo_count = min
_t(unsigned,
len, fifo_count);
#ifdef CONFIG_USB_TUSB_OMAP_DMA
if (tusb_dma_omap() && musb_ep->dma) {