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:
0cf7a63
)
USB: output an error message when the pipe type doesn't match the endpoint type
author
Simon Arlott
<
[email protected]
>
Mon, 30 Aug 2010 21:50:20 +0000
(22:50 +0100)
committer
Greg Kroah-Hartman
<
[email protected]
>
Fri, 22 Oct 2010 17:21:27 +0000
(10:21 -0700)
Commit
f661c6f8c67bd55e93348f160d590ff9edf08904
adds a check of the pipe type if
CONFIG_USB_DEBUG is enabled, but it doesn't output anything if this scenario
occurs.
Signed-off-by: Simon Arlott <
[email protected]
>
Cc: Alan Stern <
[email protected]
>
Signed-off-by: Greg Kroah-Hartman <
[email protected]
>
drivers/usb/core/urb.c
patch
|
blob
|
history
diff --git
a/drivers/usb/core/urb.c
b/drivers/usb/core/urb.c
index 419e6b34e2fe71c9f79ed79a8e76ef64ffb5c882..c14fc082864f1c26ac71fb94538d7eeca9459f75 100644
(file)
--- a/
drivers/usb/core/urb.c
+++ b/
drivers/usb/core/urb.c
@@
-401,8
+401,11
@@
int usb_submit_urb(struct urb *urb, gfp_t mem_flags)
};
/* Check that the pipe's type matches the endpoint's type */
- if (usb_pipetype(urb->pipe) != pipetypes[xfertype])
+ if (usb_pipetype(urb->pipe) != pipetypes[xfertype]) {
+ dev_err(&dev->dev, "BOGUS urb xfer, pipe %x != type %x\n",
+ usb_pipetype(urb->pipe), pipetypes[xfertype]);
return -EPIPE; /* The most suitable error code :-) */
+ }
/* enforce simple/standard policy */
allowed = (URB_NO_TRANSFER_DMA_MAP | URB_NO_INTERRUPT | URB_DIR_MASK |