diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-10-25 06:23:15 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-10-25 06:23:15 -0400 |
commit | 1be025d3cb40cd295123af2c394f7229ef9b30ca (patch) | |
tree | 5dc14e1ea412cc7fdc3e563ad23187059fe8bfb5 /drivers/usb/gadget/atmel_usba_udc.c | |
parent | 2d03423b2319cc854adeb28a03f65de5b5e0ab63 (diff) | |
parent | a2c76b83fdd763c826f38a55127ccf25708099ce (diff) |
Merge branch 'usb-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
* 'usb-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (260 commits)
usb: renesas_usbhs: fixup inconsistent return from usbhs_pkt_push()
usb/isp1760: Allow to optionally trigger low-level chip reset via GPIOLIB.
USB: gadget: midi: memory leak in f_midi_bind_config()
USB: gadget: midi: fix range check in f_midi_out_open()
QE/FHCI: fixed the CONTROL bug
usb: renesas_usbhs: tidyup for smatch warnings
USB: Fix USB Kconfig dependency problem on 85xx/QoirQ platforms
EHCI: workaround for MosChip controller bug
usb: gadget: file_storage: fix race on unloading
USB: ftdi_sio.c: Use ftdi async_icount structure for TIOCMIWAIT, as in other drivers
USB: ftdi_sio.c:Fill MSR fields of the ftdi async_icount structure
USB: ftdi_sio.c: Fill LSR fields of the ftdi async_icount structure
USB: ftdi_sio.c:Fill TX field of the ftdi async_icount structure
USB: ftdi_sio.c: Fill the RX field of the ftdi async_icount structure
USB: ftdi_sio.c: Basic icount infrastructure for ftdi_sio
usb/isp1760: Let OF bindings depend on general CONFIG_OF instead of PPC_OF .
USB: ftdi_sio: Support TI/Luminary Micro Stellaris BD-ICDI Board
USB: Fix runtime wakeup on OHCI
xHCI/USB: Make xHCI driver have a BOS descriptor.
usb: gadget: add new usb gadget for ACM and mass storage
...
Diffstat (limited to 'drivers/usb/gadget/atmel_usba_udc.c')
-rw-r--r-- | drivers/usb/gadget/atmel_usba_udc.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/usb/gadget/atmel_usba_udc.c b/drivers/usb/gadget/atmel_usba_udc.c index 5b1665eb1bef..271a9d873608 100644 --- a/drivers/usb/gadget/atmel_usba_udc.c +++ b/drivers/usb/gadget/atmel_usba_udc.c | |||
@@ -527,7 +527,7 @@ usba_ep_enable(struct usb_ep *_ep, const struct usb_endpoint_descriptor *desc) | |||
527 | 527 | ||
528 | DBG(DBG_GADGET, "%s: ep_enable: desc=%p\n", ep->ep.name, desc); | 528 | DBG(DBG_GADGET, "%s: ep_enable: desc=%p\n", ep->ep.name, desc); |
529 | 529 | ||
530 | maxpacket = le16_to_cpu(desc->wMaxPacketSize) & 0x7ff; | 530 | maxpacket = usb_endpoint_maxp(desc) & 0x7ff; |
531 | 531 | ||
532 | if (((desc->bEndpointAddress & USB_ENDPOINT_NUMBER_MASK) != ep->index) | 532 | if (((desc->bEndpointAddress & USB_ENDPOINT_NUMBER_MASK) != ep->index) |
533 | || ep->index == 0 | 533 | || ep->index == 0 |
@@ -571,7 +571,7 @@ usba_ep_enable(struct usb_ep *_ep, const struct usb_endpoint_descriptor *desc) | |||
571 | * Bits 11:12 specify number of _additional_ | 571 | * Bits 11:12 specify number of _additional_ |
572 | * transactions per microframe. | 572 | * transactions per microframe. |
573 | */ | 573 | */ |
574 | nr_trans = ((le16_to_cpu(desc->wMaxPacketSize) >> 11) & 3) + 1; | 574 | nr_trans = ((usb_endpoint_maxp(desc) >> 11) & 3) + 1; |
575 | if (nr_trans > 3) | 575 | if (nr_trans > 3) |
576 | return -EINVAL; | 576 | return -EINVAL; |
577 | 577 | ||
@@ -1718,13 +1718,12 @@ static irqreturn_t usba_udc_irq(int irq, void *devid) | |||
1718 | spin_lock(&udc->lock); | 1718 | spin_lock(&udc->lock); |
1719 | } | 1719 | } |
1720 | 1720 | ||
1721 | if (status & USBA_HIGH_SPEED) { | 1721 | if (status & USBA_HIGH_SPEED) |
1722 | DBG(DBG_BUS, "High-speed bus reset detected\n"); | ||
1723 | udc->gadget.speed = USB_SPEED_HIGH; | 1722 | udc->gadget.speed = USB_SPEED_HIGH; |
1724 | } else { | 1723 | else |
1725 | DBG(DBG_BUS, "Full-speed bus reset detected\n"); | ||
1726 | udc->gadget.speed = USB_SPEED_FULL; | 1724 | udc->gadget.speed = USB_SPEED_FULL; |
1727 | } | 1725 | DBG(DBG_BUS, "%s bus reset detected\n", |
1726 | usb_speed_string(udc->gadget.speed)); | ||
1728 | 1727 | ||
1729 | ep0 = &usba_ep[0]; | 1728 | ep0 = &usba_ep[0]; |
1730 | ep0->desc = &usba_ep0_desc; | 1729 | ep0->desc = &usba_ep0_desc; |