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. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iQIcBAABAgAGBQJPzezNAAoJEIaOsuA1yqREzHIP/AyecuqXZA/C5e4oTcxKx5M4 Lf3r2pn0y8hKZAD903IEQNRVbPUOgTd9JpcAxXV3lNE5Lwf8HaveHZMpvil/05MN Bwow/Zr/nFVaV6QVIdzDC3WaBTf1vQuRt2/xayEL0nxGLNutwR3+Tg68Gd2uLUYF HpHGdB/Eq6QcWGvXqgcHUOZmQEiJEyx/KkPDqYqk1aPOTp8qqCkJcBbI1UCbaVzd BtIaYMuYWUWUbjDQd2WoeEuXxZNf5YQVUHJT89PE0oONv7Gvtu++RGYtNO5sqyIZ kAkQJHVf5d2CcbUb2AIq+JozIxl/fY+wiovb+4qujy1/hWQvMRRfZIwKpG2zh5f9 rVFliUP4QnGLgKV/ZoAiZKDLYjJphIKlj68jc0712Tx+Lp1grRwwdHPlAkM2C51v KeH29sivehThmLHykMcXSp79wcKECFxlTfSa4nxXSbQeKbj1q9bqi5XnXDPoKZgd AXU6hj2FBRz7Ce5JbSXKn9jwcb/9zydXAQt6bqYzontKlKfSykOHKONZF+TBwPat r8VubM+YHAcRqPzZns4P3zD7PD2yXa/KMiWdN8Iniln+893FO1LGN+PwAb73USUb WYW6ce9cjON5F/6rn6c6tKL4okLORFMPHdjigzkxqVy4tRPY/9+dNPw2KqDnLvW/ V+AxaVjjb05+5AIFnKTP =eHFm -----END PGP SIGNATURE----- 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.
This commit is contained in:
commit
f2d0ed7134
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
@ -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
|
||||
|
@ -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])
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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)) {
|
||||
|
@ -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)) {
|
||||
|
@ -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))
|
||||
|
@ -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;
|
||||
|
@ -34,6 +34,7 @@
|
||||
#include <linux/dma-mapping.h>
|
||||
|
||||
#include <mach/cputype.h>
|
||||
#include <mach/hardware.h>
|
||||
|
||||
#include <asm/mach-types.h>
|
||||
|
||||
|
@ -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 */
|
||||
@ -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)
|
||||
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user