grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] bug fix for efi network


From: Vladimir 'φ-coder/phcoder' Serbinenko
Subject: Re: [PATCH] bug fix for efi network
Date: Thu, 03 May 2012 17:38:07 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.3) Gecko/20120329 Icedove/10.0.3

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: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]