Commit 741668ef authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull USB fixes from Greg KH:
 "Here are some small USB fixes for 5.15-rc5 that resolve a number of
  reported issues:

   - gadget driver fixes

   - xhci build warning fixes

   - build configuration fix

   - cdc-acm tty handling fixes

   - cdc-wdm fix

   - typec fixes

  All of these have been in linux-next for a while with no reported
  issues"

* tag 'usb-5.15-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
  USB: cdc-acm: fix break reporting
  USB: cdc-acm: fix racy tty buffer accesses
  usb: gadget: f_uac2: fixed EP-IN wMaxPacketSize
  usb: cdc-wdm: Fix check for WWAN
  usb: chipidea: ci_hdrc_imx: Also search for 'phys' phandle
  usb: typec: tcpm: handle SRC_STARTUP state if cc changes
  usb: typec: tcpci: don't handle vSafe0V event if it's not enabled
  usb: typec: tipd: Remove dependency on "connector" child fwnode
  Partially revert "usb: Kconfig: using select for USB_COMMON dependency"
  usb: dwc3: gadget: Revert "set gadgets parent to the right controller"
  usb: xhci: tegra: mark PM functions as __maybe_unused
parents 9c7e7050 58fc1daa
Loading
Loading
Loading
Loading
+10 −5
Original line number Diff line number Diff line
@@ -420,12 +420,17 @@ static int ci_hdrc_imx_probe(struct platform_device *pdev)
	data->phy = devm_usb_get_phy_by_phandle(dev, "fsl,usbphy", 0);
	if (IS_ERR(data->phy)) {
		ret = PTR_ERR(data->phy);
		/* Return -EINVAL if no usbphy is available */
		if (ret == -ENODEV) {
			data->phy = devm_usb_get_phy_by_phandle(dev, "phys", 0);
			if (IS_ERR(data->phy)) {
				ret = PTR_ERR(data->phy);
				if (ret == -ENODEV)
					data->phy = NULL;
				else
					goto err_clk;
			}
		}
	}

	pdata.usb_phy = data->phy;
	if (data->usbmisc_data)
+8 −0
Original line number Diff line number Diff line
@@ -340,6 +340,9 @@ static void acm_process_notification(struct acm *acm, unsigned char *buf)
			acm->iocount.overrun++;
		spin_unlock_irqrestore(&acm->read_lock, flags);

		if (newctrl & ACM_CTRL_BRK)
			tty_flip_buffer_push(&acm->port);

		if (difference)
			wake_up_all(&acm->wioctl);

@@ -475,11 +478,16 @@ static int acm_submit_read_urbs(struct acm *acm, gfp_t mem_flags)

static void acm_process_read_urb(struct acm *acm, struct urb *urb)
{
	unsigned long flags;

	if (!urb->actual_length)
		return;

	spin_lock_irqsave(&acm->read_lock, flags);
	tty_insert_flip_string(&acm->port, urb->transfer_buffer,
			urb->actual_length);
	spin_unlock_irqrestore(&acm->read_lock, flags);

	tty_flip_buffer_push(&acm->port);
}

+3 −3
Original line number Diff line number Diff line
@@ -824,7 +824,7 @@ static struct usb_class_driver wdm_class = {
};

/* --- WWAN framework integration --- */
#ifdef CONFIG_WWAN_CORE
#ifdef CONFIG_WWAN
static int wdm_wwan_port_start(struct wwan_port *port)
{
	struct wdm_device *desc = wwan_port_get_drvdata(port);
@@ -963,11 +963,11 @@ static void wdm_wwan_rx(struct wdm_device *desc, int length)
	/* inbuf has been copied, it is safe to check for outstanding data */
	schedule_work(&desc->service_outs_intr);
}
#else /* CONFIG_WWAN_CORE */
#else /* CONFIG_WWAN */
static void wdm_wwan_init(struct wdm_device *desc) {}
static void wdm_wwan_deinit(struct wdm_device *desc) {}
static void wdm_wwan_rx(struct wdm_device *desc, int length) {}
#endif /* CONFIG_WWAN_CORE */
#endif /* CONFIG_WWAN */

/* --- error handling --- */
static void wdm_rxwork(struct work_struct *work)
+1 −2
Original line number Diff line number Diff line
@@ -6,8 +6,7 @@ config USB_COMMON

config USB_LED_TRIG
	bool "USB LED Triggers"
	depends on LEDS_CLASS && LEDS_TRIGGERS
	select USB_COMMON
	depends on LEDS_CLASS && USB_COMMON && LEDS_TRIGGERS
	help
	  This option adds LED triggers for USB host and/or gadget activity.

+1 −1
Original line number Diff line number Diff line
@@ -4243,7 +4243,7 @@ int dwc3_gadget_init(struct dwc3 *dwc)
	}


	usb_initialize_gadget(dwc->sysdev, dwc->gadget, dwc_gadget_release);
	usb_initialize_gadget(dwc->dev, dwc->gadget, dwc_gadget_release);
	dev				= &dwc->gadget->dev;
	dev->platform_data		= dwc;
	dwc->gadget->ops		= &dwc3_gadget_ops;
Loading