Commit c5fd2c5b authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull USB driver fixes from Greg KH:
 "Here are some small USB driver and core fixes for 5.5-rc7

  There's one fix for hub wakeup issues and a number of small usb-serial
  driver fixes and device id updates.

  The hub fix has been in linux-next for a while with no reported
  issues, and the usb-serial ones have all passed 0-day with no
  problems"

* tag 'usb-5.5-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
  USB: serial: quatech2: handle unbound ports
  USB: serial: keyspan: handle unbound ports
  USB: serial: io_edgeport: add missing active-port sanity check
  USB: serial: io_edgeport: handle unbound ports on URB completion
  USB: serial: ch341: handle unbound port at reset_resume
  USB: serial: suppress driver bind attributes
  USB: serial: option: add support for Quectel RM500Q in QDL mode
  usb: core: hub: Improved device recognition on remote wakeup
  USB: serial: opticon: fix control-message timeouts
  USB: serial: option: Add support for Quectel RM500Q
  USB: serial: simple: Add Motorola Solutions TETRA MTP3xxx and MTP85xx
parents 25e73aad 453495d4
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1192,6 +1192,7 @@ static void hub_activate(struct usb_hub *hub, enum hub_activation_type type)
			 * PORT_OVER_CURRENT is not. So check for any of them.
			 */
			if (udev || (portstatus & USB_PORT_STAT_CONNECTION) ||
			    (portchange & USB_PORT_STAT_C_CONNECTION) ||
			    (portstatus & USB_PORT_STAT_OVERCURRENT) ||
			    (portchange & USB_PORT_STAT_C_OVERCURRENT))
				set_bit(port1, hub->change_bits);
+5 −1
Original line number Diff line number Diff line
@@ -642,9 +642,13 @@ static int ch341_tiocmget(struct tty_struct *tty)
static int ch341_reset_resume(struct usb_serial *serial)
{
	struct usb_serial_port *port = serial->port[0];
	struct ch341_private *priv = usb_get_serial_port_data(port);
	struct ch341_private *priv;
	int ret;

	priv = usb_get_serial_port_data(port);
	if (!priv)
		return 0;

	/* reconfigure ch341 serial port after bus-reset */
	ch341_configure(serial->dev, priv);

+9 −7
Original line number Diff line number Diff line
@@ -716,7 +716,7 @@ static void edge_interrupt_callback(struct urb *urb)
			if (txCredits) {
				port = edge_serial->serial->port[portNumber];
				edge_port = usb_get_serial_port_data(port);
				if (edge_port->open) {
				if (edge_port && edge_port->open) {
					spin_lock_irqsave(&edge_port->ep_lock,
							  flags);
					edge_port->txCredits += txCredits;
@@ -1725,7 +1725,8 @@ static void edge_break(struct tty_struct *tty, int break_state)
static void process_rcvd_data(struct edgeport_serial *edge_serial,
				unsigned char *buffer, __u16 bufferLength)
{
	struct device *dev = &edge_serial->serial->dev->dev;
	struct usb_serial *serial = edge_serial->serial;
	struct device *dev = &serial->dev->dev;
	struct usb_serial_port *port;
	struct edgeport_port *edge_port;
	__u16 lastBufferLength;
@@ -1821,11 +1822,10 @@ static void process_rcvd_data(struct edgeport_serial *edge_serial,

			/* spit this data back into the tty driver if this
			   port is open */
			if (rxLen) {
				port = edge_serial->serial->port[
							edge_serial->rxPort];
			if (rxLen && edge_serial->rxPort < serial->num_ports) {
				port = serial->port[edge_serial->rxPort];
				edge_port = usb_get_serial_port_data(port);
				if (edge_port->open) {
				if (edge_port && edge_port->open) {
					dev_dbg(dev, "%s - Sending %d bytes to TTY for port %d\n",
						__func__, rxLen,
						edge_serial->rxPort);
@@ -1833,8 +1833,8 @@ static void process_rcvd_data(struct edgeport_serial *edge_serial,
							rxLen);
					edge_port->port->icount.rx += rxLen;
				}
				buffer += rxLen;
			}
			buffer += rxLen;
			break;

		case EXPECT_HDR3:	/* Expect 3rd byte of status header */
@@ -1869,6 +1869,8 @@ static void process_rcvd_status(struct edgeport_serial *edge_serial,
	__u8 code = edge_serial->rxStatusCode;

	/* switch the port pointer to the one being currently talked about */
	if (edge_serial->rxPort >= edge_serial->serial->num_ports)
		return;
	port = edge_serial->serial->port[edge_serial->rxPort];
	edge_port = usb_get_serial_port_data(port);
	if (edge_port == NULL) {
+4 −0
Original line number Diff line number Diff line
@@ -1058,6 +1058,8 @@ static void usa49_glocont_callback(struct urb *urb)
	for (i = 0; i < serial->num_ports; ++i) {
		port = serial->port[i];
		p_priv = usb_get_serial_port_data(port);
		if (!p_priv)
			continue;

		if (p_priv->resend_cont) {
			dev_dbg(&port->dev, "%s - sending setup\n", __func__);
@@ -1459,6 +1461,8 @@ static void usa67_glocont_callback(struct urb *urb)
	for (i = 0; i < serial->num_ports; ++i) {
		port = serial->port[i];
		p_priv = usb_get_serial_port_data(port);
		if (!p_priv)
			continue;

		if (p_priv->resend_cont) {
			dev_dbg(&port->dev, "%s - sending setup\n", __func__);
+1 −1
Original line number Diff line number Diff line
@@ -113,7 +113,7 @@ static int send_control_msg(struct usb_serial_port *port, u8 requesttype,
	retval = usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
				requesttype,
				USB_DIR_OUT|USB_TYPE_VENDOR|USB_RECIP_INTERFACE,
				0, 0, buffer, 1, 0);
				0, 0, buffer, 1, USB_CTRL_SET_TIMEOUT);
	kfree(buffer);

	if (retval < 0)
Loading