From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1P7Roi-000898-LA for mharc-grub-devel@gnu.org; Sun, 17 Oct 2010 07:54:20 -0400 Received: from [140.186.70.92] (port=41447 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P7Roe-00086v-W5 for grub-devel@gnu.org; Sun, 17 Oct 2010 07:54:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P7Rod-0003oG-NH for grub-devel@gnu.org; Sun, 17 Oct 2010 07:54:16 -0400 Received: from mail-fx0-f41.google.com ([209.85.161.41]:57919) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P7Rod-0003o4-DI for grub-devel@gnu.org; Sun, 17 Oct 2010 07:54:15 -0400 Received: by fxm2 with SMTP id 2so1623194fxm.0 for ; Sun, 17 Oct 2010 04:54:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :x-enigmail-version:content-type; bh=Ep8BIXDjNxfOeVtdCt8CP101z2Gwq4q/Iu+uGtKKSJk=; b=oAv3cYDQEfTwzn5XrBN8ABezNWfc/AZmlOaekV3AbEsGw+T7T1T4eLYUN5KAFArRBr sl3bQguNqGO0H5EzUx11o3+dmv+egeTXnHqWS7mVk1c8GFg+/zVkbbjS4kZJBeiIBnf9 LGgqmXvCEJYPLDWuQL3hFx4lV33dUVMSOeOMc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:x-enigmail-version:content-type; b=iOLEcnJMg+D5wEKihAHiCdl3OODLfucLmYiroisCNA8Q4dqRTkowmBDp2KqsC0Hc9O d2DsrcxiZ8S487m/wdeZJiwjUTyc/h4+9ChS9PiMaqPnyWod0YnkInvxry63G3cI7N89 WOXBT5IJ3+eP4K9G+5UbTTqK8lv8kBIBT9eHw= Received: by 10.223.108.2 with SMTP id d2mr118251fap.7.1287316453731; Sun, 17 Oct 2010 04:54:13 -0700 (PDT) Received: from debian.bg45.phnet (gprs09.swisscom-mobile.ch [193.247.250.9]) by mx.google.com with ESMTPS id 2sm3646859faz.38.2010.10.17.04.54.11 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 17 Oct 2010 04:54:12 -0700 (PDT) Message-ID: <4CBAE3DB.7080601@gmail.com> Date: Sun, 17 Oct 2010 13:54:03 +0200 From: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.12) Gecko/20100917 Icedove/3.0.8 MIME-Version: 1.0 To: grub-devel@gnu.org References: <4C7519E8.90907@gmail.com> <20100826230527.GA26246@pina.cat> <4C76F58D.6020304@gmail.com> <1282995082.14285.4.camel@pracovna> <4C7AF2BB.2040606@gmail.com> <4C7AF7E1.7020204@gmail.com> <1283551348.27688.89.camel@pracovna> <1283621655.4824.25.camel@pracovna> <1284312512.5714.83.camel@pracovna> <1284378479.13334.53.camel@pracovna> <1284401606.5929.3.camel@pracovna> <1284530302.6578.25.camel@pracovna> <1285869208.6433.48.camel@pracovna> In-Reply-To: <1285869208.6433.48.camel@pracovna> X-Enigmail-Version: 1.0.1 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="------------enigB5FF30CC9045EF214F7DA313" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: Re: [RFC - Vladimir ?] USB/RS232 converter PL2303 small problem X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Oct 2010 11:54:18 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigB5FF30CC9045EF214F7DA313 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 09/30/2010 07:53 PM, Ale=C5=A1 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. > > =20 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. > > =20 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 i= t > 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 othe= r > 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 > > =20 --=20 Regards Vladimir '=CF=86-coder/phcoder' Serbinenko --------------enigB5FF30CC9045EF214F7DA313 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iF4EAREKAAYFAky64+IACgkQNak7dOguQgm4SQEAtPJ0ftPGONzQe1LyVF7+nDdH wAS0zMB9eLAoV+ud6E4A/1NMTQKpkusACzP02XroBnqu2sk6NANDBlJQ462Tlhr6 =+hds -----END PGP SIGNATURE----- --------------enigB5FF30CC9045EF214F7DA313--