Hopefully fix EFI problem. Not tested
This commit is contained in:
parent
8530b00aa9
commit
eb6a7b9788
2 changed files with 16 additions and 3 deletions
|
@ -35,11 +35,22 @@ send_card_buffer (const struct grub_net_card *dev,
|
|||
{
|
||||
grub_efi_status_t st;
|
||||
grub_efi_simple_network_t *net = dev->efi_net;
|
||||
grub_uint64_t limit_time = grub_get_time_ms () + 4000;
|
||||
st = efi_call_7 (net->transmit, net, 0, (pack->tail - pack->data),
|
||||
pack->data, NULL, NULL, NULL);
|
||||
if (st != GRUB_EFI_SUCCESS)
|
||||
return grub_error (GRUB_ERR_IO, "Couldn't send network packet.");
|
||||
return GRUB_ERR_NONE;
|
||||
return grub_error (GRUB_ERR_IO, "couldn't send network packet");
|
||||
while (1)
|
||||
{
|
||||
void *txbuf = NULL;
|
||||
st = efi_call_3 (net->get_status, net, 0, &txbuf);
|
||||
if (st != GRUB_EFI_SUCCESS)
|
||||
return grub_error (GRUB_ERR_IO, "couldn't send network packet");
|
||||
if (txbuf)
|
||||
return GRUB_ERR_NONE;
|
||||
if (limit_time < grub_get_time_ms ())
|
||||
return grub_error (GRUB_ERR_TIMEOUT, "couldn't send network packet");
|
||||
}
|
||||
}
|
||||
|
||||
static struct grub_net_buff *
|
||||
|
|
|
@ -1301,7 +1301,9 @@ struct grub_efi_simple_network
|
|||
void (*statistics) (void);
|
||||
void (*mcastiptomac) (void);
|
||||
void (*nvdata) (void);
|
||||
void (*getstatus) (void);
|
||||
grub_efi_status_t (*get_status) (struct grub_efi_simple_network *this,
|
||||
grub_uint32_t *int_status,
|
||||
void **txbuf);
|
||||
grub_efi_status_t (*transmit) (struct grub_efi_simple_network *this,
|
||||
grub_efi_uintn_t header_size,
|
||||
grub_efi_uintn_t buffer_size,
|
||||
|
|
Loading…
Reference in a new issue