All of lore.kernel.org
 help / color / mirror / Atom feed
From: Adam Kropelin <akropel1@rochester.rr.com>
To: Greg Kroah-Hartman <greg@kroah.com>
Cc: Nick Pasich <NewsLetters@NickAndBarb.net>,
	Andrew Morton <akpm@linux-foundation.org>,
	"linux-usb-devel @ lists. sourceforge. net" 
	<linux-usb-devel@lists.sourceforge.net>,
	Al Borchers <alborchers@steinerpoint.com>,
	"linux-kernel @ vger. kernel. org" <linux-kernel@vger.kernel.org>,
	Peter Berger <pberger@brimson.com>
Subject: [PATCH] usb-serial: Fix edgeport regression on non-EPiC devices
Date: Sun, 29 Jul 2007 11:03:29 -0400	[thread overview]
Message-ID: <20070729150329.GA14873@mail.kroptech.com> (raw)

Fix serious regression on non-EPiC edgeport usb-serial devices. Baud 
rate and MCR/LCR registers are not being written on these models due 
to apparent copy-n-paste errors introduced with EPiC support.

Failure reported by Nick Pasich <Nick@NickAndBarb.net>.

Signed-off-by: Adam Kropelin <akropel1@rochester.rr.com>

--
Assuming this is a right and proper fix, it should go in the -stable
tree ASAP.

--- linux-2.6.22.1/drivers/usb/serial/io_edgeport.c	2007-07-10 14:56:30.000000000 -0400
+++ linux-2.6.22.1.new/drivers/usb/serial/io_edgeport.c	2007-07-29 09:45:18.000000000 -0400
@@ -2366,9 +2366,8 @@
 	int status;
 	unsigned char number = edge_port->port->number - edge_port->port->serial->minor;
 
-	if ((!edge_serial->is_epic) ||
-	    ((edge_serial->is_epic) &&
-	     (!edge_serial->epic_descriptor.Supports.IOSPSetBaudRate))) {
+	if (edge_serial->is_epic &&
+	    !edge_serial->epic_descriptor.Supports.IOSPSetBaudRate) {
 		dbg("SendCmdWriteBaudRate - NOT Setting baud rate for port = %d, baud = %d",
 		    edge_port->port->number, baudRate);
 		return 0;
@@ -2461,18 +2460,16 @@
 
 	dbg("%s - write to %s register 0x%02x", (regNum == MCR) ? "MCR" : "LCR", __FUNCTION__, regValue);
 
-	if ((!edge_serial->is_epic) ||
-	    ((edge_serial->is_epic) &&
-	     (!edge_serial->epic_descriptor.Supports.IOSPWriteMCR) &&
-	     (regNum == MCR))) {
+	if (edge_serial->is_epic &&
+	    !edge_serial->epic_descriptor.Supports.IOSPWriteMCR &&
+	    regNum == MCR) {
 		dbg("SendCmdWriteUartReg - Not writing to MCR Register");
 		return 0;
 	}
 
-	if ((!edge_serial->is_epic) ||
-	    ((edge_serial->is_epic) &&
-	     (!edge_serial->epic_descriptor.Supports.IOSPWriteLCR) &&
-	     (regNum == LCR))) {
+	if (edge_serial->is_epic &&
+	    !edge_serial->epic_descriptor.Supports.IOSPWriteLCR &&
+	    regNum == LCR) {
 		dbg ("SendCmdWriteUartReg - Not writing to LCR Register");
 		return 0;
 	}

             reply	other threads:[~2007-07-29 15:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-29 15:03 Adam Kropelin [this message]
2007-07-30 19:33 ` [PATCH] usb-serial: Fix edgeport regression on non-EPiC devices Greg KH

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=20070729150329.GA14873@mail.kroptech.com \
    --to=akropel1@rochester.rr.com \
    --cc=NewsLetters@NickAndBarb.net \
    --cc=akpm@linux-foundation.org \
    --cc=alborchers@steinerpoint.com \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb-devel@lists.sourceforge.net \
    --cc=pberger@brimson.com \
    /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.