All of lore.kernel.org
 help / color / mirror / Atom feed
* USB: serial: qcserial: add Sierra Wireless EM7565
@ 2017-12-10 15:54 Reinhard Speyerer
  0 siblings, 0 replies; 4+ messages in thread
From: Reinhard Speyerer @ 2017-12-10 15:54 UTC (permalink / raw)
  To: johan; +Cc: linux-usb, Sebastian Sjoholm

Sierra Wireless EM7565 devices use the DEVICE_SWI layout for their
serial ports

T:  Bus=01 Lev=03 Prnt=29 Port=01 Cnt=02 Dev#= 31 Spd=480  MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=1199 ProdID=9091 Rev= 0.06
S:  Manufacturer=Sierra Wireless, Incorporated
S:  Product=Sierra Wireless EM7565 Qualcomm Snapdragon X16 LTE-A
S:  SerialNumber=xxxxxxxx
C:* #Ifs= 4 Cfg#= 1 Atr=a0 MxPwr=500mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=qcserial
E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=qcserial
E:  Ad=83(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
E:  Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=qcserial
E:  Ad=85(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
E:  Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 8 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan
E:  Ad=86(I) Atr=03(Int.) MxPS=   8 Ivl=32ms
E:  Ad=8e(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=0f(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms

but need sendsetup = true for the GPS port to make it work properly.
Add a new DEVICE_SW2 layout variant and use it for the EM7565 PID 0x9091.
Add a DEVICE_SWI entry for the EM7565 QDL PID 0x9090.

Signed-off-by: Reinhard Speyerer <rspmn@arcor.de>
---
[The corresponding qmi_wwan patch will be submitted by Sebastian Sjoholm.]

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

diff --git a/drivers/usb/serial/qcserial.c b/drivers/usb/serial/qcserial.c
index e3892541a489..e8f86d038e51 100644
--- a/drivers/usb/serial/qcserial.c
+++ b/drivers/usb/serial/qcserial.c
@@ -26,6 +26,7 @@ enum qcserial_layouts {
 	QCSERIAL_G1K = 1,	/* Gobi 1000 */
 	QCSERIAL_SWI = 2,	/* Sierra Wireless */
 	QCSERIAL_HWI = 3,	/* Huawei */
+	QCSERIAL_SW2 = 4,	/* SWI with sendsetup for GPS port */
 };
 
 #define DEVICE_G1K(v, p) \
@@ -34,6 +35,8 @@ enum qcserial_layouts {
 	USB_DEVICE(v, p), .driver_info = QCSERIAL_SWI
 #define DEVICE_HWI(v, p) \
 	USB_DEVICE(v, p), .driver_info = QCSERIAL_HWI
+#define DEVICE_SW2(v, p) \
+	USB_DEVICE(v, p), .driver_info = QCSERIAL_SW2
 
 static const struct usb_device_id id_table[] = {
 	/* Gobi 1000 devices */
@@ -162,6 +165,8 @@ static const struct usb_device_id id_table[] = {
 	{DEVICE_SWI(0x1199, 0x9079)},	/* Sierra Wireless EM74xx */
 	{DEVICE_SWI(0x1199, 0x907a)},	/* Sierra Wireless EM74xx QDL */
 	{DEVICE_SWI(0x1199, 0x907b)},	/* Sierra Wireless EM74xx */
+	{DEVICE_SWI(0x1199, 0x9090)},	/* Sierra Wireless EM7565 QDL */
+	{DEVICE_SW2(0x1199, 0x9091)},	/* Sierra Wireless EM7565 */
 	{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 */
@@ -329,6 +334,7 @@ static int qcprobe(struct usb_serial *serial, const struct usb_device_id *id)
 		}
 		break;
 	case QCSERIAL_SWI:
+	case QCSERIAL_SW2:
 		/*
 		 * Sierra Wireless layout:
 		 * 0: DM/DIAG (use libqcdm from ModemManager for communication)
@@ -342,6 +348,8 @@ static int qcprobe(struct usb_serial *serial, const struct usb_device_id *id)
 			break;
 		case 2:
 			dev_dbg(dev, "NMEA GPS interface found\n");
+			if (id->driver_info == QCSERIAL_SW2)
+				sendsetup = true;
 			break;
 		case 3:
 			dev_dbg(dev, "Modem port found\n");

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* USB: serial: qcserial: add Sierra Wireless EM7565
@ 2017-12-14 13:25 Reinhard Speyerer
  0 siblings, 0 replies; 4+ messages in thread
From: Reinhard Speyerer @ 2017-12-14 13:25 UTC (permalink / raw)
  To: Bjørn Mork; +Cc: johan, linux-usb, Sebastian Sjoholm

On Mon, Dec 11, 2017 at 09:48:00PM +0100, Bjørn Mork wrote:
> Reinhard Speyerer <rspmn@arcor.de> writes:
> 
> > Sierra Wireless EM7565 devices use the DEVICE_SWI layout for their
> > serial ports
> >
> > T:  Bus=01 Lev=03 Prnt=29 Port=01 Cnt=02 Dev#= 31 Spd=480  MxCh= 0
> > D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
> > P:  Vendor=1199 ProdID=9091 Rev= 0.06
> > S:  Manufacturer=Sierra Wireless, Incorporated
> > S:  Product=Sierra Wireless EM7565 Qualcomm Snapdragon X16 LTE-A
> > S:  SerialNumber=xxxxxxxx
> > C:* #Ifs= 4 Cfg#= 1 Atr=a0 MxPwr=500mA
> > I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=qcserial
> > E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> > E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> > I:* If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=qcserial
> > E:  Ad=83(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
> > E:  Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> > E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> > I:* If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=qcserial
> > E:  Ad=85(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
> > E:  Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> > E:  Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> > I:* If#= 8 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan
> > E:  Ad=86(I) Atr=03(Int.) MxPS=   8 Ivl=32ms
> > E:  Ad=8e(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> > E:  Ad=0f(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> >
> > but need sendsetup = true for the GPS port to make it work properly.
> > Add a new DEVICE_SW2 layout variant and use it for the EM7565 PID 0x9091.
> > Add a DEVICE_SWI entry for the EM7565 QDL PID 0x9090.
> 
> I wonder if the new variant is strictly necessary?  I got a feeling that
> the old behaviour is arbitrary, and that older Sierra devices might work
> both with and without sendsetup too.
> 
> Did you try sendsetup on the NMEA port with any older Sierra device?
> 
> I just did a quick test on the EM7455 in my laptop, and it doesn't seem
> to mind at least.
> 
> 
> Bjørn

Hi Bjørn,

following your suggestion I used this patch for testing:


On all of the MC77xx/MC73xx/MC74xx devices I tried and even on an old
MC8801 switched to QMI mode the NMEA port worked without problems for
me.

Besides being simpler than v1 the patch above also avoids for future
vendor-branded EM7565 variants being added to the wrong layout macro
by mistake.

I will submit a formal patch v2 based on the above later today.

Regards,
Reinhard
---
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

--- drivers/usb/serial/qcserial.c.orig	2017-07-27 18:10:39.000000000 -0400
+++ drivers/usb/serial/qcserial.c	2017-12-13 18:02:37.946654688 -0500
@@ -167,2 +167,4 @@
 	{DEVICE_SWI(0x1199, 0x907b)},	/* Sierra Wireless EM74xx */
+	{DEVICE_SWI(0x1199, 0x9090)},	/* Sierra Wireless EM7565 QDL */
+	{DEVICE_SWI(0x1199, 0x9091)},	/* Sierra Wireless EM7565 */
 	{DEVICE_SWI(0x413c, 0x81a2)},	/* Dell Wireless 5806 Gobi(TM) 4G LTE Mobile Broadband Card */
@@ -343,2 +345,3 @@
 			dev_dbg(dev, "NMEA GPS interface found\n");
+			sendsetup = true;
 			break;

^ permalink raw reply	[flat|nested] 4+ messages in thread

* USB: serial: qcserial: add Sierra Wireless EM7565
@ 2017-12-11 23:17 Reinhard Speyerer
  0 siblings, 0 replies; 4+ messages in thread
From: Reinhard Speyerer @ 2017-12-11 23:17 UTC (permalink / raw)
  To: Bjørn Mork; +Cc: johan, linux-usb, Sebastian Sjoholm

On Mon, Dec 11, 2017 at 09:48:00PM +0100, Bjørn Mork wrote:
> Reinhard Speyerer <rspmn@arcor.de> writes:
> 
> > Sierra Wireless EM7565 devices use the DEVICE_SWI layout for their
> > serial ports
> >
> > T:  Bus=01 Lev=03 Prnt=29 Port=01 Cnt=02 Dev#= 31 Spd=480  MxCh= 0
> > D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
> > P:  Vendor=1199 ProdID=9091 Rev= 0.06
> > S:  Manufacturer=Sierra Wireless, Incorporated
> > S:  Product=Sierra Wireless EM7565 Qualcomm Snapdragon X16 LTE-A
> > S:  SerialNumber=xxxxxxxx
> > C:* #Ifs= 4 Cfg#= 1 Atr=a0 MxPwr=500mA
> > I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=qcserial
> > E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> > E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> > I:* If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=qcserial
> > E:  Ad=83(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
> > E:  Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> > E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> > I:* If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=qcserial
> > E:  Ad=85(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
> > E:  Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> > E:  Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> > I:* If#= 8 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan
> > E:  Ad=86(I) Atr=03(Int.) MxPS=   8 Ivl=32ms
> > E:  Ad=8e(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> > E:  Ad=0f(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> >
> > but need sendsetup = true for the GPS port to make it work properly.
> > Add a new DEVICE_SW2 layout variant and use it for the EM7565 PID 0x9091.
> > Add a DEVICE_SWI entry for the EM7565 QDL PID 0x9090.
> 
> I wonder if the new variant is strictly necessary?  I got a feeling that
> the old behaviour is arbitrary, and that older Sierra devices might work
> both with and without sendsetup too.
> 
> Did you try sendsetup on the NMEA port with any older Sierra device?
> 
> I just did a quick test on the EM7455 in my laptop, and it doesn't seem
> to mind at least.
> 

Hi Bjørn,

I did a quick test with a MC7304 running firmware 05.05.67.00 and
the NMEA port works too with sendsetup enabled.

The introduction of the QCSERIAL_SW2 layout was an attempt to avoid
potential regressions with other devices as my testing possibilities
are limited to MC77xx/MC73xx/MC74xx devices.

If you and Johan consider it safe to always use sendsetup on the NMEA
port for the QCSERIAL_SWI layout I could submit this version as v2
of the patch.

Regards,
Reinhard
---
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* USB: serial: qcserial: add Sierra Wireless EM7565
@ 2017-12-11 20:48 Bjørn Mork
  0 siblings, 0 replies; 4+ messages in thread
From: Bjørn Mork @ 2017-12-11 20:48 UTC (permalink / raw)
  To: Reinhard Speyerer; +Cc: johan, linux-usb, Sebastian Sjoholm

Reinhard Speyerer <rspmn@arcor.de> writes:

> Sierra Wireless EM7565 devices use the DEVICE_SWI layout for their
> serial ports
>
> T:  Bus=01 Lev=03 Prnt=29 Port=01 Cnt=02 Dev#= 31 Spd=480  MxCh= 0
> D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
> P:  Vendor=1199 ProdID=9091 Rev= 0.06
> S:  Manufacturer=Sierra Wireless, Incorporated
> S:  Product=Sierra Wireless EM7565 Qualcomm Snapdragon X16 LTE-A
> S:  SerialNumber=xxxxxxxx
> C:* #Ifs= 4 Cfg#= 1 Atr=a0 MxPwr=500mA
> I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=qcserial
> E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> I:* If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=qcserial
> E:  Ad=83(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
> E:  Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> I:* If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=qcserial
> E:  Ad=85(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
> E:  Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> E:  Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> I:* If#= 8 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan
> E:  Ad=86(I) Atr=03(Int.) MxPS=   8 Ivl=32ms
> E:  Ad=8e(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> E:  Ad=0f(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
>
> but need sendsetup = true for the GPS port to make it work properly.
> Add a new DEVICE_SW2 layout variant and use it for the EM7565 PID 0x9091.
> Add a DEVICE_SWI entry for the EM7565 QDL PID 0x9090.

I wonder if the new variant is strictly necessary?  I got a feeling that
the old behaviour is arbitrary, and that older Sierra devices might work
both with and without sendsetup too.

Did you try sendsetup on the NMEA port with any older Sierra device?

I just did a quick test on the EM7455 in my laptop, and it doesn't seem
to mind at least.


Bjørn
---
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-12-14 13:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-10 15:54 USB: serial: qcserial: add Sierra Wireless EM7565 Reinhard Speyerer
2017-12-11 20:48 Bjørn Mork
2017-12-11 23:17 Reinhard Speyerer
2017-12-14 13:25 Reinhard Speyerer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.