From: Johan Hovold <johan@kernel.org>
To: "Maciej S. Szmigiero" <mail@maciej.szmigiero.name>
Cc: Johan Hovold <johan@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org
Subject: Re: [PATCH] USB: serial: option: add support for D-Link DWM-157 C1
Date: Tue, 29 Aug 2017 09:41:08 +0200 [thread overview]
Message-ID: <20170829074108.GG20634@localhost> (raw)
In-Reply-To: <7dd41245-8822-2038-86a1-bbcb393521e7@maciej.szmigiero.name>
On Mon, Aug 28, 2017 at 04:32:53PM +0200, Maciej S. Szmigiero wrote:
> Hi Johan,
>
> On 28.08.2017 12:19, Johan Hovold wrote:
> > On Mon, Aug 21, 2017 at 05:43:46PM +0200, Maciej S. Szmigiero wrote:
> >> This commit adds support (IDs, really) for D-Link DWM-157 hardware version
> >> C1 USB modem to option driver.
> >>
> >> According to manufacturer-provided Windows INF file the device has four
> >> serial ports:
> >> "D-Link HSPA+DataCard Diagnostics Interface" (interface 2; modem port),
> >> "D-Link HSPA+DataCard NMEA Device" (interface 3),
> >> "D-Link HSPA+DataCard Speech Port" (interface 4),
> >> "D-Link HSPA+DataCard Debug Port" (interface 5).
> >>
> >> Signed-off-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name>
> >> Cc: stable@vger.kernel.org
> >> ---
> >> drivers/usb/serial/option.c | 2 ++
> >> 1 file changed, 2 insertions(+)
> >>
> >> diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
> >> index fe123153b1a5..fa887c6e50e7 100644
> >> --- a/drivers/usb/serial/option.c
> >> +++ b/drivers/usb/serial/option.c
> >> @@ -2023,6 +2023,8 @@ static const struct usb_device_id option_ids[] = {
> >> { USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x7d03, 0xff, 0x02, 0x01) },
> >> { USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x7d03, 0xff, 0x00, 0x00) },
> >> { USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7d04, 0xff) }, /* D-Link DWM-158 */
> >> + { USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x7d0e, 0xff, 0x02, 0x01) }, /* D-Link DWM-157 C1 */
> >> + { USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x7d0e, 0xff, 0x00, 0x00) },
> >
> > What is the reason for not using a single USB_DEVICE_INTERFACE_CLASS
> > here instead?
>
> This is done to be as specific as possible (in case D-Link makes a
> similar device with a different interface list or changes it
> with a firmware update).
We can always add more specific matching if this ever becomes an issue.
> Also, three other D-Link modems few lines above are using the same
> USB_DEVICE_AND_INTERFACE_INFO() selectors.
Yeah, I noticed those, and I'm not sure why they're not using
class-matching only either (and note that we have some entries that do).
> > Do you have access to this device so that you could post the output of
> > usb-devices (or "lsusb -v")?
>
> I've attached lsusb output to this message, since it is pretty long.
Ok, thanks. So using USB_DEVICE_INTERFACE_CLASS() looks like it would
work for this device, so please use that instead.
If possible, try to include the more compact output of usb-devices in
the commit message so we have it easily accessible.
Thanks,
Johan
next prev parent reply other threads:[~2017-08-29 7:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-21 15:43 [PATCH] USB: serial: option: add support for D-Link DWM-157 C1 Maciej S. Szmigiero
2017-08-28 10:19 ` Johan Hovold
2017-08-28 14:32 ` Maciej S. Szmigiero
2017-08-29 7:41 ` Johan Hovold [this message]
2017-08-29 8:08 ` Bjørn Mork
2017-08-29 8:27 ` Johan Hovold
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=20170829074108.GG20634@localhost \
--to=johan@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mail@maciej.szmigiero.name \
--cc=stable@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).