linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* mangled isapnp IDs in /proc/bus/isapnp/devices
@ 2003-04-22  9:46 Rene Rebe
  2003-04-22 14:06 ` Alan Cox
  0 siblings, 1 reply; 3+ messages in thread
From: Rene Rebe @ 2003-04-22  9:46 UTC (permalink / raw)
  To: linux-kernel

Hi all,

is there a reason why the isapnp device id are mangled this way:

drivers/pnp/isapnp_proc.c

static void isapnp_devid(char *str, unsigned short vendor, unsigned short device)
{
        sprintf(str, "%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);
}

This results in output like:

CSCd937 CSC0000

Which I have to un-mangle ... :-( What is the reason for not outputting
simple hex?

Sincerely,
- René

--  
René Rebe - Europe/Germany/Berlin
e-mail:   rene@rocklinux.org, rene.rebe@gmx.net
web:      http://www.rocklinux.org/people/rene http://gsmp.tfh-berlin.de/rene/

Anyone sending unwanted advertising e-mail to this address will be
charged $25 for network traffic and computing time. By extracting my
address from this message or its header, you agree to these terms.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: mangled isapnp IDs in /proc/bus/isapnp/devices
  2003-04-22  9:46 mangled isapnp IDs in /proc/bus/isapnp/devices Rene Rebe
@ 2003-04-22 14:06 ` Alan Cox
  2003-04-22 15:21   ` Rene Rebe
  0 siblings, 1 reply; 3+ messages in thread
From: Alan Cox @ 2003-04-22 14:06 UTC (permalink / raw)
  To: Rene Rebe; +Cc: Linux Kernel Mailing List

On Maw, 2003-04-22 at 10:46, Rene Rebe wrote:
> Hi all,
> 
> is there a reason why the isapnp device id are mangled this way:

This is how the spec says the names work



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: mangled isapnp IDs in /proc/bus/isapnp/devices
  2003-04-22 14:06 ` Alan Cox
@ 2003-04-22 15:21   ` Rene Rebe
  0 siblings, 0 replies; 3+ messages in thread
From: Rene Rebe @ 2003-04-22 15:21 UTC (permalink / raw)
  To: alan; +Cc: linux-kernel

Hi.

On: 22 Apr 2003 15:06:43 +0100,
    Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:
> On Maw, 2003-04-22 at 10:46, Rene Rebe wrote:
> > Hi all,
> > 
> > is there a reason why the isapnp device id are mangled this way:
> 
> This is how the spec says the names work

Yes - but for userspace tool it would have been easier to export the
raw number; as listed in:

/lib/modules/<ver>/modules.isapnpmap

Now I added the mangling to the auto-detect script here ...

Sincerely,
- René

--  
René Rebe - Europe/Germany/Berlin
e-mail:   rene@rocklinux.org, rene.rebe@gmx.net
web:      http://www.rocklinux.org/people/rene http://gsmp.tfh-berlin.de/rene/

Anyone sending unwanted advertising e-mail to this address will be
charged $25 for network traffic and computing time. By extracting my
address from this message or its header, you agree to these terms.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-04-22 15:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-04-22  9:46 mangled isapnp IDs in /proc/bus/isapnp/devices Rene Rebe
2003-04-22 14:06 ` Alan Cox
2003-04-22 15:21   ` Rene Rebe

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).