usb: fixes for v3.8-rc2

Here is the first set of fixes for v3.8-rc cycle.
 
 There is a build fix for musb's dsps glue layer caused
 by some header cleanup on the OMAP tree.
 
 Marvel's USB drivers got a fix up for clk API usage
 switching over to clk_prepare() calls.
 
 u_serial has a bug fix for a missing wake_up() which
 would make gs_cleanup() wait forever for gs_close()
 to finish.
 
 A minor bug fix on dwc3's debugfs interface which
 would make us read wrong addresses when dumping
 all registers.
 
 dummy_hcd learned how to enumerate g_multi.
 
 s3c-hsotg now understands that we shouldn't kfree()
 memory allocated with devm_*.
 
 Other than that, there are a bunch of other minor fixes
 on renesas_usbhs, tcm_usb_gadget and amd5536udc.
 
 All patches have been pending on mailing for many weeks
 and shouldn't cause any problems.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJQya06AAoJEIaOsuA1yqRERaoQAIwzE4HkoOVX8SU/8r02eFr7
 O+mU0bMhL8RgQ1MggSLYjA4k/E/pB4ybu1Hr/ebIcGFziyjmiZIKGeYFOXfSefnO
 AtvKRrqB62bFouTbV8JXsvfHIYIjWTqDl6Sxqjyg98lKmyBNjCWrHpWEi+7KOpI/
 1ecPonRb+SfFaFrQkHtH+1XpTca4YOemHValz/W9bHhbLFsHw1yVX9PP3Nz7MV+t
 EhOs0+uPYNs5LVyIsAslFVEnhnv4KE+eVIltnPFG/sdR02jGKo8r8JD9iIUdr6zB
 U8ScU0cqDtr3E57wa0TuoVaFaMUcWLwOpY1V1ykLWTtT3Fn6W3DlU9a7WkH+Gmis
 mH6frNUpFuMqPj+5UJv/J3p+qXMq9KmuKB2KMGCpaNg4FVVipI4Y7nNSMm9C/JEt
 0Sw2EpCo5S0Pc4DHINPVzELviTr7sSjF4q1LtY6k+4t3ZzLvxeeUlNOZvmnmNiHL
 jDBYh7EeyU4otsp0JFgK+Lj9AogP2hXCymRKz5iVwoiXYN2jK5edXkRmOnNYsNWH
 7h6mFq62sKFE9fJoJxD9Kw6PPOj64bSq0byUIUTKe62c2GuKmon94qhO6ubRI5dE
 KX/HdNxBk92hmnyp9NfVOvcG1AACReE2kqEsLBetrRhWJaiFvZupo5be0LnGM9eo
 c9bZrTZrAgIH+s+ks40X
 =UsKi
 -----END PGP SIGNATURE-----

Merge tag 'fixes-for-v3.8-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-linus

Felipe says:
	usb: fixes for v3.8-rc2

	Here is the first set of fixes for v3.8-rc cycle.

	There is a build fix for musb's dsps glue layer caused
	by some header cleanup on the OMAP tree.

	Marvel's USB drivers got a fix up for clk API usage
	switching over to clk_prepare() calls.

	u_serial has a bug fix for a missing wake_up() which
	would make gs_cleanup() wait forever for gs_close()
	to finish.

	A minor bug fix on dwc3's debugfs interface which
	would make us read wrong addresses when dumping
	all registers.

	dummy_hcd learned how to enumerate g_multi.

	s3c-hsotg now understands that we shouldn't kfree()
	memory allocated with devm_*.

	Other than that, there are a bunch of other minor fixes
	on renesas_usbhs, tcm_usb_gadget and amd5536udc.

	All patches have been pending on mailing for many weeks
	and shouldn't cause any problems.
This commit is contained in:
Greg Kroah-Hartman 2013-01-07 10:09:49 -08:00
commit e4602391e2
14 changed files with 37 additions and 37 deletions

View File

@ -56,7 +56,7 @@
#define dump_register(nm) \
{ \
.name = __stringify(nm), \
.offset = DWC3_ ##nm, \
.offset = DWC3_ ##nm - DWC3_GLOBALS_REGS_START, \
}
static const struct debugfs_reg32 dwc3_regs[] = {

View File

@ -3231,7 +3231,7 @@ static int udc_pci_probe(
}
if (!pdev->irq) {
dev_err(&dev->pdev->dev, "irq not set\n");
dev_err(&pdev->dev, "irq not set\n");
kfree(dev);
dev = NULL;
retval = -ENODEV;
@ -3250,7 +3250,7 @@ static int udc_pci_probe(
dev->txfifo = (u32 __iomem *)(dev->virt_addr + UDC_TXFIFO_ADDR);
if (request_irq(pdev->irq, udc_irq, IRQF_SHARED, name, dev) != 0) {
dev_dbg(&dev->pdev->dev, "request_irq(%d) fail\n", pdev->irq);
dev_dbg(&pdev->dev, "request_irq(%d) fail\n", pdev->irq);
kfree(dev);
dev = NULL;
retval = -EBUSY;

View File

@ -130,10 +130,7 @@ static const char ep0name[] = "ep0";
static const char *const ep_name[] = {
ep0name, /* everyone has ep0 */
/* act like a net2280: high speed, six configurable endpoints */
"ep-a", "ep-b", "ep-c", "ep-d", "ep-e", "ep-f",
/* or like pxa250: fifteen fixed function endpoints */
/* act like a pxa250: fifteen fixed function endpoints */
"ep1in-bulk", "ep2out-bulk", "ep3in-iso", "ep4out-iso", "ep5in-int",
"ep6in-bulk", "ep7out-bulk", "ep8in-iso", "ep9out-iso", "ep10in-int",
"ep11in-bulk", "ep12out-bulk", "ep13in-iso", "ep14out-iso",
@ -141,6 +138,10 @@ static const char *const ep_name[] = {
/* or like sa1100: two fixed function endpoints */
"ep1out-bulk", "ep2in-bulk",
/* and now some generic EPs so we have enough in multi config */
"ep3out", "ep4in", "ep5out", "ep6out", "ep7in", "ep8out", "ep9in",
"ep10out", "ep11out", "ep12in", "ep13out", "ep14in", "ep15out",
};
#define DUMMY_ENDPOINTS ARRAY_SIZE(ep_name)

View File

@ -1012,7 +1012,7 @@ static void udc_clock_enable(struct mv_udc *udc)
unsigned int i;
for (i = 0; i < udc->clknum; i++)
clk_enable(udc->clk[i]);
clk_prepare_enable(udc->clk[i]);
}
static void udc_clock_disable(struct mv_udc *udc)
@ -1020,7 +1020,7 @@ static void udc_clock_disable(struct mv_udc *udc)
unsigned int i;
for (i = 0; i < udc->clknum; i++)
clk_disable(udc->clk[i]);
clk_disable_unprepare(udc->clk[i]);
}
static void udc_stop(struct mv_udc *udc)

View File

@ -3477,12 +3477,11 @@ static void s3c_hsotg_delete_debug(struct s3c_hsotg *hsotg)
/**
* s3c_hsotg_release - release callback for hsotg device
* @dev: Device to for which release is called
*
* Nothing to do as the resource is allocated using devm_ API.
*/
static void s3c_hsotg_release(struct device *dev)
{
struct s3c_hsotg *hsotg = dev_get_drvdata(dev);
kfree(hsotg);
}
/**

View File

@ -1794,9 +1794,10 @@ static int tcm_usbg_drop_nexus(struct usbg_tpg *tpg)
tpg->tpg_nexus = NULL;
kfree(tv_nexus);
ret = 0;
out:
mutex_unlock(&tpg->tpg_mutex);
return 0;
return ret;
}
static ssize_t tcm_usbg_tpg_store_nexus(

View File

@ -887,7 +887,7 @@ static void gs_close(struct tty_struct *tty, struct file *file)
pr_debug("gs_close: ttyGS%d (%p,%p) done!\n",
port->port_num, tty, file);
wake_up_interruptible(&port->port.close_wait);
wake_up(&port->port.close_wait);
exit:
spin_unlock_irq(&port->port_lock);
}

View File

@ -43,7 +43,7 @@ static void ehci_clock_enable(struct ehci_hcd_mv *ehci_mv)
unsigned int i;
for (i = 0; i < ehci_mv->clknum; i++)
clk_enable(ehci_mv->clk[i]);
clk_prepare_enable(ehci_mv->clk[i]);
}
static void ehci_clock_disable(struct ehci_hcd_mv *ehci_mv)
@ -51,7 +51,7 @@ static void ehci_clock_disable(struct ehci_hcd_mv *ehci_mv)
unsigned int i;
for (i = 0; i < ehci_mv->clknum; i++)
clk_disable(ehci_mv->clk[i]);
clk_disable_unprepare(ehci_mv->clk[i]);
}
static int mv_ehci_enable(struct ehci_hcd_mv *ehci_mv)

View File

@ -2298,10 +2298,7 @@ static int __init musb_init(void)
if (usb_disabled())
return 0;
pr_info("%s: version " MUSB_VERSION ", "
"?dma?"
", "
"otg (peripheral+host)",
pr_info("%s: version " MUSB_VERSION ", ?dma?, otg (peripheral+host)\n",
musb_driver_name);
return platform_driver_register(&musb_driver);
}

View File

@ -134,6 +134,11 @@ static const resource_size_t dsps_control_module_phys[] = {
DSPS_AM33XX_CONTROL_MODULE_PHYS_1,
};
#define USBPHY_CM_PWRDN (1 << 0)
#define USBPHY_OTG_PWRDN (1 << 1)
#define USBPHY_OTGVDET_EN (1 << 19)
#define USBPHY_OTGSESSEND_EN (1 << 20)
/**
* musb_dsps_phy_control - phy on/off
* @glue: struct dsps_glue *

View File

@ -110,7 +110,7 @@ config AB8500_USB
config FSL_USB2_OTG
bool "Freescale USB OTG Transceiver Driver"
depends on USB_EHCI_FSL && USB_GADGET_FSL_USB2 && USB_SUSPEND
depends on USB_EHCI_FSL && USB_FSL_USB2 && USB_SUSPEND
select USB_OTG
select USB_OTG_UTILS
help

View File

@ -240,7 +240,7 @@ static void otg_clock_enable(struct mv_otg *mvotg)
unsigned int i;
for (i = 0; i < mvotg->clknum; i++)
clk_enable(mvotg->clk[i]);
clk_prepare_enable(mvotg->clk[i]);
}
static void otg_clock_disable(struct mv_otg *mvotg)
@ -248,7 +248,7 @@ static void otg_clock_disable(struct mv_otg *mvotg)
unsigned int i;
for (i = 0; i < mvotg->clknum; i++)
clk_disable(mvotg->clk[i]);
clk_disable_unprepare(mvotg->clk[i]);
}
static int mv_otg_enable_internal(struct mv_otg *mvotg)

View File

@ -545,15 +545,6 @@ static int usbhsg_pipe_disable(struct usbhsg_uep *uep)
return 0;
}
static void usbhsg_uep_init(struct usbhsg_gpriv *gpriv)
{
int i;
struct usbhsg_uep *uep;
usbhsg_for_each_uep_with_dcp(uep, gpriv, i)
uep->pipe = NULL;
}
/*
*
* usb_ep_ops
@ -610,7 +601,12 @@ static int usbhsg_ep_disable(struct usb_ep *ep)
{
struct usbhsg_uep *uep = usbhsg_ep_to_uep(ep);
return usbhsg_pipe_disable(uep);
usbhsg_pipe_disable(uep);
uep->pipe->mod_private = NULL;
uep->pipe = NULL;
return 0;
}
static struct usb_request *usbhsg_ep_alloc_request(struct usb_ep *ep,
@ -761,9 +757,8 @@ static int usbhsg_try_start(struct usbhs_priv *priv, u32 status)
usbhs_pipe_init(priv,
usbhsg_dma_map_ctrl);
usbhs_fifo_init(priv);
usbhsg_uep_init(gpriv);
/* dcp init */
/* dcp init instead of usbhsg_ep_enable() */
dcp->pipe = usbhs_dcp_malloc(priv);
dcp->pipe->mod_private = dcp;
usbhs_pipe_config_update(dcp->pipe, 0, 0, 64);
@ -825,7 +820,7 @@ static int usbhsg_try_stop(struct usbhs_priv *priv, u32 status)
usbhs_sys_set_test_mode(priv, 0);
usbhs_sys_function_ctrl(priv, 0);
usbhsg_pipe_disable(dcp);
usbhsg_ep_disable(&dcp->ep);
dev_dbg(dev, "stop gadget\n");
@ -998,6 +993,7 @@ int usbhs_mod_gadget_probe(struct usbhs_priv *priv)
*/
usbhsg_for_each_uep_with_dcp(uep, gpriv, i) {
uep->gpriv = gpriv;
uep->pipe = NULL;
snprintf(uep->ep_name, EP_NAME_SIZE, "ep%d", i);
uep->ep.name = uep->ep_name;

View File

@ -661,9 +661,10 @@ static void usbhsh_queue_done(struct usbhs_priv *priv, struct usbhs_pkt *pkt)
status = -ESHUTDOWN;
urb->actual_length = pkt->actual;
usbhsh_ureq_free(hpriv, ureq);
usbhsh_endpoint_sequence_save(hpriv, urb, pkt);
usbhsh_ureq_free(hpriv, ureq);
usbhsh_pipe_detach(hpriv, usbhsh_ep_to_uep(urb->ep));
usb_hcd_unlink_urb_from_ep(hcd, urb);