diff options
author | Kristian Evensen <kristian.evensen@gmail.com> | 2019-04-07 15:39:09 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-04-08 16:25:56 -0700 |
commit | e4bf63482c309287ca84d91770ffa7dcc18e37eb (patch) | |
tree | fc8a39f41c20dc14a9ce1eb813fd677a7f8c93a0 /drivers/char/adi.c | |
parent | 22b56e827093dd1af2379d294aba7d629b3f3436 (diff) |
qmi_wwan: Add quirk for Quectel dynamic config
Most, if not all, Quectel devices use dynamic interface numbers, and
users are able to change the USB configuration at will. Matching on for
example interface number is therefore not possible.
Instead, the QMI device can be identified by looking at the interface
class, subclass and protocol (all 0xff), as well as the number of
endpoints. The reason we need to look at the number of endpoints, is
that the diagnostic port interface has the same class, subclass and
protocol as QMI. However, the diagnostic port only has two endpoints,
while QMI has three.
Until now, we have identified the QMI device by combining a match on
class, subclass and protocol, with a call to the function
quectel_diag_detect(). In quectel_diag_detect(), we check if the number
of endpoints matches for known Quectel vendor/product ids.
Adding new vendor/product ids to quectel_diag_detect() is not a good
long-term solution. This commit replaces the function with a quirk, and
applies the quirk to affected Quectel devices that I have been able to
test the change with (EP06, EM12 and EC25). If the quirk is set and the
number of endpoints equal two, we return from qmi_wwan_probe() with
-ENODEV.
Signed-off-by: Kristian Evensen <kristian.evensen@gmail.com>
Acked-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/char/adi.c')
0 files changed, 0 insertions, 0 deletions