Skip to content

Commit

Permalink
Merge tag 'usb-6.2-rc3' of git://git.kernel.org/pub/scm/linux/kernel/…
Browse files Browse the repository at this point in the history
…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"
  • Loading branch information
Linus Torvalds committed Jan 7, 2023
2 parents 4a4dcea + c4e3ef5 commit c28bdea
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion drivers/usb/common/ulpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ static int ulpi_read_id(struct ulpi *ulpi)
/* Test the interface */
ret = ulpi_write(ulpi, ULPI_SCRATCH, 0xaa);
if (ret < 0)
return ret;
goto err;

ret = ulpi_read(ulpi, ULPI_SCRATCH);
if (ret < 0)
Expand Down
1 change: 1 addition & 0 deletions drivers/usb/dwc3/dwc3-xilinx.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/dma-mapping.h>
#include <linux/gpio/consumer.h>
#include <linux/of_gpio.h>
#include <linux/of_platform.h>
#include <linux/pm_runtime.h>
Expand Down
5 changes: 4 additions & 1 deletion drivers/usb/dwc3/gadget.c
Original file line number Diff line number Diff line change
Expand Up @@ -1727,6 +1727,7 @@ static int __dwc3_stop_active_transfer(struct dwc3_ep *dep, bool force, bool int
else if (!ret)
dep->flags |= DWC3_EP_END_TRANSFER_PENDING;

dep->flags &= ~DWC3_EP_DELAY_STOP;
return ret;
}

Expand Down Expand Up @@ -3732,8 +3733,10 @@ void dwc3_stop_active_transfer(struct dwc3_ep *dep, bool force,
if (dep->number <= 1 && dwc->ep0state != EP0_DATA_PHASE)
return;

if (interrupt && (dep->flags & DWC3_EP_DELAY_STOP))
return;

if (!(dep->flags & DWC3_EP_TRANSFER_STARTED) ||
(dep->flags & DWC3_EP_DELAY_STOP) ||
(dep->flags & DWC3_EP_END_TRANSFER_PENDING))
return;

Expand Down
5 changes: 1 addition & 4 deletions drivers/usb/fotg210/fotg210-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,7 @@ static struct platform_driver fotg210_driver = {

static int __init fotg210_init(void)
{
if (usb_disabled())
return -ENODEV;

if (IS_ENABLED(CONFIG_USB_FOTG210_HCD))
if (IS_ENABLED(CONFIG_USB_FOTG210_HCD) && !usb_disabled())
fotg210_hcd_init();
return platform_driver_register(&fotg210_driver);
}
Expand Down
2 changes: 2 additions & 0 deletions drivers/usb/fotg210/fotg210-udc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1201,6 +1201,8 @@ int fotg210_udc_probe(struct platform_device *pdev)
dev_info(dev, "found and initialized PHY\n");
}

ret = -ENOMEM;

for (i = 0; i < FOTG210_MAX_NUM_EP; i++) {
fotg210->ep[i] = kzalloc(sizeof(struct fotg210_ep), GFP_KERNEL);
if (!fotg210->ep[i])
Expand Down

0 comments on commit c28bdea

Please sign in to comment.