Skip to content

Commit 88f66f1

Browse files
committed
Merge tag 'usb-6.5-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Pull USB fixes from Greg KH: "Here are a set of USB driver fixes for 6.5-rc4. Include in here are: - new USB serial device ids - dwc3 driver fixes for reported issues - typec driver fixes for reported problems - gadget driver fixes - reverts of some problematic USB changes that went into -rc1 All of these have been in linux-next with no reported problems" * tag 'usb-6.5-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (24 commits) usb: misc: ehset: fix wrong if condition usb: dwc3: pci: skip BYT GPIO lookup table for hardwired phy usb: cdns3: fix incorrect calculation of ep_buf_size when more than one config usb: gadget: call usb_gadget_check_config() to verify UDC capability usb: typec: Use sysfs_emit_at when concatenating the string usb: typec: Iterate pds array when showing the pd list usb: typec: Set port->pd before adding device for typec_port usb: typec: qcom: fix return value check in qcom_pmic_typec_probe() Revert "usb: gadget: tegra-xudc: Fix error check in tegra_xudc_powerdomain_init()" Revert "usb: xhci: tegra: Fix error check" USB: gadget: Fix the memory leak in raw_gadget driver usb: gadget: core: remove unbalanced mutex_unlock in usb_gadget_activate Revert "usb: dwc3: core: Enable AutoRetry feature in the controller" Revert "xhci: add quirk for host controllers that don't update endpoint DCS" USB: quirks: add quirk for Focusrite Scarlett usb: xhci-mtk: set the dma max_seg_size MAINTAINERS: drop invalid usb/cdns3 Reviewer e-mail usb: dwc3: don't reset device side if dwc3 was configured as host-only usb: typec: ucsi: move typec_set_mode(TYPEC_STATE_SAFE) to ucsi_unregister_partner() usb: ohci-at91: Fix the unhandle interrupt when resume ...
2 parents e6d34ce + 7f23276 commit 88f66f1

File tree

21 files changed

+103
-114
lines changed

21 files changed

+103
-114
lines changed

MAINTAINERS

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4463,7 +4463,6 @@ CADENCE USB3 DRD IP DRIVER
44634463
M: Peter Chen <peter.chen@kernel.org>
44644464
M: Pawel Laszczak <pawell@cadence.com>
44654465
R: Roger Quadros <rogerq@kernel.org>
4466-
R: Aswath Govindraju <a-govindraju@ti.com>
44674466
L: linux-usb@vger.kernel.org
44684467
S: Maintained
44694468
T: git git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb.git

drivers/usb/cdns3/cdns3-gadget.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3015,12 +3015,14 @@ static int cdns3_gadget_udc_stop(struct usb_gadget *gadget)
30153015
static int cdns3_gadget_check_config(struct usb_gadget *gadget)
30163016
{
30173017
struct cdns3_device *priv_dev = gadget_to_cdns3_device(gadget);
3018+
struct cdns3_endpoint *priv_ep;
30183019
struct usb_ep *ep;
30193020
int n_in = 0;
30203021
int total;
30213022

30223023
list_for_each_entry(ep, &gadget->ep_list, ep_list) {
3023-
if (ep->claimed && (ep->address & USB_DIR_IN))
3024+
priv_ep = ep_to_cdns3_ep(ep);
3025+
if ((priv_ep->flags & EP_CLAIMED) && (ep->address & USB_DIR_IN))
30243026
n_in++;
30253027
}
30263028

drivers/usb/core/quirks.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -436,6 +436,10 @@ static const struct usb_device_id usb_quirk_list[] = {
436436
/* novation SoundControl XL */
437437
{ USB_DEVICE(0x1235, 0x0061), .driver_info = USB_QUIRK_RESET_RESUME },
438438

439+
/* Focusrite Scarlett Solo USB */
440+
{ USB_DEVICE(0x1235, 0x8211), .driver_info =
441+
USB_QUIRK_DISCONNECT_SUSPEND },
442+
439443
/* Huawei 4G LTE module */
440444
{ USB_DEVICE(0x12d1, 0x15bb), .driver_info =
441445
USB_QUIRK_DISCONNECT_SUSPEND },

drivers/usb/dwc3/core.c

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -277,9 +277,9 @@ int dwc3_core_soft_reset(struct dwc3 *dwc)
277277
/*
278278
* We're resetting only the device side because, if we're in host mode,
279279
* XHCI driver will reset the host block. If dwc3 was configured for
280-
* host-only mode, then we can return early.
280+
* host-only mode or current role is host, then we can return early.
281281
*/
282-
if (dwc->current_dr_role == DWC3_GCTL_PRTCAP_HOST)
282+
if (dwc->dr_mode == USB_DR_MODE_HOST || dwc->current_dr_role == DWC3_GCTL_PRTCAP_HOST)
283283
return 0;
284284

285285
reg = dwc3_readl(dwc->regs, DWC3_DCTL);
@@ -1209,22 +1209,6 @@ static int dwc3_core_init(struct dwc3 *dwc)
12091209
dwc3_writel(dwc->regs, DWC3_GUCTL1, reg);
12101210
}
12111211

1212-
if (dwc->dr_mode == USB_DR_MODE_HOST ||
1213-
dwc->dr_mode == USB_DR_MODE_OTG) {
1214-
reg = dwc3_readl(dwc->regs, DWC3_GUCTL);
1215-
1216-
/*
1217-
* Enable Auto retry Feature to make the controller operating in
1218-
* Host mode on seeing transaction errors(CRC errors or internal
1219-
* overrun scenerios) on IN transfers to reply to the device
1220-
* with a non-terminating retry ACK (i.e, an ACK transcation
1221-
* packet with Retry=1 & Nump != 0)
1222-
*/
1223-
reg |= DWC3_GUCTL_HSTINAUTORETRY;
1224-
1225-
dwc3_writel(dwc->regs, DWC3_GUCTL, reg);
1226-
}
1227-
12281212
/*
12291213
* Must config both number of packets and max burst settings to enable
12301214
* RX and/or TX threshold.

drivers/usb/dwc3/core.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -256,9 +256,6 @@
256256
#define DWC3_GCTL_GBLHIBERNATIONEN BIT(1)
257257
#define DWC3_GCTL_DSBLCLKGTNG BIT(0)
258258

259-
/* Global User Control Register */
260-
#define DWC3_GUCTL_HSTINAUTORETRY BIT(14)
261-
262259
/* Global User Control 1 Register */
263260
#define DWC3_GUCTL1_DEV_DECOUPLE_L1L2_EVT BIT(31)
264261
#define DWC3_GUCTL1_TX_IPGAP_LINECHECK_DIS BIT(28)

drivers/usb/dwc3/dwc3-pci.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,10 +233,12 @@ static int dwc3_pci_quirks(struct dwc3_pci *dwc,
233233

234234
/*
235235
* A lot of BYT devices lack ACPI resource entries for
236-
* the GPIOs, add a fallback mapping to the reference
236+
* the GPIOs. If the ACPI entry for the GPIO controller
237+
* is present add a fallback mapping to the reference
237238
* design GPIOs which all boards seem to use.
238239
*/
239-
gpiod_add_lookup_table(&platform_bytcr_gpios);
240+
if (acpi_dev_present("INT33FC", NULL, -1))
241+
gpiod_add_lookup_table(&platform_bytcr_gpios);
240242

241243
/*
242244
* These GPIOs will turn on the USB2 PHY. Note that we have to

drivers/usb/gadget/composite.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1125,6 +1125,10 @@ int usb_add_config(struct usb_composite_dev *cdev,
11251125
goto done;
11261126

11271127
status = bind(config);
1128+
1129+
if (status == 0)
1130+
status = usb_gadget_check_config(cdev->gadget);
1131+
11281132
if (status < 0) {
11291133
while (!list_empty(&config->functions)) {
11301134
struct usb_function *f;

drivers/usb/gadget/legacy/raw_gadget.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -310,13 +310,15 @@ static int gadget_bind(struct usb_gadget *gadget,
310310
dev->eps_num = i;
311311
spin_unlock_irqrestore(&dev->lock, flags);
312312

313-
/* Matches kref_put() in gadget_unbind(). */
314-
kref_get(&dev->count);
315-
316313
ret = raw_queue_event(dev, USB_RAW_EVENT_CONNECT, 0, NULL);
317-
if (ret < 0)
314+
if (ret < 0) {
318315
dev_err(&gadget->dev, "failed to queue event\n");
316+
set_gadget_data(gadget, NULL);
317+
return ret;
318+
}
319319

320+
/* Matches kref_put() in gadget_unbind(). */
321+
kref_get(&dev->count);
320322
return ret;
321323
}
322324

drivers/usb/gadget/udc/core.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -878,7 +878,6 @@ int usb_gadget_activate(struct usb_gadget *gadget)
878878
*/
879879
if (gadget->connected)
880880
ret = usb_gadget_connect_locked(gadget);
881-
mutex_unlock(&gadget->udc->connect_lock);
882881

883882
unlock:
884883
mutex_unlock(&gadget->udc->connect_lock);

drivers/usb/gadget/udc/tegra-xudc.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3718,15 +3718,15 @@ static int tegra_xudc_powerdomain_init(struct tegra_xudc *xudc)
37183718
int err;
37193719

37203720
xudc->genpd_dev_device = dev_pm_domain_attach_by_name(dev, "dev");
3721-
if (IS_ERR_OR_NULL(xudc->genpd_dev_device)) {
3722-
err = PTR_ERR(xudc->genpd_dev_device) ? : -ENODATA;
3721+
if (IS_ERR(xudc->genpd_dev_device)) {
3722+
err = PTR_ERR(xudc->genpd_dev_device);
37233723
dev_err(dev, "failed to get device power domain: %d\n", err);
37243724
return err;
37253725
}
37263726

37273727
xudc->genpd_dev_ss = dev_pm_domain_attach_by_name(dev, "ss");
3728-
if (IS_ERR_OR_NULL(xudc->genpd_dev_ss)) {
3729-
err = PTR_ERR(xudc->genpd_dev_ss) ? : -ENODATA;
3728+
if (IS_ERR(xudc->genpd_dev_ss)) {
3729+
err = PTR_ERR(xudc->genpd_dev_ss);
37303730
dev_err(dev, "failed to get SuperSpeed power domain: %d\n", err);
37313731
return err;
37323732
}

0 commit comments

Comments
 (0)