From: Kay Sievers <kay.sievers@vrfy.org>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Bjorn Helgaas <bjorn.helgaas@hp.com>,
Frans Pop <elendil@planet.nl>,
linux-kernel@vger.kernel.org, Marcel Selhorst <tpm@selhorst.net>,
Thomas Renninger <trenn@suse.de>, Adam Belay <ambx1@neo.rr.com>,
Andrew Morton <akpm@linux-foundation.org>,
Greg KH <greg@kroah.com>
Subject: Re: char/tpm: tpm_infineon no longer loaded for HP 2510p laptop
Date: Thu, 21 Aug 2008 15:28:56 +0200 [thread overview]
Message-ID: <1219325336.20723.32.camel@lgn.site> (raw)
In-Reply-To: <200808211440.27577.rjw@sisk.pl>
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@vrfy.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@vrfy.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 */
next prev parent reply other threads:[~2008-08-21 13:29 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-18 13:40 char/tpm: tpm_infineon no longer loaded for HP 2510p laptop Frans Pop
2008-08-20 15:56 ` Bjorn Helgaas
2008-08-21 12:40 ` Rafael J. Wysocki
2008-08-21 13:28 ` Kay Sievers [this message]
2008-08-21 15:14 ` Bjorn Helgaas
2008-08-21 15:38 ` Kay Sievers
2008-08-21 16:31 ` Bjorn Helgaas
2008-08-21 20:30 ` Frans Pop
2008-08-21 21:18 Kay Sievers
2008-08-21 21:58 ` Bjorn Helgaas
2008-08-22 8:40 ` Kay Sievers
2008-08-22 12:06 ` Bjorn Helgaas
2008-08-22 12:43 ` Kay Sievers
2008-10-03 22:01 ` Bjorn Helgaas
2008-10-04 12:09 ` Kay Sievers
2008-10-04 15:31 ` Bjorn Helgaas
2008-10-04 16:27 ` Kay Sievers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1219325336.20723.32.camel@lgn.site \
--to=kay.sievers@vrfy.org \
--cc=akpm@linux-foundation.org \
--cc=ambx1@neo.rr.com \
--cc=bjorn.helgaas@hp.com \
--cc=elendil@planet.nl \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rjw@sisk.pl \
--cc=tpm@selhorst.net \
--cc=trenn@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).