Skip to contentSkip to conversation

Patch(?): isapnp_card_id tables for all isapnp drivers in 2.4.0-test11

PATCH Adam J. Richter 3 participants 3 messages Nov 25, 2000

Subsystems (6)
lore
Share & tools
lore
#0 lore raw

I have made added isapnp_card_id table to all isapnp drivers.
This is the isapnp equivalent of the pci MODULE_DEVICE_TABLE declarations. They allow a user level software agent to know which modules correspond to your hardware configuration and to load them. One such implementation (GPL'ed) is available from ftp://ftp.yggdrasil.com/pub/dist/device_control/isapnpmodules/.

There previously were no isapnp_card_id tables in the kernel
drivers. I believe this patch adds isapnp_card_id tables to all of them, completing the coverage of Keith Owens's /lib/modules/<version>/modules.{pci,usb,isapnp}map files. I have attached a patch below that covers just the files that have the isapnp changes. Note that it includes a couple of pci_device_id table declarations that happened to flow into the same "diff" sections as the isapnp_card_id declarations. A complete set of patches with both pci and isapnp declarations is available from

ftp://ftp.yggdrasil.com/pub/dist/device_control/kernel/pci_id_tables-2.4.0-test11.patch2.gz

Note that this is not a "final" version. I plan to go
through all of the changes and bracket all of these new tables with #ifdef MODULE...#endif so they do not result in complaints about the table being defined static and never used in cases where the driver is compiled directly into the kernel. After 2.4.0, I imainge most of those #ifdef MODULE conditions will go away as the tables come to be actually used by the driver code.

Any comments are welcome.

Signature · 4 lines
Adam J. Richter     __     ______________   4880 Stevens Creek Blvd, Suite 104
[email protected]     \ /                  San Jose, California 95129-1034
+1 408 261-6630         | g g d r a s i l   United States of America
fax +1 408 261-6631      "Free Software For The Rest Of Us."
drivers/char/serial.c +281 -0
@@ -4682,6 +4682,287 @@
 	unsigned short device;
 };
 
+#define ISPNP_TBL_ENTRY(v1,v2,v3,func) { \
+	card_vendor: ISAPNP_ANY_ID, \
+	card_device: ISAPNP_ANY_ID, \
+	devs: { ISAPNP_DEVICE_ID(v1,v2,v3,func ) }, \
+}
+
+# ifdef MODULE
+static struct isapnp_card_id ixj_isa_ids[] __initdata = {
+	/* Archtek America Corp. */
+	/* Archtek SmartLink Modem 3334BT Plug & Play */
+	ISAPNP_TBL_ENTRY('A', 'A', 'C', 0x000F),
+	/* Anchor Datacomm BV */
+	/* SXPro 144 External Data Fax Modem Plug & Play */
+	ISAPNP_TBL_ENTRY('A', 'D', 'C', 0x0001),
+	/* SXPro 288 External Data Fax Modem Plug & Play */
+	ISAPNP_TBL_ENTRY('A', 'D', 'C', 0x0002),
+	/* Rockwell 56K ACF II Fax+Data+Voice Modem */
+	ISAPNP_TBL_ENTRY('A', 'K', 'Y', 0x1021),
+	/* AZT3005 PnP SOUND DEVICE */
+	ISAPNP_TBL_ENTRY('A', 'Z', 'T', 0x4001),
+	/* Best Data Products Inc. Smart One 336F PnP Modem */
+	ISAPNP_TBL_ENTRY('B', 'D', 'P', 0x3336),
+	/*  Boca Research */
+	/* Boca Complete Ofc Communicator 14.4 Data-FAX */
+	ISAPNP_TBL_ENTRY('B', 'R', 'I', 0x0A49),
+	/* Boca Research 33,600 ACF Modem */
+	ISAPNP_TBL_ENTRY('B', 'R', 'I', 0x1400),
+	/* Boca 33.6 Kbps Internal FD34FSVD */
+	ISAPNP_TBL_ENTRY('B', 'R', 'I', 0x3400),
+	/* Boca 33.6 Kbps Internal FD34FSVD */
+	ISAPNP_TBL_ENTRY('B', 'R', 'I', 0x0A49),
+	/* Best Data Products Inc. Smart One 336F PnP Modem */
+	ISAPNP_TBL_ENTRY('B', 'D', 'P', 0x3336),
+	/* Computer Peripherals Inc */
+	/* EuroViVa CommCenter-33.6 SP PnP */
+	ISAPNP_TBL_ENTRY('C', 'P', 'I', 0x4050),
+	/* Creative Labs */
+	/* Creative Labs Phone Blaster 28.8 DSVD PnP Voice */
+	ISAPNP_TBL_ENTRY('C', 'T', 'L', 0x3001),
+	/* Creative Labs Modem Blaster 28.8 DSVD PnP Voice */
+	ISAPNP_TBL_ENTRY('C', 'T', 'L', 0x3011),
+	/* Creative */
+	/* Creative Modem Blaster Flash56 DI5601-1 */
+	ISAPNP_TBL_ENTRY('D', 'M', 'B', 0x1032),
+	/* Creative Modem Blaster V.90 DI5660 */
+	ISAPNP_TBL_ENTRY('D', 'M', 'B', 0x2001),
+	/* FUJITSU */
+	/* Fujitsu 33600 PnP-I2 R Plug & Play */
+	ISAPNP_TBL_ENTRY('F', 'U', 'J', 0x0202),
+	/* Fujitsu FMV-FX431 Plug & Play */
+	ISAPNP_TBL_ENTRY('F', 'U', 'J', 0x0205),
+	/* Fujitsu 33600 PnP-I4 R Plug & Play */
+	ISAPNP_TBL_ENTRY('F', 'U', 'J', 0x0206),
+	/* Fujitsu Fax Voice 33600 PNP-I5 R Plug & Play */
+	ISAPNP_TBL_ENTRY('F', 'U', 'J', 0x0209),
+	/* Archtek America Corp. */
+	/* Archtek SmartLink Modem 3334BT Plug & Play */
+	ISAPNP_TBL_ENTRY('G', 'V', 'C', 0x000F),
+	/* Hayes */
+	/* Hayes Optima 288 V.34-V.FC + FAX + Voice Plug & Play */
+	ISAPNP_TBL_ENTRY('H', 'A', 'Y', 0x0001),
+	/* Hayes Optima 336 V.34 + FAX + Voice PnP */
+	ISAPNP_TBL_ENTRY('H', 'A', 'Y', 0x000C),
+	/* Hayes Optima 336B V.34 + FAX + Voice PnP */
+	ISAPNP_TBL_ENTRY('H', 'A', 'Y', 0x000D),
+	/* Hayes Accura 56K Ext Fax Modem PnP */
+	ISAPNP_TBL_ENTRY('H', 'A', 'Y', 0x5670),
+	/* Hayes Accura 56K Ext Fax Modem PnP */
+	ISAPNP_TBL_ENTRY('H', 'A', 'Y', 0x5674),
+	/* Hayes Accura 56K Fax Modem PnP */
+	ISAPNP_TBL_ENTRY('H', 'A', 'Y', 0x5675),
+	/* Hayes 288, V.34 + FAX */
+	ISAPNP_TBL_ENTRY('H', 'A', 'Y', 0xF000),
+	/* Hayes Optima 288 V.34 + FAX + Voice, Plug & Play */
+	ISAPNP_TBL_ENTRY('H', 'A', 'Y', 0xF001),
+	/* IBM */
+	/* IBM Thinkpad 701 Internal Modem Voice */
+	ISAPNP_TBL_ENTRY('I', 'B', 'M', 0x0033),
+	/* Intertex */
+	/* Intertex 28k8 33k6 Voice EXT PnP */
+	ISAPNP_TBL_ENTRY('I', 'X', 'D', 0xC801),
+	/* Intertex 33k6 56k Voice EXT PnP */
+	ISAPNP_TBL_ENTRY('I', 'X', 'D', 0xC901),
+	/* Intertex 28k8 33k6 Voice SP EXT PnP */
+	ISAPNP_TBL_ENTRY('I', 'X', 'D', 0xD801),
+	/* Intertex 33k6 56k Voice SP EXT PnP */
+	ISAPNP_TBL_ENTRY('I', 'X', 'D', 0xD901),
+	/* Intertex 28k8 33k6 Voice SP INT PnP */
+	ISAPNP_TBL_ENTRY('I', 'X', 'D', 0xF401),
+	/* Intertex 28k8 33k6 Voice SP EXT PnP */
+	ISAPNP_TBL_ENTRY('I', 'X', 'D', 0xF801),
+	/* Intertex 33k6 56k Voice SP EXT PnP */
+	ISAPNP_TBL_ENTRY('I', 'X', 'D', 0xF901),
+	/* Kortex International */
+	/* KORTEX 28800 Externe PnP */
+	ISAPNP_TBL_ENTRY('K', 'O', 'R', 0x4522),
+	/* KXPro 33.6 Vocal ASVD PnP */
+	ISAPNP_TBL_ENTRY('K', 'O', 'R', 0xF661),
+	/* Lasat */
+	/* LASAT Internet 33600 PnP */
+	ISAPNP_TBL_ENTRY('L', 'A', 'S', 0x4040),
+	/* Lasat Safire 560 PnP */
+	ISAPNP_TBL_ENTRY('L', 'A', 'S', 0x4540),
+	/* Lasat Safire 336  PnP */
+	ISAPNP_TBL_ENTRY('L', 'A', 'S', 0x5440),
+	/* Microcom, Inc. */
+	/* Microcom TravelPorte FAST V.34 Plug & Play */
+	ISAPNP_TBL_ENTRY('M', 'N', 'P', 0x281),
+	/* Microcom DeskPorte V.34 FAST or FAST+ Plug & Play */
+	ISAPNP_TBL_ENTRY('M', 'N', 'P', 0x0336),
+	/* Microcom DeskPorte FAST EP 28.8 Plug & Play */
+	ISAPNP_TBL_ENTRY('M', 'N', 'P', 0x0339),
+	/* Microcom DeskPorte 28.8P Plug & Play */
+	ISAPNP_TBL_ENTRY('M', 'N', 'P', 0x0342),
+	/* Microcom DeskPorte FAST ES 28.8 Plug & Play */
+	ISAPNP_TBL_ENTRY('M', 'N', 'P', 0x0500),
+	/* Microcom DeskPorte FAST ES 28.8 Plug & Play */
+	ISAPNP_TBL_ENTRY('M', 'N', 'P', 0x0501),
+	/* Microcom DeskPorte 28.8S Internal Plug & Play */
+	ISAPNP_TBL_ENTRY('M', 'N', 'P', 0x0502),
+	/* Motorola */
+	/* Motorola BitSURFR Plug & Play */
+	ISAPNP_TBL_ENTRY('M', 'O', 'T', 0x1105),
+	/* Motorola TA210 Plug & Play */
+	ISAPNP_TBL_ENTRY('M', 'O', 'T', 0x1111),
+	/* Motorola HMTA 200 (ISDN) Plug & Play */
+	ISAPNP_TBL_ENTRY('M', 'O', 'T', 0x1114),
+	/* Motorola BitSURFR Plug & Play */
+	ISAPNP_TBL_ENTRY('M', 'O', 'T', 0x1115),
+	/* Motorola Lifestyle 28.8 Internal */
+	ISAPNP_TBL_ENTRY('M', 'O', 'T', 0x1190),
+	/* Motorola V.3400 Plug & Play */
+	ISAPNP_TBL_ENTRY('M', 'O', 'T', 0x1501),
+	/* Motorola Lifestyle 28.8 V.34 Plug & Play */
+	ISAPNP_TBL_ENTRY('M', 'O', 'T', 0x1502),
+	/* Motorola Power 28.8 V.34 Plug & Play */
+	ISAPNP_TBL_ENTRY('M', 'O', 'T', 0x1505),
+	/* Motorola ModemSURFR External 28.8 Plug & Play */
+	ISAPNP_TBL_ENTRY('M', 'O', 'T', 0x1509),
+	/* Motorola Premier 33.6 Desktop Plug & Play */
+	ISAPNP_TBL_ENTRY('M', 'O', 'T', 0x150A),
+	/* Motorola VoiceSURFR 56K External PnP */
+	ISAPNP_TBL_ENTRY('M', 'O', 'T', 0x150F),
+	/* Motorola ModemSURFR 56K External PnP */
+	ISAPNP_TBL_ENTRY('M', 'O', 'T', 0x1510),
+	/* Motorola ModemSURFR 56K Internal PnP */
+	ISAPNP_TBL_ENTRY('M', 'O', 'T', 0x1550),
+	/* Motorola ModemSURFR Internal 28.8 Plug & Play */
+	ISAPNP_TBL_ENTRY('M', 'O', 'T', 0x1560),
+	/* Motorola Premier 33.6 Internal Plug & Play */
+	ISAPNP_TBL_ENTRY('M', 'O', 'T', 0x1580),
+	/* Motorola OnlineSURFR 28.8 Internal Plug & Play */
+	ISAPNP_TBL_ENTRY('M', 'O', 'T', 0x15B0),
+	/* Motorola VoiceSURFR 56K Internal PnP */
+	ISAPNP_TBL_ENTRY('M', 'O', 'T', 0x15F0),
+	/* Com 1 */
+	/*  Deskline K56 Phone System PnP */
+	ISAPNP_TBL_ENTRY('M', 'V', 'X', 0x00A1),
+	/* PC Rider K56 Phone System PnP */
+	ISAPNP_TBL_ENTRY('M', 'V', 'X', 0x00F2),
+	/* Pace 56 Voice Internal Plug & Play Modem */
+	ISAPNP_TBL_ENTRY('P', 'M', 'C', 0x2430),
+	/* Generic */
+	/* Generic standard PC COM port	 */
+	ISAPNP_TBL_ENTRY('P', 'N', 'P', 0x0500),
+	/* Generic 16550A-compatible COM port */
+	ISAPNP_TBL_ENTRY('P', 'N', 'P', 0x0501),
+	/* Compaq 14400 Modem */
+	ISAPNP_TBL_ENTRY('P', 'N', 'P', 0xC000),
+	/* Compaq 2400/9600 Modem */
+	ISAPNP_TBL_ENTRY('P', 'N', 'P', 0xC001),
+	/* Dial-Up Networking Serial Cable between 2 PCs */
+	ISAPNP_TBL_ENTRY('P', 'N', 'P', 0xC031),
+	/* Dial-Up Networking Parallel Cable between 2 PCs */
+	ISAPNP_TBL_ENTRY('P', 'N', 'P', 0xC032),
+	/* Standard 9600 bps Modem */
+	ISAPNP_TBL_ENTRY('P', 'N', 'P', 0xC100),
+	/* Standard 14400 bps Modem */
+	ISAPNP_TBL_ENTRY('P', 'N', 'P', 0xC101),
+	/*  Standard 28800 bps Modem*/
+	ISAPNP_TBL_ENTRY('P', 'N', 'P', 0xC102),
+	/*  Standard Modem*/
+	ISAPNP_TBL_ENTRY('P', 'N', 'P', 0xC103),
+	/*  Standard 9600 bps Modem*/
+	ISAPNP_TBL_ENTRY('P', 'N', 'P', 0xC104),
+	/*  Standard 14400 bps Modem*/
+	ISAPNP_TBL_ENTRY('P', 'N', 'P', 0xC105),
+	/*  Standard 28800 bps Modem*/
+	ISAPNP_TBL_ENTRY('P', 'N', 'P', 0xC106),
+	/*  Standard Modem */
+	ISAPNP_TBL_ENTRY('P', 'N', 'P', 0xC107),
+	/* Standard 9600 bps Modem */
+	ISAPNP_TBL_ENTRY('P', 'N', 'P', 0xC108),
+	/* Standard 14400 bps Modem */
+	ISAPNP_TBL_ENTRY('P', 'N', 'P', 0xC109),
+	/* Standard 28800 bps Modem */
+	ISAPNP_TBL_ENTRY('P', 'N', 'P', 0xC10A),
+	/* Standard Modem */
+	ISAPNP_TBL_ENTRY('P', 'N', 'P', 0xC10B),
+	/* Standard 9600 bps Modem */
+	ISAPNP_TBL_ENTRY('P', 'N', 'P', 0xC10C),
+	/* Standard 14400 bps Modem */
+	ISAPNP_TBL_ENTRY('P', 'N', 'P', 0xC10D),
+	/* Standard 28800 bps Modem */
+	ISAPNP_TBL_ENTRY('P', 'N', 'P', 0xC10E),
+	/* Standard Modem */
+	ISAPNP_TBL_ENTRY('P', 'N', 'P', 0xC10F),
+	/* Standard PCMCIA Card Modem */
+	ISAPNP_TBL_ENTRY('P', 'N', 'P', 0x2000),
+	/* Rockwell */
+	/* Modular Technology */
+	/* Rockwell 33.6 DPF Internal PnP */
+	/* Modular Technology 33.6 Internal PnP */
+	ISAPNP_TBL_ENTRY('R', 'O', 'K', 0x0030),
+	/* Kortex International */
+	/* KORTEX 14400 Externe PnP */
+	ISAPNP_TBL_ENTRY('R', 'O', 'K', 0x0100),
+	/* Viking Components, Inc */
+	/* Viking 28.8 INTERNAL Fax+Data+Voice PnP */
+	ISAPNP_TBL_ENTRY('R', 'O', 'K', 0x4920),
+	/* Rockwell */
+	/* British Telecom */
+	/* Modular Technology */
+	/* Rockwell 33.6 DPF External PnP */
+	/* BT Prologue 33.6 External PnP */
+	/* Modular Technology 33.6 External PnP */
+	ISAPNP_TBL_ENTRY('R', 'S', 'S', 0x00A0),
+	/* Viking 56K FAX INT */
+	ISAPNP_TBL_ENTRY('R', 'S', 'S', 0x0262),
+	/* SupraExpress 28.8 Data/Fax PnP modem */
+	ISAPNP_TBL_ENTRY('S', 'U', 'P', 0x1310),
+	/* SupraExpress 33.6 Data/Fax PnP modem */
+	ISAPNP_TBL_ENTRY('S', 'U', 'P', 0x1421),
+	/* SupraExpress 33.6 Data/Fax PnP modem */
+	ISAPNP_TBL_ENTRY('S', 'U', 'P', 0x1590),
+	/* SupraExpress 33.6 Data/Fax PnP modem */
+	ISAPNP_TBL_ENTRY('S', 'U', 'P', 0x1760),
+	/* Phoebe Micro */
+	/* Phoebe Micro 33.6 Data Fax 1433VQH Plug & Play */
+	ISAPNP_TBL_ENTRY('T', 'E', 'X', 0x0011),
+	/* Archtek America Corp. */
+	/* Archtek SmartLink Modem 3334BT Plug & Play */
+	ISAPNP_TBL_ENTRY('U', 'A', 'C', 0x000F),
+	/* 3Com Corp. */
+	/* Gateway Telepath IIvi 33.6 */
+	ISAPNP_TBL_ENTRY('U', 'S', 'R', 0x0000),
+	/*  Sportster Vi 14.4 PnP FAX Voicemail */
+	ISAPNP_TBL_ENTRY('U', 'S', 'R', 0x0004),
+	/* U.S. Robotics 33.6K Voice INT PnP */
+	ISAPNP_TBL_ENTRY('U', 'S', 'R', 0x0006),
+	/* U.S. Robotics 33.6K Voice EXT PnP */
+	ISAPNP_TBL_ENTRY('U', 'S', 'R', 0x0007),
+	/* U.S. Robotics 33.6K Voice INT PnP */
+	ISAPNP_TBL_ENTRY('U', 'S', 'R', 0x2002),
+	/* U.S. Robotics 56K Voice INT PnP */
+	ISAPNP_TBL_ENTRY('U', 'S', 'R', 0x2070),
+	/* U.S. Robotics 56K Voice EXT PnP */
+	ISAPNP_TBL_ENTRY('U', 'S', 'R', 0x2080),
+	/* U.S. Robotics 56K FAX INT */
+	ISAPNP_TBL_ENTRY('U', 'S', 'R', 0x3031),
+	/* U.S. Robotics 56K Voice INT PnP */
+	ISAPNP_TBL_ENTRY('U', 'S', 'R', 0x3070),
+	/* U.S. Robotics 56K Voice EXT PnP */
+	ISAPNP_TBL_ENTRY('U', 'S', 'R', 0x3080),
+	/* U.S. Robotics 56K Voice INT PnP */
+	ISAPNP_TBL_ENTRY('U', 'S', 'R', 0x3090),
+	/* U.S. Robotics 56K Message  */
+	ISAPNP_TBL_ENTRY('U', 'S', 'R', 0x9100),
+	/*  U.S. Robotics 56K FAX EXT PnP*/
+	ISAPNP_TBL_ENTRY('U', 'S', 'R', 0x9160),
+	/*  U.S. Robotics 56K FAX INT PnP*/
+	ISAPNP_TBL_ENTRY('U', 'S', 'R', 0x9170),
+	/*  U.S. Robotics 56K Voice EXT PnP*/
+	ISAPNP_TBL_ENTRY('U', 'S', 'R', 0x9180),
+	/*  U.S. Robotics 56K Voice INT PnP*/
+	ISAPNP_TBL_ENTRY('U', 'S', 'R', 0x9190),
+	{ ISAPNP_CARD_END }
+};
+ISAPNP_CARD_TABLE(ixj_isa_ids);
+# endif /* MODULE */
+
 static struct pnp_board pnp_devices[] __initdata = {
 	/* Archtek America Corp. */
 	/* Archtek SmartLink Modem 3334BT Plug & Play */
drivers/char/joystick/ns558.c +19 -0
@@ -250,6 +250,25 @@
 	{ 0, },
 };
 
+# ifdef MODULE
+static struct isapnp_card_id ns558_isa_ids[] __initdata = {
+	{
+		card_vendor: ISAPNP_ANY_ID, card_device: ISAPNP_ANY_ID,
+        	devs: {	ISAPNP_DEVICE_ID('C', 'T', 'L', 0x7002) },
+	},
+	{
+		card_vendor: ISAPNP_ANY_ID, card_device: ISAPNP_ANY_ID,
+        	devs: {	ISAPNP_DEVICE_ID('C', 'S', 'C', 0x0b35) },
+	},
+	{
+		card_vendor: ISAPNP_ANY_ID, card_device: ISAPNP_ANY_ID,
+        	devs: {	ISAPNP_DEVICE_ID('P', 'N', 'P', 0x80f8) },
+	},
+	{ ISAPNP_CARD_END }
+};
+ISAPNP_CARD_TABLE(ns558_isa_ids);
+#endif /* MODULE */
+
 static struct ns558* ns558_pnp_probe(struct pci_dev *dev, struct ns558 *next)
 {
 	int ioport, iolen;
drivers/ide/ide-pnp.c +11 -0
@@ -19,6 +19,7 @@
 #include <linux/ide.h>
 #include <linux/init.h>
 
+#include <linux/module.h>
 #include <linux/isapnp.h>
 
 #ifndef PREPARE_FUNC
@@ -88,6 +89,16 @@
 };
 
 #ifdef MODULE
+static struct isapnp_card_id ide_isa_ids[] __initdata = {
+	{
+		card_vendor: ISAPNP_ANY_ID,
+		card_device: ISAPNP_ANY_ID,
+                devs: {	ISAPNP_DEVICE_ID('P', 'N', 'P', 0x0600) },
+	},
+	{ ISAPNP_CARD_END }
+};
+ISAPNP_CARD_TABLE(ide_isa_ids);
+
 #define NR_PNP_DEVICES 8
 struct pnp_dev_inst {
 	struct pci_dev *dev;
drivers/media/radio/radio-cadet.c +13 -2
@@ -48,11 +48,22 @@
 static int cadet_probe(void);
 #endif
 
-#ifdef CONFIG_ISAPNP
+#if defined(CONFIG_ISAPNP) || defined(CONFIG_ISAPNP_MODULE)
 #include <linux/isapnp.h>
 
 struct pci_dev *dev;
 static int isapnp_cadet_probe(void);
+
+# ifdef MODULE
+static struct isapnp_card_id cadet_isa_ids[] __initdata = {
+	{
+		card_vendor: ISAPNP_ANY_ID, card_device: ISAPNP_ANY_ID,
+                devs: { ISAPNP_DEVICE_ID('M', 'S', 'M', 0x0c24) },
+	},
+	{ ISAPNP_CARD_END }
+};
+ISAPNP_CARD_TABLE(cadet_isa_ids);
+# endif /* MODULE */
 #endif
 
 /*
@@ -551,7 +562,7 @@
 	ioctl:		cadet_ioctl,
 };
 
-#ifdef CONFIG_ISAPNP
+#if defined(CONFIG_ISAPNP) || defined(CONFIG_ISAPNP_MODULE)
 static int isapnp_cadet_probe(void)
 {
 	dev = isapnp_find_dev (NULL, ISAPNP_VENDOR('M','S','M'),
drivers/net/3c509.c +29 -0
@@ -66,6 +66,7 @@
 #include <linux/skbuff.h>
 #include <linux/delay.h>	/* for udelay() */
 #include <linux/spinlock.h>
+#include <linux/init.h>
 
 #include <asm/bitops.h>
 #include <asm/io.h>
@@ -183,6 +184,34 @@
 	{0, }
 };
 static u16 el3_isapnp_phys_addr[8][3];
+
+# ifdef MODULE
+static struct isapnp_card_id el3_isa_ids[] __initdata = {
+	{
+		card_vendor: ISAPNP_ANY_ID, card_device: ISAPNP_ANY_ID,
+        devs: {	ISAPNP_DEVICE_ID('T', 'C', 'M', 0x5090) },
+	},
+	{
+		card_vendor: ISAPNP_ANY_ID, card_device: ISAPNP_ANY_ID,
+        devs: {	ISAPNP_DEVICE_ID('T', 'C', 'M', 0x5091) },
+	},
+	{
+		card_vendor: ISAPNP_ANY_ID, card_device: ISAPNP_ANY_ID,
+        devs: {	ISAPNP_DEVICE_ID('T', 'C', 'M', 0x5094) },
+	},
+	{
+		card_vendor: ISAPNP_ANY_ID, card_device: ISAPNP_ANY_ID,
+        devs: {	ISAPNP_DEVICE_ID('T', 'C', 'M', 0x5098) },
+	},
+	{
+		card_vendor: ISAPNP_ANY_ID, card_device: ISAPNP_ANY_ID,
+        devs: {	ISAPNP_DEVICE_ID('P', 'N', 'P', 0x80f8) },
+	},
+	{ ISAPNP_CARD_END }
+};
+ISAPNP_CARD_TABLE(el3_isa_ids);
+# endif /* MODULE */
+
 #endif /* CONFIG_ISAPNP */
 #ifdef __ISAPNP__
 static int nopnp;
drivers/net/3c515.c +14 -0
@@ -60,6 +60,7 @@
 #include <linux/malloc.h>
 #include <linux/interrupt.h>
 #include <linux/timer.h>
+#include <linux/init.h>
 #include <asm/bitops.h>
 #include <asm/io.h>
 #include <asm/dma.h>
@@ -360,6 +361,19 @@
 	{ISAPNP_VENDOR('T', 'C', 'M'), ISAPNP_FUNCTION(0x5051), "3Com Fast EtherLink ISA"},
 	{0, }
 };
+
+# ifdef MODULE
+static struct isapnp_card_id corkscrew_isa_ids[] __initdata = {
+	{
+		card_vendor: ISAPNP_ANY_ID,
+		card_device: ISAPNP_ANY_ID,
+                devs: {	ISAPNP_DEVICE_ID('T', 'C', 'M', 0x5051) },
+	},
+	{ ISAPNP_CARD_END }
+};
+ISAPNP_CARD_TABLE(corkscrew_isa_ids);
+# endif
+
 int corkscrew_isapnp_phys_addr[3] = {
 	0, 0, 0
 };
drivers/net/aironet4500_card.c +36 -0
@@ -38,6 +38,8 @@
 #include <linux/if_arp.h>
 #include <linux/ioport.h>
 #include <linux/delay.h>
+#include <linux/init.h>
+#include <linux/isapnp.h>
 
 #include "aironet4500.h"
 
@@ -59,6 +61,40 @@
 
 #include <linux/pci.h>
 
+#ifdef MODULE
+static struct pci_device_id aironet4500_card_pci_tbl[] __initdata = {
+	{
+	  vendor: PCI_VENDOR_ID_AIRONET,
+	  device: PCI_DEVICE_AIRONET_4800_1,
+	  subvendor: PCI_ANY_ID,
+	  subdevice: PCI_ANY_ID,
+	},
+	{
+	  vendor: PCI_VENDOR_ID_AIRONET,
+	  device: PCI_DEVICE_AIRONET_4800,
+	  subvendor: PCI_ANY_ID,
+	  subdevice: PCI_ANY_ID,
+	},
+	{
+	  vendor: PCI_VENDOR_ID_AIRONET,
+	  device: PCI_DEVICE_AIRONET_4500,
+	  subvendor: PCI_ANY_ID,
+	  subdevice: PCI_ANY_ID,
+	},
+	{ }			/* Terminating entry */
+};
+MODULE_DEVICE_TABLE(pci, aironet4500_card_pci_tbl);
+
+static struct isapnp_card_id awc4500_isa_ids[] __initdata = {
+	{
+		card_vendor: ISAPNP_ANY_ID,
+		card_device: ISAPNP_ANY_ID,
+                devs: {	ISAPNP_DEVICE_ID('A', 'W', 'L', 0x0001) },
+	},
+	{ ISAPNP_CARD_END }
+};
+ISAPNP_CARD_TABLE(awc4500_isa_ids);
+#endif
 
 static int reverse_probe;
 
drivers/net/ne.c +18 -0
@@ -83,6 +83,24 @@
 	{0,}
 };
 
+#ifdef MODULE
+static struct isapnp_card_id ne_isa_ids[] __initdata = {
+	{
+		card_vendor: ISAPNP_ANY_ID,
+		card_device: ISAPNP_ANY_ID,
+                devs: {	ISAPNP_DEVICE_ID('E', 'D', 'I', 0x0216) },
+	},
+	{
+		card_vendor: ISAPNP_ANY_ID,
+		card_device: ISAPNP_ANY_ID,
+                devs: {	ISAPNP_DEVICE_ID('P', 'N', 'P', 0x80d6) },
+	},
+	{ ISAPNP_CARD_END }
+};
+ISAPNP_CARD_TABLE(ne_isa_ids);
+#endif
+
+
 #ifdef SUPPORT_NE_BAD_CLONES
 /* A list of bad clones that we none-the-less recognize. */
 static struct { const char *name8, *name16; unsigned char SAprefix[4];}
drivers/net/sb1000.c +13 -0
@@ -57,6 +57,7 @@
 #include <asm/uaccess.h>
 #include <linux/etherdevice.h>
 #include <linux/isapnp.h>
+#include <linux/init.h>
 
 /* for SIOGCM/SIOSCM stuff */
 
@@ -71,6 +72,18 @@
 static const int SB1000_IO_EXTENT = 8;
 /* SB1000 Maximum Receive Unit */
 static const int SB1000_MRU = 1500; /* octects */
+
+#ifdef MODULE
+static struct isapnp_card_id ncr5380_isa_ids[] __initdata = {
+	{
+		card_vendor: ISAPNP_ANY_ID,
+		card_device: ISAPNP_ANY_ID,
+                devs: {	ISAPNP_DEVICE_ID('G', 'I', 'C', 0x1000) },
+	},
+	{ ISAPNP_CARD_END }
+};
+ISAPNP_CARD_TABLE(ncr5380_isa_ids);
+#endif
 
 #define NPIDS 4
 struct sb1000_private {
drivers/scsi/aha1542.c +14 -0
@@ -51,6 +51,20 @@
 
 #include "aha1542.h"
 
+#ifdef MODULE
+static struct isapnp_card_id aha1542_isa_ids[] __initdata = {
+	{
+		card_vendor: ISAPNP_ANY_ID,
+		card_device: ISAPNP_ANY_ID,
+                devs: {	ISAPNP_DEVICE_ID('A', 'D', 'P', 0x1542) },
+	},
+	{
+		ISAPNP_CARD_END,
+	}
+};
+ISAPNP_CARD_TABLE(aha1542_isa_ids);
+#endif
+
 #define SCSI_PA(address) virt_to_bus(address)
 
 static void BAD_DMA(void *address, unsigned int length)
drivers/scsi/g_NCR5380.c +12 -0
@@ -146,6 +146,18 @@
 
 #define NO_OVERRIDES (sizeof(overrides) / sizeof(struct override))
 
+#ifdef MODULE
+static struct isapnp_card_id ncr5380_isa_ids[] __initdata = {
+	{
+		card_vendor: ISAPNP_ANY_ID,
+		card_device: ISAPNP_ANY_ID,
+                devs: {	ISAPNP_DEVICE_ID('D', 'T', 'C', 0x436e) },
+	},
+	{ ISAPNP_CARD_END }
+};
+ISAPNP_CARD_TABLE(ncr5380_isa_ids);
+#endif
+
 /*
  * Function : static internal_setup(int board, char *str, int *ints)
  *
drivers/sound/ad1816.c +19 -0
@@ -1325,6 +1325,25 @@
 	{0}
 };
 
+#ifdef MODULE
+static struct isapnp_card_id ad1816_isa_ids[] __initdata = {
+	{
+		card_vendor: ISAPNP_ANY_ID,
+		card_device: ISAPNP_ANY_ID,
+                devs: {	ISAPNP_DEVICE_ID('A', 'D', 'S', 0x7150) },
+	},
+	{
+		card_vendor: ISAPNP_ANY_ID,
+		card_device: ISAPNP_ANY_ID,
+                devs: {	ISAPNP_DEVICE_ID('A', 'D', 'S', 0x7180) },
+	},
+	{
+		ISAPNP_CARD_END,
+	}
+};
+ISAPNP_CARD_TABLE(ad1816_isa_ids);
+#endif
+
 static int __init ad1816_init_isapnp(struct address_info *hw_config,
 	struct pci_bus *bus, struct pci_dev *card, int slot)
 {
drivers/sound/awe_wave.c +23 -0
@@ -4782,6 +4782,29 @@
 	{0,}
 };
 
+static struct isapnp_card_id awe_isa_ids[] __initdata = {
+	{
+		card_vendor: ISAPNP_ANY_ID,
+		card_device: ISAPNP_ANY_ID,
+                devs: { ISAPNP_DEVICE_ID('A', 'W', 'E', 0x0021) }
+	},
+	{
+		card_vendor: ISAPNP_ANY_ID,
+		card_device: ISAPNP_ANY_ID,
+                devs: { ISAPNP_DEVICE_ID('A', 'W', 'E', 0x0022) }
+	},
+	{
+		card_vendor: ISAPNP_ANY_ID,
+		card_device: ISAPNP_ANY_ID,
+                devs: { ISAPNP_DEVICE_ID('A', 'W', 'E', 0x0023) }
+	},
+	{
+		ISAPNP_CARD_END,
+	}
+};
+ISAPNP_CARD_TABLE(awe_isa_ids);
+
+
 static struct pci_dev *idev = NULL;
 
 static int __init awe_probe_isapnp(int *port)
drivers/sound/sb_card.c +292 -0

298 lines not on this page · raw message

drivers/telephony/ixj.c +35 -6

77 lines not on this page · raw message

#1 lore raw
Quoted 5 lines · Adam J. Richter

Note that this is not a "final" version. I plan to go
through all of the changes and bracket all of these new tables with #ifdef MODULE...#endif so they do not result in complaints about the table being defined static and never used in cases where the driver is compiled directly into the kernel.

This is cleaner. Append MODULE_ONLY after __initdata and remove the ifdef. It increases the size of initdata in the kernel, compared to ifdef, but since initdata is promptly reused as scratch space it should not be a problem.

Index: 0-test11.1/include/linux/module.h

include/linux/module.h Sat, 25 Nov 2000 12:40:10 +1100 kaos (linux-2.4/W/33_module.h 1.1.2.1.2.1.2.1.2.1.1.3 644) renamed from include/linux/module.h Sun, 12 Nov 2000 14:59:01 +1100 kaos (linux-2.4/W/33_module.h 1.1.2.1.2.1.2.1.2.1.1.3 644) +2 -0
@@ -261,6 +261,7 @@ extern struct module __this_module;
 #define MOD_INC_USE_COUNT	__MOD_INC_USE_COUNT(THIS_MODULE)
 #define MOD_DEC_USE_COUNT	__MOD_DEC_USE_COUNT(THIS_MODULE)
 #define MOD_IN_USE		__MOD_IN_USE(THIS_MODULE)
+#define MODULE_ONLY		__attribute__ ((unused))
 
 #include <linux/version.h>
 static const char __module_kernel_version[] __attribute__((section(".modinfo"))) =
@@ -286,6 +287,7 @@ static const char __module_using_checksu
 #define MOD_INC_USE_COUNT	do { } while (0)
 #define MOD_DEC_USE_COUNT	do { } while (0)
 #define MOD_IN_USE		1
+#define MODULE_ONLY
 
 extern struct module *module_list;
 

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/

#2 lore raw
Quoted 17 lines · Keith Owens
Quoted 5 lines · Adam J. Richter

Note that this is not a "final" version. I plan to go
through all of the changes and bracket all of these new tables with #ifdef MODULE...#endif so they do not result in complaints about the table being defined static and never used in cases where the driver is compiled directly into the kernel.

This is cleaner. Append MODULE_ONLY after __initdata and remove the ifdef. It increases the size of initdata in the kernel, compared to ifdef, but since initdata is promptly reused as scratch space it should not be a problem.

Index: 0-test11.1/include/linux/module.h

include/linux/module.h Sat, 25 Nov 2000 12:40:10 +1100 kaos (linux-2.4/W/33_module.h 1.1.2.1.2.1.2.1.2.1.1.3 644) extern struct module __this_module; · line 264

Quoted 4 lines
include/linux/module.h Sat, 25 Nov 2000 12:40:10 +1100 kaos (linux-2.4/W/33_module.h 1.1.2.1.2.1.2.1.2.1.1.3 644) renamed from include/linux/module.h Sun, 12 Nov 2000 14:59:01 +1100 kaos (linux-2.4/W/33_module.h 1.1.2.1.2.1.2.1.2.1.1.3 644) +1 -0
@@ -261,6 +261,7 @@ extern struct module __this_module;
 #define MOD_INC_USE_COUNT	__MOD_INC_USE_COUNT(THIS_MODULE)
 #define MOD_DEC_USE_COUNT	__MOD_DEC_USE_COUNT(THIS_MODULE)
 #define MOD_IN_USE		__MOD_IN_USE(THIS_MODULE)
+#define MODULE_ONLY		__attribute__ ((unused))

What about the making MODULE_DEVICE_TABLE reference this table? This has the same disadvantage (i.e. having a little unneeded __initdata in the kernel image), but it wouldn't need the rather ugly MODULE_ONLY macro.

I'ld suggest something like this in module.h, #ifndef MODULE part:

#define MODULE_DEVICE_TABLE(type,name) \

static struct type##_device_id *__dummy_##name \
       __attribute__ ((unused, __section__(".text.exit"))) \
       = name;

This references the table (the variable holding the reference is in text.exit and thus discarded at link time), maybe there's an easier way to accomplish this. This of course smells like a hack, but at least it's hidden away from the drivers ;-)

--Kai

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/