On Wed, Aug 13, 2014 at 01:21:28PM +0300, Lauri Hintsala wrote: > On 08/13/2014 01:01 PM, Johan Hovold wrote: > > On Wed, Aug 13, 2014 at 07:51:52AM +0300, Lauri Hintsala wrote: > > The reason this hasn't been done already is partly that there are a > > bunch of devices out there that apparently cannot handle the divisor > > encoding. > > Do we have that information for driver? Can be enable divisors only for > devices which support them? Yes, we could add a new quirk for any device types that do not support divisor encoding. > > There were also some concerns raised about the accuracy of the current > > divisor calculations. Did you measure the resulting baud rates? > > I didn't measure the accuracy. I just tested it by sending and receiving > data to/from ST's ARM Cortex-M0 based CPU at high baud rates. I didn't > notice any problems in data. > > Windows driver is accepting "unsupported" baud rates, at least 1, 2 and > 4 Mbauds. > > > We'd want to restrict the divisor encoding to chip types that support > > it (500 kbaud is only there for legacy reasons). Frank Schäfer did a > > great job at sorting out the details and there's some info in the git > > logs in some patches from him (that were prematurely merged and later > > reverted). > > Current driver behaviour is the worst it could be. Currently it rounds > the baud rate to the nearest one and doesn't inform the user about that. You can always read back the resulting baud rate. > I just spent hours for debugging my embedded platform before I noticed > that the problem was in the PL2303 driver. I guess someone else may also > run into that problem as well in some day... > > Do we have any chance to fix it somehow? But agreed, with all (or most of) the infrastructure in place, we should probably just enable it. Could you just add a max-baud rate of 12Mbaud for TYPE_HX to you patch? If anyone complains we can add a no-divisor quirk (and possibly type detection) for those devices later. Thanks, Johan -- 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