In the efi_loader main loop we call eth_rx() occasionally. This rx function
might end up calling into devices that haven't been initialized yet,
potentially resulting in a lot of transfer timeouts.
Instead, let's make sure the ethernet device is actually initialized before
reading from or writing to it.
Signed-off-by: Alexander Graf <agraf@suse.de>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
if (!current)
return -ENODEV;
- if (!device_active(current))
+ if (!eth_is_active(current))
return -EINVAL;
ret = eth_get_ops(current)->send(current, packet, length);
if (!current)
return -ENODEV;
- if (!device_active(current))
+ if (!eth_is_active(current))
return -EINVAL;
/* Process up to 32 packets at one time */