[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] bug fix for efi network
From: |
Bean |
Subject: |
Re: [PATCH] bug fix for efi network |
Date: |
Fri, 4 May 2012 01:24:26 +0800 |
On Thu, May 3, 2012 at 11:38 PM, Vladimir 'φ-coder/phcoder' Serbinenko
<address@hidden> wrote:
> 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.
Hi,
Yeah, this is not necessary, it's my custom code for the tftp service,
I just want to check if it makes a difference. In fact, the problem is
in the network code itself, not the low level driver.
--
Best wishes
Bean