From: David Miller <davem@davemloft.net>
To: dcbw@redhat.com
Cc: hns@goldelico.com, j.dumon@option.com, linux-usb@vger.kernel.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
marek.belisko@gmail.com, e.verdonck@option.com
Subject: Re: [PATCH] hso: fix handling of modem port SERIAL_STATE notifications
Date: Mon, 06 Jan 2014 16:30:36 -0500 (EST) [thread overview]
Message-ID: <20140106.163036.1031013112322786.davem@davemloft.net> (raw)
In-Reply-To: <1389024449.1866.3.camel@dcbw.local>
From: Dan Williams <dcbw@redhat.com>
Date: Mon, 06 Jan 2014 10:07:29 -0600
> The existing serial state notification handling expected older Option
> devices, having a hardcoded assumption that the Modem port was always
> USB interface #2. That isn't true for devices from the past few years.
>
> hso_serial_state_notification is a local cache of a USB Communications
> Interface Class SERIAL_STATE notification from the device, and the
> USB CDC specification (section 6.3, table 67 "Class-Specific Notifications")
> defines wIndex as the USB interface the event applies to. For hso
> devices this will always be the Modem port, as the Modem port is the
> only port which is set up to receive them by the driver.
>
> So instead of always expecting USB interface #2, instead validate the
> notification with the actual USB interface number of the Modem port.
>
> Signed-off-by: Dan Williams <dcbw@redhat.com>
> Tested-by: H. Nikolaus Schaller <hns@goldelico.com>
Applied, although that BUG_ON() is a bit harsh. It might have been
cleaner to just dev_warn() ratelimited or similar and return.
next prev parent reply other threads:[~2014-01-06 21:30 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-02 7:00 [PATCH 1/1] hso: fix problem with wrong status code sent by OPTION GTM601 during RING indication Dr. H. Nikolaus Schaller
2013-10-03 19:29 ` David Miller
[not found] ` <20131003.152907.2144013596237714581.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2013-10-03 19:40 ` Dr. H. Nikolaus Schaller
2013-10-03 20:00 ` David Miller
[not found] ` <20131003.160049.199880461500344692.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2013-10-04 6:22 ` Dr. H. Nikolaus Schaller
2013-12-13 14:43 ` Dr. H. Nikolaus Schaller
2013-12-16 19:40 ` Dan Williams
2013-12-17 19:56 ` Dr. H. Nikolaus Schaller
[not found] ` <174CD81C-6425-4560-A3FA-3BFAA83BA770-xXXSsgcRVICgSpxsJD1C4w@public.gmane.org>
2013-12-17 22:27 ` Dan Williams
2013-12-18 13:16 ` Dr. H. Nikolaus Schaller
2013-12-18 17:49 ` Dan Williams
2013-12-19 7:48 ` Dr. H. Nikolaus Schaller
2014-01-06 16:07 ` [PATCH] hso: fix handling of modem port SERIAL_STATE notifications Dan Williams
2014-01-06 21:30 ` David Miller [this message]
2014-01-06 21:39 ` Dan Williams
2014-01-06 21:39 ` David Miller
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=20140106.163036.1031013112322786.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=dcbw@redhat.com \
--cc=e.verdonck@option.com \
--cc=hns@goldelico.com \
--cc=j.dumon@option.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=marek.belisko@gmail.com \
--cc=netdev@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).