All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Vladimir 'φ-coder/phcoder' Serbinenko" <phcoder@gmail.com>
To: grub-devel@gnu.org
Subject: Re: [PATCH] bug fix for efi network
Date: Thu, 03 May 2012 17:38:07 +0200	[thread overview]
Message-ID: <4FA2A65F.40808@gmail.com> (raw)
In-Reply-To: <CAF-6-Q0eGrNUZLxrxv7D4t5oAqoVfWx6YmOB4EmfBvgYhxdOuA@mail.gmail.com>

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

On 29.04.2012 17:05, Bean wrote:
> +  for (i = 0; i < 3; i++)
>      {
> +      grub_uint64_t limit_time;      
> +      
> +      efi_call_3 (net->get_status, net, &int_status, 0);
> +
> +      limit_time = grub_get_time_ms () + 5;
> +      for (;;)
> +	{
> +	  st = efi_call_7 (net->transmit, net, 0, (pack->tail - pack->data),
> +			   pack->data, NULL, NULL, NULL);
> +	  if (st != GRUB_EFI_NOT_READY)
> +	    break;
> +
> +	  if (limit_time < grub_get_time_ms ())
> +	    {
> +	      st = GRUB_EFI_TIMEOUT;
> +	      break;
> +	    }
> +	}
> +
> +      if (st)
> +	goto quit;
> +
>        void *txbuf = NULL;
> -      st = efi_call_3 (net->get_status, net, 0, &txbuf);
> -      if (st != GRUB_EFI_SUCCESS)
> -	return grub_error (GRUB_ERR_IO, N_("couldn't send network packet"));
> -      if (txbuf)
> -	return GRUB_ERR_NONE;
> -      if (limit_time < grub_get_time_ms ())
> -	return grub_error (GRUB_ERR_TIMEOUT, N_("couldn't send network packet"));
> +      limit_time = grub_get_time_ms () + 5;
> +      for (;;)
> +	{	 	  
> +	  st = efi_call_3 (net->get_status, net, &int_status, &txbuf);
> +
> +	  if (txbuf != NULL)
> +	    break;
> +
> +	  if (limit_time < grub_get_time_ms ())
> +	    {
> +	      st = GRUB_EFI_TIMEOUT;
> +	      break;
> +	    }
> +	}
> +
> +    quit:
> +      if (st != GRUB_EFI_TIMEOUT)
> +	break;
>      }
> +
> +  return st;
>  }
I see no justification as to why this part of patch so I can't know if
it's something which is we absolutely need to commit or something that
can wait.

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



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

  reply	other threads:[~2012-05-03 15:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-29  8:22 [PATCH] bug fix for efi network Bean
2012-04-29  8:25 ` Bean
2012-04-29 15:05 ` Bean
2012-05-03 15:38   ` Vladimir 'φ-coder/phcoder' Serbinenko [this message]
2012-05-03 17:24     ` Bean
2012-04-29 16:41 ` Vladimir 'φ-coder/phcoder' Serbinenko
2012-04-29 18:19   ` Bean
2012-05-03 15:34     ` 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=4FA2A65F.40808@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.