grub-devel
[Top][All Lists]
Advanced

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

Re: [RFC - Vladimir ?] USB/RS232 converter PL2303 small problem


From: Vladimir 'φ-coder/phcoder' Serbinenko
Subject: Re: [RFC - Vladimir ?] USB/RS232 converter PL2303 small problem
Date: Sun, 17 Oct 2010 13:54:03 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.12) Gecko/20100917 Icedove/3.0.8

On 09/30/2010 07:53 PM, Aleš Nesrsta wrote:
> Hi,
>
> I don't know who is developer/maintainer of USB serial drivers - I
> expect it is Vladimir, so this e-mail is addressed mainly to him.
>
> As I wrote in my older e-mail (Question: USB serial - device driver
> debugging), there is some problem with PL2303. Not with driver but with
> device itself (probably).
>
> What is the problem:
>
> If I put some stream of characters into PL2303, device stops accepting
> data and answers NAK indefinitely after some time / some amounts of
> character sent (256 exactly).
>
> It happens only if PL2303 is connected to another computer. If only
> null-modem cable is connected, it does not happen. (If no cable is
> connected, it happens also but in this case it is caused by missing
> handshaking signals which prevent sending -> output buffer overloading
> happens, i.e. it is in fact correct situation.)
>
> I discovered the reason - I forgot switch off "echo" on ttyS0 of PC
> where was cable connected. I.e. every character sent by GRUB was
> returned from connected PC back to input of PL2303 and input buffer was
> overloaded.
>
> But what is surprising for me - why stops PL2303 SENDING when INPUT
> buffer is full ???
> ("Normal" serial port does not such thing in GRUB, it looks like it is
> PL2303 device speciality. I did not test FTDI, I don't have it.)
>
> Maybe such behavior can be prevented by some another pre-setting of
> PL2303 device - but there is no detailed documentation about PL2303
> device USB interface.
>
>   
I doubt it's the case or that it's at least known. I expect it's
something Linux would want to enable and the driver is based on USB
capture from Linux operation.
> I thought also about some workaround - continuously check amount of
> characters in input buffer in device but there is problem how to do it -
> at least there is no related documentation of PL2303 as I mentioned
> above.
>
>   
Yes, we need a workaround. The sanest and simplest would be to receive
input before sending anything. The input will be saved in a buffer of
fixed size and in case of overflow just discarded (it's to prevent
memory overusage by input noone cares about, not very clean but...)
This logic can be put in common usbserial part. This workaround is
harmless and enabling it on all devices will save the time of figuring
out which ones exhibit such behaviour
> Another possibility is periodical fetching characters from PL2303 but it
> should be disabled when PL2303 is used as input for terminal etc. - it
> looks too difficult to implement (and non-standard...).
>
> I.e. there is probably no simple way how to prevent this problem but
> such unexpected behavior of device should be known and probably
> documented somewhere - where ?
> Is there some place in source where to store HowTos, FAQs and some other
> more or less important notes ? Or should I write this information into
> driver source code ?
>
> Regards
> Ales
>
>
>
>
> _______________________________________________
> Grub-devel mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/grub-devel
>
>   


-- 
Regards
Vladimir 'φ-coder/phcoder' Serbinenko


Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]