[PATCH -v2.6.32] ibft: Finding IBFT ACPI table on UEFI commit 935a9fee51c945b8942be2d7b4bae069167b4886 upstream. Found one system with UEFI/iBFT, kernel does not detect the iBFT during iscsi_ibft module loading. So users will need to input iscsi info during RHEL 6.x installation. We can add checking in ibft_init for acpi. At that time ACPI iBFT already get permanent mapped with ioremap. For legacy one, print the found address early. Signed-off-by: Yinghai Lu --- drivers/firmware/iscsi_ibft.c | 42 ++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 40 insertions(+), 2 deletions(-) Index: linux-2.6/drivers/firmware/iscsi_ibft.c =================================================================== --- linux-2.6.orig/drivers/firmware/iscsi_ibft.c +++ linux-2.6/drivers/firmware/iscsi_ibft.c @@ -926,6 +926,37 @@ static int __init ibft_register_attribut return rc; } +#ifdef CONFIG_ACPI +static const struct { + char *sign; +} ibft_signs[] = { + /* + * One spec says "IBFT", the other says "iBFT". We have to check + * for both. + */ + { ACPI_SIG_IBFT }, + { "iBFT" }, +}; + +static void __init acpi_find_ibft_region(void) +{ + int i; + struct acpi_table_header *table = NULL; + + if (acpi_disabled) + return; + + for (i = 0; i < ARRAY_SIZE(ibft_signs) && !ibft_addr; i++) { + acpi_get_table(ibft_signs[i].sign, 0, &table); + ibft_addr = (struct acpi_table_ibft *)table; + } +} +#else +static void __init acpi_find_ibft_region(void) +{ +} +#endif + /* * ibft_init() - creates sysfs tree entries for the iBFT data. */ @@ -937,9 +968,16 @@ static int __init ibft_init(void) if (!ibft_kset) return -ENOMEM; + /* + As on UEFI systems the setup_arch()/find_ibft_region() + is called before ACPI tables are parsed and it only does + legacy finding. + */ + if (!ibft_addr) + acpi_find_ibft_region(); + if (ibft_addr) { - printk(KERN_INFO "iBFT detected at 0x%llx.\n", - (u64)isa_virt_to_bus(ibft_addr)); + pr_info("iBFT detected.\n"); rc = ibft_check_device(); if (rc)