Skip to content

Commit

Permalink
Merge tag 'fixes-for-v3.5-rc1' of git://git.kernel.org/pub/scm/linux/…
Browse files Browse the repository at this point in the history
…kernel/git/balbi/usb into usb-linus

usb: fixes for v3.5-rc1

Here you have the first set of fixes for our v3.5-rc cycle.

It contains a set regression fixes caused by Ido's
usb_endpoint_descriptor usage rework and a build
fix to the musb driver caused by recent changes to
the DaVinci tree.

Nothing really major, the fixes are quite obvious.
  • Loading branch information
Greg Kroah-Hartman committed Jun 5, 2012
2 parents f8f5701 + 08f75bf commit f2d0ed7
Show file tree
Hide file tree
Showing 13 changed files with 15 additions and 19 deletions.
6 changes: 0 additions & 6 deletions drivers/usb/gadget/atmel_usba_udc.c
Original file line number Diff line number Diff line change
Expand Up @@ -599,12 +599,6 @@ usba_ep_enable(struct usb_ep *_ep, const struct usb_endpoint_descriptor *desc)

spin_lock_irqsave(&ep->udc->lock, flags);

if (ep->ep.desc) {
spin_unlock_irqrestore(&ep->udc->lock, flags);
DBG(DBG_ERR, "ep%d already enabled\n", ep->index);
return -EBUSY;
}

ep->ep.desc = desc;
ep->ep.maxpacket = maxpacket;

Expand Down
2 changes: 1 addition & 1 deletion drivers/usb/gadget/fsl_qe_udc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1596,7 +1596,7 @@ static int qe_ep_enable(struct usb_ep *_ep,
ep = container_of(_ep, struct qe_ep, ep);

/* catch various bogus parameters */
if (!_ep || !desc || ep->ep.desc || _ep->name == ep_name[0] ||
if (!_ep || !desc || _ep->name == ep_name[0] ||
(desc->bDescriptorType != USB_DT_ENDPOINT))
return -EINVAL;

Expand Down
4 changes: 2 additions & 2 deletions drivers/usb/gadget/fsl_udc_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,7 @@ static int fsl_ep_enable(struct usb_ep *_ep,
ep = container_of(_ep, struct fsl_ep, ep);

/* catch various bogus parameters */
if (!_ep || !desc || ep->ep.desc
if (!_ep || !desc
|| (desc->bDescriptorType != USB_DT_ENDPOINT))
return -EINVAL;

Expand Down Expand Up @@ -2575,7 +2575,7 @@ static int __init fsl_udc_probe(struct platform_device *pdev)
/* for ep0: the desc defined here;
* for other eps, gadget layer called ep_enable with defined desc
*/
udc_controller->eps[0].desc = &fsl_ep0_desc;
udc_controller->eps[0].ep.desc = &fsl_ep0_desc;
udc_controller->eps[0].ep.maxpacket = USB_MAX_CTRL_PAYLOAD;

/* setup the udc->eps[] for non-control endpoints and link
Expand Down
4 changes: 2 additions & 2 deletions drivers/usb/gadget/fsl_usb2_udc.h
Original file line number Diff line number Diff line change
Expand Up @@ -568,10 +568,10 @@ static void dump_msg(const char *label, const u8 * buf, unsigned int length)
/*
* ### internal used help routines.
*/
#define ep_index(EP) ((EP)->desc->bEndpointAddress&0xF)
#define ep_index(EP) ((EP)->ep.desc->bEndpointAddress&0xF)
#define ep_maxpacket(EP) ((EP)->ep.maxpacket)
#define ep_is_in(EP) ( (ep_index(EP) == 0) ? (EP->udc->ep0_dir == \
USB_DIR_IN ):((EP)->desc->bEndpointAddress \
USB_DIR_IN) : ((EP)->ep.desc->bEndpointAddress \
& USB_DIR_IN)==USB_DIR_IN)
#define get_ep_by_pipe(udc, pipe) ((pipe == 1)? &udc->eps[0]: \
&udc->eps[pipe])
Expand Down
2 changes: 1 addition & 1 deletion drivers/usb/gadget/goku_udc.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ goku_ep_enable(struct usb_ep *_ep, const struct usb_endpoint_descriptor *desc)
unsigned long flags;

ep = container_of(_ep, struct goku_ep, ep);
if (!_ep || !desc || ep->ep.desc
if (!_ep || !desc
|| desc->bDescriptorType != USB_DT_ENDPOINT)
return -EINVAL;
dev = ep->dev;
Expand Down
2 changes: 1 addition & 1 deletion drivers/usb/gadget/mv_udc_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ static int mv_ep_enable(struct usb_ep *_ep,
ep = container_of(_ep, struct mv_ep, ep);
udc = ep->udc;

if (!_ep || !desc || ep->ep.desc
if (!_ep || !desc
|| desc->bDescriptorType != USB_DT_ENDPOINT)
return -EINVAL;

Expand Down
2 changes: 1 addition & 1 deletion drivers/usb/gadget/omap_udc.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ static int omap_ep_enable(struct usb_ep *_ep,
u16 maxp;

/* catch various bogus parameters */
if (!_ep || !desc || ep->ep.desc
if (!_ep || !desc
|| desc->bDescriptorType != USB_DT_ENDPOINT
|| ep->bEndpointAddress != desc->bEndpointAddress
|| ep->maxpacket < usb_endpoint_maxp(desc)) {
Expand Down
2 changes: 1 addition & 1 deletion drivers/usb/gadget/pxa25x_udc.c
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ static int pxa25x_ep_enable (struct usb_ep *_ep,
struct pxa25x_udc *dev;

ep = container_of (_ep, struct pxa25x_ep, ep);
if (!_ep || !desc || ep->ep.desc || _ep->name == ep0name
if (!_ep || !desc || _ep->name == ep0name
|| desc->bDescriptorType != USB_DT_ENDPOINT
|| ep->bEndpointAddress != desc->bEndpointAddress
|| ep->fifo_size < usb_endpoint_maxp (desc)) {
Expand Down
2 changes: 1 addition & 1 deletion drivers/usb/gadget/s3c-hsudc.c
Original file line number Diff line number Diff line change
Expand Up @@ -760,7 +760,7 @@ static int s3c_hsudc_ep_enable(struct usb_ep *_ep,
u32 ecr = 0;

hsep = our_ep(_ep);
if (!_ep || !desc || hsep->ep.desc || _ep->name == ep0name
if (!_ep || !desc || _ep->name == ep0name
|| desc->bDescriptorType != USB_DT_ENDPOINT
|| hsep->bEndpointAddress != desc->bEndpointAddress
|| ep_maxpacket(hsep) < usb_endpoint_maxp(desc))
Expand Down
2 changes: 1 addition & 1 deletion drivers/usb/gadget/s3c2410_udc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1062,7 +1062,7 @@ static int s3c2410_udc_ep_enable(struct usb_ep *_ep,

ep = to_s3c2410_ep(_ep);

if (!_ep || !desc || ep->ep.desc
if (!_ep || !desc
|| _ep->name == ep0name
|| desc->bDescriptorType != USB_DT_ENDPOINT)
return -EINVAL;
Expand Down
1 change: 1 addition & 0 deletions drivers/usb/musb/davinci.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#include <linux/dma-mapping.h>

#include <mach/cputype.h>
#include <mach/hardware.h>

#include <asm/mach-types.h>

Expand Down
4 changes: 2 additions & 2 deletions drivers/usb/musb/davinci.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

/* Integrated highspeed/otg PHY */
#define USBPHY_CTL_PADDR (DAVINCI_SYSTEM_MODULE_BASE + 0x34)
#define USBPHY_CTL_PADDR 0x01c40034
#define USBPHY_DATAPOL BIT(11) /* (dm355) switch D+/D- */
#define USBPHY_PHYCLKGD BIT(8)
#define USBPHY_SESNDEN BIT(7) /* v(sess_end) comparator */
Expand All @@ -27,7 +27,7 @@
#define USBPHY_OTGPDWN BIT(1)
#define USBPHY_PHYPDWN BIT(0)

#define DM355_DEEPSLEEP_PADDR (DAVINCI_SYSTEM_MODULE_BASE + 0x48)
#define DM355_DEEPSLEEP_PADDR 0x01c40048
#define DRVVBUS_FORCE BIT(2)
#define DRVVBUS_OVERRIDE BIT(1)

Expand Down
1 change: 1 addition & 0 deletions drivers/usb/musb/musb_gadget.c
Original file line number Diff line number Diff line change
Expand Up @@ -1232,6 +1232,7 @@ static int musb_gadget_disable(struct usb_ep *ep)
}

musb_ep->desc = NULL;
musb_ep->end_point.desc = NULL;

/* abort all pending DMA and requests */
nuke(musb_ep, -ESHUTDOWN);
Expand Down

0 comments on commit f2d0ed7

Please sign in to comment.