From f473b9c3f66a2166129e1f60774f56e673423c5a Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Fri, 14 Mar 2014 14:16:05 +0000 Subject: [efi] Disable SNP devices when running iPXE as the application Some UEFI builds will set up a timer to continuously poll any SNP devices. This can drain packets from the network device's receive queue before iPXE gets a chance to process them. Use netdev_rx_[un]freeze() to explicitly indicate when we expect our network devices to be driven via the external SNP API (as we do with the UNDI API on the standard BIOS build), and disable the SNP API except when receive queue processing is frozen. Signed-off-by: Michael Brown --- src/include/ipxe/efi/efi_snp.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/include') diff --git a/src/include/ipxe/efi/efi_snp.h b/src/include/ipxe/efi/efi_snp.h index 379164597..e1b866eb8 100644 --- a/src/include/ipxe/efi/efi_snp.h +++ b/src/include/ipxe/efi/efi_snp.h @@ -32,6 +32,8 @@ struct efi_snp_device { EFI_SIMPLE_NETWORK_PROTOCOL snp; /** The SNP "mode" (parameters) */ EFI_SIMPLE_NETWORK_MODE mode; + /** Started flag */ + int started; /** Outstanding TX packet count (via "interrupt status") * * Used in order to generate TX completions. @@ -75,5 +77,7 @@ struct efi_snp_device { extern int efi_snp_hii_install ( struct efi_snp_device *snpdev ); extern void efi_snp_hii_uninstall ( struct efi_snp_device *snpdev ); extern struct efi_snp_device * last_opened_snpdev ( void ); +extern void efi_snp_claim ( void ); +extern void efi_snp_release ( void ); #endif /* _IPXE_EFI_SNP_H */ -- cgit v1.2.3-55-g7522