Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 67907
b: refs/heads/master
c: e3a0905
h: refs/heads/master
i:
  67905: 5759b79
  67903: 077b110
v: v3
  • Loading branch information
Yoshihiro Shimoda authored and Greg Kroah-Hartman committed Oct 12, 2007
1 parent e1fa668 commit 59ea39a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 93b6497da99978742ffa9d9db6177397436278f5
refs/heads/master: e3a09051a16fcdb190ad0b7dc6064904c8118409
11 changes: 10 additions & 1 deletion trunk/drivers/usb/host/r8a66597-hcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1034,14 +1034,23 @@ static void prepare_status_packet(struct r8a66597 *r8a66597,
pipe_start(r8a66597, td->pipe);
}

static int is_set_address(unsigned char *setup_packet)
{
if (((setup_packet[0] & USB_TYPE_MASK) == USB_TYPE_STANDARD) &&
setup_packet[1] == USB_REQ_SET_ADDRESS)
return 1;
else
return 0;
}

/* this function must be called with interrupt disabled */
static int start_transfer(struct r8a66597 *r8a66597, struct r8a66597_td *td)
{
BUG_ON(!td);

switch (td->type) {
case USB_PID_SETUP:
if (td->urb->setup_packet[1] == USB_REQ_SET_ADDRESS) {
if (is_set_address(td->urb->setup_packet)) {
td->set_address = 1;
td->urb->setup_packet[2] = alloc_usb_address(r8a66597,
td->urb);
Expand Down

0 comments on commit 59ea39a

Please sign in to comment.