Re: Proposed modification to PL2303 driver

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

 



A: No.
Q: Should I include quotations after my reply?

http://daringfireball.net/2007/07/on_top

On Fri, Jun 14, 2013 at 11:20:01AM +0200, Mastro Gippo wrote:
> Hi Greg,
> thanks for your reply. I spent some free time this week trying to
> compile and use the modified driver, but I'm unable to compile it, I'm
> not an expert in compiling linux drivers, I may reinstall a fresh
> linux version this weekend as I think I messed up something.

There's a whole book on how to build the kernel that you might want to
get, "Linux Kernel in a Nutshell", it's free online.

> BTW; I'm quite sure that the clock is 12MHz, because the baudrate
> divisor is calculated as 12M/div - see line 363:
> http://lxr.free-electrons.com/source/drivers/usb/serial/pl2303.c#L363
> The code I'm using to set odd baudrates is this one with Termios2
> library: http://mail.python.org/pipermail/python-list/2012-October/633871.html
> this code, when run, tells me that the actual set baudrate is 230.4K,
> because obviously this is forced by the lines that I would like to
> remove (332->348).
> 
> IMHO, this is the possible scenario when these lines will be removed:
> - All linux programs using Termios original library will still not be
> able to set custom baudrates as standard baudrates are forced by that
> library. Nothing will change.
> - All linux programs using any other methods of setting baudrates,
> will still be able to do so, but will also be able to set non-standard
> baudrates
> - Only problem: if a user mistypes the baudrate, he will have
> communication problems, because the driver will not correct it, but
> this is his problem only, and it's not something that the driver
> should handle. Also, the driver's way of forcing a different baudrate
> will also result in comm errors too, because if the user writes
> "1152000" instead of "115200", for example, the driver will set
> "1228800" and the  communication will fail anyway.
> 
> This "nanny" function, IMHO, is contrary to linux philosophy, where
> everything must be precise, case sensitive, and the user must write
> everything correctly, in exchange for great flexibility; obviously, if
> a user wants to set a custom baudrate, he will take all the risks
> associated with doing so, and he must know what he is doing, but the
> driver shouldn't be forcing a baudrate on the user.

Unless the device itself can not support arbritrary baud rates, which,
we really don't know at this point in time.

> PS: this device (at least mine) WILL support 250K baudrate, as in
> windows I can set it in any software I use, and the output is spot on,
> measured with a digital oscilloscope.

That's good to know, which model is it?  Remember, the pl2303 driver
supports at least 3 generations of this chipset (maybe 4).  All of them
seem to work just a little bit differently.

I'd be glad to take changes that get rid of the baud rate table, if we
know for sure that all of the chips can support that.  Without hardware
specifications from the manufacturer, I just don't know that.

Have you tried asking Prolific about this to see if they can verify that
this will work with all of these chips?

thanks,

greg k-h
--
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