]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[efi] Default to releasing network devices for use via SNP
authorMichael Brown <mcb30@ipxe.org>
Wed, 30 Jul 2014 13:21:10 +0000 (14:21 +0100)
committerMichael Brown <mcb30@ipxe.org>
Wed, 30 Jul 2014 13:27:07 +0000 (14:27 +0100)
commitdc18fd76488476c8bd5b70ba228576d328280670
tree367cbb53850d4379742d465ced0a08918abe5fbd
parent793a806611f5a7b3a404afb27c837a3da381952e
[efi] Default to releasing network devices for use via SNP

We currently treat network devices as available for use via the SNP
API only if RX queue processing has been frozen.  (This is similar in
spirit to the way that RX queue processing is frozen for the network
device currently exposed via the PXE API.)

The default state of a freshly created network device is for the RX
queue to not be frozen, and thus to be unavailable for use via SNP.
This causes problems when devices are added through code paths other
than _efidrv_start() (which explicitly releases devices for use via
SNP).

We don't actually need to freeze RX queue processing, since calls via
the SNP API will always use netdev_poll() rather than net_poll(), and
so will never trigger the RX queue processing code path anyway.

We can therefore simplify the code to use a single global flag to
indicate whether network devices are claimed for use by iPXE or
available for use via SNP.  Using a global flag allows the default
state for dynamically created network devices to behave sensibly.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/arch/x86/prefix/efidrvprefix.c
src/arch/x86/prefix/efiprefix.c
src/include/ipxe/efi/efi_snp.h
src/interface/efi/efi_download.c
src/interface/efi/efi_snp.c