Home
last modified time | relevance | path

Searched hist:d0bf1ff0ae322aca59b00b9a2ad121d35a77e78f (Results 1 – 1 of 1) sorted by relevance

/linux/drivers/usb/serial/
H A Dcp210x.cdiff d0bf1ff0ae322aca59b00b9a2ad121d35a77e78f Wed Oct 28 22:02:54 CET 2015 Konstantin Shkolnyy <konstantin.shkolnyy@gmail.com> USB: cp210x: work around cp2108 GET_LINE_CTL bug

Add helper to access line-control register in order to work around a
cp2108 GET_LINE_CTL bug.

cp2108 GET_LINE_CTL returns the 16-bit value with the 2 bytes swapped.
However, SET_LINE_CTL functions properly. When the driver tries to modify
the register, it reads it, modifies some bits and writes back. Because the
read bytes were swapped, this often results in an invalid value to be
written. In turn, this causes cp2108 respond with a stall. The stall
sometimes doesn't clear properly and cp2108 starts responding to following
valid commands also with stalls, effectively failing.

Signed-off-by: Konstantin Shkolnyy <konstantin.shkolnyy@gmail.com>
[johan: amend commit message, modify probe error handling ]
Signed-off-by: Johan Hovold <johan@kernel.org>