mirror of https://github.com/ipxe/ipxe.git
[efi] Ignore failures when attempting to install SNP HII protocol
HII seems to fail on several systems. Since it is non-essential, treat HII problems as non-fatal. Debugged-by: Curtis Larsen <larsen@dixie.edu> Signed-off-by: Michael Brown <mcb30@ipxe.org>pull/20/merge
parent
98d09a1e03
commit
7cfb502fff
|
@ -1053,7 +1053,10 @@ static int efi_snp_probe ( struct net_device *netdev ) {
|
||||||
if ( ( rc = efi_snp_hii_install ( snpdev ) ) != 0 ) {
|
if ( ( rc = efi_snp_hii_install ( snpdev ) ) != 0 ) {
|
||||||
DBGC ( snpdev, "SNPDEV %p could not install HII: %s\n",
|
DBGC ( snpdev, "SNPDEV %p could not install HII: %s\n",
|
||||||
snpdev, strerror ( rc ) );
|
snpdev, strerror ( rc ) );
|
||||||
goto err_hii_install;
|
/* HII fails on several platforms. It's
|
||||||
|
* non-essential, so treat this as a non-fatal
|
||||||
|
* error.
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Add to list of SNP devices */
|
/* Add to list of SNP devices */
|
||||||
|
@ -1064,8 +1067,8 @@ static int efi_snp_probe ( struct net_device *netdev ) {
|
||||||
efi_devpath_text ( &snpdev->path ) );
|
efi_devpath_text ( &snpdev->path ) );
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
if ( snpdev->package_list )
|
||||||
efi_snp_hii_uninstall ( snpdev );
|
efi_snp_hii_uninstall ( snpdev );
|
||||||
err_hii_install:
|
|
||||||
efidev_child_del ( efidev, snpdev->handle );
|
efidev_child_del ( efidev, snpdev->handle );
|
||||||
err_efidev_child_add:
|
err_efidev_child_add:
|
||||||
bs->UninstallMultipleProtocolInterfaces (
|
bs->UninstallMultipleProtocolInterfaces (
|
||||||
|
@ -1130,6 +1133,7 @@ static void efi_snp_remove ( struct net_device *netdev ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Uninstall the SNP */
|
/* Uninstall the SNP */
|
||||||
|
if ( snpdev->package_list )
|
||||||
efi_snp_hii_uninstall ( snpdev );
|
efi_snp_hii_uninstall ( snpdev );
|
||||||
efidev_child_del ( snpdev->efidev, snpdev->handle );
|
efidev_child_del ( snpdev->efidev, snpdev->handle );
|
||||||
list_del ( &snpdev->list );
|
list_del ( &snpdev->list );
|
||||||
|
|
|
@ -649,8 +649,10 @@ int efi_snp_hii_install ( struct efi_snp_device *snpdev ) {
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
/* Do nothing if HII database protocol is not supported */
|
/* Do nothing if HII database protocol is not supported */
|
||||||
if ( ! efihii )
|
if ( ! efihii ) {
|
||||||
return 0;
|
rc = -ENOTSUP;
|
||||||
|
goto err_no_hii;
|
||||||
|
}
|
||||||
|
|
||||||
/* Initialise HII protocol */
|
/* Initialise HII protocol */
|
||||||
memcpy ( &snpdev->hii, &efi_snp_device_hii, sizeof ( snpdev->hii ) );
|
memcpy ( &snpdev->hii, &efi_snp_device_hii, sizeof ( snpdev->hii ) );
|
||||||
|
@ -697,6 +699,7 @@ int efi_snp_hii_install ( struct efi_snp_device *snpdev ) {
|
||||||
free ( snpdev->package_list );
|
free ( snpdev->package_list );
|
||||||
snpdev->package_list = NULL;
|
snpdev->package_list = NULL;
|
||||||
err_build_package_list:
|
err_build_package_list:
|
||||||
|
err_no_hii:
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue