Bug 42586
Summary: | CP2104 Device doesn't respond to baudrate change request | ||
---|---|---|---|
Product: | Drivers | Reporter: | Preston Fick (preston.fick) |
Component: | USB | Assignee: | Greg Kroah-Hartman (greg) |
Status: | RESOLVED CODE_FIX | ||
Severity: | normal | CC: | florian, ronnie.king |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 3.2.0 | Subsystem: | |
Regression: | No | Bisected commit-id: | |
Attachments: |
[PATCH 3.2.0] cp210x: Bug fix for CP2104 baudrate usage
[PATCH 3.2.0] cp210x: Bug fix for CP2104 baudrate usage |
Description
Preston Fick
2012-01-16 03:01:59 UTC
Created attachment 72081 [details] [PATCH 3.2.0] cp210x: Bug fix for CP2104 baudrate usage From: Preston Fick <preston.fick@silabs.com> This is a patch for the cp210x.ko driver with regards to the following bug report: CP2104 Device doesn't respond to baudrate change request Bug Report: #42586 in bugzilla.kernel.org: https://bugzilla.kernel.org/show_bug.cgi?id=42586 OS/Kernel version: GNU/Linux 3.2.0 (Mainline) Description: This fix changes the way baudrates are set on the CP210x devices from Silicon Labs. The CP2101/2/3 will respond to both a GET/SET_BAUDDIV command, and GET/SET_BAUDRATE command, while CP2104 and higher devices only respond to GET/SET_BAUDRATE. The current cp210x.ko driver in kernel version 3.2.0 only implements the GET/SET_BAUDDIV command. This patch implements the two new codes for the GET/SET_BAUDRATE commands. Then there is a change in the way that the baudrate is assigned or retrieved. This is done according to the CP210x USB specification in AN571. This document can be found here: http://www.silabs.com/pages/DownloadDoc.aspx?FILEURL=Support%20Documents/TechnicalDocs/AN571.pdf&src=DocumentationWebPart Sections 5.3/5.4 describe the USB packets for the old baudrate method. Sections 5.5/5.6 describe the USB packets for the new method. This patch also implements the new request scheme, and eliminates the unnecessary baudrate calculations since it uses the "actual baudrate" method. This patch solves the problem reported for the CP2104 in bug 42586, and also keeps support for all other devices (CP2101/2/3). This patchfile is also attached to the bug report on bugzilla.kernel.org. This patch has been developed and test on the 3.2.0 mainline kernel version under Ubuntu 10.11. Signed-off-by: Preston Fick <preston.fick@silabs.com> Created attachment 72091 [details] [PATCH 3.2.0] cp210x: Bug fix for CP2104 baudrate usage Submitting corrected patch as of 1/16/2012. From: Preston Fick <preston.fick@silabs.com> This is an updated patch for the cp210x.ko driver with regards to the following bug report: CP2104 Device doesn't respond to baudrate change request Bug Report: #42586 in bugzilla.kernel.org: https://bugzilla.kernel.org/show_bug.cgi?id=42586 OS/Kernel version: GNU/Linux 3.2.0 (Mainline) Description: This fix changes the way baudrates are set on the CP210x devices from Silicon Labs. The CP2101/2/3 will respond to both a GET/SET_BAUDDIV command, and GET/SET_BAUDRATE command, while CP2104 and higher devices only respond to GET/SET_BAUDRATE. The current cp210x.ko driver in kernel version 3.2.0 only implements the GET/SET_BAUDDIV command. This patch implements the two new codes for the GET/SET_BAUDRATE commands. Then there is a change in the way that the baudrate is assigned or retrieved. This is done according to the CP210x USB specification in AN571. This document can be found here: http://www.silabs.com/pages/DownloadDoc.aspx?FILEURL=Support%20Documents/TechnicalDocs/AN571.pdf&src=DocumentationWebPart Sections 5.3/5.4 describe the USB packets for the old baudrate method. Sections 5.5/5.6 describe the USB packets for the new method. This patch also implements the new request scheme, and eliminates the unnecessary baudrate calculations since it uses the "actual baudrate" method. This patch solves the problem reported for the CP2104 in bug 42586, and also keeps support for all other devices (CP2101/2/3). This patchfile is also attached to the bug report on bugzilla.kernel.org. This patch has been developed and test on the 3.2.0 mainline kernel version under Ubuntu 10.11. Signed-off-by: Preston Fick <preston.fick@silabs.com> A patch referencing this bug report has been merged in Linux v3.3-rc2: commit 7f482fc88ac47662228d6b1f05759797c8936a30 Author: Preston Fick <preston.fick@silabs.com> Date: Mon Jan 16 18:14:09 2012 -0600 USB: cp210x: fix CP2104 baudrate usage |