Re: Proposed modification to PL2303 driver

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

 



Am 27.06.2013 15:32, schrieb Reinhard Max:
> On Thu, 27 Jun 2013 at 07:17, Greg KH wrote:
>
>> On Wed, Jun 26, 2013 at 12:03:23PM +0200, Reinhard Max wrote:
>>
>>> OTOH, why should a driver impose such a limit at all [...]
>>
>> Because that's the way the driver has successfully worked for the
>> past 10+ years?
>
> Well, this particular part was added less than four years ago[1],
> apparently based on experiments that a single person did on a single
> device (a PL2303HX as per the comment). I've contacted him to find out
> if he still has access to that device and could double-check his
> findings.

I'm currently not at home, but I'm pretty sure I still have one of these
devices laying around somewhere.
I didn't read the whole thread yet, but what I can say for sure is that
the device I tested did _NOT_ support any non-standard baud rates.
And the baud rates currently supported are taken from the datasheet (and
not reverse-engineered).

>
> Meanwhile I found "Datasheets" dating from 2004 for the PL2303X[2] to
> 2012 for newer variants like PL2303HXD[3] and PL2303SA[4] that have
> sentences like the following in their "Introduction" chapter:
>
>  "The flexible baud rate generator of PL-2303HXD could be programmed
>   to generate any rate between 75 bps to 12M bps."
>
>  "The flexible baud rate generator of PL2303SA also could be
>   programmed to generate any rate between 75 bps to 115 kbps by driver
>   customization."
>
> But there are also datasheets for the original PL2303 and PL2303H from
> 2002[5] and 2005[6] that do not contain such a statement.

IIRC, the datasheet I was looking into said something like "the
following baud rates are supported: ..." and "please contact the
manufacturer if you need further baud rates".
Maybe they sold custom versions of their chip supporting other/further
baud rates at that time.
So maybe you chip is a custom chip or they gave up this business modell
or the chip has just been improved.

>
>> Again, remember, this driver was created by reverse engineering the
>> protocol, the fact that it works at all is amazing.
>
> I am very well aware of that.
>
> But still, if the worst thing that might happen when an invalid data
> rate is selected is that 9600 baud is used instead, I'd prefer that
> over a driver that by trying to be clever keeps me from using data
> rates that my hardware would perfectly support.
>

As a developer of automotive applications that are using non-standrad
baud rates (e.g. 10400 baud), I need to find out which baud rates a
device actually supports.
The fact that the device silently runs at 9600 baud if unsupported baud
rates are selected can cause trouble...

Of course we want to support all baud rates a chip supports. So we need
to find out how to distinguish between versions that support custom baud
rates and the ones that do not support them.
Any ideas ? Chip type/revision ? USB-IDs ? :D

Regards,
Frank

> Things would of course be different if setting unsupported baud rates
> caused the hardware to crash, but I think there is no indication of
> this being the case for any member of the PL2303 family.
>
> cu
>     Reinhrd
>
> [1]
> https://git.kernel.org/cgit/linux/kernel/git/gregkh/usb.git/commit?id=25b8286805e856c8c7fda127018e31032c918015
> [2] http://prolificusa.com/pdf/PL-2303XA.pdf
> [3] http://prolificusa.com/files/ds_pl2303HXD_v1.4.3.pdf
> [4] http://prolificusa.com/files/DS_PL2303SA_d20120504.pdf
> [5]
> http://www.digchip.com/datasheets/download_datasheet.php?id=1751150&part-number=PL2303
> [6] http://www.electronicaestudio.com/docs/PL2303.pdf
> -- 
> 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

--
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