All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] USB: serial: option: adding support for YUGA CLM920-NC5
@ 2017-12-15 10:32 ` SZ Lin
  0 siblings, 0 replies; 12+ messages in thread
From: SZ Lin @ 2017-12-15 10:32 UTC (permalink / raw)
  Cc: SZ Lin, Taiyi Wu, Johan Hovold, Greg Kroah-Hartman, linux-usb,
	linux-kernel

This patch adds support for YUGA CLM920-NC5 PID 0x9625 USB modem to option
driver.

Signed-off-by: Taiyi Wu <taiyity.wu@moxa.com>
Signed-off-by: SZ Lin <sz.lin@moxa.com>
---

Please refer to following lsusb output:

Bus 001 Device 003: ID 05c6:9625 Qualcomm, Inc.
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  idVendor           0x05c6 Qualcomm, Inc.
  idProduct          0x9625
  bcdDevice            3.18
  iManufacturer           1 Shanghai Yuge
  iProduct                2 YUGA Incorporated
  iSerial                 3 0123456789ABCDEF
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength          183
    bNumInterfaces          5
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower              500mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass    255 Vendor Specific Subclass
      bInterfaceProtocol    255 Vendor Specific Protocol
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass     66
      bInterfaceProtocol      1
      iInterface              6 ADB Interface
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       0
      bNumEndpoints           3
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      0
      bInterfaceProtocol      0
      iInterface              0
      ** UNRECOGNIZED:  05 24 00 10 01
      ** UNRECOGNIZED:  05 24 01 00 00
      ** UNRECOGNIZED:  04 24 02 02
      ** UNRECOGNIZED:  05 24 06 00 00
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x84  EP 4 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x000a  1x 10 bytes
        bInterval               9
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x03  EP 3 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        3
      bAlternateSetting       0
      bNumEndpoints           3
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      0
      bInterfaceProtocol      0
      iInterface              0
      ** UNRECOGNIZED:  05 24 00 10 01
      ** UNRECOGNIZED:  05 24 01 00 00
      ** UNRECOGNIZED:  04 24 02 02
      ** UNRECOGNIZED:  05 24 06 00 00
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x86  EP 6 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x000a  1x 10 bytes
        bInterval               9
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x85  EP 5 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x04  EP 4 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        4
      bAlternateSetting       0
      bNumEndpoints           3
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass    255 Vendor Specific Subclass
      bInterfaceProtocol    255 Vendor Specific Protocol
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x88  EP 8 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0008  1x 8 bytes
        bInterval               9
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x87  EP 7 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x05  EP 5 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType         6
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  bNumConfigurations      1
Device Status:     0x0000
  (Bus Powered)

---
 drivers/usb/serial/option.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
index 3b3513874cfd..370a0342072f 100644
--- a/drivers/usb/serial/option.c
+++ b/drivers/usb/serial/option.c
@@ -233,6 +233,8 @@ static void option_instat_callback(struct urb *urb);
 /* These Quectel products use Qualcomm's vendor ID */
 #define QUECTEL_PRODUCT_UC20			0x9003
 #define QUECTEL_PRODUCT_UC15			0x9090
+/* These Yuga products use Qualcomm's vendor ID */
+#define YUGA_PROFUCT_CLM920_NC5			0x9625
 
 #define QUECTEL_VENDOR_ID			0x2c7c
 /* These Quectel products use Quectel's vendor ID */
@@ -674,6 +676,10 @@ static const struct option_blacklist_info cinterion_rmnet2_blacklist = {
 	.reserved = BIT(4) | BIT(5),
 };
 
+static const struct option_blacklist_info yuga_clm920_nc5_blacklist = {
+	.reserved = BIT(0) | BIT(1) | BIT(4),
+};
+
 static const struct usb_device_id option_ids[] = {
 	{ USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COLT) },
 	{ USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_RICOLA) },
@@ -1178,6 +1184,9 @@ static const struct usb_device_id option_ids[] = {
 	{ USB_DEVICE(QUALCOMM_VENDOR_ID, QUECTEL_PRODUCT_UC15)},
 	{ USB_DEVICE(QUALCOMM_VENDOR_ID, QUECTEL_PRODUCT_UC20),
 	  .driver_info = (kernel_ulong_t)&net_intf4_blacklist },
+	/* Yuga products use Qualcomm vendor ID */
+	{ USB_DEVICE(QUALCOMM_VENDOR_ID, YUGA_PROFUCT_CLM920_NC5),
+	  .driver_info = (kernel_ulong_t)&yuga_clm920_nc5_blacklist },
 	/* Quectel products using Quectel vendor ID */
 	{ USB_DEVICE(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EC21),
 	  .driver_info = (kernel_ulong_t)&net_intf4_blacklist },
-- 
2.15.1

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

* USB: serial: option: adding support for YUGA CLM920-NC5
@ 2017-12-15 10:32 ` SZ Lin
  0 siblings, 0 replies; 12+ messages in thread
From: SZ Lin @ 2017-12-15 10:32 UTC (permalink / raw)
  Cc: SZ Lin, Taiyi Wu, Johan Hovold, Greg Kroah-Hartman, linux-usb,
	linux-kernel

This patch adds support for YUGA CLM920-NC5 PID 0x9625 USB modem to option
driver.

Signed-off-by: Taiyi Wu <taiyity.wu@moxa.com>
Signed-off-by: SZ Lin <sz.lin@moxa.com>
---

Please refer to following lsusb output:

Bus 001 Device 003: ID 05c6:9625 Qualcomm, Inc.
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  idVendor           0x05c6 Qualcomm, Inc.
  idProduct          0x9625
  bcdDevice            3.18
  iManufacturer           1 Shanghai Yuge
  iProduct                2 YUGA Incorporated
  iSerial                 3 0123456789ABCDEF
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength          183
    bNumInterfaces          5
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower              500mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass    255 Vendor Specific Subclass
      bInterfaceProtocol    255 Vendor Specific Protocol
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass     66
      bInterfaceProtocol      1
      iInterface              6 ADB Interface
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       0
      bNumEndpoints           3
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      0
      bInterfaceProtocol      0
      iInterface              0
      ** UNRECOGNIZED:  05 24 00 10 01
      ** UNRECOGNIZED:  05 24 01 00 00
      ** UNRECOGNIZED:  04 24 02 02
      ** UNRECOGNIZED:  05 24 06 00 00
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x84  EP 4 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x000a  1x 10 bytes
        bInterval               9
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x03  EP 3 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        3
      bAlternateSetting       0
      bNumEndpoints           3
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      0
      bInterfaceProtocol      0
      iInterface              0
      ** UNRECOGNIZED:  05 24 00 10 01
      ** UNRECOGNIZED:  05 24 01 00 00
      ** UNRECOGNIZED:  04 24 02 02
      ** UNRECOGNIZED:  05 24 06 00 00
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x86  EP 6 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x000a  1x 10 bytes
        bInterval               9
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x85  EP 5 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x04  EP 4 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        4
      bAlternateSetting       0
      bNumEndpoints           3
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass    255 Vendor Specific Subclass
      bInterfaceProtocol    255 Vendor Specific Protocol
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x88  EP 8 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0008  1x 8 bytes
        bInterval               9
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x87  EP 7 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x05  EP 5 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType         6
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  bNumConfigurations      1
Device Status:     0x0000
  (Bus Powered)

---
 drivers/usb/serial/option.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
index 3b3513874cfd..370a0342072f 100644
--- a/drivers/usb/serial/option.c
+++ b/drivers/usb/serial/option.c
@@ -233,6 +233,8 @@ static void option_instat_callback(struct urb *urb);
 /* These Quectel products use Qualcomm's vendor ID */
 #define QUECTEL_PRODUCT_UC20			0x9003
 #define QUECTEL_PRODUCT_UC15			0x9090
+/* These Yuga products use Qualcomm's vendor ID */
+#define YUGA_PROFUCT_CLM920_NC5			0x9625
 
 #define QUECTEL_VENDOR_ID			0x2c7c
 /* These Quectel products use Quectel's vendor ID */
@@ -674,6 +676,10 @@ static const struct option_blacklist_info cinterion_rmnet2_blacklist = {
 	.reserved = BIT(4) | BIT(5),
 };
 
+static const struct option_blacklist_info yuga_clm920_nc5_blacklist = {
+	.reserved = BIT(0) | BIT(1) | BIT(4),
+};
+
 static const struct usb_device_id option_ids[] = {
 	{ USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COLT) },
 	{ USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_RICOLA) },
@@ -1178,6 +1184,9 @@ static const struct usb_device_id option_ids[] = {
 	{ USB_DEVICE(QUALCOMM_VENDOR_ID, QUECTEL_PRODUCT_UC15)},
 	{ USB_DEVICE(QUALCOMM_VENDOR_ID, QUECTEL_PRODUCT_UC20),
 	  .driver_info = (kernel_ulong_t)&net_intf4_blacklist },
+	/* Yuga products use Qualcomm vendor ID */
+	{ USB_DEVICE(QUALCOMM_VENDOR_ID, YUGA_PROFUCT_CLM920_NC5),
+	  .driver_info = (kernel_ulong_t)&yuga_clm920_nc5_blacklist },
 	/* Quectel products using Quectel vendor ID */
 	{ USB_DEVICE(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EC21),
 	  .driver_info = (kernel_ulong_t)&net_intf4_blacklist },

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

* Re: [PATCH] USB: serial: option: adding support for YUGA CLM920-NC5
@ 2017-12-18 16:52   ` Johan Hovold
  0 siblings, 0 replies; 12+ messages in thread
From: Johan Hovold @ 2017-12-18 16:52 UTC (permalink / raw)
  To: SZ Lin
  Cc: Taiyi Wu, Johan Hovold, Greg Kroah-Hartman, linux-usb,
	linux-kernel, Bjørn Mork

[ +CC: Bjørn ]

On Fri, Dec 15, 2017 at 06:32:03PM +0800, SZ Lin wrote:
> This patch adds support for YUGA CLM920-NC5 PID 0x9625 USB modem to option
> driver.

Could you specify what each interface is used for here?

> Signed-off-by: Taiyi Wu <taiyity.wu@moxa.com>
> Signed-off-by: SZ Lin <sz.lin@moxa.com>

Is SZ your legal name?

> ---
> 
> Please refer to following lsusb output:
> 
> Bus 001 Device 003: ID 05c6:9625 Qualcomm, Inc.
> Device Descriptor:
>   bLength                18
>   bDescriptorType         1
>   bcdUSB               2.00
>   bDeviceClass            0 (Defined at Interface level)
>   bDeviceSubClass         0
>   bDeviceProtocol         0
>   bMaxPacketSize0        64
>   idVendor           0x05c6 Qualcomm, Inc.
>   idProduct          0x9625
>   bcdDevice            3.18
>   iManufacturer           1 Shanghai Yuge
>   iProduct                2 YUGA Incorporated
>   iSerial                 3 0123456789ABCDEF
>   bNumConfigurations      1
>   Configuration Descriptor:
>     bLength                 9
>     bDescriptorType         2
>     wTotalLength          183
>     bNumInterfaces          5
>     bConfigurationValue     1
>     iConfiguration          0
>     bmAttributes         0xa0
>       (Bus Powered)
>       Remote Wakeup
>     MaxPower              500mA
>     Interface Descriptor:
>       bLength                 9
>       bDescriptorType         4
>       bInterfaceNumber        0
>       bAlternateSetting       0
>       bNumEndpoints           2
>       bInterfaceClass       255 Vendor Specific Class
>       bInterfaceSubClass    255 Vendor Specific Subclass
>       bInterfaceProtocol    255 Vendor Specific Protocol
>       iInterface              0
>       Endpoint Descriptor:
>         bLength                 7
>         bDescriptorType         5
>         bEndpointAddress     0x81  EP 1 IN
>         bmAttributes            2
>           Transfer Type            Bulk
>           Synch Type               None
>           Usage Type               Data
>         wMaxPacketSize     0x0200  1x 512 bytes
>         bInterval               0
>       Endpoint Descriptor:
>         bLength                 7
>         bDescriptorType         5
>         bEndpointAddress     0x01  EP 1 OUT
>         bmAttributes            2
>           Transfer Type            Bulk
>           Synch Type               None
>           Usage Type               Data
>         wMaxPacketSize     0x0200  1x 512 bytes
>         bInterval               0
>     Interface Descriptor:
>       bLength                 9
>       bDescriptorType         4
>       bInterfaceNumber        1
>       bAlternateSetting       0
>       bNumEndpoints           2
>       bInterfaceClass       255 Vendor Specific Class
>       bInterfaceSubClass     66
>       bInterfaceProtocol      1
>       iInterface              6 ADB Interface
>       Endpoint Descriptor:
>         bLength                 7
>         bDescriptorType         5
>         bEndpointAddress     0x02  EP 2 OUT
>         bmAttributes            2
>           Transfer Type            Bulk
>           Synch Type               None
>           Usage Type               Data
>         wMaxPacketSize     0x0200  1x 512 bytes
>         bInterval               0
>       Endpoint Descriptor:
>         bLength                 7
>         bDescriptorType         5
>         bEndpointAddress     0x82  EP 2 IN
>         bmAttributes            2
>           Transfer Type            Bulk
>           Synch Type               None
>           Usage Type               Data
>         wMaxPacketSize     0x0200  1x 512 bytes
>         bInterval               0
>     Interface Descriptor:
>       bLength                 9
>       bDescriptorType         4
>       bInterfaceNumber        2
>       bAlternateSetting       0
>       bNumEndpoints           3
>       bInterfaceClass       255 Vendor Specific Class
>       bInterfaceSubClass      0
>       bInterfaceProtocol      0
>       iInterface              0
>       ** UNRECOGNIZED:  05 24 00 10 01
>       ** UNRECOGNIZED:  05 24 01 00 00
>       ** UNRECOGNIZED:  04 24 02 02
>       ** UNRECOGNIZED:  05 24 06 00 00
>       Endpoint Descriptor:
>         bLength                 7
>         bDescriptorType         5
>         bEndpointAddress     0x84  EP 4 IN
>         bmAttributes            3
>           Transfer Type            Interrupt
>           Synch Type               None
>           Usage Type               Data
>         wMaxPacketSize     0x000a  1x 10 bytes
>         bInterval               9
>       Endpoint Descriptor:
>         bLength                 7
>         bDescriptorType         5
>         bEndpointAddress     0x83  EP 3 IN
>         bmAttributes            2
>           Transfer Type            Bulk
>           Synch Type               None
>           Usage Type               Data
>         wMaxPacketSize     0x0200  1x 512 bytes
>         bInterval               0
>       Endpoint Descriptor:
>         bLength                 7
>         bDescriptorType         5
>         bEndpointAddress     0x03  EP 3 OUT
>         bmAttributes            2
>           Transfer Type            Bulk
>           Synch Type               None
>           Usage Type               Data
>         wMaxPacketSize     0x0200  1x 512 bytes
>         bInterval               0
>     Interface Descriptor:
>       bLength                 9
>       bDescriptorType         4
>       bInterfaceNumber        3
>       bAlternateSetting       0
>       bNumEndpoints           3
>       bInterfaceClass       255 Vendor Specific Class
>       bInterfaceSubClass      0
>       bInterfaceProtocol      0
>       iInterface              0
>       ** UNRECOGNIZED:  05 24 00 10 01
>       ** UNRECOGNIZED:  05 24 01 00 00
>       ** UNRECOGNIZED:  04 24 02 02
>       ** UNRECOGNIZED:  05 24 06 00 00
>       Endpoint Descriptor:
>         bLength                 7
>         bDescriptorType         5
>         bEndpointAddress     0x86  EP 6 IN
>         bmAttributes            3
>           Transfer Type            Interrupt
>           Synch Type               None
>           Usage Type               Data
>         wMaxPacketSize     0x000a  1x 10 bytes
>         bInterval               9
>       Endpoint Descriptor:
>         bLength                 7
>         bDescriptorType         5
>         bEndpointAddress     0x85  EP 5 IN
>         bmAttributes            2
>           Transfer Type            Bulk
>           Synch Type               None
>           Usage Type               Data
>         wMaxPacketSize     0x0200  1x 512 bytes
>         bInterval               0
>       Endpoint Descriptor:
>         bLength                 7
>         bDescriptorType         5
>         bEndpointAddress     0x04  EP 4 OUT
>         bmAttributes            2
>           Transfer Type            Bulk
>           Synch Type               None
>           Usage Type               Data
>         wMaxPacketSize     0x0200  1x 512 bytes
>         bInterval               0
>     Interface Descriptor:
>       bLength                 9
>       bDescriptorType         4
>       bInterfaceNumber        4
>       bAlternateSetting       0
>       bNumEndpoints           3
>       bInterfaceClass       255 Vendor Specific Class
>       bInterfaceSubClass    255 Vendor Specific Subclass
>       bInterfaceProtocol    255 Vendor Specific Protocol
>       iInterface              0
>       Endpoint Descriptor:
>         bLength                 7
>         bDescriptorType         5
>         bEndpointAddress     0x88  EP 8 IN
>         bmAttributes            3
>           Transfer Type            Interrupt
>           Synch Type               None
>           Usage Type               Data
>         wMaxPacketSize     0x0008  1x 8 bytes
>         bInterval               9
>       Endpoint Descriptor:
>         bLength                 7
>         bDescriptorType         5
>         bEndpointAddress     0x87  EP 7 IN
>         bmAttributes            2
>           Transfer Type            Bulk
>           Synch Type               None
>           Usage Type               Data
>         wMaxPacketSize     0x0200  1x 512 bytes
>         bInterval               0
>       Endpoint Descriptor:
>         bLength                 7
>         bDescriptorType         5
>         bEndpointAddress     0x05  EP 5 OUT
>         bmAttributes            2
>           Transfer Type            Bulk
>           Synch Type               None
>           Usage Type               Data
>         wMaxPacketSize     0x0200  1x 512 bytes
>         bInterval               0
> Device Qualifier (for other device speed):
>   bLength                10
>   bDescriptorType         6
>   bcdUSB               2.00
>   bDeviceClass            0 (Defined at Interface level)
>   bDeviceSubClass         0
>   bDeviceProtocol         0
>   bMaxPacketSize0        64
>   bNumConfigurations      1
> Device Status:     0x0000
>   (Bus Powered)
> 
> ---
>  drivers/usb/serial/option.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
> index 3b3513874cfd..370a0342072f 100644
> --- a/drivers/usb/serial/option.c
> +++ b/drivers/usb/serial/option.c
> @@ -233,6 +233,8 @@ static void option_instat_callback(struct urb *urb);
>  /* These Quectel products use Qualcomm's vendor ID */
>  #define QUECTEL_PRODUCT_UC20			0x9003
>  #define QUECTEL_PRODUCT_UC15			0x9090
> +/* These Yuga products use Qualcomm's vendor ID */
> +#define YUGA_PROFUCT_CLM920_NC5			0x9625

s/PROFUCT/PRODUCT/

>  
>  #define QUECTEL_VENDOR_ID			0x2c7c
>  /* These Quectel products use Quectel's vendor ID */
> @@ -674,6 +676,10 @@ static const struct option_blacklist_info cinterion_rmnet2_blacklist = {
>  	.reserved = BIT(4) | BIT(5),
>  };
>  
> +static const struct option_blacklist_info yuga_clm920_nc5_blacklist = {
> +	.reserved = BIT(0) | BIT(1) | BIT(4),
> +};

Do you really need to blacklist the first interface?

If so it looks like you could use USB_DEVICE_AND_INTERFACE_INFO() to
avoid the blacklist altogether.

> +
>  static const struct usb_device_id option_ids[] = {
>  	{ USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COLT) },
>  	{ USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_RICOLA) },
> @@ -1178,6 +1184,9 @@ static const struct usb_device_id option_ids[] = {
>  	{ USB_DEVICE(QUALCOMM_VENDOR_ID, QUECTEL_PRODUCT_UC15)},
>  	{ USB_DEVICE(QUALCOMM_VENDOR_ID, QUECTEL_PRODUCT_UC20),
>  	  .driver_info = (kernel_ulong_t)&net_intf4_blacklist },
> +	/* Yuga products use Qualcomm vendor ID */
> +	{ USB_DEVICE(QUALCOMM_VENDOR_ID, YUGA_PROFUCT_CLM920_NC5),
> +	  .driver_info = (kernel_ulong_t)&yuga_clm920_nc5_blacklist },
>  	/* Quectel products using Quectel vendor ID */
>  	{ USB_DEVICE(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EC21),
>  	  .driver_info = (kernel_ulong_t)&net_intf4_blacklist },

Thanks,
Johan

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

* USB: serial: option: adding support for YUGA CLM920-NC5
@ 2017-12-18 16:52   ` Johan Hovold
  0 siblings, 0 replies; 12+ messages in thread
From: Johan Hovold @ 2017-12-18 16:52 UTC (permalink / raw)
  To: SZ Lin
  Cc: Taiyi Wu, Johan Hovold, Greg Kroah-Hartman, linux-usb,
	linux-kernel, Bjørn Mork

[ +CC: Bjørn ]

On Fri, Dec 15, 2017 at 06:32:03PM +0800, SZ Lin wrote:
> This patch adds support for YUGA CLM920-NC5 PID 0x9625 USB modem to option
> driver.

Could you specify what each interface is used for here?

> Signed-off-by: Taiyi Wu <taiyity.wu@moxa.com>
> Signed-off-by: SZ Lin <sz.lin@moxa.com>

Is SZ your legal name?

> ---
> 
> Please refer to following lsusb output:
> 
> Bus 001 Device 003: ID 05c6:9625 Qualcomm, Inc.
> Device Descriptor:
>   bLength                18
>   bDescriptorType         1
>   bcdUSB               2.00
>   bDeviceClass            0 (Defined at Interface level)
>   bDeviceSubClass         0
>   bDeviceProtocol         0
>   bMaxPacketSize0        64
>   idVendor           0x05c6 Qualcomm, Inc.
>   idProduct          0x9625
>   bcdDevice            3.18
>   iManufacturer           1 Shanghai Yuge
>   iProduct                2 YUGA Incorporated
>   iSerial                 3 0123456789ABCDEF
>   bNumConfigurations      1
>   Configuration Descriptor:
>     bLength                 9
>     bDescriptorType         2
>     wTotalLength          183
>     bNumInterfaces          5
>     bConfigurationValue     1
>     iConfiguration          0
>     bmAttributes         0xa0
>       (Bus Powered)
>       Remote Wakeup
>     MaxPower              500mA
>     Interface Descriptor:
>       bLength                 9
>       bDescriptorType         4
>       bInterfaceNumber        0
>       bAlternateSetting       0
>       bNumEndpoints           2
>       bInterfaceClass       255 Vendor Specific Class
>       bInterfaceSubClass    255 Vendor Specific Subclass
>       bInterfaceProtocol    255 Vendor Specific Protocol
>       iInterface              0
>       Endpoint Descriptor:
>         bLength                 7
>         bDescriptorType         5
>         bEndpointAddress     0x81  EP 1 IN
>         bmAttributes            2
>           Transfer Type            Bulk
>           Synch Type               None
>           Usage Type               Data
>         wMaxPacketSize     0x0200  1x 512 bytes
>         bInterval               0
>       Endpoint Descriptor:
>         bLength                 7
>         bDescriptorType         5
>         bEndpointAddress     0x01  EP 1 OUT
>         bmAttributes            2
>           Transfer Type            Bulk
>           Synch Type               None
>           Usage Type               Data
>         wMaxPacketSize     0x0200  1x 512 bytes
>         bInterval               0
>     Interface Descriptor:
>       bLength                 9
>       bDescriptorType         4
>       bInterfaceNumber        1
>       bAlternateSetting       0
>       bNumEndpoints           2
>       bInterfaceClass       255 Vendor Specific Class
>       bInterfaceSubClass     66
>       bInterfaceProtocol      1
>       iInterface              6 ADB Interface
>       Endpoint Descriptor:
>         bLength                 7
>         bDescriptorType         5
>         bEndpointAddress     0x02  EP 2 OUT
>         bmAttributes            2
>           Transfer Type            Bulk
>           Synch Type               None
>           Usage Type               Data
>         wMaxPacketSize     0x0200  1x 512 bytes
>         bInterval               0
>       Endpoint Descriptor:
>         bLength                 7
>         bDescriptorType         5
>         bEndpointAddress     0x82  EP 2 IN
>         bmAttributes            2
>           Transfer Type            Bulk
>           Synch Type               None
>           Usage Type               Data
>         wMaxPacketSize     0x0200  1x 512 bytes
>         bInterval               0
>     Interface Descriptor:
>       bLength                 9
>       bDescriptorType         4
>       bInterfaceNumber        2
>       bAlternateSetting       0
>       bNumEndpoints           3
>       bInterfaceClass       255 Vendor Specific Class
>       bInterfaceSubClass      0
>       bInterfaceProtocol      0
>       iInterface              0
>       ** UNRECOGNIZED:  05 24 00 10 01
>       ** UNRECOGNIZED:  05 24 01 00 00
>       ** UNRECOGNIZED:  04 24 02 02
>       ** UNRECOGNIZED:  05 24 06 00 00
>       Endpoint Descriptor:
>         bLength                 7
>         bDescriptorType         5
>         bEndpointAddress     0x84  EP 4 IN
>         bmAttributes            3
>           Transfer Type            Interrupt
>           Synch Type               None
>           Usage Type               Data
>         wMaxPacketSize     0x000a  1x 10 bytes
>         bInterval               9
>       Endpoint Descriptor:
>         bLength                 7
>         bDescriptorType         5
>         bEndpointAddress     0x83  EP 3 IN
>         bmAttributes            2
>           Transfer Type            Bulk
>           Synch Type               None
>           Usage Type               Data
>         wMaxPacketSize     0x0200  1x 512 bytes
>         bInterval               0
>       Endpoint Descriptor:
>         bLength                 7
>         bDescriptorType         5
>         bEndpointAddress     0x03  EP 3 OUT
>         bmAttributes            2
>           Transfer Type            Bulk
>           Synch Type               None
>           Usage Type               Data
>         wMaxPacketSize     0x0200  1x 512 bytes
>         bInterval               0
>     Interface Descriptor:
>       bLength                 9
>       bDescriptorType         4
>       bInterfaceNumber        3
>       bAlternateSetting       0
>       bNumEndpoints           3
>       bInterfaceClass       255 Vendor Specific Class
>       bInterfaceSubClass      0
>       bInterfaceProtocol      0
>       iInterface              0
>       ** UNRECOGNIZED:  05 24 00 10 01
>       ** UNRECOGNIZED:  05 24 01 00 00
>       ** UNRECOGNIZED:  04 24 02 02
>       ** UNRECOGNIZED:  05 24 06 00 00
>       Endpoint Descriptor:
>         bLength                 7
>         bDescriptorType         5
>         bEndpointAddress     0x86  EP 6 IN
>         bmAttributes            3
>           Transfer Type            Interrupt
>           Synch Type               None
>           Usage Type               Data
>         wMaxPacketSize     0x000a  1x 10 bytes
>         bInterval               9
>       Endpoint Descriptor:
>         bLength                 7
>         bDescriptorType         5
>         bEndpointAddress     0x85  EP 5 IN
>         bmAttributes            2
>           Transfer Type            Bulk
>           Synch Type               None
>           Usage Type               Data
>         wMaxPacketSize     0x0200  1x 512 bytes
>         bInterval               0
>       Endpoint Descriptor:
>         bLength                 7
>         bDescriptorType         5
>         bEndpointAddress     0x04  EP 4 OUT
>         bmAttributes            2
>           Transfer Type            Bulk
>           Synch Type               None
>           Usage Type               Data
>         wMaxPacketSize     0x0200  1x 512 bytes
>         bInterval               0
>     Interface Descriptor:
>       bLength                 9
>       bDescriptorType         4
>       bInterfaceNumber        4
>       bAlternateSetting       0
>       bNumEndpoints           3
>       bInterfaceClass       255 Vendor Specific Class
>       bInterfaceSubClass    255 Vendor Specific Subclass
>       bInterfaceProtocol    255 Vendor Specific Protocol
>       iInterface              0
>       Endpoint Descriptor:
>         bLength                 7
>         bDescriptorType         5
>         bEndpointAddress     0x88  EP 8 IN
>         bmAttributes            3
>           Transfer Type            Interrupt
>           Synch Type               None
>           Usage Type               Data
>         wMaxPacketSize     0x0008  1x 8 bytes
>         bInterval               9
>       Endpoint Descriptor:
>         bLength                 7
>         bDescriptorType         5
>         bEndpointAddress     0x87  EP 7 IN
>         bmAttributes            2
>           Transfer Type            Bulk
>           Synch Type               None
>           Usage Type               Data
>         wMaxPacketSize     0x0200  1x 512 bytes
>         bInterval               0
>       Endpoint Descriptor:
>         bLength                 7
>         bDescriptorType         5
>         bEndpointAddress     0x05  EP 5 OUT
>         bmAttributes            2
>           Transfer Type            Bulk
>           Synch Type               None
>           Usage Type               Data
>         wMaxPacketSize     0x0200  1x 512 bytes
>         bInterval               0
> Device Qualifier (for other device speed):
>   bLength                10
>   bDescriptorType         6
>   bcdUSB               2.00
>   bDeviceClass            0 (Defined at Interface level)
>   bDeviceSubClass         0
>   bDeviceProtocol         0
>   bMaxPacketSize0        64
>   bNumConfigurations      1
> Device Status:     0x0000
>   (Bus Powered)
> 
> ---
>  drivers/usb/serial/option.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
> index 3b3513874cfd..370a0342072f 100644
> --- a/drivers/usb/serial/option.c
> +++ b/drivers/usb/serial/option.c
> @@ -233,6 +233,8 @@ static void option_instat_callback(struct urb *urb);
>  /* These Quectel products use Qualcomm's vendor ID */
>  #define QUECTEL_PRODUCT_UC20			0x9003
>  #define QUECTEL_PRODUCT_UC15			0x9090
> +/* These Yuga products use Qualcomm's vendor ID */
> +#define YUGA_PROFUCT_CLM920_NC5			0x9625

s/PROFUCT/PRODUCT/

>  
>  #define QUECTEL_VENDOR_ID			0x2c7c
>  /* These Quectel products use Quectel's vendor ID */
> @@ -674,6 +676,10 @@ static const struct option_blacklist_info cinterion_rmnet2_blacklist = {
>  	.reserved = BIT(4) | BIT(5),
>  };
>  
> +static const struct option_blacklist_info yuga_clm920_nc5_blacklist = {
> +	.reserved = BIT(0) | BIT(1) | BIT(4),
> +};

Do you really need to blacklist the first interface?

If so it looks like you could use USB_DEVICE_AND_INTERFACE_INFO() to
avoid the blacklist altogether.

> +
>  static const struct usb_device_id option_ids[] = {
>  	{ USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COLT) },
>  	{ USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_RICOLA) },
> @@ -1178,6 +1184,9 @@ static const struct usb_device_id option_ids[] = {
>  	{ USB_DEVICE(QUALCOMM_VENDOR_ID, QUECTEL_PRODUCT_UC15)},
>  	{ USB_DEVICE(QUALCOMM_VENDOR_ID, QUECTEL_PRODUCT_UC20),
>  	  .driver_info = (kernel_ulong_t)&net_intf4_blacklist },
> +	/* Yuga products use Qualcomm vendor ID */
> +	{ USB_DEVICE(QUALCOMM_VENDOR_ID, YUGA_PROFUCT_CLM920_NC5),
> +	  .driver_info = (kernel_ulong_t)&yuga_clm920_nc5_blacklist },
>  	/* Quectel products using Quectel vendor ID */
>  	{ USB_DEVICE(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EC21),
>  	  .driver_info = (kernel_ulong_t)&net_intf4_blacklist },

Thanks,
Johan
---
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] 12+ messages in thread

* Re: [PATCH] USB: serial: option: adding support for YUGA CLM920-NC5
@ 2017-12-18 18:44     ` Bjørn Mork
  0 siblings, 0 replies; 12+ messages in thread
From: Bjørn Mork @ 2017-12-18 18:44 UTC (permalink / raw)
  To: SZ Lin
  Cc: Johan Hovold, Taiyi Wu, Greg Kroah-Hartman, linux-usb, linux-kernel

Johan Hovold <johan@kernel.org> writes:

>> +static const struct option_blacklist_info yuga_clm920_nc5_blacklist = {
>> +	.reserved = BIT(0) | BIT(1) | BIT(4),
>> +};
>
> Do you really need to blacklist the first interface?

Good question. Interface #0 does look a lot like a Qualcomm DM/DIAG
function, based on two bulk endpoints, no additional descriptors and the
fact that it is the first interface.  If so, then we do want a serial
driver for it.  There is a basic libqcdm implementation in ModemManager
if you want to test it out.

And I expect interface #4 is QMI/rmnet?  Feel free to confirm that
assumption with a patch against qmi_wwan :-)


Bjørn

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

* USB: serial: option: adding support for YUGA CLM920-NC5
@ 2017-12-18 18:44     ` Bjørn Mork
  0 siblings, 0 replies; 12+ messages in thread
From: Bjørn Mork @ 2017-12-18 18:44 UTC (permalink / raw)
  To: SZ Lin
  Cc: Johan Hovold, Taiyi Wu, Greg Kroah-Hartman, linux-usb, linux-kernel

Johan Hovold <johan@kernel.org> writes:

>> +static const struct option_blacklist_info yuga_clm920_nc5_blacklist = {
>> +	.reserved = BIT(0) | BIT(1) | BIT(4),
>> +};
>
> Do you really need to blacklist the first interface?

Good question. Interface #0 does look a lot like a Qualcomm DM/DIAG
function, based on two bulk endpoints, no additional descriptors and the
fact that it is the first interface.  If so, then we do want a serial
driver for it.  There is a basic libqcdm implementation in ModemManager
if you want to test it out.

And I expect interface #4 is QMI/rmnet?  Feel free to confirm that
assumption with a patch against qmi_wwan :-)


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] 12+ messages in thread

* RE: [PATCH] USB: serial: option: adding support for YUGA CLM920-NC5
@ 2017-12-19  5:59       ` SZ Lin
  0 siblings, 0 replies; 12+ messages in thread
From: SZ Lin (林上智) @ 2017-12-19  5:59 UTC (permalink / raw)
  To: Bjørn Mork
  Cc: Johan Hovold, Taiyi TY Wu (吳泰毅),
	Greg Kroah-Hartman, linux-usb, linux-kernel

> -----Original Message-----
> From: Bjørn Mork [mailto:bjorn@mork.no]
> Sent: Tuesday, December 19, 2017 2:44 AM
> To: SZ Lin (林上智)
> Cc: Johan Hovold; Taiyi TY Wu (吳泰毅); Greg Kroah-Hartman;
> linux-usb@vger.kernel.org; linux-kernel@vger.kernel.org
> Subject: Re: [PATCH] USB: serial: option: adding support for YUGA CLM920-NC5
> 
> Johan Hovold <johan@kernel.org> writes:
> 
> >> +static const struct option_blacklist_info yuga_clm920_nc5_blacklist = {
> >> +	.reserved = BIT(0) | BIT(1) | BIT(4), };
> >
> > Do you really need to blacklist the first interface?
> 
> Good question. Interface #0 does look a lot like a Qualcomm DM/DIAG function, based
> on two bulk endpoints, no additional descriptors and the fact that it is the first interface.
> If so, then we do want a serial driver for it.  There is a basic libqcdm implementation in
> ModemManager if you want to test it out.
> 

I have confirmed that interface #0 is QCDM/DIAG port in this module, and thus I will remove this from reserved list in next patch.
Furthermore, interface #1 is ADB port. Should I also remove this from reserved list?

> And I expect interface #4 is QMI/rmnet?  Feel free to confirm that assumption with a
> patch against qmi_wwan :-)
> 
Yes, it is. I will send qmi_wwan patch by all means.
> 
> Bjørn

SZ

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

* USB: serial: option: adding support for YUGA CLM920-NC5
@ 2017-12-19  5:59       ` SZ Lin
  0 siblings, 0 replies; 12+ messages in thread
From: SZ Lin @ 2017-12-19  5:59 UTC (permalink / raw)
  To: Bjørn Mork
  Cc: Johan Hovold, Taiyi TY Wu (吳泰毅),
	Greg Kroah-Hartman, linux-usb, linux-kernel

> -----Original Message-----
> From: Bjørn Mork [mailto:bjorn@mork.no]
> Sent: Tuesday, December 19, 2017 2:44 AM
> To: SZ Lin (林上智)
> Cc: Johan Hovold; Taiyi TY Wu (吳泰毅); Greg Kroah-Hartman;
> linux-usb@vger.kernel.org; linux-kernel@vger.kernel.org
> Subject: Re: [PATCH] USB: serial: option: adding support for YUGA CLM920-NC5
> 
> Johan Hovold <johan@kernel.org> writes:
> 
> >> +static const struct option_blacklist_info yuga_clm920_nc5_blacklist = {
> >> +	.reserved = BIT(0) | BIT(1) | BIT(4), };
> >
> > Do you really need to blacklist the first interface?
> 
> Good question. Interface #0 does look a lot like a Qualcomm DM/DIAG function, based
> on two bulk endpoints, no additional descriptors and the fact that it is the first interface.
> If so, then we do want a serial driver for it.  There is a basic libqcdm implementation in
> ModemManager if you want to test it out.
> 

I have confirmed that interface #0 is QCDM/DIAG port in this module, and thus I will remove this from reserved list in next patch.
Furthermore, interface #1 is ADB port. Should I also remove this from reserved list?

> And I expect interface #4 is QMI/rmnet?  Feel free to confirm that assumption with a
> patch against qmi_wwan :-)
> 
Yes, it is. I will send qmi_wwan patch by all means.
> 
> Bjørn

SZ

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

* Re: [PATCH] USB: serial: option: adding support for YUGA CLM920-NC5
@ 2017-12-19  6:14         ` Bjørn Mork
  0 siblings, 0 replies; 12+ messages in thread
From: Bjørn Mork @ 2017-12-19  6:14 UTC (permalink / raw)
  To: SZ Lin (林上智)
  Cc: Johan Hovold, Taiyi TY Wu (吳泰毅),
	Greg Kroah-Hartman, linux-usb, linux-kernel

"SZ Lin (林上智)" <SZ.Lin@moxa.com> writes:
>> Johan Hovold <johan@kernel.org> writes:
>> 
>> >> +static const struct option_blacklist_info yuga_clm920_nc5_blacklist = {
>> >> +	.reserved = BIT(0) | BIT(1) | BIT(4), };
>> >
>> > Do you really need to blacklist the first interface?
>> 
>> Good question. Interface #0 does look a lot like a Qualcomm DM/DIAG function, based
>> on two bulk endpoints, no additional descriptors and the fact that it is the first interface.
>> If so, then we do want a serial driver for it.  There is a basic libqcdm implementation in
>> ModemManager if you want to test it out.
>> 
>
> I have confirmed that interface #0 is QCDM/DIAG port in this module,
>and thus I will remove this from reserved list in next patch.
>Furthermore, interface #1 is ADB port. Should I also remove this from
>reserved list?

No. ADB is handled by userspace tools using libusb.  It should not be
bound to any serial driver, so you will need to blacklist it.  But you
need to keep the blacklist anyway to include the QCDM/DIAG port

I assume Johan's alternative was to match class/subclass/protocol
against ff/00/00, which would have worked if you only wanted to include
interfaces 2 and 3.

>> And I expect interface #4 is QMI/rmnet?  Feel free to confirm that assumption with a
>> patch against qmi_wwan :-)
>> 
> Yes, it is. I will send qmi_wwan patch by all means.

Thanks


Bjørn

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

* USB: serial: option: adding support for YUGA CLM920-NC5
@ 2017-12-19  6:14         ` Bjørn Mork
  0 siblings, 0 replies; 12+ messages in thread
From: Bjørn Mork @ 2017-12-19  6:14 UTC (permalink / raw)
  To: SZ Lin (林上智)
  Cc: Johan Hovold, Taiyi TY Wu (吳泰毅),
	Greg Kroah-Hartman, linux-usb, linux-kernel

"SZ Lin (林上智)" <SZ.Lin@moxa.com> writes:
>> Johan Hovold <johan@kernel.org> writes:
>> 
>> >> +static const struct option_blacklist_info yuga_clm920_nc5_blacklist = {
>> >> +	.reserved = BIT(0) | BIT(1) | BIT(4), };
>> >
>> > Do you really need to blacklist the first interface?
>> 
>> Good question. Interface #0 does look a lot like a Qualcomm DM/DIAG function, based
>> on two bulk endpoints, no additional descriptors and the fact that it is the first interface.
>> If so, then we do want a serial driver for it.  There is a basic libqcdm implementation in
>> ModemManager if you want to test it out.
>> 
>
> I have confirmed that interface #0 is QCDM/DIAG port in this module,
>and thus I will remove this from reserved list in next patch.
>Furthermore, interface #1 is ADB port. Should I also remove this from
>reserved list?

No. ADB is handled by userspace tools using libusb.  It should not be
bound to any serial driver, so you will need to blacklist it.  But you
need to keep the blacklist anyway to include the QCDM/DIAG port

I assume Johan's alternative was to match class/subclass/protocol
against ff/00/00, which would have worked if you only wanted to include
interfaces 2 and 3.

>> And I expect interface #4 is QMI/rmnet?  Feel free to confirm that assumption with a
>> patch against qmi_wwan :-)
>> 
> Yes, it is. I will send qmi_wwan patch by all means.

Thanks


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] 12+ messages in thread

* Re: [PATCH] USB: serial: option: adding support for YUGA CLM920-NC5
@ 2017-12-19  8:54           ` Johan Hovold
  0 siblings, 0 replies; 12+ messages in thread
From: Johan Hovold @ 2017-12-19  8:54 UTC (permalink / raw)
  To: Bjørn Mork
  Cc: SZ Lin (林上智),
	Johan Hovold, Taiyi TY Wu (吳泰毅),
	Greg Kroah-Hartman, linux-usb, linux-kernel

On Tue, Dec 19, 2017 at 07:14:17AM +0100, Bjørn Mork wrote:
> "SZ Lin (林上智)" <SZ.Lin@moxa.com> writes:
> >> Johan Hovold <johan@kernel.org> writes:
> >> 
> >> >> +static const struct option_blacklist_info yuga_clm920_nc5_blacklist = {
> >> >> +	.reserved = BIT(0) | BIT(1) | BIT(4), };
> >> >
> >> > Do you really need to blacklist the first interface?
> >> 
> >> Good question. Interface #0 does look a lot like a Qualcomm DM/DIAG
> >> function, based on two bulk endpoints, no additional descriptors
> >> and the fact that it is the first interface.  If so, then we do
> >> want a serial driver for it.  There is a basic libqcdm
> >> implementation in ModemManager if you want to test it out.
> >
> >I have confirmed that interface #0 is QCDM/DIAG port in this module,
> >and thus I will remove this from reserved list in next patch.

Thanks to both of you for confirming.

> >Furthermore, interface #1 is ADB port. Should I also remove this from
> >reserved list?
> 
> No. ADB is handled by userspace tools using libusb.  It should not be
> bound to any serial driver, so you will need to blacklist it.  But you
> need to keep the blacklist anyway to include the QCDM/DIAG port
>
> I assume Johan's alternative was to match class/subclass/protocol
> against ff/00/00, which would have worked if you only wanted to include
> interfaces 2 and 3.

Indeed.

Johan

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

* USB: serial: option: adding support for YUGA CLM920-NC5
@ 2017-12-19  8:54           ` Johan Hovold
  0 siblings, 0 replies; 12+ messages in thread
From: Johan Hovold @ 2017-12-19  8:54 UTC (permalink / raw)
  To: Bjørn Mork
  Cc: SZ Lin (林上智),
	Johan Hovold, Taiyi TY Wu (吳泰毅),
	Greg Kroah-Hartman, linux-usb, linux-kernel

On Tue, Dec 19, 2017 at 07:14:17AM +0100, Bjørn Mork wrote:
> "SZ Lin (林上智)" <SZ.Lin@moxa.com> writes:
> >> Johan Hovold <johan@kernel.org> writes:
> >> 
> >> >> +static const struct option_blacklist_info yuga_clm920_nc5_blacklist = {
> >> >> +	.reserved = BIT(0) | BIT(1) | BIT(4), };
> >> >
> >> > Do you really need to blacklist the first interface?
> >> 
> >> Good question. Interface #0 does look a lot like a Qualcomm DM/DIAG
> >> function, based on two bulk endpoints, no additional descriptors
> >> and the fact that it is the first interface.  If so, then we do
> >> want a serial driver for it.  There is a basic libqcdm
> >> implementation in ModemManager if you want to test it out.
> >
> >I have confirmed that interface #0 is QCDM/DIAG port in this module,
> >and thus I will remove this from reserved list in next patch.

Thanks to both of you for confirming.

> >Furthermore, interface #1 is ADB port. Should I also remove this from
> >reserved list?
> 
> No. ADB is handled by userspace tools using libusb.  It should not be
> bound to any serial driver, so you will need to blacklist it.  But you
> need to keep the blacklist anyway to include the QCDM/DIAG port
>
> I assume Johan's alternative was to match class/subclass/protocol
> against ff/00/00, which would have worked if you only wanted to include
> interfaces 2 and 3.

Indeed.

Johan
---
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] 12+ messages in thread

end of thread, other threads:[~2017-12-19  8:54 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-15 10:32 [PATCH] USB: serial: option: adding support for YUGA CLM920-NC5 SZ Lin
2017-12-15 10:32 ` SZ Lin
2017-12-18 16:52 ` [PATCH] " Johan Hovold
2017-12-18 16:52   ` Johan Hovold
2017-12-18 18:44   ` [PATCH] " Bjørn Mork
2017-12-18 18:44     ` Bjørn Mork
2017-12-19  5:59     ` [PATCH] " SZ Lin (林上智)
2017-12-19  5:59       ` SZ Lin
2017-12-19  6:14       ` [PATCH] " Bjørn Mork
2017-12-19  6:14         ` Bjørn Mork
2017-12-19  8:54         ` [PATCH] " Johan Hovold
2017-12-19  8:54           ` Johan Hovold

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.