Commit 69237f8c authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull USB fixes from Greg KH:
 "Here is a large chunk of USB driver fixes for 7.0-rc4. Included in
  here are:

   - usb gadget reverts due to reported issues, and then a follow-on fix
     to hopefully resolve the reported overall problem

   - xhci driver fixes

   - dwc3 driver fixes

   - usb core "killable" bulk message api addition to fix a usbtmc
     driver bug where userspace could hang the driver for forever

   - small USB driver fixes for reported issues

   - new usb device quirks

  All except the last USB device quirk change have been in linux-next
  with no reported issues. That one came in too late, and is 'obviously
  correct' :)"

* tag 'usb-7.0-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (35 commits)
  USB: ezcap401 needs USB_QUIRK_NO_BOS to function on 10gbs usb speed
  usb: roles: get usb role switch from parent only for usb-b-connector
  Revert "tcpm: allow looking for role_sw device in the main node"
  usb: gadget: f_ncm: Fix net_device lifecycle with device_move
  Revert "usb: gadget: u_ether: add gether_opts for config caching"
  Revert "usb: gadget: u_ether: use <linux/hex.h> header file"
  Revert "usb: gadget: u_ether: Add auto-cleanup helper for freeing net_device"
  Revert "usb: gadget: f_ncm: align net_device lifecycle with bind/unbind"
  Revert "usb: legacy: ncm: Fix NPE in gncm_bind"
  Revert "usb: gadget: f_ncm: Fix atomic context locking issue"
  usb: typec: altmode/displayport: set displayport signaling rate in configure message
  usb: dwc3: pci: add support for the Intel Nova Lake -H
  usb/core/quirks: Add Huawei ME906S-device to wakeup quirk
  usb: gadget: uvc: fix interval_duration calculation
  xhci: Fix NULL pointer dereference when reading portli debugfs files
  usb: xhci: Prevent interrupt storm on host controller error (HCE)
  usb: xhci: Fix memory leak in xhci_disable_slot()
  usb: class: cdc-wdm: fix reordering issue in read code path
  usb: renesas_usbhs: fix use-after-free in ISR during device removal
  usb: cdc-acm: Restore CAP_BRK functionnality to CH343
  ...
parents 5c751256 d0d9b1f4
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -8196,6 +8196,9 @@ Kernel parameters
				p = USB_QUIRK_SHORT_SET_ADDRESS_REQ_TIMEOUT
					(Reduce timeout of the SET_ADDRESS
					request from 5000 ms to 500 ms);
				q = USB_QUIRK_FORCE_ONE_CONFIG (Device
					claims zero configurations,
					forcing to 1);
			Example: quirks=0781:5580:bk,0a5c:5834:gij

	usbhid.mousepoll=
+5 −0
Original line number Diff line number Diff line
@@ -1379,6 +1379,8 @@ static int acm_probe(struct usb_interface *intf,
		acm->ctrl_caps = h.usb_cdc_acm_descriptor->bmCapabilities;
	if (quirks & NO_CAP_LINE)
		acm->ctrl_caps &= ~USB_CDC_CAP_LINE;
	if (quirks & MISSING_CAP_BRK)
		acm->ctrl_caps |= USB_CDC_CAP_BRK;
	acm->ctrlsize = ctrlsize;
	acm->readsize = readsize;
	acm->rx_buflimit = num_rx_buf;
@@ -2002,6 +2004,9 @@ static const struct usb_device_id acm_ids[] = {
	.driver_info = IGNORE_DEVICE,
	},

	/* CH343 supports CAP_BRK, but doesn't advertise it */
	{ USB_DEVICE(0x1a86, 0x55d3), .driver_info = MISSING_CAP_BRK, },

	/* control interfaces without any protocol set */
	{ USB_INTERFACE_INFO(USB_CLASS_COMM, USB_CDC_SUBCLASS_ACM,
		USB_CDC_PROTO_NONE) },
+1 −0
Original line number Diff line number Diff line
@@ -113,3 +113,4 @@ struct acm {
#define CLEAR_HALT_CONDITIONS		BIT(5)
#define SEND_ZERO_PACKET		BIT(6)
#define DISABLE_ECHO			BIT(7)
#define MISSING_CAP_BRK			BIT(8)
+3 −1
Original line number Diff line number Diff line
@@ -225,7 +225,8 @@ static void wdm_in_callback(struct urb *urb)
		/* we may already be in overflow */
		if (!test_bit(WDM_OVERFLOW, &desc->flags)) {
			memmove(desc->ubuf + desc->length, desc->inbuf, length);
			desc->length += length;
			smp_wmb(); /* against wdm_read() */
			WRITE_ONCE(desc->length, desc->length + length);
		}
	}
skip_error:
@@ -533,6 +534,7 @@ static ssize_t wdm_read
		return -ERESTARTSYS;

	cntr = READ_ONCE(desc->length);
	smp_rmb(); /* against wdm_in_callback() */
	if (cntr == 0) {
		desc->read = 0;
retry:
+3 −3
Original line number Diff line number Diff line
@@ -727,7 +727,7 @@ static int usbtmc488_ioctl_trigger(struct usbtmc_file_data *file_data)
	buffer[1] = data->bTag;
	buffer[2] = ~data->bTag;

	retval = usb_bulk_msg(data->usb_dev,
	retval = usb_bulk_msg_killable(data->usb_dev,
			      usb_sndbulkpipe(data->usb_dev,
					      data->bulk_out),
			      buffer, USBTMC_HEADER_SIZE,
@@ -1347,7 +1347,7 @@ static int send_request_dev_dep_msg_in(struct usbtmc_file_data *file_data,
	buffer[11] = 0; /* Reserved */

	/* Send bulk URB */
	retval = usb_bulk_msg(data->usb_dev,
	retval = usb_bulk_msg_killable(data->usb_dev,
			      usb_sndbulkpipe(data->usb_dev,
					      data->bulk_out),
			      buffer, USBTMC_HEADER_SIZE,
@@ -1419,7 +1419,7 @@ static ssize_t usbtmc_read(struct file *filp, char __user *buf,
	actual = 0;

	/* Send bulk URB */
	retval = usb_bulk_msg(data->usb_dev,
	retval = usb_bulk_msg_killable(data->usb_dev,
			      usb_rcvbulkpipe(data->usb_dev,
					      data->bulk_in),
			      buffer, bufsize, &actual,
Loading