hal: Branch 'master'

Danny Kukawka dkukawka at kemper.freedesktop.org
Fri Sep 8 03:02:52 PDT 2006


 hald/linux/addons/.gitignore |    1 
 hald/linux/ids.c             |  801 ++++++++++++++++++++++---------------------
 2 files changed, 413 insertions(+), 389 deletions(-)

New commits:
diff-tree 853115cf6749087546671c92fc64d51ec01e68ac (from 674e7fe86a2f1dca672863de5e283eaf0730ae26)
Author: Danny Kukawka <danny.kukawka at web.de>
Date:   Fri Sep 8 12:00:48 2006 +0200

    performance patch to speed up mapping of pnp_ids to description
    
    Replace the current linear search for map a pnp-id to description
    with a binary search by using bsearch(). This should reduce the needed
    time/iterations from O(n) (in average O(N/2)) to  O(log n) to find
    the id (from ~400 ids in the list atm).
    
    This patch include also some new pnp ids for TabletPC devices.
    
    Updated hald/linux/addons/.gitignore for hald-addon-cpufreq.

diff --git a/hald/linux/addons/.gitignore b/hald/linux/addons/.gitignore
index 6c2e509..25fcda8 100644
--- a/hald/linux/addons/.gitignore
+++ b/hald/linux/addons/.gitignore
@@ -12,5 +12,6 @@ hald-addon-usb-csr
 hald-addon-keyboard
 hald-addon-acpi-buttons-toshiba
 hald-addon-macbookpro-backlight
+hald-addon-cpufreq
 *.o
 *~
diff --git a/hald/linux/ids.c b/hald/linux/ids.c
index 7cb41f3..d46a63b 100644
--- a/hald/linux/ids.c
+++ b/hald/linux/ids.c
@@ -552,422 +552,445 @@ ids_init (void)
  *
  * Keep this sorted!
  */
-static char *pnp_ids_list[] = {
+struct pnp_id {
+	char *id;
+   	char *desc;
+} static pnp_ids_list[] = {
 	/* Crystal Semiconductor devices */
-	"CSC0000", "Crystal Semiconductor CS423x sound -- SB/WSS/OPL3 emulation",
-	"CSC0010", "Crystal Semiconductor CS423x sound -- control",
-	"CSC0001", "Crystal Semiconductor CS423x sound -- joystick",
-	"CSC0003", "Crystal Semiconductor CS423x sound -- MPU401",
+	{"CSC0000", "Crystal Semiconductor CS423x sound -- SB/WSS/OPL3 emulation"},
+	{"CSC0001", "Crystal Semiconductor CS423x sound -- joystick"},
+	{"CSC0003", "Crystal Semiconductor CS423x sound -- MPU401"},
+	{"CSC0010", "Crystal Semiconductor CS423x sound -- control"},
 	/* IBM devices */
-	"IBM3780", "IBM pointing device",
-	"IBM0071", "IBM infrared communications device",
-	"IBM3760", "IBM DSP",
+	{"IBM0071", "IBM infrared communications device"},
+	{"IBM3760", "IBM DSP"},
+	{"IBM3780", "IBM pointing device"},
+        /* FinePoint devices */
+        {"FPI2004", "FinePoint Innovations Tablet"},
+        /* Fujitsu (Siemens Computers) devices */
+        {"FUJ02E5", "Wacom Serial Pen HID Tablet"},
+        {"FUJ02E6", "Fujitsu Serial TouchScreen"},
 	/* interrupt controllers */
-	"PNP0000", "AT Interrupt Controller",
-	"PNP0001", "EISA Interrupt Controller",
-	"PNP0002", "MCA Interrupt Controller",
-	"PNP0003", "APIC",
-	"PNP0004", "Cyrix SLiC MP interrupt controller",
+	{"PNP0000", "AT Interrupt Controller"},
+	{"PNP0001", "EISA Interrupt Controller"},
+	{"PNP0002", "MCA Interrupt Controller"},
+	{"PNP0003", "APIC"},
+	{"PNP0004", "Cyrix SLiC MP interrupt controller"},
 	/* timers */
-	"PNP0100", "AT Timer",
-	"PNP0101", "EISA Timer",
-	"PNP0102", "MCA Timer",
+	{"PNP0100", "AT Timer"},
+	{"PNP0101", "EISA Timer"},
+	{"PNP0102", "MCA Timer"},
 	/* DMA controllers */
-	"PNP0200", "AT DMA Controller",
-	"PNP0201", "EISA DMA Controller",
-	"PNP0202", "MCA DMA Controller",
+	{"PNP0200", "AT DMA Controller"},
+	{"PNP0201", "EISA DMA Controller"},
+	{"PNP0202", "MCA DMA Controller"},
 	/* keyboards */
-	"PNP0300", "IBM PC/XT keyboard controller (83-key)",
-	"PNP0301", "IBM PC/AT keyboard controller (86-key)",
-	"PNP0302", "IBM PC/XT keyboard controller (84-key)",
-	"PNP0303", "IBM Enhanced (101/102-key, PS/2 mouse support)",
-	"PNP0304", "Olivetti Keyboard (83-key)",
-	"PNP0305", "Olivetti Keyboard (102-key)",
-	"PNP0306", "Olivetti Keyboard (86-key)",
-	"PNP0307", "Microsoft Windows(R) Keyboard",
-	"PNP0308", "General Input Device Emulation Interface (GIDEI) legacy",
-	"PNP0309", "Olivetti Keyboard (A101/102 key)",
-	"PNP030A", "AT&T 302 keyboard",
-	"PNP030B", "Reserved by Microsoft",
-	"PNP0320", "Japanese 101-key keyboard",
-	"PNP0321", "Japanese AX keyboard",
-	"PNP0322", "Japanese 106-key keyboard A01",
-	"PNP0323", "Japanese 106-key keyboard 002/003",
-	"PNP0324", "Japanese 106-key keyboard 001",
-	"PNP0325", "Japanese Toshiba Desktop keyboard",
-	"PNP0326", "Japanese Toshiba Laptop keyboard",
-	"PNP0327", "Japanese Toshiba Notebook keyboard",
-	"PNP0340", "Korean 84-key keyboard",
-	"PNP0341", "Korean 86-key keyboard",
-	"PNP0342", "Korean Enhanced keyboard",
-	"PNP0343", "Korean Enhanced keyboard 101b",
-	"PNP0343", "Korean Enhanced keyboard 101c",
-	"PNP0344", "Korean Enhanced keyboard 103",
+	{"PNP0300", "IBM PC/XT keyboard controller (83-key)"},
+	{"PNP0301", "IBM PC/AT keyboard controller (86-key)"},
+	{"PNP0302", "IBM PC/XT keyboard controller (84-key)"},
+	{"PNP0303", "IBM Enhanced (101/102-key, PS/2 mouse support)"},
+	{"PNP0304", "Olivetti Keyboard (83-key)"},
+	{"PNP0305", "Olivetti Keyboard (102-key)"},
+	{"PNP0306", "Olivetti Keyboard (86-key)"},
+	{"PNP0307", "Microsoft Windows(R) Keyboard"},
+	{"PNP0308", "General Input Device Emulation Interface (GIDEI) legacy"},
+	{"PNP0309", "Olivetti Keyboard (A101/102 key)"},
+	{"PNP030A", "AT&T 302 keyboard"},
+	{"PNP030B", "Reserved by Microsoft"},
+	{"PNP0320", "Japanese 101-key keyboard"},
+	{"PNP0321", "Japanese AX keyboard"},
+	{"PNP0322", "Japanese 106-key keyboard A01"},
+	{"PNP0323", "Japanese 106-key keyboard 002/003"},
+	{"PNP0324", "Japanese 106-key keyboard 001"},
+	{"PNP0325", "Japanese Toshiba Desktop keyboard"},
+	{"PNP0326", "Japanese Toshiba Laptop keyboard"},
+	{"PNP0327", "Japanese Toshiba Notebook keyboard"},
+	{"PNP0340", "Korean 84-key keyboard"},
+	{"PNP0341", "Korean 86-key keyboard"},
+	{"PNP0342", "Korean Enhanced keyboard"},
+	{"PNP0343", "Korean Enhanced keyboard 101b"},
+	{"PNP0343", "Korean Enhanced keyboard 101c"},
+	{"PNP0344", "Korean Enhanced keyboard 103"},
 	/* parallel ports */
-	"PNP0400", "Standard LPT printer port",
-	"PNP0401", "ECP printer port",
+	{"PNP0400", "Standard LPT printer port"},
+	{"PNP0401", "ECP printer port"},
 	/* serial ports */
-	"PNP0500", "Standard PC COM port",
-	"PNP0501", "16550A-compatible COM port",
-	"PNP0502", "Multiport serial device (non-intelligent 16550)",
-	"PNP0510", "Generic IRDA-compatible device",
-	"PNP0511", "Generic IRDA-compatible device",
+	{"PNP0500", "Standard PC COM port"},
+	{"PNP0501", "16550A-compatible COM port"},
+	{"PNP0502", "Multiport serial device (non-intelligent 16550)"},
+	{"PNP0510", "Generic IRDA-compatible device"},
+	{"PNP0511", "Generic IRDA-compatible device"},
 	/* IDE controller */
-	"PNP0600", "Generic ESDI/IDE/ATA compatible hard disk controller",
-	"PNP0601", "Plus Hardcard II",
-	"PNP0602", "Plus Hardcard IIXL/EZ",
-	"PNP0603", "Generic IDE supporting Microsoft Device Bay Specification",
-	"PNP0680", "Bus Master E-IDE controller",
-	/* floppy controllers */
-	"PNP0604", "PC standard floppy disk controller",
-	"PNP0605", "HP Omnibook floppy disk controller",
-	"PNP0700", "PC standard floppy disk controller",
-	"PNP0701", "Standard floppy controller supporting MS Device Bay Spec",
+	{"PNP0600", "Generic ESDI/IDE/ATA compatible hard disk controller"},
+	{"PNP0601", "Plus Hardcard II"},
+	{"PNP0602", "Plus Hardcard IIXL/EZ"},
+	{"PNP0603", "Generic IDE supporting Microsoft Device Bay Specification"},
+	{"PNP0604", "PC standard floppy disk controller"},
+	{"PNP0605", "HP Omnibook floppy disk controller"},
+	{"PNP0680", "Bus Master E-IDE controller"},
+	{"PNP0700", "PC standard floppy disk controller"},
+	{"PNP0701", "Standard floppy controller supporting MS Device Bay Spec"},
+	/* system devices */
+	{"PNP0800", "AT-style speaker sound"},
 	/* obsolete devices */
-	"PNP0802", "Microsoft Sound System compatible device (obsolete, use PNPB0xx instead)",
+	{"PNP0802", "Microsoft Sound System compatible device (obsolete, use PNPB0xx instead)"},
 	/* display adapters / graphic cards */
-	"PNP0900", "VGA Compatible",
-	"PNP0901", "Video Seven VRAM/VRAM II/1024i",
-	"PNP0902", "IBM 8514/A Compatible",
-	"PNP0903", "Trident VGA",
-	"PNP0904", "Cirrus Logic Laptop VGA",
-	"PNP0905", "Cirrus Logic VGA",
-	"PNP0906", "Tseng Labs ET4000",
-	"PNP0907", "Western Digital VGA",
-	"PNP0908", "Western Digital Laptop VGA",
-	"PNP0909", "S3 Inc. 911/924",
-	"PNP090A", "ATI Ultra Pro/Plus (Mach 32)",
-	"PNP090B", "ATI Ultra (Mach 8)",
-	"PNP090C", "IBM XGA Compatible",
-	"PNP090D", "ATI VGA Wonder",
-	"PNP090E", "Weitek P9000 Graphics Adapter",
-	"PNP090F", "Oak Technology VGA",
-	"PNP0910", "Compaq QVision",
-	"PNP0911", "IBM XGA/2",
-	"PNP0912", "Tseng Labs ET4000 W32/W32i/W32p",
-	"PNP0913", "S3 Inc. 801/928/964",
-	"PNP0914", "Cirrus Logic 5429/5434 (memory mapped)",
-	"PNP0915", "Compaq Advanced VGA (AVGA)",
-	"PNP0916", "ATI Ultra Pro Turbo (Mach64)",
-	"PNP0917", "Reserved by Microsoft",
-	"PNP0918", "Matrox MGA",
-	"PNP0919", "Compaq QVision 2000",
-	"PNP091A", "Tseng Labs W128",
-	"PNP0930", "Chips & Technologies Super VGA",
-	"PNP0931", "Chips & Technologies Accelerator",
-	"PNP0940", "NCR 77c22e Super VGA",
-	"PNP0941", "NCR 77c32blt",
-	"PNP09FF", "Plug and Play Monitors (VESA DDC)",
+	{"PNP0900", "VGA Compatible"},
+	{"PNP0901", "Video Seven VRAM/VRAM II/1024i"},
+	{"PNP0902", "IBM 8514/A Compatible"},
+	{"PNP0903", "Trident VGA"},
+	{"PNP0904", "Cirrus Logic Laptop VGA"},
+	{"PNP0905", "Cirrus Logic VGA"},
+	{"PNP0906", "Tseng Labs ET4000"},
+	{"PNP0907", "Western Digital VGA"},
+	{"PNP0908", "Western Digital Laptop VGA"},
+	{"PNP0909", "S3 Inc. 911/924"},
+	{"PNP090A", "ATI Ultra Pro/Plus (Mach 32)"},
+	{"PNP090B", "ATI Ultra (Mach 8)"},
+	{"PNP090C", "IBM XGA Compatible"},
+	{"PNP090D", "ATI VGA Wonder"},
+	{"PNP090E", "Weitek P9000 Graphics Adapter"},
+	{"PNP090F", "Oak Technology VGA"},
+	{"PNP0910", "Compaq QVision"},
+	{"PNP0911", "IBM XGA/2"},
+	{"PNP0912", "Tseng Labs ET4000 W32/W32i/W32p"},
+	{"PNP0913", "S3 Inc. 801/928/964"},
+	{"PNP0914", "Cirrus Logic 5429/5434 (memory mapped)"},
+	{"PNP0915", "Compaq Advanced VGA (AVGA)"},
+	{"PNP0916", "ATI Ultra Pro Turbo (Mach64)"},
+	{"PNP0917", "Reserved by Microsoft"},
+	{"PNP0918", "Matrox MGA"},
+	{"PNP0919", "Compaq QVision 2000"},
+	{"PNP091A", "Tseng Labs W128"},
+	{"PNP0930", "Chips & Technologies Super VGA"},
+	{"PNP0931", "Chips & Technologies Accelerator"},
+	{"PNP0940", "NCR 77c22e Super VGA"},
+	{"PNP0941", "NCR 77c32blt"},
+	{"PNP09FF", "Plug and Play Monitors (VESA DDC)"},
 	/* peripheral buses */
-	"PNP0A00", "ISA Bus",
-	"PNP0A01", "EISA Bus",
-	"PNP0A02", "MCA Bus",
-	"PNP0A03", "PCI Bus",
-	"PNP0A04", "VESA/VL Bus",
-	"PNP0A05", "Generic ACPI Bus",
-	"PNP0A06", "Generic ACPI Extended-IO Bus (EIO bus)",
+	{"PNP0A00", "ISA Bus"},
+	{"PNP0A01", "EISA Bus"},
+	{"PNP0A02", "MCA Bus"},
+	{"PNP0A03", "PCI Bus"},
+	{"PNP0A04", "VESA/VL Bus"},
+	{"PNP0A05", "Generic ACPI Bus"},
+	{"PNP0A06", "Generic ACPI Extended-IO Bus (EIO bus)"},
 	/* system devices */
-	"PNP0800", "AT-style speaker sound",
-	"PNP0B00", "AT Real-Time Clock",
-	"PNP0C00", "Plug and Play BIOS (only created by the root enumerator)",
-	"PNP0C01", "System Board",
-	"PNP0C02", "General ID for reserving resources required by PnP motherboard registers. (Not device specific.)",
-	"PNP0C03", "Plug and Play BIOS Event Notification Interrupt",
-	"PNP0C04", "Math Coprocessor",
-	"PNP0C05", "APM BIOS (Version independent)",
-	"PNP0C06", "Reserved for identification of early Plug and Play BIOS implementation",
-	"PNP0C07", "Reserved for identification of early Plug and Play BIOS implementation",
-	"PNP0C08", "ACPI system board hardware",
-	"PNP0C09", "ACPI Embedded Controller",
-	"PNP0C0A", "ACPI Control Method Battery",
-	"PNP0C0B", "ACPI Fan",
-	"PNP0C0C", "ACPI power button device",
-	"PNP0C0D", "ACPI lid device",
-	"PNP0C0E", "ACPI sleep button device",
-	"PNP0C0F", "PCI interrupt link device",
-	"PNP0C10", "ACPI system indicator device",
-	"PNP0C11", "ACPI thermal zone",
-	"PNP0C12", "Device Bay Controller",
-	"PNP0C13", "Plug and Play BIOS (used when ACPI mode cannot be used)",
-	"PNP0CF0", "Compaq LTE Lite Support",
-	"PNP0CF1", "Compaq LTE Elite Support",
+	{"PNP0B00", "AT Real-Time Clock"},
+	{"PNP0C00", "Plug and Play BIOS (only created by the root enumerator)"},
+	{"PNP0C01", "System Board"},
+	{"PNP0C02", "General ID for reserving resources required by PnP motherboard registers. (Not device specific.)"},
+	{"PNP0C03", "Plug and Play BIOS Event Notification Interrupt"},
+	{"PNP0C04", "Math Coprocessor"},
+	{"PNP0C05", "APM BIOS (Version independent)"},
+	{"PNP0C06", "Reserved for identification of early Plug and Play BIOS implementation"},
+	{"PNP0C07", "Reserved for identification of early Plug and Play BIOS implementation"},
+	{"PNP0C08", "ACPI system board hardware"},
+	{"PNP0C09", "ACPI Embedded Controller"},
+	{"PNP0C0A", "ACPI Control Method Battery"},
+	{"PNP0C0B", "ACPI Fan"},
+	{"PNP0C0C", "ACPI power button device"},
+	{"PNP0C0D", "ACPI lid device"},
+	{"PNP0C0E", "ACPI sleep button device"},
+	{"PNP0C0F", "PCI interrupt link device"},
+	{"PNP0C10", "ACPI system indicator device"},
+	{"PNP0C11", "ACPI thermal zone"},
+	{"PNP0C12", "Device Bay Controller"},
+	{"PNP0C13", "Plug and Play BIOS (used when ACPI mode cannot be used)"},
+	{"PNP0CF0", "Compaq LTE Lite Support"},
+	{"PNP0CF1", "Compaq LTE Elite Support"},
 	/* PCMCIA controllers */
-	"PNP0E00", "Intel 82365-Compatible PCMCIA Controller",
-	"PNP0E01", "Cirrus Logic CL-PD6720 PCMCIA Controller",
-	"PNP0E02", "VLSI VL82C146 PCMCIA Controller",
-	"PNP0E03", "Intel 82365-compatible CardBus controller",
+	{"PNP0E00", "Intel 82365-Compatible PCMCIA Controller"},
+	{"PNP0E01", "Cirrus Logic CL-PD6720 PCMCIA Controller"},
+	{"PNP0E02", "VLSI VL82C146 PCMCIA Controller"},
+	{"PNP0E03", "Intel 82365-compatible CardBus controller"},
 	/* mice */
-	"PNP0F00", "Microsoft Bus Mouse",
-	"PNP0F01", "Microsoft Serial Mouse",
-	"PNP0F02", "Microsoft InPort Mouse",
-	"PNP0F03", "Microsoft PS/2-style Mouse",
-	"PNP0F04", "Mouse Systems Mouse",
-	"PNP0F05", "Mouse Systems 3-Button Mouse (COM2)",
-	"PNP0F06", "Genius Mouse (COM1)",
-	"PNP0F07", "Genius Mouse (COM2)",
-	"PNP0F08", "Logitech Serial Mouse",
-	"PNP0F09", "Microsoft BallPoint Serial Mouse",
-	"PNP0F0A", "Microsoft Plug and Play Mouse",
-	"PNP0F0B", "Microsoft Plug and Play BallPoint Mouse",
-	"PNP0F0C", "Microsoft-compatible Serial Mouse",
-	"PNP0F0D", "Microsoft-compatible InPort-compatible Mouse",
-	"PNP0F0E", "Microsoft-compatible PS/2-style Mouse",
-	"PNP0F0F", "Microsoft-compatible Serial BallPoint-compatible Mouse",
-	"PNP0F10", "Texas Instruments QuickPort Mouse",
-	"PNP0F11", "Microsoft-compatible Bus Mouse",
-	"PNP0F12", "Logitech PS/2-style Mouse",
-	"PNP0F13", "PS/2 Port for PS/2-style Mice",
-	"PNP0F14", "Microsoft Kids Mouse",
-	"PNP0F15", "Logitech bus mouse",
-	"PNP0F16", "Logitech SWIFT device",
-	"PNP0F17", "Logitech-compatible serial mouse",
-	"PNP0F18", "Logitech-compatible bus mouse",
-	"PNP0F19", "Logitech-compatible PS/2-style Mouse",
-	"PNP0F1A", "Logitech-compatible SWIFT Device",
-	"PNP0F1B", "HP Omnibook Mouse",
-	"PNP0F1C", "Compaq LTE Trackball PS/2-style Mouse",
-	"PNP0F1D", "Compaq LTE Trackball Serial Mouse",
-	"PNP0F1E", "Microsoft Kids Trackball Mouse",
-	"PNP0F1F", "Reserved by Microsoft Input Device Group",
-	"PNP0F20", "Reserved by Microsoft Input Device Group",
-	"PNP0F21", "Reserved by Microsoft Input Device Group",
-	"PNP0F22", "Reserved by Microsoft Input Device Group",
-	"PNP0F23", "Reserved by Microsoft Input Device Group",
-	"PNP0FFF", "Reserved by Microsoft Systems",
-	"PNP0XXX", "Unknown System Device",
+	{"PNP0F00", "Microsoft Bus Mouse"},
+	{"PNP0F01", "Microsoft Serial Mouse"},
+	{"PNP0F02", "Microsoft InPort Mouse"},
+	{"PNP0F03", "Microsoft PS/2-style Mouse"},
+	{"PNP0F04", "Mouse Systems Mouse"},
+	{"PNP0F05", "Mouse Systems 3-Button Mouse (COM2)"},
+	{"PNP0F06", "Genius Mouse (COM1)"},
+	{"PNP0F07", "Genius Mouse (COM2)"},
+	{"PNP0F08", "Logitech Serial Mouse"},
+	{"PNP0F09", "Microsoft BallPoint Serial Mouse"},
+	{"PNP0F0A", "Microsoft Plug and Play Mouse"},
+	{"PNP0F0B", "Microsoft Plug and Play BallPoint Mouse"},
+	{"PNP0F0C", "Microsoft-compatible Serial Mouse"},
+	{"PNP0F0D", "Microsoft-compatible InPort-compatible Mouse"},
+	{"PNP0F0E", "Microsoft-compatible PS/2-style Mouse"},
+	{"PNP0F0F", "Microsoft-compatible Serial BallPoint-compatible Mouse"},
+	{"PNP0F10", "Texas Instruments QuickPort Mouse"},
+	{"PNP0F11", "Microsoft-compatible Bus Mouse"},
+	{"PNP0F12", "Logitech PS/2-style Mouse"},
+	{"PNP0F13", "PS/2 Port for PS/2-style Mice"},
+	{"PNP0F14", "Microsoft Kids Mouse"},
+	{"PNP0F15", "Logitech bus mouse"},
+	{"PNP0F16", "Logitech SWIFT device"},
+	{"PNP0F17", "Logitech-compatible serial mouse"},
+	{"PNP0F18", "Logitech-compatible bus mouse"},
+	{"PNP0F19", "Logitech-compatible PS/2-style Mouse"},
+	{"PNP0F1A", "Logitech-compatible SWIFT Device"},
+	{"PNP0F1B", "HP Omnibook Mouse"},
+	{"PNP0F1C", "Compaq LTE Trackball PS/2-style Mouse"},
+	{"PNP0F1D", "Compaq LTE Trackball Serial Mouse"},
+	{"PNP0F1E", "Microsoft Kids Trackball Mouse"},
+	{"PNP0F1F", "Reserved by Microsoft Input Device Group"},
+	{"PNP0F20", "Reserved by Microsoft Input Device Group"},
+	{"PNP0F21", "Reserved by Microsoft Input Device Group"},
+	{"PNP0F22", "Reserved by Microsoft Input Device Group"},
+	{"PNP0F23", "Reserved by Microsoft Input Device Group"},
+	{"PNP0FFF", "Reserved by Microsoft Systems"},
+	{"PNP0XXX", "Unknown System Device"},
 	/* network cards */
-	"PNP8000", "Network Adapter",
-	"PNP8001", "Novell/Anthem NE3200",
-	"PNP8004", "Compaq NE3200",
-	"PNP8006", "Intel EtherExpress/32",
-	"PNP8008", "HP EtherTwist EISA LAN Adapter/32 (HP27248A)",
-	"PNP8065", "Ungermann-Bass NIUps or NIUps/EOTP",
-	"PNP8072", "DEC (DE211) EtherWorks MC/TP",
-	"PNP8073", "DEC (DE212) EtherWorks MC/TP_BNC",
-	"PNP8074", "HP MC LAN Adapter/16 TP (PC27246)",
-	"PNP8078", "DCA 10 Mb MCA",
-	"PNP807F", "Racal NI9210",
-	"PNP8081", "Pure Data Ethernet",
-	"PNP8096", "Thomas-Conrad TC4046",
-	"PNP80C9", "IBM Token Ring",
-	"PNP80CA", "IBM Token Ring II",
-	"PNP80CB", "IBM Token Ring II/Short",
-	"PNP80CC", "IBM Token Ring 4/16Mbs",
-	"PNP80D3", "Novell/Anthem NE1000",
-	"PNP80D4", "Novell/Anthem NE2000",
-	"PNP80D5", "NE1000 Compatible",
-	"PNP80D6", "NE2000 Compatible",
-	"PNP80D7", "Novell/Anthem NE1500T",
-	"PNP80D8", "Novell/Anthem NE2100",
-	"PNP80D9", "NE2000 Plus",
-	"PNP80DD", "SMC ARCNETPC",
-	"PNP80DE", "SMC ARCNET PC100, PC200",
-	"PNP80DF", "SMC ARCNET PC110, PC210, PC250",
-	"PNP80E0", "SMC ARCNET PC130/E",
-	"PNP80E1", "SMC ARCNET PC120, PC220, PC260",
-	"PNP80E2", "SMC ARCNET PC270/E",
-	"PNP80E5", "SMC ARCNET PC600W, PC650W",
-	"PNP80E7", "DEC DEPCA",
-	"PNP80E8", "DEC (DE100) EtherWorks LC",
-	"PNP80E9", "DEC (DE200) EtherWorks Turbo",
-	"PNP80EA", "DEC (DE101) EtherWorks LC/TP",
-	"PNP80EB", "DEC (DE201) EtherWorks Turbo/TP",
-	"PNP80EC", "DEC (DE202) EtherWorks Turbo/TP_BNC",
-	"PNP80ED", "DEC (DE102) EtherWorks LC/TP_BNC",
-	"PNP80EE", "DEC EE101 (Built-In)",
-	"PNP80EF", "DEC PC 433 WS (Built-In)",
-	"PNP80F1", "3Com EtherLink Plus",
-	"PNP80F3", "3Com EtherLink II or IITP (8 or 16-bit)",
-	"PNP80F4", "3Com TokenLink",
-	"PNP80F6", "3Com EtherLink 16",
-	"PNP80F7", "3Com EtherLink III",
-	"PNP80F8", "3Com Generic Etherlink Plug and Play Device",
-	"PNP80FB", "Thomas Conrad TC6045",
-	"PNP80FC", "Thomas Conrad TC6042",
-	"PNP80FD", "Thomas Conrad TC6142",
-	"PNP80FE", "Thomas Conrad TC6145",
-	"PNP80FF", "Thomas Conrad TC6242",
-	"PNP8100", "Thomas Conrad TC6245",
-	"PNP8101", "Thomas-Conrad TC4045",
-	"PNP8104", "Thomas-Conrad TC4035",
-	"PNP8105", "DCA 10 MB",
-	"PNP8106", "DCA 10 MB Fiber Optic",
-	"PNP8107", "DCA 10 MB Twisted Pair",
-	"PNP8113", "Racal NI6510",
-	"PNP8114", "Racal NI5210/8 or NI5210/16",
-	"PNP8119", "Ungermann-Bass pcNIU",
-	"PNP811A", "Ungermann-Bass pcNIU/ex 128K",
-	"PNP811B", "Ungermann-Bass pcNIU/ex 512K", 
-	"PNP811C", "Ungermann-Bass NIUpc",
-	"PNP811D", "Ungermann-Bass NIUpc/3270",
-	"PNP8120", "Ungermann-Bass NIUpc/EOTP",
-	"PNP8123", "SMC StarCard PLUS (WD/8003S)",
-	"PNP8124", "SMC StarCard PLUS With On Board Hub (WD/8003SH)",
-	"PNP8125", "SMC EtherCard PLUS (WD/8003E)",
-	"PNP8126", "SMC EtherCard PLUS With Boot ROM Socket (WD/8003EBT)",
-	"PNP8127", "SMC EtherCard PLUS With Boot ROM Socket (WD/8003EB)",
-	"PNP8128", "SMC EtherCard PLUS TP (WD/8003WT)",
-	"PNP812A", "SMC EtherCard PLUS 16 With Boot ROM Socket (WD/8013EBT)",
-	"PNP812D", "Intel EtherExpress 16 or 16TP",
-	"PNP812F", "Intel TokenExpress 16/4",
-	"PNP8130", "Intel TokenExpress MCA 16/4",
-	"PNP8132", "Intel EtherExpress 16 (MCA)",
-	"PNP8133", "Compaq Ethernet 16E",
-	"PNP8137", "Artisoft AE-1",
-	"PNP8138", "Artisoft AE-2 or AE-3",
-	"PNP8141", "Amplicard AC 210/XT",
-	"PNP8142", "Amplicard AC 210/AT",
-	"PNP814B", "Everex SpeedLink /PC16 (EV2027)",
-	"PNP8155", "HP PC LAN Adapter/8 TP (HP27245)",
-	"PNP8156", "HP PC LAN Adapter/16 TP (HP27247A)",
-	"PNP8157", "HP PC LAN Adapter/8 TL (HP27250)",
-	"PNP8158", "HP PC LAN Adapter/16 TP Plus (HP27247B)",
-	"PNP8159", "HP PC LAN Adapter/16 TL Plus (HP27252)",
-	"PNP815F", "National Semiconductor Ethernode *16AT",
-	"PNP8160", "National Semiconductor AT/LANTIC EtherNODE 16-AT3",
-	"PNP8169", "NCR StarCard",
-	"PNP816A", "NCR Token-Ring 4 Mbs ISA",
-	"PNP816B", "NCR WaveLAN AT",
-	"PNP816C", "NCR WaveLan MC",
-	"PNP816D", "NCR Token-Ring 16/4 Mbs ISA",
-	"PNP8191", "Olicom 16/4 Token-Ring Adapter",
-	"PNP81A5", "Research Machines Ethernet",
-	"PNP81B9", "ToshibaLAN (internal)",
-	"PNP81C3", "SMC EtherCard PLUS Elite (WD/8003EP)",
-	"PNP81C4", "SMC EtherCard PLUS 10T (WD/8003W)",
-	"PNP81C5", "SMC EtherCard PLUS Elite 16 (WD/8013EP)",
-	"PNP81C6", "SMC EtherCard PLUS Elite 16T (WD/8013W)",
-	"PNP81C7", "SMC EtherCard PLUS Elite 16 Combo (WD/8013EW or 8013EWC)",
-	"PNP81C8", "SMC EtherElite Ultra 16",
-	"PNP81C9", "SMC TigerCard (8216L, 8216LC, 8216LT)",
-	"PNP81CA", "SMC EtherEZ (8416)",
-	"PNP81D7", "Madge Smart 16/4 PC Ringnode",
-	"PNP81D8", "Madge Smart 16/4 Ringnode ISA",
-	"PNP81E4", "Pure Data PDI9025-32 (Token Ring)",
-	"PNP81E6", "Pure Data PDI508+ (ArcNet)",
-	"PNP81E7", "Pure Data PDI516+ (ArcNet)",
-	"PNP81EB", "Proteon Token Ring (P1390)",
-	"PNP81EC", "Proteon Token Ring (P1392)",
-	"PNP81ED", "Proteon Token Ring ISA (P1340)",
-	"PNP81EE", "Proteon Token Ring ISA (P1342)",
-	"PNP81EF", "Proteon Token Ring ISA (P1346)",
-	"PNP81F0", "Proteon Token Ring ISA (P1347)",
-	"PNP81FF", "Cabletron E2000 Series DNI",
-	"PNP8200", "Cabletron E2100 Series DNI",
-	"PNP8201", "Cabletron T2015 4/16 Mbit/s DNI",
-	"PNP8209", "Zenith Data Systems Z-Note",
-	"PNP820A", "Zenith Data Systems NE2000-Compatible",
-	"PNP8213", "Xircom Pocket Ethernet II",
-	"PNP8214", "Xircom Pocket Ethernet I",
-	"PNP8215", "Xircom Pocket Ethernet III Adapter",
-	"PNP821D", "RadiSys EXM-10",
-	"PNP8227", "SMC 3000 Series",
-	"PNP8228", "SMC 91C2 controller",
-	"PNP8231", "AMD AM2100/AM1500T",
-	"PNP824F", "RCE 10Base-T (16 bit)",
-	"PNP8250", "RCE 10Base-T (8 bit)",
-	"PNP8263", "Tulip NCC-16",
-	"PNP8277", "Exos 105",
-	"PNP828A", "Intel '595 based Ethernet",
-	"PNP828B", "TI2000-style Token Ring",
-	"PNP828C", "AMD PCNet Family cards",
-	"PNP828D", "AMD PCNet32 (VL version)",
-	"PNP8294", "IrDA Infrared NDIS driver (Microsoft-supplied)",
-	"PNP82BD", "IBM PCMCIA-NIC",
-	"PNP82C0", "Eagle Technology NE200T",
-	"PNP82C2", "Xircom CE10",
-	"PNP82C3", "Xircom CEM2",
-	"PNP82C4", "Xircom CE2",
-	"PNP8321", "DEC Ethernet (All Types)",
-	"PNP8323", "SMC EtherCard (All Types except 8013/A)",
-	"PNP8324", "ARCNET Compatible",
-	"PNP8325", "SMC TokenCard PLUS (8115T)",
-	"PNP8326", "Thomas Conrad (All Arcnet Types)",
-	"PNP8327", "IBM Token Ring (All Types)",
-	"PNP8328", "Ungermann-Bass NIU",
-	"PNP8329", "Proteon ProNET-4/16 ISA Token Ring (P1392+,P1392,1390)",
-	"PNP8385", "Remote Network Access [RNA] Driver",
-	"PNP8387", "Remote Network Access [RNA] PPP Driver",
-	"PNP8388", "Reserved for Microsoft Networking components",
-	"PNP8389", "Peer IrLAN infrared driver (Microsoft-supplied)",
-	"PNP8390", "Generic network adapter",
-	"PNP8XXX", "Unknown Network Adapter",
-	"PNPD300", "SK-NET TR4/16+ Token-Ring",
-	"PNPE000", "SK-NET G16, G16/TP Ethernet",
-	"PNPF000", "SK-NET FDDI-FI FDDI LAN",
+	{"PNP8000", "Network Adapter"},
+	{"PNP8001", "Novell/Anthem NE3200"},
+	{"PNP8004", "Compaq NE3200"},
+	{"PNP8006", "Intel EtherExpress/32"},
+	{"PNP8008", "HP EtherTwist EISA LAN Adapter/32 (HP27248A)"},
+	{"PNP8065", "Ungermann-Bass NIUps or NIUps/EOTP"},
+	{"PNP8072", "DEC (DE211) EtherWorks MC/TP"},
+	{"PNP8073", "DEC (DE212) EtherWorks MC/TP_BNC"},
+	{"PNP8074", "HP MC LAN Adapter/16 TP (PC27246)"},
+	{"PNP8078", "DCA 10 Mb MCA"},
+	{"PNP807F", "Racal NI9210"},
+	{"PNP8081", "Pure Data Ethernet"},
+	{"PNP8096", "Thomas-Conrad TC4046"},
+	{"PNP80C9", "IBM Token Ring"},
+	{"PNP80CA", "IBM Token Ring II"},
+	{"PNP80CB", "IBM Token Ring II/Short"},
+	{"PNP80CC", "IBM Token Ring 4/16Mbs"},
+	{"PNP80D3", "Novell/Anthem NE1000"},
+	{"PNP80D4", "Novell/Anthem NE2000"},
+	{"PNP80D5", "NE1000 Compatible"},
+	{"PNP80D6", "NE2000 Compatible"},
+	{"PNP80D7", "Novell/Anthem NE1500T"},
+	{"PNP80D8", "Novell/Anthem NE2100"},
+	{"PNP80D9", "NE2000 Plus"},
+	{"PNP80DD", "SMC ARCNETPC"},
+	{"PNP80DE", "SMC ARCNET PC100, PC200"},
+	{"PNP80DF", "SMC ARCNET PC110, PC210, PC250"},
+	{"PNP80E0", "SMC ARCNET PC130/E"},
+	{"PNP80E1", "SMC ARCNET PC120, PC220, PC260"},
+	{"PNP80E2", "SMC ARCNET PC270/E"},
+	{"PNP80E5", "SMC ARCNET PC600W, PC650W"},
+	{"PNP80E7", "DEC DEPCA"},
+	{"PNP80E8", "DEC (DE100) EtherWorks LC"},
+	{"PNP80E9", "DEC (DE200) EtherWorks Turbo"},
+	{"PNP80EA", "DEC (DE101) EtherWorks LC/TP"},
+	{"PNP80EB", "DEC (DE201) EtherWorks Turbo/TP"},
+	{"PNP80EC", "DEC (DE202) EtherWorks Turbo/TP_BNC"},
+	{"PNP80ED", "DEC (DE102) EtherWorks LC/TP_BNC"},
+	{"PNP80EE", "DEC EE101 (Built-In)"},
+	{"PNP80EF", "DEC PC 433 WS (Built-In)"},
+	{"PNP80F1", "3Com EtherLink Plus"},
+	{"PNP80F3", "3Com EtherLink II or IITP (8 or 16-bit)"},
+	{"PNP80F4", "3Com TokenLink"},
+	{"PNP80F6", "3Com EtherLink 16"},
+	{"PNP80F7", "3Com EtherLink III"},
+	{"PNP80F8", "3Com Generic Etherlink Plug and Play Device"},
+	{"PNP80FB", "Thomas Conrad TC6045"},
+	{"PNP80FC", "Thomas Conrad TC6042"},
+	{"PNP80FD", "Thomas Conrad TC6142"},
+	{"PNP80FE", "Thomas Conrad TC6145"},
+	{"PNP80FF", "Thomas Conrad TC6242"},
+	{"PNP8100", "Thomas Conrad TC6245"},
+	{"PNP8101", "Thomas-Conrad TC4045"},
+	{"PNP8104", "Thomas-Conrad TC4035"},
+	{"PNP8105", "DCA 10 MB"},
+	{"PNP8106", "DCA 10 MB Fiber Optic"},
+	{"PNP8107", "DCA 10 MB Twisted Pair"},
+	{"PNP8113", "Racal NI6510"},
+	{"PNP8114", "Racal NI5210/8 or NI5210/16"},
+	{"PNP8119", "Ungermann-Bass pcNIU"},
+	{"PNP811A", "Ungermann-Bass pcNIU/ex 128K"},
+	{"PNP811B", "Ungermann-Bass pcNIU/ex 512K"}, 
+	{"PNP811C", "Ungermann-Bass NIUpc"},
+	{"PNP811D", "Ungermann-Bass NIUpc/3270"},
+	{"PNP8120", "Ungermann-Bass NIUpc/EOTP"},
+	{"PNP8123", "SMC StarCard PLUS (WD/8003S)"},
+	{"PNP8124", "SMC StarCard PLUS With On Board Hub (WD/8003SH)"},
+	{"PNP8125", "SMC EtherCard PLUS (WD/8003E)"},
+	{"PNP8126", "SMC EtherCard PLUS With Boot ROM Socket (WD/8003EBT)"},
+	{"PNP8127", "SMC EtherCard PLUS With Boot ROM Socket (WD/8003EB)"},
+	{"PNP8128", "SMC EtherCard PLUS TP (WD/8003WT)"},
+	{"PNP812A", "SMC EtherCard PLUS 16 With Boot ROM Socket (WD/8013EBT)"},
+	{"PNP812D", "Intel EtherExpress 16 or 16TP"},
+	{"PNP812F", "Intel TokenExpress 16/4"},
+	{"PNP8130", "Intel TokenExpress MCA 16/4"},
+	{"PNP8132", "Intel EtherExpress 16 (MCA)"},
+	{"PNP8133", "Compaq Ethernet 16E"},
+	{"PNP8137", "Artisoft AE-1"},
+	{"PNP8138", "Artisoft AE-2 or AE-3"},
+	{"PNP8141", "Amplicard AC 210/XT"},
+	{"PNP8142", "Amplicard AC 210/AT"},
+	{"PNP814B", "Everex SpeedLink /PC16 (EV2027)"},
+	{"PNP8155", "HP PC LAN Adapter/8 TP (HP27245)"},
+	{"PNP8156", "HP PC LAN Adapter/16 TP (HP27247A)"},
+	{"PNP8157", "HP PC LAN Adapter/8 TL (HP27250)"},
+	{"PNP8158", "HP PC LAN Adapter/16 TP Plus (HP27247B)"},
+	{"PNP8159", "HP PC LAN Adapter/16 TL Plus (HP27252)"},
+	{"PNP815F", "National Semiconductor Ethernode *16AT"},
+	{"PNP8160", "National Semiconductor AT/LANTIC EtherNODE 16-AT3"},
+	{"PNP8169", "NCR StarCard"},
+	{"PNP816A", "NCR Token-Ring 4 Mbs ISA"},
+	{"PNP816B", "NCR WaveLAN AT"},
+	{"PNP816C", "NCR WaveLan MC"},
+	{"PNP816D", "NCR Token-Ring 16/4 Mbs ISA"},
+	{"PNP8191", "Olicom 16/4 Token-Ring Adapter"},
+	{"PNP81A5", "Research Machines Ethernet"},
+	{"PNP81B9", "ToshibaLAN (internal)"},
+	{"PNP81C3", "SMC EtherCard PLUS Elite (WD/8003EP)"},
+	{"PNP81C4", "SMC EtherCard PLUS 10T (WD/8003W)"},
+	{"PNP81C5", "SMC EtherCard PLUS Elite 16 (WD/8013EP)"},
+	{"PNP81C6", "SMC EtherCard PLUS Elite 16T (WD/8013W)"},
+	{"PNP81C7", "SMC EtherCard PLUS Elite 16 Combo (WD/8013EW or 8013EWC)"},
+	{"PNP81C8", "SMC EtherElite Ultra 16"},
+	{"PNP81C9", "SMC TigerCard (8216L, 8216LC, 8216LT)"},
+	{"PNP81CA", "SMC EtherEZ (8416)"},
+	{"PNP81D7", "Madge Smart 16/4 PC Ringnode"},
+	{"PNP81D8", "Madge Smart 16/4 Ringnode ISA"},
+	{"PNP81E4", "Pure Data PDI9025-32 (Token Ring)"},
+	{"PNP81E6", "Pure Data PDI508+ (ArcNet)"},
+	{"PNP81E7", "Pure Data PDI516+ (ArcNet)"},
+	{"PNP81EB", "Proteon Token Ring (P1390)"},
+	{"PNP81EC", "Proteon Token Ring (P1392)"},
+	{"PNP81ED", "Proteon Token Ring ISA (P1340)"},
+	{"PNP81EE", "Proteon Token Ring ISA (P1342)"},
+	{"PNP81EF", "Proteon Token Ring ISA (P1346)"},
+	{"PNP81F0", "Proteon Token Ring ISA (P1347)"},
+	{"PNP81FF", "Cabletron E2000 Series DNI"},
+	{"PNP8200", "Cabletron E2100 Series DNI"},
+	{"PNP8201", "Cabletron T2015 4/16 Mbit/s DNI"},
+	{"PNP8209", "Zenith Data Systems Z-Note"},
+	{"PNP820A", "Zenith Data Systems NE2000-Compatible"},
+	{"PNP8213", "Xircom Pocket Ethernet II"},
+	{"PNP8214", "Xircom Pocket Ethernet I"},
+	{"PNP8215", "Xircom Pocket Ethernet III Adapter"},
+	{"PNP821D", "RadiSys EXM-10"},
+	{"PNP8227", "SMC 3000 Series"},
+	{"PNP8228", "SMC 91C2 controller"},
+	{"PNP8231", "AMD AM2100/AM1500T"},
+	{"PNP824F", "RCE 10Base-T (16 bit)"},
+	{"PNP8250", "RCE 10Base-T (8 bit)"},
+	{"PNP8263", "Tulip NCC-16"},
+	{"PNP8277", "Exos 105"},
+	{"PNP828A", "Intel '595 based Ethernet"},
+	{"PNP828B", "TI2000-style Token Ring"},
+	{"PNP828C", "AMD PCNet Family cards"},
+	{"PNP828D", "AMD PCNet32 (VL version)"},
+	{"PNP8294", "IrDA Infrared NDIS driver (Microsoft-supplied)"},
+	{"PNP82BD", "IBM PCMCIA-NIC"},
+	{"PNP82C0", "Eagle Technology NE200T"},
+	{"PNP82C2", "Xircom CE10"},
+	{"PNP82C3", "Xircom CEM2"},
+	{"PNP82C4", "Xircom CE2"},
+	{"PNP8321", "DEC Ethernet (All Types)"},
+	{"PNP8323", "SMC EtherCard (All Types except 8013/A)"},
+	{"PNP8324", "ARCNET Compatible"},
+	{"PNP8325", "SMC TokenCard PLUS (8115T)"},
+	{"PNP8326", "Thomas Conrad (All Arcnet Types)"},
+	{"PNP8327", "IBM Token Ring (All Types)"},
+	{"PNP8328", "Ungermann-Bass NIU"},
+	{"PNP8329", "Proteon ProNET-4/16 ISA Token Ring (P1392+,P1392,1390)"},
+	{"PNP8385", "Remote Network Access [RNA] Driver"},
+	{"PNP8387", "Remote Network Access [RNA] PPP Driver"},
+	{"PNP8388", "Reserved for Microsoft Networking components"},
+	{"PNP8389", "Peer IrLAN infrared driver (Microsoft-supplied)"},
+	{"PNP8390", "Generic network adapter"},
+	{"PNP8XXX", "Unknown Network Adapter"},
+	/* modems */
+	{"PNP9000", "Modem"},
 	/* CD controller */
-	"PNPA000", "Adaptec 154x compatible SCSI controller",
-	"PNPA001", "Adaptec 174x compatible SCSI controller",
-	"PNPA002", "Future Domain 16-700 compatible controller",
-	"PNPA003", "Mitsumi CD-ROM adapter (Panasonic spec., used on SBPro/SB16)",
-	"PNPA01B", "Trantor 128 SCSI Controller",
-	"PNPA01D", "Trantor T160 SCSI Controller",
-	"PNPA01E", "Trantor T338 Parallel SCSI controller",
-	"PNPA01F", "Trantor T348 Parallel SCSI controller",
-	"PNPA020", "Trantor Media Vision SCSI controller",
-	"PNPA022", "Always IN-2000 SCSI controller",
-	"PNPA02B", "Sony proprietary CD-ROM controller",
-	"PNPA02D", "Trantor T13b 8-bit SCSI controller",
-	"PNPA02F", "Trantor T358 Parallel SCSI controller",
-	"PNPA030", "Mitsumi LU-005 Single Speed CD-ROM controller + drive",
-	"PNPA031", "Mitsumi FX-001 Single Speed CD-ROM controller + drive",
-	"PNPA032", "Mitsumi FX-001 Double Speed CD-ROM controller + drive",
-	"PNPAXXX", "Unknown SCSI, Proprietary CD Adapter",
+	{"PNPA000", "Adaptec 154x compatible SCSI controller"},
+	{"PNPA001", "Adaptec 174x compatible SCSI controller"},
+	{"PNPA002", "Future Domain 16-700 compatible controller"},
+	{"PNPA003", "Mitsumi CD-ROM adapter (Panasonic spec., used on SBPro/SB16)"},
+	{"PNPA01B", "Trantor 128 SCSI Controller"},
+	{"PNPA01D", "Trantor T160 SCSI Controller"},
+	{"PNPA01E", "Trantor T338 Parallel SCSI controller"},
+	{"PNPA01F", "Trantor T348 Parallel SCSI controller"},
+	{"PNPA020", "Trantor Media Vision SCSI controller"},
+	{"PNPA022", "Always IN-2000 SCSI controller"},
+	{"PNPA02B", "Sony proprietary CD-ROM controller"},
+	{"PNPA02D", "Trantor T13b 8-bit SCSI controller"},
+	{"PNPA02F", "Trantor T358 Parallel SCSI controller"},
+	{"PNPA030", "Mitsumi LU-005 Single Speed CD-ROM controller + drive"},
+	{"PNPA031", "Mitsumi FX-001 Single Speed CD-ROM controller + drive"},
+	{"PNPA032", "Mitsumi FX-001 Double Speed CD-ROM controller + drive"},
+	{"PNPAXXX", "Unknown SCSI, Proprietary CD Adapter"},
 	/* multimedia devices */
-	"PNPB000", "Creative Labs Sound Blaster 1.5 (or compatible sound device)",
-	"PNPB001", "Creative Labs Sound Blaster 2.0 (or compatible sound device)",
-	"PNPB002", "Creative Labs Sound Blaster Pro (or compatible sound device)",
-	"PNPB003", "Creative Labs Sound Blaster 16 (or compatible sound device)",
-	"PNPB004", "MediaVision Thunderboard (or compatible sound device)",
-	"PNPB005", "Adlib-compatible FM synthesizer device",
-	"PNPB006", "MPU401 compatible",
-	"PNPB007", "Microsoft Windows Sound System-compatible sound device",
-	"PNPB008", "Compaq Business Audio",
-	"PNPB009", "Plug and Play Microsoft Windows Sound System Device",
-	"PNPB00A", "MediaVision Pro Audio Spectrum (Trantor SCSI enabled, Thunder Chip Disabled)",
-	"PNPB00B", "MediaVision Pro Audio 3D",
-	"PNPB00C", "MusicQuest MQX-32M",
-	"PNPB00D", "MediaVision Pro Audio Spectrum Basic (No Trantor SCSI, Thunder Chip Enabled)",
-	"PNPB00E", "MediaVision Pro Audio Spectrum (Trantor SCSI enabled, Thunder Chip Disabled)",
-	"PNPB00F", "MediaVision Jazz-16 chipset (OEM Versions)",
-	"PNPB010", "Orchid Videola - Auravision VxP500 chipset",
-	"PNPB018", "MediaVision Pro Audio Spectrum 8-bit",
-	"PNPB019", "MediaVision Pro Audio Spectrum Basic (No Trantor SCSI, Thunder Chip Enabled)",
-	"PNPB020", "Yamaha OPL3-compatible FM synthesizer device",
-	"PNPB02F", "Joystick/Game port",
-	"PNPB077", "OAK Mozart Sound System",
-	"PNPB078", "OAK Mozart Sound System MPU-401",
-	"PNPBXXX", "Unknown Multimedia Device",
+	{"PNPB000", "Creative Labs Sound Blaster 1.5 (or compatible sound device)"},
+	{"PNPB001", "Creative Labs Sound Blaster 2.0 (or compatible sound device)"},
+	{"PNPB002", "Creative Labs Sound Blaster Pro (or compatible sound device)"},
+	{"PNPB003", "Creative Labs Sound Blaster 16 (or compatible sound device)"},
+	{"PNPB004", "MediaVision Thunderboard (or compatible sound device)"},
+	{"PNPB005", "Adlib-compatible FM synthesizer device"},
+	{"PNPB006", "MPU401 compatible"},
+	{"PNPB007", "Microsoft Windows Sound System-compatible sound device"},
+	{"PNPB008", "Compaq Business Audio"},
+	{"PNPB009", "Plug and Play Microsoft Windows Sound System Device"},
+	{"PNPB00A", "MediaVision Pro Audio Spectrum (Trantor SCSI enabled, Thunder Chip Disabled)"},
+	{"PNPB00B", "MediaVision Pro Audio 3D"},
+	{"PNPB00C", "MusicQuest MQX-32M"},
+	{"PNPB00D", "MediaVision Pro Audio Spectrum Basic (No Trantor SCSI, Thunder Chip Enabled)"},
+	{"PNPB00E", "MediaVision Pro Audio Spectrum (Trantor SCSI enabled, Thunder Chip Disabled)"},
+	{"PNPB00F", "MediaVision Jazz-16 chipset (OEM Versions)"},
+	{"PNPB010", "Orchid Videola - Auravision VxP500 chipset"},
+	{"PNPB018", "MediaVision Pro Audio Spectrum 8-bit"},
+	{"PNPB019", "MediaVision Pro Audio Spectrum Basic (No Trantor SCSI, Thunder Chip Enabled)"},
+	{"PNPB020", "Yamaha OPL3-compatible FM synthesizer device"},
+	{"PNPB02F", "Joystick/Game port"},
+	{"PNPB077", "OAK Mozart Sound System"},
+	{"PNPB078", "OAK Mozart Sound System MPU-401"},
+	{"PNPBXXX", "Unknown Multimedia Device"},
 	/* modems */
-	"PNP9000", "Modem",
-	"PNPC000", "Compaq 14400 Modem (TBD)",
-	"PNPC001", "Compaq 2400/9600 Modem (TBD)",
-	"PNPCXXX", "Unknown Modem",
+	{"PNPC000", "Compaq 14400 Modem (TBD)"},
+	{"PNPC001", "Compaq 2400/9600 Modem (TBD)"},
+	{"PNPCXXX", "Unknown Modem"},
+	/* some other network cards */
+	{"PNPD300", "SK-NET TR4/16+ Token-Ring"},
+	{"PNPE000", "SK-NET G16, G16/TP Ethernet"},
+	{"PNPF000", "SK-NET FDDI-FI FDDI LAN"},
 	/* Toshiba devices */
-	"TOS6200", "Toshiba Notebook Extra HCI driver",
-	"TOS6202", "Toshiba Notebook Extra HCI driver",
-	"TOS6207", "Toshiba Notebook Extra HCI driver",
-	"TOS7400", "Toshiba AcuPoint",
+	{"TOS6200", "Toshiba Notebook Extra HCI driver"},
+	{"TOS6202", "Toshiba Notebook Extra HCI driver"},
+	{"TOS6207", "Toshiba Notebook Extra HCI driver"},
+	{"TOS7400", "Toshiba AcuPoint"},
 	/* Wacom devices */
-	"WACf004", "Wacom Serial Tablet PC Pen Tablet/Digitizer",
-	"WACf005", "Wacom Serial Tablet PC Pen Tablet/Digitizer",
-	"WACf006", "Wacom Serial Tablet PC Pen Tablet/Digitizer",
-	NULL
+	{"WACf004", "Wacom Serial Tablet PC Pen Tablet/Digitizer"},
+	{"WACf005", "Wacom Serial Tablet PC Pen Tablet/Digitizer"},
+	{"WACf006", "Wacom Serial Tablet PC Pen Tablet/Digitizer"}
 };
 
+static int 
+ids_comp_pnp(const void *id1, const void *id2) {
+        struct pnp_id *pnp_id1 = (struct pnp_id *) id1;
+        struct pnp_id *pnp_id2 = (struct pnp_id *) id2;
+        return strcasecmp(pnp_id1->id, pnp_id2->id);
+}
 
 void
 ids_find_pnp (const char *pnp_id, char **pnp_description)
 {
-	unsigned int i;
-
-	/* OK, so someone should optimize this lookup - send me patches */
-	for (i = 0; pnp_ids_list[2*i] != NULL; i++) {
-		if (strcasecmp (pnp_id, pnp_ids_list[2*i]) == 0) {
-			*pnp_description = pnp_ids_list[2*i + 1];
-			return;
-		}
+	static gboolean sorted = FALSE;
+	struct pnp_id search, *res;
+        
+	if (!sorted) {
+		/* sort the list, to be sure that all is in correc order */
+		qsort(pnp_ids_list, sizeof(pnp_ids_list)/sizeof(pnp_ids_list[0]), 
+		      sizeof(struct pnp_id), ids_comp_pnp);
+		sorted = TRUE;
 	}
 
-	*pnp_description = NULL;
+        search.id = (char *) pnp_id;
+        res = bsearch(&search, pnp_ids_list, sizeof(pnp_ids_list)/sizeof(pnp_ids_list[0]), 
+		      sizeof(struct pnp_id), ids_comp_pnp);
+
+        if (res != NULL)
+        	*pnp_description = res->desc;
+	else
+        	*pnp_description = NULL; 
+        return;
 }


More information about the hal-commit mailing list