Commit 196856db authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull USB fixes from Greg KH:
 "Here are some small USB driver fixes and new device ids for 6.13-rc7.
  Included in here are:

   - usb serial new device ids

   - typec bugfixes for reported issues

   - dwc3 driver fixes

   - chipidea driver fixes

   - gadget driver fixes

   - other minor fixes for reported problems.

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

* tag 'usb-6.13-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
  USB: serial: option: add Neoway N723-EA support
  USB: serial: option: add MeiG Smart SRM815
  USB: serial: cp210x: add Phoenix Contact UPS Device
  usb: typec: fix pm usage counter imbalance in ucsi_ccg_sync_control()
  usb-storage: Add max sectors quirk for Nokia 208
  usb: gadget: midi2: Reverse-select at the right place
  usb: gadget: f_fs: Remove WARN_ON in functionfs_bind
  USB: core: Disable LPM only for non-suspended ports
  usb: fix reference leak in usb_new_device()
  usb: typec: tcpci: fix NULL pointer issue on shared irq case
  usb: gadget: u_serial: Disable ep before setting port to null to fix the crash caused by port being null
  usb: chipidea: ci_hdrc_imx: decrement device's refcount in .remove() and in the error path of .probe()
  usb: typec: ucsi: Set orientation as none when connector is unplugged
  usb: gadget: configfs: Ignore trailing LF for user strings to cdev
  USB: usblp: return error when setting unsupported protocol
  usb: gadget: f_uac2: Fix incorrect setting of bNumEndpoints
  usb: typec: tcpm/tcpci_maxim: fix error code in max_contaminant_read_resistance_kohm()
  usb: host: xhci-plat: set skip_phy_initialization if software node has XHCI_SKIP_PHY_INIT property
  usb: dwc3-am62: Disable autosuspend during remove
  usb: dwc3: gadget: fix writing NYET threshold
parents be548645 f3149ed6
Loading
Loading
Loading
Loading
+17 −8
Original line number Diff line number Diff line
@@ -370,25 +370,29 @@ static int ci_hdrc_imx_probe(struct platform_device *pdev)
		data->pinctrl = devm_pinctrl_get(dev);
		if (PTR_ERR(data->pinctrl) == -ENODEV)
			data->pinctrl = NULL;
		else if (IS_ERR(data->pinctrl))
			return dev_err_probe(dev, PTR_ERR(data->pinctrl),
		else if (IS_ERR(data->pinctrl)) {
			ret = dev_err_probe(dev, PTR_ERR(data->pinctrl),
					     "pinctrl get failed\n");
			goto err_put;
		}

		data->hsic_pad_regulator =
				devm_regulator_get_optional(dev, "hsic");
		if (PTR_ERR(data->hsic_pad_regulator) == -ENODEV) {
			/* no pad regulator is needed */
			data->hsic_pad_regulator = NULL;
		} else if (IS_ERR(data->hsic_pad_regulator))
			return dev_err_probe(dev, PTR_ERR(data->hsic_pad_regulator),
		} else if (IS_ERR(data->hsic_pad_regulator)) {
			ret = dev_err_probe(dev, PTR_ERR(data->hsic_pad_regulator),
					     "Get HSIC pad regulator error\n");
			goto err_put;
		}

		if (data->hsic_pad_regulator) {
			ret = regulator_enable(data->hsic_pad_regulator);
			if (ret) {
				dev_err(dev,
					"Failed to enable HSIC pad regulator\n");
				return ret;
				goto err_put;
			}
		}
	}
@@ -402,13 +406,14 @@ static int ci_hdrc_imx_probe(struct platform_device *pdev)
			dev_err(dev,
				"pinctrl_hsic_idle lookup failed, err=%ld\n",
					PTR_ERR(pinctrl_hsic_idle));
			return PTR_ERR(pinctrl_hsic_idle);
			ret = PTR_ERR(pinctrl_hsic_idle);
			goto err_put;
		}

		ret = pinctrl_select_state(data->pinctrl, pinctrl_hsic_idle);
		if (ret) {
			dev_err(dev, "hsic_idle select failed, err=%d\n", ret);
			return ret;
			goto err_put;
		}

		data->pinctrl_hsic_active = pinctrl_lookup_state(data->pinctrl,
@@ -417,7 +422,8 @@ static int ci_hdrc_imx_probe(struct platform_device *pdev)
			dev_err(dev,
				"pinctrl_hsic_active lookup failed, err=%ld\n",
					PTR_ERR(data->pinctrl_hsic_active));
			return PTR_ERR(data->pinctrl_hsic_active);
			ret = PTR_ERR(data->pinctrl_hsic_active);
			goto err_put;
		}
	}

@@ -527,6 +533,8 @@ static int ci_hdrc_imx_probe(struct platform_device *pdev)
	if (pdata.flags & CI_HDRC_PMQOS)
		cpu_latency_qos_remove_request(&data->pm_qos_req);
	data->ci_pdev = NULL;
err_put:
	put_device(data->usbmisc_data->dev);
	return ret;
}

@@ -551,6 +559,7 @@ static void ci_hdrc_imx_remove(struct platform_device *pdev)
		if (data->hsic_pad_regulator)
			regulator_disable(data->hsic_pad_regulator);
	}
	put_device(data->usbmisc_data->dev);
}

static void ci_hdrc_imx_shutdown(struct platform_device *pdev)
+4 −3
Original line number Diff line number Diff line
@@ -1337,11 +1337,12 @@ static int usblp_set_protocol(struct usblp *usblp, int protocol)
	if (protocol < USBLP_FIRST_PROTOCOL || protocol > USBLP_LAST_PROTOCOL)
		return -EINVAL;

	/* Don't unnecessarily set the interface if there's a single alt. */
	if (usblp->intf->num_altsetting > 1) {
	alts = usblp->protocol[protocol].alt_setting;
	if (alts < 0)
		return -EINVAL;

	/* Don't unnecessarily set the interface if there's a single alt. */
	if (usblp->intf->num_altsetting > 1) {
		r = usb_set_interface(usblp->dev, usblp->ifnum, alts);
		if (r < 0) {
			printk(KERN_ERR "usblp: can't set desired altsetting %d on interface %d\n",
+4 −2
Original line number Diff line number Diff line
@@ -2663,13 +2663,13 @@ int usb_new_device(struct usb_device *udev)
		err = sysfs_create_link(&udev->dev.kobj,
				&port_dev->dev.kobj, "port");
		if (err)
			goto fail;
			goto out_del_dev;

		err = sysfs_create_link(&port_dev->dev.kobj,
				&udev->dev.kobj, "device");
		if (err) {
			sysfs_remove_link(&udev->dev.kobj, "port");
			goto fail;
			goto out_del_dev;
		}

		if (!test_and_set_bit(port1, hub->child_usage_bits))
@@ -2683,6 +2683,8 @@ int usb_new_device(struct usb_device *udev)
	pm_runtime_put_sync_autosuspend(&udev->dev);
	return err;

out_del_dev:
	device_del(&udev->dev);
fail:
	usb_set_device_state(udev, USB_STATE_NOTATTACHED);
	pm_runtime_disable(&udev->dev);
+4 −3
Original line number Diff line number Diff line
@@ -453,10 +453,11 @@ static int usb_port_runtime_suspend(struct device *dev)
static void usb_port_shutdown(struct device *dev)
{
	struct usb_port *port_dev = to_usb_port(dev);
	struct usb_device *udev = port_dev->child;

	if (port_dev->child) {
		usb_disable_usb2_hardware_lpm(port_dev->child);
		usb_unlocked_disable_lpm(port_dev->child);
	if (udev && !udev->port_is_suspended) {
		usb_disable_usb2_hardware_lpm(udev);
		usb_unlocked_disable_lpm(udev);
	}
}

+1 −0
Original line number Diff line number Diff line
@@ -464,6 +464,7 @@
#define DWC3_DCTL_TRGTULST_SS_INACT	(DWC3_DCTL_TRGTULST(6))

/* These apply for core versions 1.94a and later */
#define DWC3_DCTL_NYET_THRES_MASK	(0xf << 20)
#define DWC3_DCTL_NYET_THRES(n)		(((n) & 0xf) << 20)

#define DWC3_DCTL_KEEP_CONNECT		BIT(19)
Loading