Re: [GIT PULL] ibft fix for 3.2-rc6

From: Yinghai Lu
Date: Fri Dec 23 2011 - 13:24:32 EST


On Thu, Dec 22, 2011 at 7:50 PM, Konrad Rzeszutek Wilk
<konrad@xxxxxxxxxx> wrote:
>>
>> When legacy mode iscsi installation is used, installation program will
>> not need user install those info again.
>>
>> QA are complaining that difference.
>
> I think I understand your position. You are getting emails from QA
> testing some hardware saying it does not work with RHEL, so you try
> upstream, find the bug and fix it (awesome, thanks for doing that),
> and then you want to back-port the fix so RHEL picks it up (and can
> close the bug). Thr mechanism for that is by contacting the vendor
> about this - either using the Program Manager to open a feature
> request, or waiting for a customer to report this bug (on the Red Hat
> side) and then your fix will be magically picked up.

yes,

attached is the patch for 2.6.32 to close the loop.

Thanks

Yinghai
[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 <yinghai@xxxxxxxxxx>

---
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)