Skip to content

Commit b48a7e7

Browse files
committed
Merge tag 'usb-serial-5.10-rc7' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-linus
Johan writes: USB-serial fixes for 5.10-rc7 Here's a fix for a regression in the option driver which has been backported to the stable trees and fix for a small memory leak on open in the kl5kusb105 driver. Included are also various new device ids. All but the memleak fix has been in linux-next and with no reported issues. * tag 'usb-serial-5.10-rc7' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial: USB: serial: kl5kusb105: fix memleak on open USB: serial: ch341: sort device-id entries USB: serial: ch341: add new Product ID for CH341A USB: serial: option: fix Quectel BG96 matching USB: serial: option: add support for Thales Cinterion EXS82 USB: serial: option: add Fibocom NL668 variants
2 parents d3f3130 + 3f203f0 commit b48a7e7

3 files changed

Lines changed: 13 additions & 12 deletions

File tree

drivers/usb/serial/ch341.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,11 @@
8181
#define CH341_QUIRK_SIMULATE_BREAK BIT(1)
8282

8383
static const struct usb_device_id id_table[] = {
84-
{ USB_DEVICE(0x4348, 0x5523) },
84+
{ USB_DEVICE(0x1a86, 0x5512) },
85+
{ USB_DEVICE(0x1a86, 0x5523) },
8586
{ USB_DEVICE(0x1a86, 0x7522) },
8687
{ USB_DEVICE(0x1a86, 0x7523) },
87-
{ USB_DEVICE(0x1a86, 0x5523) },
88+
{ USB_DEVICE(0x4348, 0x5523) },
8889
{ },
8990
};
9091
MODULE_DEVICE_TABLE(usb, id_table);

drivers/usb/serial/kl5kusb105.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -276,12 +276,12 @@ static int klsi_105_open(struct tty_struct *tty, struct usb_serial_port *port)
276276
priv->cfg.unknown2 = cfg->unknown2;
277277
spin_unlock_irqrestore(&priv->lock, flags);
278278

279+
kfree(cfg);
280+
279281
/* READ_ON and urb submission */
280282
rc = usb_serial_generic_open(tty, port);
281-
if (rc) {
282-
retval = rc;
283-
goto err_free_cfg;
284-
}
283+
if (rc)
284+
return rc;
285285

286286
rc = usb_control_msg(port->serial->dev,
287287
usb_sndctrlpipe(port->serial->dev, 0),
@@ -324,8 +324,6 @@ static int klsi_105_open(struct tty_struct *tty, struct usb_serial_port *port)
324324
KLSI_TIMEOUT);
325325
err_generic_close:
326326
usb_serial_generic_close(port);
327-
err_free_cfg:
328-
kfree(cfg);
329327

330328
return retval;
331329
}

drivers/usb/serial/option.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,7 @@ static void option_instat_callback(struct urb *urb);
419419
#define CINTERION_PRODUCT_PH8 0x0053
420420
#define CINTERION_PRODUCT_AHXX 0x0055
421421
#define CINTERION_PRODUCT_PLXX 0x0060
422+
#define CINTERION_PRODUCT_EXS82 0x006c
422423
#define CINTERION_PRODUCT_PH8_2RMNET 0x0082
423424
#define CINTERION_PRODUCT_PH8_AUDIO 0x0083
424425
#define CINTERION_PRODUCT_AHXX_2RMNET 0x0084
@@ -1105,9 +1106,8 @@ static const struct usb_device_id option_ids[] = {
11051106
{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EG95, 0xff, 0xff, 0xff),
11061107
.driver_info = NUMEP2 },
11071108
{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EG95, 0xff, 0, 0) },
1108-
{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_BG96, 0xff, 0xff, 0xff),
1109-
.driver_info = NUMEP2 },
1110-
{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_BG96, 0xff, 0, 0) },
1109+
{ USB_DEVICE(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_BG96),
1110+
.driver_info = RSVD(4) },
11111111
{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EP06, 0xff, 0xff, 0xff),
11121112
.driver_info = RSVD(1) | RSVD(2) | RSVD(3) | RSVD(4) | NUMEP2 },
11131113
{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EP06, 0xff, 0, 0) },
@@ -1902,6 +1902,7 @@ static const struct usb_device_id option_ids[] = {
19021902
{ USB_DEVICE_INTERFACE_CLASS(CINTERION_VENDOR_ID, CINTERION_PRODUCT_AHXX_AUDIO, 0xff) },
19031903
{ USB_DEVICE_INTERFACE_CLASS(CINTERION_VENDOR_ID, CINTERION_PRODUCT_CLS8, 0xff),
19041904
.driver_info = RSVD(0) | RSVD(4) },
1905+
{ USB_DEVICE_INTERFACE_CLASS(CINTERION_VENDOR_ID, CINTERION_PRODUCT_EXS82, 0xff) },
19051906
{ USB_DEVICE(CINTERION_VENDOR_ID, CINTERION_PRODUCT_HC28_MDM) },
19061907
{ USB_DEVICE(CINTERION_VENDOR_ID, CINTERION_PRODUCT_HC28_MDMNET) },
19071908
{ USB_DEVICE(SIEMENS_VENDOR_ID, CINTERION_PRODUCT_HC25_MDM) },
@@ -2046,12 +2047,13 @@ static const struct usb_device_id option_ids[] = {
20462047
.driver_info = RSVD(0) | RSVD(1) | RSVD(6) },
20472048
{ USB_DEVICE(0x0489, 0xe0b5), /* Foxconn T77W968 ESIM */
20482049
.driver_info = RSVD(0) | RSVD(1) | RSVD(6) },
2049-
{ USB_DEVICE(0x1508, 0x1001), /* Fibocom NL668 */
2050+
{ USB_DEVICE(0x1508, 0x1001), /* Fibocom NL668 (IOT version) */
20502051
.driver_info = RSVD(4) | RSVD(5) | RSVD(6) },
20512052
{ USB_DEVICE(0x2cb7, 0x0104), /* Fibocom NL678 series */
20522053
.driver_info = RSVD(4) | RSVD(5) },
20532054
{ USB_DEVICE_INTERFACE_CLASS(0x2cb7, 0x0105, 0xff), /* Fibocom NL678 series */
20542055
.driver_info = RSVD(6) },
2056+
{ USB_DEVICE_INTERFACE_CLASS(0x2cb7, 0x01a0, 0xff) }, /* Fibocom NL668-AM/NL652-EU (laptop MBIM) */
20552057
{ USB_DEVICE_INTERFACE_CLASS(0x305a, 0x1404, 0xff) }, /* GosunCn GM500 RNDIS */
20562058
{ USB_DEVICE_INTERFACE_CLASS(0x305a, 0x1405, 0xff) }, /* GosunCn GM500 MBIM */
20572059
{ USB_DEVICE_INTERFACE_CLASS(0x305a, 0x1406, 0xff) }, /* GosunCn GM500 ECM/NCM */

0 commit comments

Comments
 (0)