[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241117083204.57738-3-intelfx@intelfx.name>
Date: Sun, 17 Nov 2024 12:31:13 +0400
From: Ivan Shapovalov <intelfx@...elfx.name>
To: linux-kernel@...r.kernel.org
Cc: Ivan Shapovalov <intelfx@...elfx.name>,
Bjørn Mork <bjorn@...k.no>,
Andrew Lunn <andrew+netdev@...n.ch>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
Johan Hovold <johan@...nel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
netdev@...r.kernel.org,
linux-usb@...r.kernel.org
Subject: [PATCH 3/5] USB: serial: qcserial: add EM9xxx (SDX55) IDs and configurations
This is a port of the corresponding change from the qcserial.c driver
distributed as part of the 9X50 SDK. It was not tested by the author.
Signed-off-by: Ivan Shapovalov <intelfx@...elfx.name>
---
drivers/usb/serial/qcserial.c | 55 ++++++++++++++++++++++++++++++++++-
1 file changed, 54 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/serial/qcserial.c b/drivers/usb/serial/qcserial.c
index c7167242e235..f1b0ef9935bb 100644
--- a/drivers/usb/serial/qcserial.c
+++ b/drivers/usb/serial/qcserial.c
@@ -28,6 +28,8 @@ enum qcserial_layouts {
QCSERIAL_HWI = 3, /* Huawei */
QCSERIAL_SWI_9X50_MBIM = 4, /* Sierra Wireless 9x50 "MBIM USBIF" */
QCSERIAL_SWI_9X50_PCIE = 5, /* Sierra Wireless 9x50 "PCIE USBIF" */
+ QCSERIAL_SWI_SDX55 = 6, /* Sierra Wireless SDX55 */
+ QCSERIAL_SWI_SDX55_RMNET = 7, /* Sierra Wireless SDX55 */
};
#define DEVICE_G1K(v, p) \
@@ -38,6 +40,10 @@ enum qcserial_layouts {
USB_DEVICE(v, p), .driver_info = QCSERIAL_SWI_9X50_PCIE
#define DEVICE_SWI_9X50_MBIM(v, p) \
USB_DEVICE(v, p), .driver_info = QCSERIAL_SWI_9X50_MBIM
+#define DEVICE_SWI_SDX55(v, p) \
+ USB_DEVICE(v, p), .driver_info = QCSERIAL_SWI_SDX55
+#define DEVICE_SWI_SDX55_RMNET(v, p) \
+ USB_DEVICE(v, p), .driver_info = QCSERIAL_SWI_SDX55_RMNET
#define DEVICE_HWI(v, p) \
USB_DEVICE(v, p), .driver_info = QCSERIAL_HWI
@@ -177,11 +183,18 @@ static const struct usb_device_id id_table[] = {
{DEVICE_SWI_9X50_PCIE(0x1199, 0x90c1)}, /* Sierra Wireless EM7565 (unknown configuration, found in on-device AT command help) */
{DEVICE_SWI(0x1199, 0x90c2)}, /* Sierra Wireless EM7565 QDL */
{DEVICE_SWI_9X50_PCIE(0x1199, 0x90c3)}, /* Sierra Wireless EM7565 "PCIE USBIF" */
- {DEVICE_SWI(0x1199, 0x90d2)}, /* Sierra Wireless EM9191 QDL */
{DEVICE_SWI(0x1199, 0x90e4)}, /* Sierra Wireless EM86xx QDL*/
{DEVICE_SWI(0x1199, 0x90e5)}, /* Sierra Wireless EM86xx */
{DEVICE_SWI(0x1199, 0xc080)}, /* Sierra Wireless EM7590 QDL */
{DEVICE_SWI(0x1199, 0xc081)}, /* Sierra Wireless EM7590 */
+ {DEVICE_SWI(0x1199, 0x90d2)}, /* Sierra Wireless EM9190 QDL */
+ {DEVICE_SWI_SDX55(0x1199, 0x90d3)}, /* Sierra Wireless EM9190 */
+ {DEVICE_SWI(0x1199, 0x90d8)}, /* Sierra Wireless EM9190 QDL */
+ {DEVICE_SWI_SDX55_RMNET(0x1199, 0x90d9)}, /* Sierra Wireless EM9190 */
+ {DEVICE_SWI(0x1199, 0x90e0)}, /* Sierra Wireless EM929x QDL */
+ {DEVICE_SWI_SDX55(0x1199, 0x90e1)}, /* Sierra Wireless EM929x */
+ {DEVICE_SWI(0x1199, 0x90e2)}, /* Sierra Wireless EM929x QDL */
+ {DEVICE_SWI_SDX55(0x1199, 0x90e3)}, /* Sierra Wireless EM929x */
{DEVICE_SWI(0x413c, 0x81a2)}, /* Dell Wireless 5806 Gobi(TM) 4G LTE Mobile Broadband Card */
{DEVICE_SWI(0x413c, 0x81a3)}, /* Dell Wireless 5570 HSPA+ (42Mbps) Mobile Broadband Card */
{DEVICE_SWI(0x413c, 0x81a4)}, /* Dell Wireless 5570e HSPA+ (42Mbps) Mobile Broadband Card */
@@ -476,6 +489,46 @@ static int qcprobe(struct usb_serial *serial, const struct usb_device_id *id)
break;
}
break;
+ case QCSERIAL_SWI_SDX55:
+ /*
+ * Sierra Wireless SDX55 layout:
+ * 3: AT-capable modem port
+ * 4: DM
+ */
+ switch (ifnum) {
+ case 3:
+ dev_dbg(dev, "Modem port found\n");
+ sendsetup = true;
+ break;
+ case 4:
+ dev_dbg(dev, "DM/DIAG interface found\n");
+ break;
+ default:
+ /* don't claim any unsupported interface */
+ altsetting = -1;
+ break;
+ }
+ break;
+ case QCSERIAL_SWI_SDX55_RMNET:
+ /*
+ * Sierra Wireless SDX55 layout:
+ * 1: AT-capable modem port
+ * 2: DM
+ */
+ switch (ifnum) {
+ case 1:
+ dev_dbg(dev, "Modem port found\n");
+ sendsetup = true;
+ break;
+ case 2:
+ dev_dbg(dev, "DM/DIAG interface found\n");
+ break;
+ default:
+ /* don't claim any unsupported interface */
+ altsetting = -1;
+ break;
+ }
+ break;
default:
dev_err(dev, "unsupported device layout type: %lu\n",
id->driver_info);
--
2.47.0.5.gd823fa0eac
Powered by blists - more mailing lists