USB: serial: cp210x: honour device-type maximum line speed
Greg Kroah-Hartman
maintainerPATCH 2/5 USB: serial: cp210x: honour device-type maximum line speed
Quoted 24 lines · Johan Hovold
Newer cp210x devices support higher line speeds than the older ones which supported a discrete set of speeds up to 921.6 kbaud.
To support these higher speeds, we have for some time mapped speeds lower than 1 Mbaud to the speeds supported by older devices, while allowing the device to pick the closest possible rate for higher speeds (without trying to guess and report back what rate was actually chosen).
As this implementation can lead to undefined behaviour for older devices which do not support the higher rates, let's use the later-added device-type detection to determine the maximum supported speed.
This will also be useful when adding support for cp2102n which can handle rates up to 3 Mbaud.
As per the data sheets the following maximum speeds are used
cp2101 921.6 kbaud cp2102/3 1 Mbaud cp2104/8 2 Mbaud cp2105 - ECI port 2 Mbaud - SCI port 921.6 kbaud
Quoted 7 lines
while keeping the maximum 2 Mbaud for unknown device types in order to avoid any regressions.
Signed-off-by Johan Hovold <[email protected]>--- drivers/usb/serial/cp210x.c | 41 ++++++++++++++++++++++++++++++++++--- 1 file changed, 38 insertions(+), 3 deletions(-)
---
To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html