Re: [PATCH] pl2303: use divisors for unsupported baud rates

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 08/13/2014 01:01 PM, Johan Hovold wrote:
On Wed, Aug 13, 2014 at 07:51:52AM +0300, Lauri Hintsala wrote:

Please describe your change also in the message body.

OK


This change has been tested to work with PL-2303HX at 115200, 500000,
1000000, 2000000, 2500000, 3000000 and 4000000 baud rates.

115200 and 3Mbaud can be set directly and are thus handled in the same
way also after this change.

That's true. I tested them to make sure I didn't break anything.


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?


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.

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?

Best regards,
Lauri Hintsala
--
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




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux