Commit fd59585c authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull USB/Thunderbolt driver fixes from Greg KH:
 "Here are a lot of small USB and Thunderbolt driver fixes for 6.0-rc4
  for reported problems. Included in here are:

   - new usb-serial driver ids

   - dwc3 driver bugfixes for reported problems with 6.0-rc1

   - new device quirks, and reverts of some quirks that were incorrect

   - gadget driver bugfixes for reported problems

   - USB host controller bugfixes (xhci and others)

   - other small USB fixes, details in the shortlog

   - small thunderbolt driver fixes

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

* tag 'usb-6.0-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (51 commits)
  Revert "usb: gadget: udc-xilinx: replace memcpy with memcpy_toio"
  usb: storage: Add ASUS <0x0b05:0x1932> to IGNORE_UAS
  USB: serial: ch341: fix disabled rx timer on older devices
  USB: serial: ch341: fix lost character on LCR updates
  USB: serial: cp210x: add Decagon UCA device id
  Revert "usb: add quirks for Lenovo OneLink+ Dock"
  usb: cdns3: fix issue with rearming ISO OUT endpoint
  usb: cdns3: fix incorrect handling TRB_SMM flag for ISOC transfer
  usb: gadget: mass_storage: Fix cdrom data transfers on MAC-OS
  media: mceusb: Use new usb_control_msg_*() routines
  USB: core: Prevent nested device-reset calls
  USB: gadget: Fix obscure lockdep violation for udc_mutex
  usb: dwc2: fix wrong order of phy_power_on and phy_init
  usb: gadget: udc-xilinx: replace memcpy with memcpy_toio
  usb: typec: Remove retimers properly
  usb: dwc3: disable USB core PHY management
  usb: add quirks for Lenovo OneLink+ Dock
  USB: serial: option: add support for Cinterion MV32-WA/WB RmNet mode
  USB: serial: ftdi_sio: add Omron CS1W-CIF31 device id
  USB: serial: option: add Quectel EM060K modem
  ...
parents 1a2f6a37 fe0a2ac7
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@ properties:
          - mediatek,mt2712-mtu3
          - mediatek,mt8173-mtu3
          - mediatek,mt8183-mtu3
          - mediatek,mt8188-mtu3
          - mediatek,mt8192-mtu3
          - mediatek,mt8195-mtu3
      - const: mediatek,mtu3
+6 −0
Original line number Diff line number Diff line
@@ -33,6 +33,7 @@ properties:
          - qcom,sm6115-dwc3
          - qcom,sm6125-dwc3
          - qcom,sm6350-dwc3
          - qcom,sm6375-dwc3
          - qcom,sm8150-dwc3
          - qcom,sm8250-dwc3
          - qcom,sm8350-dwc3
@@ -108,12 +109,17 @@ properties:
      HS/FS/LS modes are supported.
    type: boolean

  wakeup-source: true

# Required child node:

patternProperties:
  "^usb@[0-9a-f]+$":
    $ref: snps,dwc3.yaml#

    properties:
      wakeup-source: false

required:
  - compatible
  - reg
+14 −21
Original line number Diff line number Diff line
@@ -1416,42 +1416,37 @@ static void mceusb_gen1_init(struct mceusb_dev *ir)
{
	int ret;
	struct device *dev = ir->dev;
	char *data;

	data = kzalloc(USB_CTRL_MSG_SZ, GFP_KERNEL);
	if (!data) {
		dev_err(dev, "%s: memory allocation failed!", __func__);
		return;
	}
	char data[USB_CTRL_MSG_SZ];

	/*
	 * This is a strange one. Windows issues a set address to the device
	 * on the receive control pipe and expect a certain value pair back
	 */
	ret = usb_control_msg(ir->usbdev, usb_rcvctrlpipe(ir->usbdev, 0),
			      USB_REQ_SET_ADDRESS, USB_TYPE_VENDOR, 0, 0,
			      data, USB_CTRL_MSG_SZ, 3000);
	ret = usb_control_msg_recv(ir->usbdev, 0, USB_REQ_SET_ADDRESS,
				   USB_DIR_IN | USB_TYPE_VENDOR,
				   0, 0, data, USB_CTRL_MSG_SZ, 3000,
				   GFP_KERNEL);
	dev_dbg(dev, "set address - ret = %d", ret);
	dev_dbg(dev, "set address - data[0] = %d, data[1] = %d",
						data[0], data[1]);

	/* set feature: bit rate 38400 bps */
	ret = usb_control_msg(ir->usbdev, usb_sndctrlpipe(ir->usbdev, 0),
	ret = usb_control_msg_send(ir->usbdev, 0,
				   USB_REQ_SET_FEATURE, USB_TYPE_VENDOR,
			      0xc04e, 0x0000, NULL, 0, 3000);
				   0xc04e, 0x0000, NULL, 0, 3000, GFP_KERNEL);

	dev_dbg(dev, "set feature - ret = %d", ret);

	/* bRequest 4: set char length to 8 bits */
	ret = usb_control_msg(ir->usbdev, usb_sndctrlpipe(ir->usbdev, 0),
	ret = usb_control_msg_send(ir->usbdev, 0,
				   4, USB_TYPE_VENDOR,
			      0x0808, 0x0000, NULL, 0, 3000);
				   0x0808, 0x0000, NULL, 0, 3000, GFP_KERNEL);
	dev_dbg(dev, "set char length - retB = %d", ret);

	/* bRequest 2: set handshaking to use DTR/DSR */
	ret = usb_control_msg(ir->usbdev, usb_sndctrlpipe(ir->usbdev, 0),
	ret = usb_control_msg_send(ir->usbdev, 0,
				   2, USB_TYPE_VENDOR,
			      0x0000, 0x0100, NULL, 0, 3000);
				   0x0000, 0x0100, NULL, 0, 3000, GFP_KERNEL);
	dev_dbg(dev, "set handshake  - retC = %d", ret);

	/* device resume */
@@ -1459,8 +1454,6 @@ static void mceusb_gen1_init(struct mceusb_dev *ir)

	/* get hw/sw revision? */
	mce_command_out(ir, GET_REVISION, sizeof(GET_REVISION));

	kfree(data);
}

static void mceusb_gen2_init(struct mceusb_dev *ir)
+1 −1
Original line number Diff line number Diff line
@@ -407,7 +407,7 @@ static void tb_ctl_rx_submit(struct ctl_pkg *pkg)

static int tb_async_error(const struct ctl_pkg *pkg)
{
	const struct cfg_error_pkg *error = (const struct cfg_error_pkg *)pkg;
	const struct cfg_error_pkg *error = pkg->buffer;

	if (pkg->frame.eof != TB_CFG_PKG_ERROR)
		return false;
+5 −1
Original line number Diff line number Diff line
@@ -3786,14 +3786,18 @@ int tb_switch_pcie_l1_enable(struct tb_switch *sw)
 */
int tb_switch_xhci_connect(struct tb_switch *sw)
{
	bool usb_port1, usb_port3, xhci_port1, xhci_port3;
	struct tb_port *port1, *port3;
	int ret;

	if (sw->generation != 3)
		return 0;

	port1 = &sw->ports[1];
	port3 = &sw->ports[3];

	if (tb_switch_is_alpine_ridge(sw)) {
		bool usb_port1, usb_port3, xhci_port1, xhci_port3;

		usb_port1 = tb_lc_is_usb_plugged(port1);
		usb_port3 = tb_lc_is_usb_plugged(port3);
		xhci_port1 = tb_lc_is_xhci_connected(port1);
Loading