Commit 3d9061d2 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull USB / Thunderbolt driver fixes from Greg KH:
 "Here are some small USB and Thunderbolt driver fixes for 6.11-rc4 to
  resolve some reported issues. Included in here are:

   - thunderbolt driver fixes for reported problems

   - typec driver fixes

   - xhci fixes

   - new device id for ljca usb driver

  All of these have been in linux-next this week with no reported
  issues"

* tag 'usb-6.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
  xhci: Fix Panther point NULL pointer deref at full-speed re-enumeration
  usb: misc: ljca: Add Lunar Lake ljca GPIO HID to ljca_gpio_hids[]
  Revert "usb: typec: tcpm: clear pd_event queue in PORT_RESET"
  usb: typec: ucsi: Fix the return value of ucsi_run_command()
  usb: xhci: fix duplicate stall handling in handle_tx_event()
  usb: xhci: Check for xhci->interrupters being allocated in xhci_mem_clearup()
  thunderbolt: Mark XDomain as unplugged when router is removed
  thunderbolt: Fix memory leaks in {port|retimer}_sb_regs_write()
parents 57b14823 af8e119f
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -323,16 +323,17 @@ static ssize_t port_sb_regs_write(struct file *file, const char __user *user_buf

	if (mutex_lock_interruptible(&tb->lock)) {
		ret = -ERESTARTSYS;
		goto out_rpm_put;
		goto out;
	}

	ret = sb_regs_write(port, port_sb_regs, ARRAY_SIZE(port_sb_regs),
			    USB4_SB_TARGET_ROUTER, 0, buf, count, ppos);

	mutex_unlock(&tb->lock);
out_rpm_put:
out:
	pm_runtime_mark_last_busy(&sw->dev);
	pm_runtime_put_autosuspend(&sw->dev);
	free_page((unsigned long)buf);

	return ret < 0 ? ret : count;
}
@@ -355,16 +356,17 @@ static ssize_t retimer_sb_regs_write(struct file *file,

	if (mutex_lock_interruptible(&tb->lock)) {
		ret = -ERESTARTSYS;
		goto out_rpm_put;
		goto out;
	}

	ret = sb_regs_write(rt->port, retimer_sb_regs, ARRAY_SIZE(retimer_sb_regs),
			    USB4_SB_TARGET_RETIMER, rt->index, buf, count, ppos);

	mutex_unlock(&tb->lock);
out_rpm_put:
out:
	pm_runtime_mark_last_busy(&rt->dev);
	pm_runtime_put_autosuspend(&rt->dev);
	free_page((unsigned long)buf);

	return ret < 0 ? ret : count;
}
+1 −0
Original line number Diff line number Diff line
@@ -3392,6 +3392,7 @@ void tb_switch_remove(struct tb_switch *sw)
			tb_switch_remove(port->remote->sw);
			port->remote = NULL;
		} else if (port->xdomain) {
			port->xdomain->is_unplugged = true;
			tb_xdomain_remove(port->xdomain);
			port->xdomain = NULL;
		}
+1 −1
Original line number Diff line number Diff line
@@ -1872,7 +1872,7 @@ void xhci_mem_cleanup(struct xhci_hcd *xhci)

	cancel_delayed_work_sync(&xhci->cmd_timer);

	for (i = 0; i < xhci->max_interrupters; i++) {
	for (i = 0; xhci->interrupters && i < xhci->max_interrupters; i++) {
		if (xhci->interrupters[i]) {
			xhci_remove_interrupter(xhci, xhci->interrupters[i]);
			xhci_free_interrupter(xhci, xhci->interrupters[i]);
+1 −0
Original line number Diff line number Diff line
@@ -2910,6 +2910,7 @@ static int handle_tx_event(struct xhci_hcd *xhci,
		process_isoc_td(xhci, ep, ep_ring, td, ep_trb, event);
	else
		process_bulk_intr_td(xhci, ep, ep_ring, td, ep_trb, event);
	return 0;

check_endpoint_halted:
	if (xhci_halted_host_endpoint(ep_ctx, trb_comp_code))
+5 −3
Original line number Diff line number Diff line
@@ -2837,7 +2837,7 @@ static int xhci_configure_endpoint(struct xhci_hcd *xhci,
				xhci->num_active_eps);
		return -ENOMEM;
	}
	if ((xhci->quirks & XHCI_SW_BW_CHECKING) &&
	if ((xhci->quirks & XHCI_SW_BW_CHECKING) && !ctx_change &&
	    xhci_reserve_bandwidth(xhci, virt_dev, command->in_ctx)) {
		if ((xhci->quirks & XHCI_EP_LIMIT_QUIRK))
			xhci_free_host_resources(xhci, ctrl_ctx);
@@ -4200,8 +4200,10 @@ static int xhci_setup_device(struct usb_hcd *hcd, struct usb_device *udev,
		mutex_unlock(&xhci->mutex);
		ret = xhci_disable_slot(xhci, udev->slot_id);
		xhci_free_virt_device(xhci, udev->slot_id);
		if (!ret)
			xhci_alloc_dev(hcd, udev);
		if (!ret) {
			if (xhci_alloc_dev(hcd, udev) == 1)
				xhci_setup_addressable_virt_dev(xhci, udev);
		}
		kfree(command->completion);
		kfree(command);
		return -EPROTO;
Loading