lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070729150329.GA14873@mail.kroptech.com>
Date:	Sun, 29 Jul 2007 11:03:29 -0400
From:	Adam Kropelin <akropel1@...hester.rr.com>
To:	Greg Kroah-Hartman <greg@...ah.com>
Cc:	Nick Pasich <NewsLetters@...kAndBarb.net>,
	Andrew Morton <akpm@...ux-foundation.org>,
	"linux-usb-devel @ lists. sourceforge. net" 
	<linux-usb-devel@...ts.sourceforge.net>,
	Al Borchers <alborchers@...inerpoint.com>,
	"linux-kernel @ vger. kernel. org" <linux-kernel@...r.kernel.org>,
	Peter Berger <pberger@...mson.com>
Subject: [PATCH] usb-serial: Fix edgeport regression on non-EPiC devices

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@...kAndBarb.net>.

Signed-off-by: Adam Kropelin <akropel1@...hester.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;
 	}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ