From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Fri, 17 Nov 2017 10:44:55 -0500 Subject: [U-Boot] serial: nulldev: Implement "pending" function to fix tstc return "true" In-Reply-To: <1509691191-3850-1-git-send-email-wilson.lee@ni.com> References: <1509691191-3850-1-git-send-email-wilson.lee@ni.com> Message-ID: <20171117154455.GP9986@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Thu, Nov 02, 2017 at 11:39:51PM -0700, Wilson Lee wrote: > In U-boot, serial_tstc was use to determine is there have a character in > serial console that pending for read. If there is no "pending" function > implemented in serial driver, the serial-uclass will return "true(1)" > to indicate there have a character pending to read. > > Thus, read a character from nulldev serial will result in continuous > getting -EAGAIN return which might lead system to hang. > > This commit is to fix a bug in nulldev serial which implement "pending" > function in nulldev serial to always indicate there is no character in > console that pending for read. > > Signed-off-by: Wilson Lee > Cc: Joe Hershberger > Cc: Keng Soon Cheah > Cc: Chen Yee Chew > Cc: Bin Meng Applied to u-boot/master, thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: