Re: 53052feb6 (PNP: remove pnp_mem_flags() as an lvalue) breaks my ALSA intel8x0 sound card regression

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Bjorn Helgaas
Date: Thursday, June 5, 2008 - 9:18 am

On Wednesday 04 June 2008 05:38:53 pm Tony Luck wrote:

I just sent Linus the patch to fix this (below).

In Linus' current tree, PNP_MAX_MEM is 24, so I would expect that
you would see 24 iomem messages (either successful or unsuccessful
reservations) for each system device (PNP0C01 or PNP0C02).

Hmm... the other report (on LKML) was for "iomem range 0x0-0x0
could not be reserved", while your messages were for successful
reservations.  I don't know why they're different.  But I think
this patch should fix both.



PNP: skip UNSET MEM resources as well as DISABLED ones

We don't need to reserve "unset" resources.  Trying to reserve
them results in messages like this, which are ugly but harmless:

    system 00:08: iomem range 0x0-0x0 could not be reserved

Future PNP patches will remove use of IORESOURCE_UNSET, but
we still need it for now.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>

Index: work11/drivers/pnp/system.c
===================================================================
--- work11.orig/drivers/pnp/system.c	2008-06-05 09:46:33.000000000 -0600
+++ work11/drivers/pnp/system.c	2008-06-05 09:48:09.000000000 -0600
@@ -81,7 +81,8 @@ static void reserve_resources_of_dev(str
 	}
 
 	for (i = 0; (res = pnp_get_resource(dev, IORESOURCE_MEM, i)); i++) {
-		if (res->flags & IORESOURCE_DISABLED)
+		if (res->flags & IORESOURCE_UNSET ||
+		    res->flags & IORESOURCE_DISABLED)
 			continue;
 
 		reserve_range(dev, res->start, res->end, 0);
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: 53052feb6 (PNP: remove pnp_mem_flags() as an lvalue) b ..., Bjorn Helgaas, (Thu Jun 5, 9:18 am)