usb: fixes for v5.0-rc4
Dwc3 got a fix for cases when gadget driver queue an OUT request of length 0; this is a case that has been overlooked for quite some time now. Exynos' dwc3 glue layer got a fix on the error path for those cases where clk_prepare_enable() fails. TI's AM335x PHY driver got a fix for a race condition during probe. This race happened because driver was powering off the PHY only after adding the PHY handle to the framework. The result is that we could fall into a situation where user of the PHY (MUSB) could call phy_init() before phy driver's probe() called phy_poweroff() which would result in a powered off PHY after phy_init() was called. The old net2272 driver got a fix for an erroneous use of bitwise negation. -----BEGIN PGP SIGNATURE----- iQJRBAABCAA7FiEElLzh7wn96CXwjh2IzL64meEamQYFAlxSlhMdHGZlbGlwZS5i YWxiaUBsaW51eC5pbnRlbC5jb20ACgkQzL64meEamQYATA/9FUGhYQ6sVwDPzGKU Tb4oOJBFIdEpgL2pPt7pNUOoW+/HDRQLzBkgUmrukEIprPCKQOwJIs9rfZmMbyn6 0KpypxTEQ5lV0uDG82UCPGmdPlKhFiVhW0eaaaFC0PVu8XBpS7hz78R0+Q81YW/o qkOTtWtk3mJFVLFKxVppVALnaSiW9dfT5Oi8S2HOAuLIS2gnxLjlXTokL2k+mngW bsErLxeN6S9q1ztkpxjo4ko+ScfWeJzS+tkHqHaHZzs8KZWtqIR30CEvC0Qozsko Kcl5VV3C6PjpzkAqBHq2zlmOmZtcamuCcl7ErR2UVaRFjXGvPAuk7xpCMY+HL84d MYIO53ft5VKGP2aQ7mH1pqYQoGWN0sbwT1U9lu3WWEVntVhLVedOLlsigQyllh2K g6e8M0+MSSQcSHe0LNyKY5voi1uZofUYDUkWeQmFtIGkJCvv0XbppxoV6Sn2Ndkx XMULzFIb1fDZcc/E/MXbEhX37jTKr3RSdPsIoGj2wTaNaCLeqY2crf68r3gGmwcT /ovtIBf9sek+t0263HKg93Np+gNby2+NNZv5t2Uthz9W5DEum6iu2rq901J502Jj KbYWZUABba4+JOkNT2j78WinuydKXxpqTfAoipuEAqWF1h8AZ+1ixnIzVMGMXr+w 2UjJQu7lEq13NyrDYxiVt7tKfZk= =xcVV -----END PGP SIGNATURE----- Merge tag 'fixes-for-v5.0-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-linus Felipe writes: usb: fixes for v5.0-rc4 Dwc3 got a fix for cases when gadget driver queue an OUT request of length 0; this is a case that has been overlooked for quite some time now. Exynos' dwc3 glue layer got a fix on the error path for those cases where clk_prepare_enable() fails. TI's AM335x PHY driver got a fix for a race condition during probe. This race happened because driver was powering off the PHY only after adding the PHY handle to the framework. The result is that we could fall into a situation where user of the PHY (MUSB) could call phy_init() before phy driver's probe() called phy_poweroff() which would result in a powered off PHY after phy_init() was called. The old net2272 driver got a fix for an erroneous use of bitwise negation. * tag 'fixes-for-v5.0-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb: usb: phy: am335x: fix race condition in _probe usb: dwc3: exynos: Fix error handling of clk_prepare_enable usb: phy: fix link errors usb: gadget: udc: net2272: Fix bitwise and boolean operations usb: dwc3: gadget: Handle 0 xfer length for OUT EP
This commit is contained in:
commit
c7b0c3bbe4
|
@ -78,7 +78,7 @@ static int dwc3_exynos_probe(struct platform_device *pdev)
|
|||
for (i = 0; i < exynos->num_clks; i++) {
|
||||
ret = clk_prepare_enable(exynos->clks[i]);
|
||||
if (ret) {
|
||||
while (--i > 0)
|
||||
while (i-- > 0)
|
||||
clk_disable_unprepare(exynos->clks[i]);
|
||||
return ret;
|
||||
}
|
||||
|
@ -223,7 +223,7 @@ static int dwc3_exynos_resume(struct device *dev)
|
|||
for (i = 0; i < exynos->num_clks; i++) {
|
||||
ret = clk_prepare_enable(exynos->clks[i]);
|
||||
if (ret) {
|
||||
while (--i > 0)
|
||||
while (i-- > 0)
|
||||
clk_disable_unprepare(exynos->clks[i]);
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -1119,7 +1119,7 @@ static void dwc3_prepare_one_trb_linear(struct dwc3_ep *dep,
|
|||
unsigned int maxp = usb_endpoint_maxp(dep->endpoint.desc);
|
||||
unsigned int rem = length % maxp;
|
||||
|
||||
if (rem && usb_endpoint_dir_out(dep->endpoint.desc)) {
|
||||
if ((!length || rem) && usb_endpoint_dir_out(dep->endpoint.desc)) {
|
||||
struct dwc3 *dwc = dep->dwc;
|
||||
struct dwc3_trb *trb;
|
||||
|
||||
|
|
|
@ -2083,7 +2083,7 @@ static irqreturn_t net2272_irq(int irq, void *_dev)
|
|||
#if defined(PLX_PCI_RDK2)
|
||||
/* see if PCI int for us by checking irqstat */
|
||||
intcsr = readl(dev->rdk2.fpga_base_addr + RDK2_IRQSTAT);
|
||||
if (!intcsr & (1 << NET2272_PCI_IRQ)) {
|
||||
if (!(intcsr & (1 << NET2272_PCI_IRQ))) {
|
||||
spin_unlock(&dev->lock);
|
||||
return IRQ_NONE;
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ config AB8500_USB
|
|||
|
||||
config FSL_USB2_OTG
|
||||
bool "Freescale USB OTG Transceiver Driver"
|
||||
depends on USB_EHCI_FSL && USB_FSL_USB2 && USB_OTG_FSM && PM
|
||||
depends on USB_EHCI_FSL && USB_FSL_USB2 && USB_OTG_FSM=y && PM
|
||||
depends on USB_GADGET || !USB_GADGET # if USB_GADGET=m, this can't be 'y'
|
||||
select USB_PHY
|
||||
help
|
||||
|
|
|
@ -61,9 +61,6 @@ static int am335x_phy_probe(struct platform_device *pdev)
|
|||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = usb_add_phy_dev(&am_phy->usb_phy_gen.phy);
|
||||
if (ret)
|
||||
return ret;
|
||||
am_phy->usb_phy_gen.phy.init = am335x_init;
|
||||
am_phy->usb_phy_gen.phy.shutdown = am335x_shutdown;
|
||||
|
||||
|
@ -82,7 +79,7 @@ static int am335x_phy_probe(struct platform_device *pdev)
|
|||
device_set_wakeup_enable(dev, false);
|
||||
phy_ctrl_power(am_phy->phy_ctrl, am_phy->id, am_phy->dr_mode, false);
|
||||
|
||||
return 0;
|
||||
return usb_add_phy_dev(&am_phy->usb_phy_gen.phy);
|
||||
}
|
||||
|
||||
static int am335x_phy_remove(struct platform_device *pdev)
|
||||
|
|
Loading…
Reference in New Issue