On Wed, Jul 18, 2018 at 02:24:58PM +0200, Johan Hovold wrote: > 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 > > while keeping the maximum 2 Mbaud for unknown device types in order to > avoid any regressions. > > Signed-off-by: Johan Hovold <johan@xxxxxxxxxx> > --- > drivers/usb/serial/cp210x.c | 41 ++++++++++++++++++++++++++++++++++--- > 1 file changed, 38 insertions(+), 3 deletions(-) Reviewed-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html