[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1219325336.20723.32.camel@lgn.site>
Date: Thu, 21 Aug 2008 15:28:56 +0200
From: Kay Sievers <kay.sievers@...y.org>
To: "Rafael J. Wysocki" <rjw@...k.pl>
Cc: Bjorn Helgaas <bjorn.helgaas@...com>,
Frans Pop <elendil@...net.nl>, linux-kernel@...r.kernel.org,
Marcel Selhorst <tpm@...horst.net>,
Thomas Renninger <trenn@...e.de>,
Adam Belay <ambx1@....rr.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Greg KH <greg@...ah.com>
Subject: Re: char/tpm: tpm_infineon no longer loaded for HP 2510p laptop
On Thu, 2008-08-21 at 14:40 +0200, Rafael J. Wysocki wrote:
> On Wednesday, 20 of August 2008, Bjorn Helgaas wrote:
> > On Monday 18 August 2008 07:40:24 am Frans Pop wrote:
> > > While comparing the loaded modules for 2.6.26 and 2.6.27-rc3 for my HP
> > > 2510p, I noticed that the tpm_infineon module and related modules no
> > > longer get loaded automatically.
> > >
> > > The difference seems to be that 2.6.26 listed:
> > > /lib/modules/2.6.26.2/modules.alias:alias pnp:dIFX0102* tpm_infineon
> > > /lib/modules/2.6.26.2/modules.alias:alias pnp:dIFX0101* tpm_infineon
> > >
> > > while 2.6.27 has:
> > > /lib/modules/2.6.27-rc3/modules.alias:alias acpi*:IFX0101:* tpm_infineon
> > > /lib/modules/2.6.27-rc3/modules.alias:alias pnp:dIFX0101* tpm_infineon
> > >
> > > My system has:
> > > $ grep IFX /sys/bus/pnp/devices/*/id
> > > /sys/bus/pnp/devices/00:02/id:IFX0102
> >
> > drivers/char/tpm/tpm_infineon.c hasn't changed since v2.6.26. I think
> > the problem is more likely related to commit 22454cb99fc39f2629a:
> > http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=22454cb99fc39f2629ad06a7eccb3df312f8830e
>
> Frans, could you verify if reverting commit 22454cb99fc39f2629a fixes the
> problem for you?
Yeah, we miss to loop over the list. This should fix it. Thanks!
From: Kay Sievers <kay.sievers@...y.org>
Subject: pnp: fix "add acpi:* modalias entries"
With 22454cb99fc39f2629ad06a7eccb3df312f8830e we added only the
first entry of the device table. We need to loop over the whole
device list.
Signed-off-by: Kay Sievers <kay.sievers@...y.org>
---
file2alias.c | 16 +++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)
diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c
--- a/scripts/mod/file2alias.c
+++ b/scripts/mod/file2alias.c
@@ -344,14 +344,20 @@ static void do_pnp_device_entry(void *symval, unsigned long size,
struct module *mod)
{
const unsigned long id_size = sizeof(struct pnp_device_id);
- const struct pnp_device_id *id = symval;
+ const unsigned int count = (size / id_size)-1;
+ const struct pnp_device_id *devs = symval;
+ unsigned int i;
device_id_check(mod->name, "pnp", size, id_size, symval);
- buf_printf(&mod->dev_table_buf,
- "MODULE_ALIAS(\"pnp:d%s*\");\n", id->id);
- buf_printf(&mod->dev_table_buf,
- "MODULE_ALIAS(\"acpi*:%s:*\");\n", id->id);
+ for (i = 0; i < count; i++) {
+ const char *id = (char *)devs[i].id;
+
+ buf_printf(&mod->dev_table_buf,
+ "MODULE_ALIAS(\"pnp:d%s*\");\n", id);
+ buf_printf(&mod->dev_table_buf,
+ "MODULE_ALIAS(\"acpi*:%s:*\");\n", id);
+ }
}
/* looks like: "pnp:dD" for every device of the card */
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists