public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Johan Hovold <jhovold@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Tobias Winter" <tobias@linuxdingsda.de>,
	"Bjørn Mork" <bjorn@mork.no>, "Rob Landley" <rob@landley.net>,
	"Johan Hovold" <jhovold@gmail.com>,
	stable@vger.kernel.org
Subject: [PATCH] USB: whiteheat: fix broken port configuration
Date: Thu,  6 Jun 2013 13:32:47 +0200	[thread overview]
Message-ID: <1370518367-2631-1-git-send-email-jhovold@gmail.com> (raw)
In-Reply-To: <20130606113106.GI2566@localhost>

When configuring the port (e.g. set_termios) the port minor number
rather than the port number was used in the request (and they only
coincide for minor number 0).

Cc: stable@vger.kernel.org
Signed-off-by: Johan Hovold <jhovold@gmail.com>
---
 drivers/usb/serial/whiteheat.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/serial/whiteheat.c b/drivers/usb/serial/whiteheat.c
index b9fca35..347caad 100644
--- a/drivers/usb/serial/whiteheat.c
+++ b/drivers/usb/serial/whiteheat.c
@@ -649,7 +649,7 @@ static void firm_setup_port(struct tty_struct *tty)
 	struct whiteheat_port_settings port_settings;
 	unsigned int cflag = tty->termios.c_cflag;
 
-	port_settings.port = port->number + 1;
+	port_settings.port = port->number - port->serial->minor + 1;
 
 	/* get the byte size */
 	switch (cflag & CSIZE) {
-- 
1.8.2.1


  reply	other threads:[~2013-06-06 11:33 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-05 17:54 [PATCH 0/3] Increase the number of USB to serial devices we can support at once Greg KH
2013-06-05 17:54 ` [PATCH 2/3] USB: serial: make minor allocation dynamic Greg KH
2013-06-06 12:17   ` Johan Hovold
2013-06-06 16:33     ` Greg KH
2013-06-05 17:55 ` [PATCH 3/3] USB: serial: increase the number of devices we support Greg KH
2013-06-05 17:55 ` [PATCH 1/3] USB: serial: ports: add minor and port number Greg KH
2013-06-06 11:31   ` Johan Hovold
2013-06-06 11:32     ` Johan Hovold [this message]
2013-06-06 16:37     ` Greg KH
2013-06-06 11:35 ` [PATCH 0/3] Increase the number of USB to serial devices we can support at once Tobias Winter
2013-06-06 15:01 ` Dave Jones
2013-06-06 15:21   ` Greg KH
2013-06-06 16:24     ` Tobias Winter

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=1370518367-2631-1-git-send-email-jhovold@gmail.com \
    --to=jhovold@gmail.com \
    --cc=bjorn@mork.no \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=rob@landley.net \
    --cc=stable@vger.kernel.org \
    --cc=tobias@linuxdingsda.de \
    /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