diff mbox

powerpc/hvsi: increase handshake timeout from 200ms to 400ms.

Message ID 1377543212-20432-1-git-send-email-ebs@ebshome.net (mailing list archive)
State Accepted, archived
Headers show

Commit Message

Eugene Surovegin Aug. 26, 2013, 6:53 p.m. UTC
This solves a problem observed in kexec'ed kernel where 200ms timeout is
too short and bootconsole fails to initialize. Console did eventually
become workable but much later into the boot process.

Observed timeout was around 260ms, but I decided to make it a little bigger
for more reliability.

This has been tested on Power7 machine with Petitboot as a primary
bootloader and PowerNV firmware.

Signed-off-by: Eugene Surovegin <surovegin@google.com>
---
 drivers/tty/hvc/hvsi_lib.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Benjamin Herrenschmidt Aug. 27, 2013, 12:52 a.m. UTC | #1
On Mon, 2013-08-26 at 11:53 -0700, Eugene Surovegin wrote:
> This solves a problem observed in kexec'ed kernel where 200ms timeout is
> too short and bootconsole fails to initialize. Console did eventually
> become workable but much later into the boot process.
> 
> Observed timeout was around 260ms, but I decided to make it a little bigger
> for more reliability.
> 
> This has been tested on Power7 machine with Petitboot as a primary
> bootloader and PowerNV firmware.

Thanks !

I've been carrying a patch like that in my test stuff, the only reason I
hadn't merged it yet was that I though there might be a problem under
the hood, such as us maybe not actually polling the FSP fast enough or
something, but so far it looks like it's just slow to respond.

Cheers,
Ben.

> Signed-off-by: Eugene Surovegin <surovegin@google.com>
> ---
>  drivers/tty/hvc/hvsi_lib.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/tty/hvc/hvsi_lib.c b/drivers/tty/hvc/hvsi_lib.c
> index 3396eb9..ac27671 100644
> --- a/drivers/tty/hvc/hvsi_lib.c
> +++ b/drivers/tty/hvc/hvsi_lib.c
> @@ -341,8 +341,8 @@ void hvsilib_establish(struct hvsi_priv *pv)
>  
>  	pr_devel("HVSI@%x:   ... waiting handshake\n", pv->termno);
>  
> -	/* Try for up to 200s */
> -	for (timeout = 0; timeout < 20; timeout++) {
> +	/* Try for up to 400ms */
> +	for (timeout = 0; timeout < 40; timeout++) {
>  		if (pv->established)
>  			goto established;
>  		if (!hvsi_get_packet(pv))
diff mbox

Patch

diff --git a/drivers/tty/hvc/hvsi_lib.c b/drivers/tty/hvc/hvsi_lib.c
index 3396eb9..ac27671 100644
--- a/drivers/tty/hvc/hvsi_lib.c
+++ b/drivers/tty/hvc/hvsi_lib.c
@@ -341,8 +341,8 @@  void hvsilib_establish(struct hvsi_priv *pv)
 
 	pr_devel("HVSI@%x:   ... waiting handshake\n", pv->termno);
 
-	/* Try for up to 200s */
-	for (timeout = 0; timeout < 20; timeout++) {
+	/* Try for up to 400ms */
+	for (timeout = 0; timeout < 40; timeout++) {
 		if (pv->established)
 			goto established;
 		if (!hvsi_get_packet(pv))