Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 303869
b: refs/heads/master
c: 1155a7b
h: refs/heads/master
i:
  303867: 3afe915
v: v3
  • Loading branch information
Alexander Shishkin authored and Greg Kroah-Hartman committed May 9, 2012
1 parent 159d47b commit 24e5d8d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 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: df767b71e5816692134d59c0c17e0f77cd73333d
refs/heads/master: 1155a7b8315bc60e43ee67e2e0e32e536f3a2a93
8 changes: 4 additions & 4 deletions trunk/drivers/usb/gadget/ci13xxx_udc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1760,14 +1760,14 @@ __acquires(mEp->lock)

if ((setup->bRequestType & USB_RECIP_MASK) == USB_RECIP_DEVICE) {
/* Assume that device is bus powered for now. */
*((u16 *)req->buf) = _udc->remote_wakeup << 1;
*(u16 *)req->buf = _udc->remote_wakeup << 1;
retval = 0;
} else if ((setup->bRequestType & USB_RECIP_MASK) \
== USB_RECIP_ENDPOINT) {
dir = (le16_to_cpu(setup->wIndex) & USB_ENDPOINT_DIR_MASK) ?
TX : RX;
num = le16_to_cpu(setup->wIndex) & USB_ENDPOINT_NUMBER_MASK;
*((u16 *)req->buf) = hw_ep_get_halt(num, dir);
*(u16 *)req->buf = hw_ep_get_halt(num, dir);
}
/* else do nothing; reserved for future use */

Expand Down Expand Up @@ -2284,8 +2284,8 @@ static int ep_queue(struct usb_ep *ep, struct usb_request *req,
goto done;
}

if (req->length > (4 * CI13XXX_PAGE_SIZE)) {
req->length = (4 * CI13XXX_PAGE_SIZE);
if (req->length > 4 * CI13XXX_PAGE_SIZE) {
req->length = 4 * CI13XXX_PAGE_SIZE;
retval = -EMSGSIZE;
warn("request length truncated");
}
Expand Down
8 changes: 4 additions & 4 deletions trunk/drivers/usb/gadget/ci13xxx_udc.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
* DEFINE
*****************************************************************************/
#define CI13XXX_PAGE_SIZE 4096ul /* page size for TD's */
#define ENDPT_MAX (32)
#define CTRL_PAYLOAD_MAX (64)
#define RX (0) /* similar to USB_DIR_OUT but can be used as an index */
#define TX (1) /* similar to USB_DIR_IN but can be used as an index */
#define ENDPT_MAX 32
#define CTRL_PAYLOAD_MAX 64
#define RX 0 /* similar to USB_DIR_OUT but can be used as an index */
#define TX 1 /* similar to USB_DIR_IN but can be used as an index */

/******************************************************************************
* STRUCTURES
Expand Down

0 comments on commit 24e5d8d

Please sign in to comment.