Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1993cbf0 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull USB fixes from Greg KH:
 "Here are a number of USB driver fixes for reported problems for
  4.17-rc3.

  The "largest" here is a number of phy core changes for reported
  problems with the -rc1 release. There's also the usual musb and xhci
  fixes, as well as new device id updates. There are also some usbip
  fixes for reported problems as more people start to use that code with
  containers.

  All of these have been in linux-next with no reported issues, except
  the last few new device ids, which are "obviously correct" :)"

* tag 'usb-4.17-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (26 commits)
  USB: musb: dsps: drop duplicate phy initialisation
  USB: musb: host: prevent core phy initialisation
  usb: core: phy: add the SPDX-License-Identifier and include guard
  xhci: Fix Kernel oops in xhci dbgtty
  usb: select USB_COMMON for usb role switch config
  usb: core: phy: add missing forward declaration for "struct device"
  usb: core: phy: make it a no-op if CONFIG_GENERIC_PHY is disabled
  usb: core: use phy_exit during suspend if wake up is not supported
  usb: core: split usb_phy_roothub_{init,alloc}
  usb: core: phy: fix return value of usb_phy_roothub_exit()
  usb: typec: ucsi: Increase command completion timeout value
  Revert "xhci: plat: Register shutdown for xhci_plat"
  usb: core: Add quirk for HP v222w 16GB Mini
  Documentation: typec.rst: Use literal-block element with ascii art
  usb: typec: ucsi: fix tracepoint related build error
  usbip: usbip_event: fix to not print kernel pointer address
  usbip: usbip_host: fix to hold parent lock for device_attach() calls
  usbip: vhci_hcd: Fix usb device and sockfd leaks
  usbip: vhci_hcd: check rhport before using in vhci_hub_control()
  USB: Increment wakeup count on remote wakeup.
  ...
parents 7ff50002 573a0948
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -28,7 +28,10 @@ Required properties:
  - interrupts: one XHCI interrupt should be described here.

Optional properties:
  - clocks: reference to a clock
  - clocks: reference to the clocks
  - clock-names: mandatory if there is a second clock, in this case
    the name must be "core" for the first clock and "reg" for the
    second one
  - usb2-lpm-disable: indicate if we don't want to enable USB2 HW LPM
  - usb3-lpm-capable: determines if platform is USB3 LPM capable
  - quirk-broken-port-ped: set if the controller has broken port disable mechanism
+1 −1
Original line number Diff line number Diff line
@@ -210,7 +210,7 @@ If the connector is dual-role capable, there may also be a switch for the data
role. USB Type-C Connector Class does not supply separate API for them. The
port drivers can use USB Role Class API with those.

Illustration of the muxes behind a connector that supports an alternate mode:
Illustration of the muxes behind a connector that supports an alternate mode::

                     ------------------------
                     |       Connector      |
+1 −0
Original line number Diff line number Diff line
@@ -207,5 +207,6 @@ config USB_ULPI_BUS

config USB_ROLE_SWITCH
	tristate
	select USB_COMMON

endif # USB_SUPPORT
+13 −6
Original line number Diff line number Diff line
@@ -2262,7 +2262,8 @@ int hcd_bus_suspend(struct usb_device *rhdev, pm_message_t msg)
		hcd->state = HC_STATE_SUSPENDED;

		if (!PMSG_IS_AUTO(msg))
			usb_phy_roothub_power_off(hcd->phy_roothub);
			usb_phy_roothub_suspend(hcd->self.sysdev,
						hcd->phy_roothub);

		/* Did we race with a root-hub wakeup event? */
		if (rhdev->do_remote_wakeup) {
@@ -2302,7 +2303,8 @@ int hcd_bus_resume(struct usb_device *rhdev, pm_message_t msg)
	}

	if (!PMSG_IS_AUTO(msg)) {
		status = usb_phy_roothub_power_on(hcd->phy_roothub);
		status = usb_phy_roothub_resume(hcd->self.sysdev,
						hcd->phy_roothub);
		if (status)
			return status;
	}
@@ -2344,7 +2346,7 @@ int hcd_bus_resume(struct usb_device *rhdev, pm_message_t msg)
		}
	} else {
		hcd->state = old_state;
		usb_phy_roothub_power_off(hcd->phy_roothub);
		usb_phy_roothub_suspend(hcd->self.sysdev, hcd->phy_roothub);
		dev_dbg(&rhdev->dev, "bus %s fail, err %d\n",
				"resume", status);
		if (status != -ESHUTDOWN)
@@ -2377,6 +2379,7 @@ void usb_hcd_resume_root_hub (struct usb_hcd *hcd)

	spin_lock_irqsave (&hcd_root_hub_lock, flags);
	if (hcd->rh_registered) {
		pm_wakeup_event(&hcd->self.root_hub->dev, 0);
		set_bit(HCD_FLAG_WAKEUP_PENDING, &hcd->flags);
		queue_work(pm_wq, &hcd->wakeup_work);
	}
@@ -2758,12 +2761,16 @@ int usb_add_hcd(struct usb_hcd *hcd,
	}

	if (!hcd->skip_phy_initialization && usb_hcd_is_primary_hcd(hcd)) {
		hcd->phy_roothub = usb_phy_roothub_init(hcd->self.sysdev);
		hcd->phy_roothub = usb_phy_roothub_alloc(hcd->self.sysdev);
		if (IS_ERR(hcd->phy_roothub)) {
			retval = PTR_ERR(hcd->phy_roothub);
			goto err_phy_roothub_init;
			goto err_phy_roothub_alloc;
		}

		retval = usb_phy_roothub_init(hcd->phy_roothub);
		if (retval)
			goto err_phy_roothub_alloc;

		retval = usb_phy_roothub_power_on(hcd->phy_roothub);
		if (retval)
			goto err_usb_phy_roothub_power_on;
@@ -2936,7 +2943,7 @@ int usb_add_hcd(struct usb_hcd *hcd,
	usb_phy_roothub_power_off(hcd->phy_roothub);
err_usb_phy_roothub_power_on:
	usb_phy_roothub_exit(hcd->phy_roothub);
err_phy_roothub_init:
err_phy_roothub_alloc:
	if (hcd->remove_phy && hcd->usb_phy) {
		usb_phy_shutdown(hcd->usb_phy);
		usb_put_phy(hcd->usb_phy);
+9 −1
Original line number Diff line number Diff line
@@ -653,12 +653,17 @@ void usb_wakeup_notification(struct usb_device *hdev,
		unsigned int portnum)
{
	struct usb_hub *hub;
	struct usb_port *port_dev;

	if (!hdev)
		return;

	hub = usb_hub_to_struct_hub(hdev);
	if (hub) {
		port_dev = hub->ports[portnum - 1];
		if (port_dev && port_dev->child)
			pm_wakeup_event(&port_dev->child->dev, 0);

		set_bit(portnum, hub->wakeup_bits);
		kick_hub_wq(hub);
	}
@@ -3434,8 +3439,11 @@ int usb_port_resume(struct usb_device *udev, pm_message_t msg)

	/* Skip the initial Clear-Suspend step for a remote wakeup */
	status = hub_port_status(hub, port1, &portstatus, &portchange);
	if (status == 0 && !port_is_suspended(hub, portstatus))
	if (status == 0 && !port_is_suspended(hub, portstatus)) {
		if (portchange & USB_PORT_STAT_C_SUSPEND)
			pm_wakeup_event(&udev->dev, 0);
		goto SuspendCleared;
	}

	/* see 7.1.7.7; affects power usage, but not budgeting */
	if (hub_is_superspeed(hub->hdev))
Loading