Re: [patch 00/37] PNP resource_table cleanups

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 27-03-08 18:50, Bjorn Helgaas wrote:

Are any ISAPNP devices at all found?

Yes, but at most 100 * 10^4 / 2^16 percent of them. Trouble is in 04/37:

http://lkml.org/lkml/2008/3/26/273

The numeric part of the ID is a 4-digit hexadecimal value, not just decimal, so '0'+ don't work. Unfortunately, that one has a few dependents, so you'll probably want to restructure things yourself. If I just place the attached on top, the card's found again.

Not too much avail unfortunately, as I then get a resource assignment problem with your patches:

pnp: the driver 'cs4236_isapnp' has been registered
cs4236_isapnp 01:01.00: driver attached
cs4236_isapnp 01:01.02: driver attached
cs4236_isapnp 01:01.03: driver attached
cs4236_isapnp 01:01.00: unable to assign resources
CS4236+ WSS PnP configure failed for WSS (out of resources?)
isapnp detection failed and probing for CS4236+ is not supported

(and exact same thing for snd-es18xx) which I'll try to look at next, but this ID thing will certainly need a fix first.

Rene.
diff --git a/drivers/pnp/isapnp/core.c b/drivers/pnp/isapnp/core.c
index c4b95b5..0a41e05 100644
--- a/drivers/pnp/isapnp/core.c
+++ b/drivers/pnp/isapnp/core.c
@@ -403,14 +403,12 @@ static void __init isapnp_skip_bytes(int count)
 static void isapnp_to_pnpid(unsigned short vendor, unsigned short device,
 			    char *id)
 {
-	id[0] = 'A' + ((vendor >> 2) & 0x3f) - 1;
-	id[1] = 'A' + (((vendor & 3) << 3) | ((vendor >> 13) & 7)) - 1;
-	id[2] = 'A' + ((vendor >> 8) & 0x1f) - 1;
-	id[3] = '0' + ((device >> 4) & 0x0f);
-	id[4] = '0' + (device & 0x0f);
-	id[5] = '0' + ((device >> 12) & 0x0f);
-	id[6] = '0' + ((device >> 8) & 0x0f);
-	id[7] = '\0';
+	sprintf(id, "%c%c%c%x%x%x%x",
+		'A' + ((vendor >> 2) & 0x3f) - 1,
+		'A' + (((vendor & 3) << 3) | ((vendor >> 13) & 7)) - 1,
+		'A' + ((vendor >> 8) & 0x1f) - 1,
+		(device >> 4) & 0x0f, device & 0x0f,
+		(device >> 12) & 0x0f, (device >> 8) & 0x0f);
 }
 
 /*

[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux