All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johan Hovold <johan@kernel.org>
To: Kristian Evensen <kristian.evensen@gmail.com>
Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: option: Improve Quectel EP06 detection
Date: Mon, 10 Sep 2018 12:30:22 +0200	[thread overview]
Message-ID: <20180910103022.GR1089@localhost> (raw)

On Sat, Sep 08, 2018 at 02:57:54PM +0200, Kristian Evensen wrote:
> The Quectel EP06 (and EM06/EG06) LTE modem supports updating the USB
> configuration, without the VID/PID or configuration number changing.
> When the configuration is updated and interfaces are added/removed, the
> interface numbers are updated. This causes our current code for matching
> EP06 not to work as intended, as the assumption about reserved
> interfaces no longer holds. If for example the diagnostic (first)
> interface is removed, option will (try to) bind to the QMI interface.
> 
> This patch improves EP06 detection by replacing the current match with
> two matches, and those matches check class, subclass and protocol as
> well as VID and PID. The diag interface exports class, subclass and
> protocol as 0xff. For the other serial interfaces, class is 0xff and
> subclass and protocol are both 0x0.
> 
> The modem can export the following devices and always in this order:
> diag, nmea, at, ppp. qmi and adb. This means that diag can only ever be
> interface 0, and interface numbers 1-5 should be marked as reserved. The
> three other serial devices can have interface numbers 0-3, but I have
> not marked any interfaces as reserved. The reason is that the serial
> devices are the only interfaces exported by the device where subclass
> and protocol is 0x0.
> 
> QMI exports the same class, subclass and protocol values as the diag
> interface. However, the two interfaces have different number of
> endpoints, QMI has three and diag two. I have added a check for number
> of interfaces if VID/PID matches the EP06, and we ignore the device if
> number of interfaces equals three (and subclass is set).
> 
> Signed-off-by: Kristian Evensen <kristian.evensen@gmail.com>

What a mess.

Please provide the output of usb-devices (or lsusb -v) for both
"configurations". How do you update the configuration by the way?

Thanks,
Johan

WARNING: multiple messages have this Message-ID (diff)
From: Johan Hovold <johan@kernel.org>
To: Kristian Evensen <kristian.evensen@gmail.com>
Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] option: Improve Quectel EP06 detection
Date: Mon, 10 Sep 2018 12:30:22 +0200	[thread overview]
Message-ID: <20180910103022.GR1089@localhost> (raw)
In-Reply-To: <20180908125754.1947-1-kristian.evensen@gmail.com>

On Sat, Sep 08, 2018 at 02:57:54PM +0200, Kristian Evensen wrote:
> The Quectel EP06 (and EM06/EG06) LTE modem supports updating the USB
> configuration, without the VID/PID or configuration number changing.
> When the configuration is updated and interfaces are added/removed, the
> interface numbers are updated. This causes our current code for matching
> EP06 not to work as intended, as the assumption about reserved
> interfaces no longer holds. If for example the diagnostic (first)
> interface is removed, option will (try to) bind to the QMI interface.
> 
> This patch improves EP06 detection by replacing the current match with
> two matches, and those matches check class, subclass and protocol as
> well as VID and PID. The diag interface exports class, subclass and
> protocol as 0xff. For the other serial interfaces, class is 0xff and
> subclass and protocol are both 0x0.
> 
> The modem can export the following devices and always in this order:
> diag, nmea, at, ppp. qmi and adb. This means that diag can only ever be
> interface 0, and interface numbers 1-5 should be marked as reserved. The
> three other serial devices can have interface numbers 0-3, but I have
> not marked any interfaces as reserved. The reason is that the serial
> devices are the only interfaces exported by the device where subclass
> and protocol is 0x0.
> 
> QMI exports the same class, subclass and protocol values as the diag
> interface. However, the two interfaces have different number of
> endpoints, QMI has three and diag two. I have added a check for number
> of interfaces if VID/PID matches the EP06, and we ignore the device if
> number of interfaces equals three (and subclass is set).
> 
> Signed-off-by: Kristian Evensen <kristian.evensen@gmail.com>

What a mess.

Please provide the output of usb-devices (or lsusb -v) for both
"configurations". How do you update the configuration by the way?

Thanks,
Johan

             reply	other threads:[~2018-09-10 10:30 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-10 10:30 Johan Hovold [this message]
2018-09-10 10:30 ` [PATCH] option: Improve Quectel EP06 detection Johan Hovold
  -- strict thread matches above, loose matches on Subject: below --
2018-09-14  8:42 Johan Hovold
2018-09-14  8:42 ` [PATCH] " Johan Hovold
2018-09-14  7:53 Kristian Evensen
2018-09-14  7:53 ` [PATCH] " Kristian Evensen
2018-09-14  7:51 Johan Hovold
2018-09-14  7:51 ` [PATCH] " Johan Hovold
2018-09-13 15:13 Kristian Evensen
2018-09-13 15:13 ` [PATCH] " Kristian Evensen
2018-09-13  9:44 Kristian Evensen
2018-09-13  9:44 ` [PATCH] " Kristian Evensen
2018-09-13  9:21 [2/2] USB: serial: option: add two-endpoints device-id flag Johan Hovold
2018-09-13  9:21 ` [PATCH 2/2] " Johan Hovold
2018-09-13  9:21 [1/2] USB: serial: option: improve Quectel EP06 detection Johan Hovold
2018-09-13  9:21 ` [PATCH 1/2] " Johan Hovold
2018-09-13  9:17 option: Improve " Johan Hovold
2018-09-13  9:17 ` [PATCH] " Johan Hovold
2018-09-12 20:34 Bjørn Mork
2018-09-12 20:34 ` [PATCH] " Bjørn Mork
2018-09-12 19:18 Dan Williams
2018-09-12 19:18 ` [PATCH] " Dan Williams
2018-09-12 18:25 Lars Melin
2018-09-12 18:25 ` [PATCH] " Lars Melin
2018-09-12 16:57 Kristian Evensen
2018-09-12 16:57 ` [PATCH] " Kristian Evensen
2018-09-12 16:32 Lars Melin
2018-09-12 16:32 ` [PATCH] " Lars Melin
2018-09-11 14:34 Kristian Evensen
2018-09-11 14:34 ` [PATCH] " Kristian Evensen
2018-09-11 14:00 Lars Melin
2018-09-11 14:00 ` [PATCH] " Lars Melin
2018-09-10 14:43 Dan Williams
2018-09-10 14:43 ` [PATCH] " Dan Williams
2018-09-10 11:39 Kristian Evensen
2018-09-10 11:39 ` [PATCH] " Kristian Evensen
2018-09-08 12:57 Kristian Evensen
2018-09-08 12:57 ` [PATCH] " Kristian Evensen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180910103022.GR1089@localhost \
    --to=johan@kernel.org \
    --cc=kristian.evensen@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.