Commit 4b2ee6d2 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull USB / Thunderbolt fixes from Greg KH:
 "Here are some small bugfixes and new device ids for USB and
  Thunderbolt drivers for 6.7-rc7. Included in here are:

   - new usb-serial device ids

   - thunderbolt driver fixes

   - typec driver fix

   - usb-storage driver quirk added

   - fotg210 driver fix

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

* tag 'usb-6.7-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
  USB: serial: option: add Quectel EG912Y module support
  USB: serial: ftdi_sio: update Actisense PIDs constant names
  usb: fotg210-hcd: delete an incorrect bounds test
  usb-storage: Add quirk for incorrect WP on Kingston DT Ultimate 3.0 G3
  usb: typec: ucsi: fix gpio-based orientation detection
  net: usb: ax88179_178a: avoid failed operations when device is disconnected
  USB: serial: option: add Quectel RM500Q R13 firmware support
  USB: serial: option: add Foxconn T99W265 with new baseline
  thunderbolt: Fix minimum allocated USB 3.x and PCIe bandwidth
  thunderbolt: Fix memory leak in margining_port_remove()
parents a0652eb2 ab241a0a
Loading
Loading
Loading
Loading
+20 −3
Original line number Diff line number Diff line
@@ -173,6 +173,7 @@ struct ax88179_data {
	u8 in_pm;
	u32 wol_supported;
	u32 wolopts;
	u8 disconnecting;
};

struct ax88179_int_data {
@@ -208,6 +209,7 @@ static int __ax88179_read_cmd(struct usbnet *dev, u8 cmd, u16 value, u16 index,
{
	int ret;
	int (*fn)(struct usbnet *, u8, u8, u16, u16, void *, u16);
	struct ax88179_data *ax179_data = dev->driver_priv;

	BUG_ON(!dev);

@@ -219,7 +221,7 @@ static int __ax88179_read_cmd(struct usbnet *dev, u8 cmd, u16 value, u16 index,
	ret = fn(dev, cmd, USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
		 value, index, data, size);

	if (unlikely(ret < 0))
	if (unlikely((ret < 0) && !(ret == -ENODEV && ax179_data->disconnecting)))
		netdev_warn(dev->net, "Failed to read reg index 0x%04x: %d\n",
			    index, ret);

@@ -231,6 +233,7 @@ static int __ax88179_write_cmd(struct usbnet *dev, u8 cmd, u16 value, u16 index,
{
	int ret;
	int (*fn)(struct usbnet *, u8, u8, u16, u16, const void *, u16);
	struct ax88179_data *ax179_data = dev->driver_priv;

	BUG_ON(!dev);

@@ -242,7 +245,7 @@ static int __ax88179_write_cmd(struct usbnet *dev, u8 cmd, u16 value, u16 index,
	ret = fn(dev, cmd, USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
		 value, index, data, size);

	if (unlikely(ret < 0))
	if (unlikely((ret < 0) && !(ret == -ENODEV && ax179_data->disconnecting)))
		netdev_warn(dev->net, "Failed to write reg index 0x%04x: %d\n",
			    index, ret);

@@ -492,6 +495,20 @@ static int ax88179_resume(struct usb_interface *intf)
	return usbnet_resume(intf);
}

static void ax88179_disconnect(struct usb_interface *intf)
{
	struct usbnet *dev = usb_get_intfdata(intf);
	struct ax88179_data *ax179_data;

	if (!dev)
		return;

	ax179_data = dev->driver_priv;
	ax179_data->disconnecting = 1;

	usbnet_disconnect(intf);
}

static void
ax88179_get_wol(struct net_device *net, struct ethtool_wolinfo *wolinfo)
{
@@ -1906,7 +1923,7 @@ static struct usb_driver ax88179_178a_driver = {
	.suspend =	ax88179_suspend,
	.resume =	ax88179_resume,
	.reset_resume =	ax88179_resume,
	.disconnect =	usbnet_disconnect,
	.disconnect =	ax88179_disconnect,
	.supports_autosuspend = 1,
	.disable_hub_initiated_lpm = 1,
};
+1 −1
Original line number Diff line number Diff line
@@ -959,7 +959,7 @@ static void margining_port_remove(struct tb_port *port)
	snprintf(dir_name, sizeof(dir_name), "port%d", port->port);
	parent = debugfs_lookup(dir_name, port->sw->debugfs_dir);
	if (parent)
		debugfs_remove_recursive(debugfs_lookup("margining", parent));
		debugfs_lookup_and_remove("margining", parent);

	kfree(port->usb4->margining);
	port->usb4->margining = NULL;
+5 −5
Original line number Diff line number Diff line
@@ -2311,13 +2311,13 @@ int usb4_usb3_port_release_bandwidth(struct tb_port *port, int *upstream_bw,
		goto err_request;

	/*
	 * Always keep 1000 Mb/s to make sure xHCI has at least some
	 * Always keep 900 Mb/s to make sure xHCI has at least some
	 * bandwidth available for isochronous traffic.
	 */
	if (consumed_up < 1000)
		consumed_up = 1000;
	if (consumed_down < 1000)
		consumed_down = 1000;
	if (consumed_up < 900)
		consumed_up = 900;
	if (consumed_down < 900)
		consumed_down = 900;

	ret = usb4_usb3_port_write_allocated_bandwidth(port, consumed_up,
						       consumed_down);
+0 −3
Original line number Diff line number Diff line
@@ -428,8 +428,6 @@ static void qh_lines(struct fotg210_hcd *fotg210, struct fotg210_qh *qh,
			temp = size;
		size -= temp;
		next += temp;
		if (temp == size)
			goto done;
	}

	temp = snprintf(next, size, "\n");
@@ -439,7 +437,6 @@ static void qh_lines(struct fotg210_hcd *fotg210, struct fotg210_qh *qh,
	size -= temp;
	next += temp;

done:
	*sizep = size;
	*nextp = next;
}
+3 −3
Original line number Diff line number Diff line
@@ -1033,9 +1033,9 @@ static const struct usb_device_id id_table_combined[] = {
	{ USB_DEVICE(FTDI_VID, ACTISENSE_USG_PID) },
	{ USB_DEVICE(FTDI_VID, ACTISENSE_NGT_PID) },
	{ USB_DEVICE(FTDI_VID, ACTISENSE_NGW_PID) },
	{ USB_DEVICE(FTDI_VID, ACTISENSE_D9AC_PID) },
	{ USB_DEVICE(FTDI_VID, ACTISENSE_D9AD_PID) },
	{ USB_DEVICE(FTDI_VID, ACTISENSE_D9AE_PID) },
	{ USB_DEVICE(FTDI_VID, ACTISENSE_UID_PID) },
	{ USB_DEVICE(FTDI_VID, ACTISENSE_USA_PID) },
	{ USB_DEVICE(FTDI_VID, ACTISENSE_NGX_PID) },
	{ USB_DEVICE(FTDI_VID, ACTISENSE_D9AF_PID) },
	{ USB_DEVICE(FTDI_VID, CHETCO_SEAGAUGE_PID) },
	{ USB_DEVICE(FTDI_VID, CHETCO_SEASWITCH_PID) },
Loading