grub-devel.gnu.org archive mirror
 help / color / mirror / Atom feed
From: "Vladimir 'φ-coder/phcoder' Serbinenko" <phcoder@gmail.com>
To: grub-devel@gnu.org
Subject: Re: [RFC - Vladimir ?] USB/RS232 converter PL2303 small problem
Date: Sun, 17 Oct 2010 13:54:03 +0200	[thread overview]
Message-ID: <4CBAE3DB.7080601@gmail.com> (raw)
In-Reply-To: <1285869208.6433.48.camel@pracovna>

[-- Attachment #1: Type: text/plain, Size: 3248 bytes --]

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
> Grub-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/grub-devel
>
>   


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



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 294 bytes --]

  reply	other threads:[~2010-10-17 11:54 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-25 13:26 Plans on 1.99 release Vladimir 'φ-coder/phcoder' Serbinenko
2010-08-26 23:05 ` Carles Pina i Estany
2010-08-26 23:15   ` Vladimir 'φ-coder/phcoder' Serbinenko
2010-08-28 11:31     ` Aleš Nesrsta
2010-08-29 23:52       ` Vladimir 'φ-coder/phcoder' Serbinenko
2010-08-30  0:14         ` Vladimir 'φ-coder/phcoder' Serbinenko
2010-09-03 22:02           ` Plans on 1.99 release - USB issues Aleš Nesrsta
2010-09-04 17:34             ` Aleš Nesrsta
2010-09-12 17:28               ` [PATCH] USB issues - kbdlayouts branch Aleš Nesrsta
2010-09-13 10:43                 ` [PATCH] usb_keyboard.c problems (USB issues - kbdlayouts branch) Aleš Nesrsta
2010-09-13 11:47                 ` [PATCH] USB issues - kbdlayouts branch Aleš Nesrsta
2010-09-13 18:13                   ` Aleš Nesrsta
2010-09-15  5:58                     ` [PATCH] USB serial - missing configuration Aleš Nesrsta
2010-09-19 11:46                       ` Vladimir 'φ-coder/phcoder' Serbinenko
2010-09-21 20:18                         ` Aleš Nesrsta
2010-09-23 21:13                           ` Trunk: boot problem - unaligned pointer 0x Aleš Nesrsta
2010-09-26  9:58                             ` Aleš Nesrsta
2010-09-30 19:37                             ` Vladimir 'φ-coder/phcoder' Serbinenko
2010-09-30 20:45                               ` Aleš Nesrsta
2010-09-15  5:58                     ` Question: USB serial - device driver debugging Aleš Nesrsta
2010-09-30 17:53                       ` [RFC - Vladimir ?] USB/RS232 converter PL2303 small problem Aleš Nesrsta
2010-10-17 11:54                         ` Vladimir 'φ-coder/phcoder' Serbinenko [this message]
2010-09-18 10:08             ` Plans on 1.99 release - USB issues Vladimir 'φ-coder/phcoder' Serbinenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4CBAE3DB.7080601@gmail.com \
    --to=phcoder@gmail.com \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).