aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/r8a66597-hcd.c
diff options
context:
space:
mode:
authorYoshihiro Shimoda <shimoda.yoshihiro@renesas.com>2007-10-03 05:53:13 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2007-10-12 17:55:29 -0400
commite3a09051a16fcdb190ad0b7dc6064904c8118409 (patch)
treebf30caa5f4c3c50a9624882119a84a0a1759fa06 /drivers/usb/host/r8a66597-hcd.c
parent93b6497da99978742ffa9d9db6177397436278f5 (diff)
USB: r8a66597-hcd: fix Class or Vendor Request
Fixed the problem that does not work in the case of bRequest = 0x05 in Class or Vendor Request. Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/host/r8a66597-hcd.c')
-rw-r--r--drivers/usb/host/r8a66597-hcd.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/usb/host/r8a66597-hcd.c b/drivers/usb/host/r8a66597-hcd.c
index fd00f1e33fb5..0a699efe6c9c 100644
--- a/drivers/usb/host/r8a66597-hcd.c
+++ b/drivers/usb/host/r8a66597-hcd.c
@@ -1034,6 +1034,15 @@ static void prepare_status_packet(struct r8a66597 *r8a66597,
1034 pipe_start(r8a66597, td->pipe); 1034 pipe_start(r8a66597, td->pipe);
1035} 1035}
1036 1036
1037static int is_set_address(unsigned char *setup_packet)
1038{
1039 if (((setup_packet[0] & USB_TYPE_MASK) == USB_TYPE_STANDARD) &&
1040 setup_packet[1] == USB_REQ_SET_ADDRESS)
1041 return 1;
1042 else
1043 return 0;
1044}
1045
1037/* this function must be called with interrupt disabled */ 1046/* this function must be called with interrupt disabled */
1038static int start_transfer(struct r8a66597 *r8a66597, struct r8a66597_td *td) 1047static int start_transfer(struct r8a66597 *r8a66597, struct r8a66597_td *td)
1039{ 1048{
@@ -1041,7 +1050,7 @@ static int start_transfer(struct r8a66597 *r8a66597, struct r8a66597_td *td)
1041 1050
1042 switch (td->type) { 1051 switch (td->type) {
1043 case USB_PID_SETUP: 1052 case USB_PID_SETUP:
1044 if (td->urb->setup_packet[1] == USB_REQ_SET_ADDRESS) { 1053 if (is_set_address(td->urb->setup_packet)) {
1045 td->set_address = 1; 1054 td->set_address = 1;
1046 td->urb->setup_packet[2] = alloc_usb_address(r8a66597, 1055 td->urb->setup_packet[2] = alloc_usb_address(r8a66597,
1047 td->urb); 1056 td->urb);