USB-serial fixes for 5.0-rc3

Here's a fix for the new ftdi gpio support, which failed to take
 autosuspend into account, and a patch adding missing SPDX identifiers to
 the keyspan headers.
 
 Included are also some new device ids.
 
 All but the SPDX patch have been in linux-next with no reported issues.
 
 Signed-off-by: Johan Hovold <johan@kernel.org>
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQQHbPq+cpGvN/peuzMLxc3C7H1lCAUCXEGnxAAKCRALxc3C7H1l
 CDWIAP9c3kzZLIxhVLyBpLaBgLQftCov5n0oIfNvbrFak3NZIQEA1R2Lvd/b5wbQ
 RS5ZaPzLIeeIUHA0YcavuMjdF3na5QM=
 =J9iV
 -----END PGP SIGNATURE-----

Merge tag 'usb-serial-5.0-rc3' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-linus

Johan writes:

USB-serial fixes for 5.0-rc3

Here's a fix for the new ftdi gpio support, which failed to take
autosuspend into account, and a patch adding missing SPDX identifiers to
the keyspan headers.

Included are also some new device ids.

All but the SPDX patch have been in linux-next with no reported issues.

Signed-off-by: Johan Hovold <johan@kernel.org>

* tag 'usb-serial-5.0-rc3' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial:
  USB: serial: keyspan_usa: add proper SPDX lines for .h files
  USB: serial: pl2303: add new PID to support PL2303TB
  USB: serial: ftdi_sio: fix GPIO not working in autosuspend
  USB: serial: simple: add Motorola Tetra TPG2200 device id
This commit is contained in:
Greg Kroah-Hartman 2019-01-18 12:58:20 +01:00
commit 4f9b838927
9 changed files with 24 additions and 2 deletions

View File

@ -1783,6 +1783,10 @@ static int ftdi_set_bitmode(struct usb_serial_port *port, u8 mode)
int result;
u16 val;
result = usb_autopm_get_interface(serial->interface);
if (result)
return result;
val = (mode << 8) | (priv->gpio_output << 4) | priv->gpio_value;
result = usb_control_msg(serial->dev,
usb_sndctrlpipe(serial->dev, 0),
@ -1795,6 +1799,8 @@ static int ftdi_set_bitmode(struct usb_serial_port *port, u8 mode)
val, result);
}
usb_autopm_put_interface(serial->interface);
return result;
}
@ -1846,9 +1852,15 @@ static int ftdi_read_cbus_pins(struct usb_serial_port *port)
unsigned char *buf;
int result;
result = usb_autopm_get_interface(serial->interface);
if (result)
return result;
buf = kmalloc(1, GFP_KERNEL);
if (!buf)
if (!buf) {
usb_autopm_put_interface(serial->interface);
return -ENOMEM;
}
result = usb_control_msg(serial->dev,
usb_rcvctrlpipe(serial->dev, 0),
@ -1863,6 +1875,7 @@ static int ftdi_read_cbus_pins(struct usb_serial_port *port)
}
kfree(buf);
usb_autopm_put_interface(serial->interface);
return result;
}

View File

@ -1,3 +1,4 @@
/* SPDX-License-Identifier: BSD-3-Clause */
/*
usa26msg.h

View File

@ -1,3 +1,4 @@
/* SPDX-License-Identifier: BSD-3-Clause */
/*
usa28msg.h

View File

@ -1,3 +1,4 @@
/* SPDX-License-Identifier: BSD-3-Clause */
/*
usa49msg.h

View File

@ -1,3 +1,4 @@
/* SPDX-License-Identifier: BSD-3-Clause */
/*
usa67msg.h

View File

@ -1,3 +1,4 @@
/* SPDX-License-Identifier: BSD-3-Clause */
/*
usa90msg.h

View File

@ -46,6 +46,7 @@ static const struct usb_device_id id_table[] = {
{ USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_HCR331) },
{ USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_MOTOROLA) },
{ USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_ZTEK) },
{ USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_TB) },
{ USB_DEVICE(IODATA_VENDOR_ID, IODATA_PRODUCT_ID) },
{ USB_DEVICE(IODATA_VENDOR_ID, IODATA_PRODUCT_ID_RSAQ5) },
{ USB_DEVICE(ATEN_VENDOR_ID, ATEN_PRODUCT_ID),

View File

@ -8,6 +8,7 @@
#define PL2303_VENDOR_ID 0x067b
#define PL2303_PRODUCT_ID 0x2303
#define PL2303_PRODUCT_ID_TB 0x2304
#define PL2303_PRODUCT_ID_RSAQ2 0x04bb
#define PL2303_PRODUCT_ID_DCU11 0x1234
#define PL2303_PRODUCT_ID_PHAROS 0xaaa0
@ -20,6 +21,7 @@
#define PL2303_PRODUCT_ID_MOTOROLA 0x0307
#define PL2303_PRODUCT_ID_ZTEK 0xe1f1
#define ATEN_VENDOR_ID 0x0557
#define ATEN_VENDOR_ID2 0x0547
#define ATEN_PRODUCT_ID 0x2008

View File

@ -85,7 +85,8 @@ DEVICE(moto_modem, MOTO_IDS);
/* Motorola Tetra driver */
#define MOTOROLA_TETRA_IDS() \
{ USB_DEVICE(0x0cad, 0x9011) }, /* Motorola Solutions TETRA PEI */ \
{ USB_DEVICE(0x0cad, 0x9012) } /* MTP6550 */
{ USB_DEVICE(0x0cad, 0x9012) }, /* MTP6550 */ \
{ USB_DEVICE(0x0cad, 0x9016) } /* TPG2200 */
DEVICE(motorola_tetra, MOTOROLA_TETRA_IDS);
/* Novatel Wireless GPS driver */