From 54dc5792ea933a3ff8c62a1f9ea9e4e6cbdd324a Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Fri, 1 Nov 2013 09:19:56 -0700 Subject: [PATCH] Revert "USB: pl2303: restrict the divisor based baud rate encoding method to the "HX" chip type" MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This reverts commit b8bdad608213caffa081a97d2e937e5fe08c4046. Revert all of the pl2303 changes that went into 3.12-rc1 and -rc2 as they cause regressions on some versions of the chip. This will all be revisited for later kernel versions when we can figure out how to handle this in a way that does not break working devices. Reported-by: Mika Westerberg Cc: Frank Schäfer Acked-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman --- drivers/usb/serial/pl2303.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c index 244820193e1..1e6de4cd079 100644 --- a/drivers/usb/serial/pl2303.c +++ b/drivers/usb/serial/pl2303.c @@ -305,14 +305,10 @@ static void pl2303_encode_baudrate(struct tty_struct *tty, if (spriv->type != HX) baud = min_t(int, baud, 1228800); - if (spriv->type != HX || baud <= 115200) { - /* Direct (standard) baud rate encoding method */ + if (baud <= 115200) { put_unaligned_le32(baud, buf); } else { /* - * NOTE: it's not clear if the type_0/1 chips - * support this method - * * Apparently the formula for higher speeds is: * baudrate = 12M * 32 / (2^buf[1]) / buf[0] */ -- 2.46.0