diff options
author | Bjorn Helgaas <bjorn.helgaas@hp.com> | 2008-04-10 21:29:28 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-11 08:06:44 -0700 |
commit | 544451a1a36b06f43fc67112ede3b92e6203eb9d (patch) | |
tree | 3ae32c7f59291b963770ae8017ac37943077f7ac /include | |
parent | bd2ab67030e9116f1e4aae1289220255412b37fd (diff) |
pnp: increase number of devices supported per protocol
Increase the PNP "number of devices" limit. We currently use an unsigned
char, which limits us to 256 devices per protocol. This patch changes that to
an unsigned int.
Not all backends can take advantage of this: we limit ISAPNP to 10 devices in
isapnp_cfg_begin(), and PNPBIOS is limited to 256 devices because the BIOS
interfaces use a one-byte device node number.
But there is no limit on the number of PNPACPI devices we may have. Large HP
Integrity machines have more than 256, which causes the current "unsigned char
number" to wrap around. This causes errors like this:
pnp: PnP ACPI init
kobject_add failed for 00:00 with -EEXIST, don't try to register things with the same name in the same directory.
Call Trace:
[<a000000100010720>] show_stack+0x40/0xa0
[<a0000001000107b0>] dump_stack+0x30/0x60
[<a0000001001dbdf0>] kobject_add+0x290/0x2c0
[<a0000001002bfd40>] device_add+0x160/0x860
[<a0000001002c0470>] device_register+0x30/0x60
[<a00000010026ba70>] __pnp_add_device+0x130/0x180
[<a00000010026bb70>] pnp_add_device+0xb0/0xe0
[<a0000001007f2730>] pnpacpi_add_device+0x510/0x5a0
[<a0000001007f2810>] pnpacpi_add_device_handler+0x50/0x80
This patch increases the limit to fix this PNPACPI problem. It should not
have any adverse effect on ISAPNP or PNPBIOS because their limits are still
enforced in the backends.
Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/pnp.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/pnp.h b/include/linux/pnp.h index 29dd55838e84..b2f05c230f4b 100644 --- a/include/linux/pnp.h +++ b/include/linux/pnp.h @@ -175,7 +175,7 @@ static inline void pnp_set_card_drvdata(struct pnp_card_link *pcard, void *data) struct pnp_dev { struct device dev; /* Driver Model device interface */ u64 dma_mask; - unsigned char number; /* used as an index, must be unique */ + unsigned int number; /* used as an index, must be unique */ int status; struct list_head global_list; /* node in global list of devices */ |