All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] ibm_rtl fixes
@ 2010-11-02 20:08 Vernon Mauery
  2010-11-02 20:08 ` [PATCH 1/2] ibm_rtl: Loosen the DMI criteria to all IBM machines Vernon Mauery
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Vernon Mauery @ 2010-11-02 20:08 UTC (permalink / raw)
  To: linux-kernel; +Cc: Matthew Garrett, platform-driver-x86, Vernon Mauery

This pair of patches address two issues that were brought
to my attention.  The first is to remove the need for
constantly updating the driver whenever a new machine
with this capability is added.  The second fixes a bug
when run on a machine in UEFI mode.

Signed-off-by: Vernon Mauery <vernux@us.ibm.com>

--Vernon

ibm_rtl: Loosen the DMI criteria to all IBM machines
ibm_rtl: _RTL_ is not available in UEFI mode

 ibm_rtl.c |   32 +++++++-------------------------
 1 file changed, 7 insertions(+), 25 deletions(-)


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 1/2] ibm_rtl: Loosen the DMI criteria to all IBM machines
  2010-11-02 20:08 [PATCH 0/2] ibm_rtl fixes Vernon Mauery
@ 2010-11-02 20:08 ` Vernon Mauery
  2010-11-24 16:51   ` Matthew Garrett
  2010-11-02 20:08 ` [PATCH 2/2] ibm_rtl: _RTL_ is not available in UEFI mode Vernon Mauery
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 7+ messages in thread
From: Vernon Mauery @ 2010-11-02 20:08 UTC (permalink / raw)
  To: linux-kernel; +Cc: Matthew Garrett, platform-driver-x86, Vernon Mauery

Allow all IBM machines to pass the DMI check so that we
don't have to add them one by one to the driver.  Any IBM
machine that has the _RTL_ table in the EBDA will work.

Signed-off-by: Vernon Mauery <vernux@us.ibm.com>
---
 drivers/platform/x86/ibm_rtl.c |   29 +++++------------------------
 1 files changed, 5 insertions(+), 24 deletions(-)

diff --git a/drivers/platform/x86/ibm_rtl.c b/drivers/platform/x86/ibm_rtl.c
index 3c2c6b9..c5a0061 100644
--- a/drivers/platform/x86/ibm_rtl.c
+++ b/drivers/platform/x86/ibm_rtl.c
@@ -220,32 +220,13 @@ static void rtl_teardown_sysfs(void) {
 	sysdev_class_unregister(&class_rtl);
 }
 
-static int dmi_check_cb(const struct dmi_system_id *id)
-{
-	RTL_DEBUG("found IBM server '%s'\n", id->ident);
-	return 0;
-}
-
-#define ibm_dmi_entry(NAME, TYPE)                  \
-{                                                  \
-	.ident = NAME,                             \
-	.matches = {                               \
-		DMI_MATCH(DMI_SYS_VENDOR, "IBM"),  \
-		DMI_MATCH(DMI_PRODUCT_NAME, TYPE), \
-	},                                         \
-	.callback = dmi_check_cb                   \
-}
 
 static struct dmi_system_id __initdata ibm_rtl_dmi_table[] = {
-	ibm_dmi_entry("BladeCenter LS21", "7971"),
-	ibm_dmi_entry("BladeCenter LS22", "7901"),
-	ibm_dmi_entry("BladeCenter HS21 XM", "7995"),
-	ibm_dmi_entry("BladeCenter HS22", "7870"),
-	ibm_dmi_entry("BladeCenter HS22V", "7871"),
-	ibm_dmi_entry("System x3550 M2", "7946"),
-	ibm_dmi_entry("System x3650 M2", "7947"),
-	ibm_dmi_entry("System x3550 M3", "7944"),
-	ibm_dmi_entry("System x3650 M3", "7945"),
+	{                                                  \
+		.matches = {                               \
+			DMI_MATCH(DMI_SYS_VENDOR, "IBM"),  \
+		},                                         \
+	},
 	{ }
 };
 
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/2] ibm_rtl: _RTL_ is not available in UEFI mode
  2010-11-02 20:08 [PATCH 0/2] ibm_rtl fixes Vernon Mauery
  2010-11-02 20:08 ` [PATCH 1/2] ibm_rtl: Loosen the DMI criteria to all IBM machines Vernon Mauery
@ 2010-11-02 20:08 ` Vernon Mauery
  2010-11-02 20:12 ` [PATCH 0/2] ibm_rtl fixes Matthew Garrett
  2010-11-02 20:17 ` [PATCH -resend] ibm_rtl: fix printk format warning Randy Dunlap
  3 siblings, 0 replies; 7+ messages in thread
From: Vernon Mauery @ 2010-11-02 20:08 UTC (permalink / raw)
  To: linux-kernel; +Cc: Matthew Garrett, platform-driver-x86, Vernon Mauery

Some of the IBM servers that are supported by ibm_rtl
can run in both Legacy mode (BIOS) and in UEFI mode.
When running in UEFI mode, it is possible that the
EBDA table exists but cannot be mapped and reports
errors.  We need to make sure that by default we don't
try to probe the machines if they are running in UEFI
mode.

Signed-off-by: Vernon Mauery <vernux@us.ibm.com>
---
 drivers/platform/x86/ibm_rtl.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/platform/x86/ibm_rtl.c b/drivers/platform/x86/ibm_rtl.c
index c5a0061..3cff0e5 100644
--- a/drivers/platform/x86/ibm_rtl.c
+++ b/drivers/platform/x86/ibm_rtl.c
@@ -28,6 +28,7 @@
 #include <linux/io.h>
 #include <linux/sysdev.h>
 #include <linux/dmi.h>
+#include <linux/efi.h>
 #include <linux/mutex.h>
 #include <asm/bios_ebda.h>
 
@@ -238,7 +239,7 @@ static int __init ibm_rtl_init(void) {
 	if (force)
 		pr_warning("ibm-rtl: module loaded by force\n");
 	/* first ensure that we are running on IBM HW */
-	else if (!dmi_check_system(ibm_rtl_dmi_table))
+	else if (efi_enabled || !dmi_check_system(ibm_rtl_dmi_table))
 		return -ENODEV;
 
 	/* Get the address for the Extended BIOS Data Area */
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 0/2] ibm_rtl fixes
  2010-11-02 20:08 [PATCH 0/2] ibm_rtl fixes Vernon Mauery
  2010-11-02 20:08 ` [PATCH 1/2] ibm_rtl: Loosen the DMI criteria to all IBM machines Vernon Mauery
  2010-11-02 20:08 ` [PATCH 2/2] ibm_rtl: _RTL_ is not available in UEFI mode Vernon Mauery
@ 2010-11-02 20:12 ` Matthew Garrett
  2010-11-02 20:17 ` [PATCH -resend] ibm_rtl: fix printk format warning Randy Dunlap
  3 siblings, 0 replies; 7+ messages in thread
From: Matthew Garrett @ 2010-11-02 20:12 UTC (permalink / raw)
  To: Vernon Mauery; +Cc: linux-kernel, platform-driver-x86

I'll queue these up to be merged, but I'm going to have spotty 
availability for the next couple of weeks - so if you don't hear 
anything, don't panic and I'll catch up once I'm back.

-- 
Matthew Garrett | mjg59@srcf.ucam.org

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH -resend] ibm_rtl: fix printk format warning
  2010-11-02 20:08 [PATCH 0/2] ibm_rtl fixes Vernon Mauery
                   ` (2 preceding siblings ...)
  2010-11-02 20:12 ` [PATCH 0/2] ibm_rtl fixes Matthew Garrett
@ 2010-11-02 20:17 ` Randy Dunlap
  2010-11-02 20:20   ` Vernon Mauery
  3 siblings, 1 reply; 7+ messages in thread
From: Randy Dunlap @ 2010-11-02 20:17 UTC (permalink / raw)
  To: Vernon Mauery, Keith Mannthey
  Cc: linux-kernel, Matthew Garrett, platform-driver-x86

From: Randy Dunlap <randy.dunlap@oracle.com>

Fix printk format warning:

drivers/platform/x86/ibm_rtl.c:305:warning: format '%#llx' expects type 'long long unsigned int', but argument 2 has type 'phys_addr_t'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Keith Mannthey <kmannth@us.ibm.com>
Cc: Vernon Mauery <vernux@us.ibm.com>
Cc: platform-driver-x86@vger.kernel.org
Cc: Matthew Garrett <mjg@redhat.com>
---
 drivers/platform/x86/ibm_rtl.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- linux-next-20101022.orig/drivers/platform/x86/ibm_rtl.c
+++ linux-next-20101022/drivers/platform/x86/ibm_rtl.c
@@ -302,7 +302,7 @@ static int __init ibm_rtl_init(void) {
 			RTL_DEBUG("rtl_cmd_width = %u, rtl_cmd_type = %u\n",
 			      rtl_cmd_width, rtl_cmd_type);
 			addr = ioread32(&rtl_table->cmd_port_address);
-			RTL_DEBUG("addr = %#llx\n", addr);
+			RTL_DEBUG("addr = %#llx\n", (unsigned long long)addr);
 			plen = rtl_cmd_width/sizeof(char);
 			rtl_cmd_addr = rtl_port_map(addr, plen);
 			RTL_DEBUG("rtl_cmd_addr = %#llx\n", (u64)rtl_cmd_addr);

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH -resend] ibm_rtl: fix printk format warning
  2010-11-02 20:17 ` [PATCH -resend] ibm_rtl: fix printk format warning Randy Dunlap
@ 2010-11-02 20:20   ` Vernon Mauery
  0 siblings, 0 replies; 7+ messages in thread
From: Vernon Mauery @ 2010-11-02 20:20 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: Keith Mannthey, linux-kernel, Matthew Garrett, platform-driver-x86

On 02-Nov-2010 01:17 PM, Randy Dunlap wrote:
>From: Randy Dunlap <randy.dunlap@oracle.com>
>
>Fix printk format warning:
>
>drivers/platform/x86/ibm_rtl.c:305:warning: format '%#llx' expects type 'long long unsigned int', but argument 2 has type 'phys_addr_t'
>
>Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
>Cc: Keith Mannthey <kmannth@us.ibm.com>
>Cc: Vernon Mauery <vernux@us.ibm.com>
>Cc: platform-driver-x86@vger.kernel.org
>Cc: Matthew Garrett <mjg@redhat.com>

Acked-by: Vernon Mauery <vernux@us.ibm.com>

--Vernon

>---
> drivers/platform/x86/ibm_rtl.c |    2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>--- linux-next-20101022.orig/drivers/platform/x86/ibm_rtl.c
>+++ linux-next-20101022/drivers/platform/x86/ibm_rtl.c
>@@ -302,7 +302,7 @@ static int __init ibm_rtl_init(void) {
> 			RTL_DEBUG("rtl_cmd_width = %u, rtl_cmd_type = %u\n",
> 			      rtl_cmd_width, rtl_cmd_type);
> 			addr = ioread32(&rtl_table->cmd_port_address);
>-			RTL_DEBUG("addr = %#llx\n", addr);
>+			RTL_DEBUG("addr = %#llx\n", (unsigned long long)addr);
> 			plen = rtl_cmd_width/sizeof(char);
> 			rtl_cmd_addr = rtl_port_map(addr, plen);
> 			RTL_DEBUG("rtl_cmd_addr = %#llx\n", (u64)rtl_cmd_addr);
>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] ibm_rtl: Loosen the DMI criteria to all IBM machines
  2010-11-02 20:08 ` [PATCH 1/2] ibm_rtl: Loosen the DMI criteria to all IBM machines Vernon Mauery
@ 2010-11-24 16:51   ` Matthew Garrett
  0 siblings, 0 replies; 7+ messages in thread
From: Matthew Garrett @ 2010-11-24 16:51 UTC (permalink / raw)
  To: Vernon Mauery; +Cc: linux-kernel, platform-driver-x86

Applied both of these, thanks.

-- 
Matthew Garrett | mjg59@srcf.ucam.org

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-11-24 16:52 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-02 20:08 [PATCH 0/2] ibm_rtl fixes Vernon Mauery
2010-11-02 20:08 ` [PATCH 1/2] ibm_rtl: Loosen the DMI criteria to all IBM machines Vernon Mauery
2010-11-24 16:51   ` Matthew Garrett
2010-11-02 20:08 ` [PATCH 2/2] ibm_rtl: _RTL_ is not available in UEFI mode Vernon Mauery
2010-11-02 20:12 ` [PATCH 0/2] ibm_rtl fixes Matthew Garrett
2010-11-02 20:17 ` [PATCH -resend] ibm_rtl: fix printk format warning Randy Dunlap
2010-11-02 20:20   ` Vernon Mauery

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.