Commit c28bdeaf authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'usb-6.2-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb

Pull USB fixes from Greg KH:
 "Here are some small USB driver fixes for 6.2-rc3 that resolve some
  reported issues. They include:

   - of-reported ulpi problem, so the offending commit is reverted

   - dwc3 driver bugfixes for recent changes

   - fotg210 fixes

  Most of these have been in linux-next for a while, the last few were
  on the mailing list for a long time and passed all the 0-day bot
  testing so all should be fine with them as well"

* tag 'usb-6.2-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
  usb: dwc3: gadget: Ignore End Transfer delay on teardown
  usb: dwc3: xilinx: include linux/gpio/consumer.h
  usb: fotg210-udc: fix error return code in fotg210_udc_probe()
  usb: fotg210: fix OTG-only build
  Revert "usb: ulpi: defer ulpi_register on ulpi_read_id timeout"
parents 4a4dcea0 c4e3ef56
...@@ -207,7 +207,7 @@ static int ulpi_read_id(struct ulpi *ulpi) ...@@ -207,7 +207,7 @@ static int ulpi_read_id(struct ulpi *ulpi)
/* Test the interface */ /* Test the interface */
ret = ulpi_write(ulpi, ULPI_SCRATCH, 0xaa); ret = ulpi_write(ulpi, ULPI_SCRATCH, 0xaa);
if (ret < 0) if (ret < 0)
return ret; goto err;
ret = ulpi_read(ulpi, ULPI_SCRATCH); ret = ulpi_read(ulpi, ULPI_SCRATCH);
if (ret < 0) if (ret < 0)
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
#include <linux/of.h> #include <linux/of.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/dma-mapping.h> #include <linux/dma-mapping.h>
#include <linux/gpio/consumer.h>
#include <linux/of_gpio.h> #include <linux/of_gpio.h>
#include <linux/of_platform.h> #include <linux/of_platform.h>
#include <linux/pm_runtime.h> #include <linux/pm_runtime.h>
......
...@@ -1727,6 +1727,7 @@ static int __dwc3_stop_active_transfer(struct dwc3_ep *dep, bool force, bool int ...@@ -1727,6 +1727,7 @@ static int __dwc3_stop_active_transfer(struct dwc3_ep *dep, bool force, bool int
else if (!ret) else if (!ret)
dep->flags |= DWC3_EP_END_TRANSFER_PENDING; dep->flags |= DWC3_EP_END_TRANSFER_PENDING;
dep->flags &= ~DWC3_EP_DELAY_STOP;
return ret; return ret;
} }
...@@ -3732,8 +3733,10 @@ void dwc3_stop_active_transfer(struct dwc3_ep *dep, bool force, ...@@ -3732,8 +3733,10 @@ void dwc3_stop_active_transfer(struct dwc3_ep *dep, bool force,
if (dep->number <= 1 && dwc->ep0state != EP0_DATA_PHASE) if (dep->number <= 1 && dwc->ep0state != EP0_DATA_PHASE)
return; return;
if (interrupt && (dep->flags & DWC3_EP_DELAY_STOP))
return;
if (!(dep->flags & DWC3_EP_TRANSFER_STARTED) || if (!(dep->flags & DWC3_EP_TRANSFER_STARTED) ||
(dep->flags & DWC3_EP_DELAY_STOP) ||
(dep->flags & DWC3_EP_END_TRANSFER_PENDING)) (dep->flags & DWC3_EP_END_TRANSFER_PENDING))
return; return;
......
...@@ -144,10 +144,7 @@ static struct platform_driver fotg210_driver = { ...@@ -144,10 +144,7 @@ static struct platform_driver fotg210_driver = {
static int __init fotg210_init(void) static int __init fotg210_init(void)
{ {
if (usb_disabled()) if (IS_ENABLED(CONFIG_USB_FOTG210_HCD) && !usb_disabled())
return -ENODEV;
if (IS_ENABLED(CONFIG_USB_FOTG210_HCD))
fotg210_hcd_init(); fotg210_hcd_init();
return platform_driver_register(&fotg210_driver); return platform_driver_register(&fotg210_driver);
} }
......
...@@ -1201,6 +1201,8 @@ int fotg210_udc_probe(struct platform_device *pdev) ...@@ -1201,6 +1201,8 @@ int fotg210_udc_probe(struct platform_device *pdev)
dev_info(dev, "found and initialized PHY\n"); dev_info(dev, "found and initialized PHY\n");
} }
ret = -ENOMEM;
for (i = 0; i < FOTG210_MAX_NUM_EP; i++) { for (i = 0; i < FOTG210_MAX_NUM_EP; i++) {
fotg210->ep[i] = kzalloc(sizeof(struct fotg210_ep), GFP_KERNEL); fotg210->ep[i] = kzalloc(sizeof(struct fotg210_ep), GFP_KERNEL);
if (!fotg210->ep[i]) if (!fotg210->ep[i])
......
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