Commit f2d0ed71 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

Merge tag 'fixes-for-v3.5-rc1' of...

Merge tag 'fixes-for-v3.5-rc1' of git://git.kernel.org/pub/scm/linux/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.
parents f8f5701b 08f75bf1
...@@ -599,12 +599,6 @@ usba_ep_enable(struct usb_ep *_ep, const struct usb_endpoint_descriptor *desc) ...@@ -599,12 +599,6 @@ usba_ep_enable(struct usb_ep *_ep, const struct usb_endpoint_descriptor *desc)
spin_lock_irqsave(&ep->udc->lock, flags); 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.desc = desc;
ep->ep.maxpacket = maxpacket; ep->ep.maxpacket = maxpacket;
......
...@@ -1596,7 +1596,7 @@ static int qe_ep_enable(struct usb_ep *_ep, ...@@ -1596,7 +1596,7 @@ static int qe_ep_enable(struct usb_ep *_ep,
ep = container_of(_ep, struct qe_ep, ep); ep = container_of(_ep, struct qe_ep, ep);
/* catch various bogus parameters */ /* 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)) (desc->bDescriptorType != USB_DT_ENDPOINT))
return -EINVAL; return -EINVAL;
......
...@@ -567,7 +567,7 @@ static int fsl_ep_enable(struct usb_ep *_ep, ...@@ -567,7 +567,7 @@ static int fsl_ep_enable(struct usb_ep *_ep,
ep = container_of(_ep, struct fsl_ep, ep); ep = container_of(_ep, struct fsl_ep, ep);
/* catch various bogus parameters */ /* catch various bogus parameters */
if (!_ep || !desc || ep->ep.desc if (!_ep || !desc
|| (desc->bDescriptorType != USB_DT_ENDPOINT)) || (desc->bDescriptorType != USB_DT_ENDPOINT))
return -EINVAL; return -EINVAL;
...@@ -2575,7 +2575,7 @@ static int __init fsl_udc_probe(struct platform_device *pdev) ...@@ -2575,7 +2575,7 @@ static int __init fsl_udc_probe(struct platform_device *pdev)
/* for ep0: the desc defined here; /* for ep0: the desc defined here;
* for other eps, gadget layer called ep_enable with defined desc * 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; udc_controller->eps[0].ep.maxpacket = USB_MAX_CTRL_PAYLOAD;
/* setup the udc->eps[] for non-control endpoints and link /* setup the udc->eps[] for non-control endpoints and link
......
...@@ -568,10 +568,10 @@ static void dump_msg(const char *label, const u8 * buf, unsigned int length) ...@@ -568,10 +568,10 @@ static void dump_msg(const char *label, const u8 * buf, unsigned int length)
/* /*
* ### internal used help routines. * ### 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_maxpacket(EP) ((EP)->ep.maxpacket)
#define ep_is_in(EP) ( (ep_index(EP) == 0) ? (EP->udc->ep0_dir == \ #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) & USB_DIR_IN)==USB_DIR_IN)
#define get_ep_by_pipe(udc, pipe) ((pipe == 1)? &udc->eps[0]: \ #define get_ep_by_pipe(udc, pipe) ((pipe == 1)? &udc->eps[0]: \
&udc->eps[pipe]) &udc->eps[pipe])
......
...@@ -102,7 +102,7 @@ goku_ep_enable(struct usb_ep *_ep, const struct usb_endpoint_descriptor *desc) ...@@ -102,7 +102,7 @@ goku_ep_enable(struct usb_ep *_ep, const struct usb_endpoint_descriptor *desc)
unsigned long flags; unsigned long flags;
ep = container_of(_ep, struct goku_ep, ep); ep = container_of(_ep, struct goku_ep, ep);
if (!_ep || !desc || ep->ep.desc if (!_ep || !desc
|| desc->bDescriptorType != USB_DT_ENDPOINT) || desc->bDescriptorType != USB_DT_ENDPOINT)
return -EINVAL; return -EINVAL;
dev = ep->dev; dev = ep->dev;
......
...@@ -464,7 +464,7 @@ static int mv_ep_enable(struct usb_ep *_ep, ...@@ -464,7 +464,7 @@ static int mv_ep_enable(struct usb_ep *_ep,
ep = container_of(_ep, struct mv_ep, ep); ep = container_of(_ep, struct mv_ep, ep);
udc = ep->udc; udc = ep->udc;
if (!_ep || !desc || ep->ep.desc if (!_ep || !desc
|| desc->bDescriptorType != USB_DT_ENDPOINT) || desc->bDescriptorType != USB_DT_ENDPOINT)
return -EINVAL; return -EINVAL;
......
...@@ -153,7 +153,7 @@ static int omap_ep_enable(struct usb_ep *_ep, ...@@ -153,7 +153,7 @@ static int omap_ep_enable(struct usb_ep *_ep,
u16 maxp; u16 maxp;
/* catch various bogus parameters */ /* catch various bogus parameters */
if (!_ep || !desc || ep->ep.desc if (!_ep || !desc
|| desc->bDescriptorType != USB_DT_ENDPOINT || desc->bDescriptorType != USB_DT_ENDPOINT
|| ep->bEndpointAddress != desc->bEndpointAddress || ep->bEndpointAddress != desc->bEndpointAddress
|| ep->maxpacket < usb_endpoint_maxp(desc)) { || ep->maxpacket < usb_endpoint_maxp(desc)) {
......
...@@ -218,7 +218,7 @@ static int pxa25x_ep_enable (struct usb_ep *_ep, ...@@ -218,7 +218,7 @@ static int pxa25x_ep_enable (struct usb_ep *_ep,
struct pxa25x_udc *dev; struct pxa25x_udc *dev;
ep = container_of (_ep, struct pxa25x_ep, ep); 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 || desc->bDescriptorType != USB_DT_ENDPOINT
|| ep->bEndpointAddress != desc->bEndpointAddress || ep->bEndpointAddress != desc->bEndpointAddress
|| ep->fifo_size < usb_endpoint_maxp (desc)) { || ep->fifo_size < usb_endpoint_maxp (desc)) {
......
...@@ -760,7 +760,7 @@ static int s3c_hsudc_ep_enable(struct usb_ep *_ep, ...@@ -760,7 +760,7 @@ static int s3c_hsudc_ep_enable(struct usb_ep *_ep,
u32 ecr = 0; u32 ecr = 0;
hsep = our_ep(_ep); hsep = our_ep(_ep);
if (!_ep || !desc || hsep->ep.desc || _ep->name == ep0name if (!_ep || !desc || _ep->name == ep0name
|| desc->bDescriptorType != USB_DT_ENDPOINT || desc->bDescriptorType != USB_DT_ENDPOINT
|| hsep->bEndpointAddress != desc->bEndpointAddress || hsep->bEndpointAddress != desc->bEndpointAddress
|| ep_maxpacket(hsep) < usb_endpoint_maxp(desc)) || ep_maxpacket(hsep) < usb_endpoint_maxp(desc))
......
...@@ -1062,7 +1062,7 @@ static int s3c2410_udc_ep_enable(struct usb_ep *_ep, ...@@ -1062,7 +1062,7 @@ static int s3c2410_udc_ep_enable(struct usb_ep *_ep,
ep = to_s3c2410_ep(_ep); ep = to_s3c2410_ep(_ep);
if (!_ep || !desc || ep->ep.desc if (!_ep || !desc
|| _ep->name == ep0name || _ep->name == ep0name
|| desc->bDescriptorType != USB_DT_ENDPOINT) || desc->bDescriptorType != USB_DT_ENDPOINT)
return -EINVAL; return -EINVAL;
......
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
#include <linux/dma-mapping.h> #include <linux/dma-mapping.h>
#include <mach/cputype.h> #include <mach/cputype.h>
#include <mach/hardware.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
*/ */
/* Integrated highspeed/otg PHY */ /* 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_DATAPOL BIT(11) /* (dm355) switch D+/D- */
#define USBPHY_PHYCLKGD BIT(8) #define USBPHY_PHYCLKGD BIT(8)
#define USBPHY_SESNDEN BIT(7) /* v(sess_end) comparator */ #define USBPHY_SESNDEN BIT(7) /* v(sess_end) comparator */
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#define USBPHY_OTGPDWN BIT(1) #define USBPHY_OTGPDWN BIT(1)
#define USBPHY_PHYPDWN BIT(0) #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_FORCE BIT(2)
#define DRVVBUS_OVERRIDE BIT(1) #define DRVVBUS_OVERRIDE BIT(1)
......
...@@ -1232,6 +1232,7 @@ static int musb_gadget_disable(struct usb_ep *ep) ...@@ -1232,6 +1232,7 @@ static int musb_gadget_disable(struct usb_ep *ep)
} }
musb_ep->desc = NULL; musb_ep->desc = NULL;
musb_ep->end_point.desc = NULL;
/* abort all pending DMA and requests */ /* abort all pending DMA and requests */
nuke(musb_ep, -ESHUTDOWN); nuke(musb_ep, -ESHUTDOWN);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment