Commit 6a655547 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull USB driver fixes from Greg KH:
 "Here are some small USB driver fixes for 5.14-rc5. They resolve a
  number of small reported issues, including:

   - cdnsp driver fixes

   - usb serial driver fixes and device id updates

   - usb gadget hid fixes

   - usb host driver fixes

   - usb dwc3 driver fixes

   - other usb gadget driver fixes

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

* tag 'usb-5.14-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (21 commits)
  usb: typec: tcpm: Keep other events when receiving FRS and Sourcing_vbus events
  usb: dwc3: gadget: Avoid runtime resume if disabling pullup
  usb: dwc3: gadget: Use list_replace_init() before traversing lists
  USB: serial: ftdi_sio: add device ID for Auto-M3 OP-COM v2
  USB: serial: pl2303: fix GT type detection
  USB: serial: option: add Telit FD980 composition 0x1056
  USB: serial: pl2303: fix HX type detection
  USB: serial: ch341: fix character loss at high transfer rates
  usb: cdnsp: Fix the IMAN_IE_SET and IMAN_IE_CLEAR macro
  usb: cdnsp: Fixed issue with ZLP
  usb: cdnsp: Fix incorrect supported maximum speed
  usb: cdns3: Fixed incorrect gadget state
  usb: gadget: f_hid: idle uses the highest byte for duration
  Revert "thunderbolt: Hide authorized attribute if router does not support PCIe tunnels"
  usb: otg-fsm: Fix hrtimer list corruption
  usb: host: ohci-at91: suspend/resume ports after/before OHCI accesses
  usb: musb: Fix suspend and resume issues for PHYs on I2C and SPI
  usb: gadget: f_hid: added GET_IDLE and SET_IDLE handlers
  usb: gadget: f_hid: fixed NULL pointer dereference
  usb: gadget: remove leaked entry from udc driver list
  ...
parents 85a90500 43ad944c
Loading
Loading
Loading
Loading
+1 −14
Original line number Diff line number Diff line
@@ -1875,18 +1875,6 @@ static struct attribute *switch_attrs[] = {
	NULL,
};

static bool has_port(const struct tb_switch *sw, enum tb_port_type type)
{
	const struct tb_port *port;

	tb_switch_for_each_port(sw, port) {
		if (!port->disabled && port->config.type == type)
			return true;
	}

	return false;
}

static umode_t switch_attr_is_visible(struct kobject *kobj,
				      struct attribute *attr, int n)
{
@@ -1895,8 +1883,7 @@ static umode_t switch_attr_is_visible(struct kobject *kobj,

	if (attr == &dev_attr_authorized.attr) {
		if (sw->tb->security_level == TB_SECURITY_NOPCIE ||
		    sw->tb->security_level == TB_SECURITY_DPONLY ||
		    !has_port(sw, TB_TYPE_PCIE_UP))
		    sw->tb->security_level == TB_SECURITY_DPONLY)
			return 0;
	} else if (attr == &dev_attr_device.attr) {
		if (!sw->device)
+1 −0
Original line number Diff line number Diff line
@@ -731,6 +731,7 @@ static int cdns3_gadget_ep0_queue(struct usb_ep *ep,
		request->actual = 0;
		priv_dev->status_completion_no_call = true;
		priv_dev->pending_status_request = request;
		usb_gadget_set_state(&priv_dev->gadget, USB_STATE_CONFIGURED);
		spin_unlock_irqrestore(&priv_dev->lock, flags);

		/*
+1 −1
Original line number Diff line number Diff line
@@ -1882,7 +1882,7 @@ static int __cdnsp_gadget_init(struct cdns *cdns)
	pdev->gadget.name = "cdnsp-gadget";
	pdev->gadget.speed = USB_SPEED_UNKNOWN;
	pdev->gadget.sg_supported = 1;
	pdev->gadget.max_speed = USB_SPEED_SUPER_PLUS;
	pdev->gadget.max_speed = max_speed;
	pdev->gadget.lpm_capable = 1;

	pdev->setup_buf = kzalloc(CDNSP_EP0_SETUP_SIZE, GFP_KERNEL);
+2 −2
Original line number Diff line number Diff line
@@ -383,8 +383,8 @@ struct cdnsp_intr_reg {
#define IMAN_IE			BIT(1)
#define IMAN_IP			BIT(0)
/* bits 2:31 need to be preserved */
#define IMAN_IE_SET(p)		(((p) & IMAN_IE) | 0x2)
#define IMAN_IE_CLEAR(p)	(((p) & IMAN_IE) & ~(0x2))
#define IMAN_IE_SET(p)		((p) | IMAN_IE)
#define IMAN_IE_CLEAR(p)	((p) & ~IMAN_IE)

/* IMOD - Interrupter Moderation Register - irq_control bitmasks. */
/*
+8 −10
Original line number Diff line number Diff line
@@ -1932,16 +1932,14 @@ int cdnsp_queue_bulk_tx(struct cdnsp_device *pdev, struct cdnsp_request *preq)
		}

		if (enqd_len + trb_buff_len >= full_len) {
			if (need_zero_pkt && zero_len_trb) {
				zero_len_trb = true;
			} else {
			if (need_zero_pkt)
				zero_len_trb = !zero_len_trb;

			field &= ~TRB_CHAIN;
			field |= TRB_IOC;
			more_trbs_coming = false;
				need_zero_pkt = false;
			preq->td.last_trb = ring->enqueue;
		}
		}

		/* Only set interrupt on short packet for OUT endpoints. */
		if (!preq->direction)
@@ -1955,7 +1953,7 @@ int cdnsp_queue_bulk_tx(struct cdnsp_device *pdev, struct cdnsp_request *preq)
		length_field = TRB_LEN(trb_buff_len) | TRB_TD_SIZE(remainder) |
			TRB_INTR_TARGET(0);

		cdnsp_queue_trb(pdev, ring, more_trbs_coming | need_zero_pkt,
		cdnsp_queue_trb(pdev, ring, more_trbs_coming | zero_len_trb,
				lower_32_bits(send_addr),
				upper_32_bits(send_addr),
				length_field,
Loading