diff options
Diffstat (limited to 'drivers/firmware/iscsi_ibft.c')
-rw-r--r-- | drivers/firmware/iscsi_ibft.c | 42 |
1 files changed, 40 insertions, 2 deletions
diff --git a/drivers/firmware/iscsi_ibft.c b/drivers/firmware/iscsi_ibft.c index c811cb107904..2cce44a1d7d0 100644 --- a/drivers/firmware/iscsi_ibft.c +++ b/drivers/firmware/iscsi_ibft.c | |||
@@ -746,6 +746,37 @@ static void __exit ibft_exit(void) | |||
746 | ibft_cleanup(); | 746 | ibft_cleanup(); |
747 | } | 747 | } |
748 | 748 | ||
749 | #ifdef CONFIG_ACPI | ||
750 | static const struct { | ||
751 | char *sign; | ||
752 | } ibft_signs[] = { | ||
753 | /* | ||
754 | * One spec says "IBFT", the other says "iBFT". We have to check | ||
755 | * for both. | ||
756 | */ | ||
757 | { ACPI_SIG_IBFT }, | ||
758 | { "iBFT" }, | ||
759 | }; | ||
760 | |||
761 | static void __init acpi_find_ibft_region(void) | ||
762 | { | ||
763 | int i; | ||
764 | struct acpi_table_header *table = NULL; | ||
765 | |||
766 | if (acpi_disabled) | ||
767 | return; | ||
768 | |||
769 | for (i = 0; i < ARRAY_SIZE(ibft_signs) && !ibft_addr; i++) { | ||
770 | acpi_get_table(ibft_signs[i].sign, 0, &table); | ||
771 | ibft_addr = (struct acpi_table_ibft *)table; | ||
772 | } | ||
773 | } | ||
774 | #else | ||
775 | static void __init acpi_find_ibft_region(void) | ||
776 | { | ||
777 | } | ||
778 | #endif | ||
779 | |||
749 | /* | 780 | /* |
750 | * ibft_init() - creates sysfs tree entries for the iBFT data. | 781 | * ibft_init() - creates sysfs tree entries for the iBFT data. |
751 | */ | 782 | */ |
@@ -753,9 +784,16 @@ static int __init ibft_init(void) | |||
753 | { | 784 | { |
754 | int rc = 0; | 785 | int rc = 0; |
755 | 786 | ||
787 | /* | ||
788 | As on UEFI systems the setup_arch()/find_ibft_region() | ||
789 | is called before ACPI tables are parsed and it only does | ||
790 | legacy finding. | ||
791 | */ | ||
792 | if (!ibft_addr) | ||
793 | acpi_find_ibft_region(); | ||
794 | |||
756 | if (ibft_addr) { | 795 | if (ibft_addr) { |
757 | printk(KERN_INFO "iBFT detected at 0x%llx.\n", | 796 | pr_info("iBFT detected.\n"); |
758 | (u64)isa_virt_to_bus(ibft_addr)); | ||
759 | 797 | ||
760 | rc = ibft_check_device(); | 798 | rc = ibft_check_device(); |
761 | if (rc) | 799 | if (rc) |