On 25.04.2015 16:12, Andrei Borzenkov wrote:
> ---
> grub-core/net/drivers/efi/efinet.c | 101
> ++++++++++++++++++++++++++++++++++++-
> 1 file changed, 99 insertions(+), 2 deletions(-)
>
> diff --git a/grub-core/net/drivers/efi/efinet.c
> b/grub-core/net/drivers/efi/efinet.c
> index f171f20..46e337a 100644
> --- a/grub-core/net/drivers/efi/efinet.c
> +++ b/grub-core/net/drivers/efi/efinet.c
> @@ -142,9 +142,52 @@ get_card_packet (struct grub_net_card *dev)
> return nb;
> }
>
> +static grub_err_t
> +open_card (struct grub_net_card *dev)
> +{
> + grub_efi_simple_network_t *net;
> +
> + /* Try to reopen SNP exlusively to close any active MNP protocol instance
> + that may compete for packet polling
> + */
> + net = grub_efi_open_protocol (dev->efi_handle, &net_io_guid,
> + GRUB_EFI_OPEN_PROTOCOL_BY_EXCLUSIVE);
> + if (net)
> + {
> + if (net->mode->state == GRUB_EFI_NETWORK_STOPPED
> + && efi_call_1 (net->start, net) != GRUB_EFI_SUCCESS)
> + return GRUB_ERR_BAD_DEVICE;
> +
Please use proper grub_error.
> + if (net->mode->state == GRUB_EFI_NETWORK_STOPPED)
> + return GRUB_ERR_BAD_DEVICE;
> +
Ditto
> + if (net->mode->state == GRUB_EFI_NETWORK_STARTED
> + && efi_call_3 (net->initialize, net, 0, 0) != GRUB_EFI_SUCCESS)
> + return GRUB_ERR_BAD_DEVICE;
> +
DittoOtherwise patch looks good. If you're comfortable with it, please commit. Make sure to credit all relevant authors, feel free to use Also-By to credit several authors (AFAIU Martin as main author and you in Also-By)
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Grub-devel mailing list [email protected] https://lists.gnu.org/mailman/listinfo/grub-devel
