Skip to contentSkip to conversation

make ide driver compilable as kernel module (2.6.0)

PATCH In review Lothar Wassmann 2 participants 2 messages Jan 8, 2004

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

PATCH 1/1 make ide driver compilable as kernel module (2.6.0)

Hi,

the following patch enables building the ide driver as a kernel
module:
(BTW: the MAINTAINERS file lists '[email protected]' as
the maintainers email address, while all the source files say: '<[email protected]>')

drivers/block/ll_rw_blk.c +1 -0
@@ -144,6 +144,7 @@
 	q->activity_fn = fn;
 	q->activity_data = data;
 }
+EXPORT_SYMBOL(blk_queue_activity_fn);
 
 /**
  * blk_queue_prep_rq - set a prepare_request function for queue
drivers/ide/Makefile +5 -1
@@ -12,7 +12,8 @@
 
 # Core IDE code - must come before legacy
 
-obj-$(CONFIG_BLK_DEV_IDE)		+= ide-io.o ide-probe.o ide-iops.o ide-taskfile.o ide.o ide-lib.o ide-default.o
+ide-mod-objs = ide-io.o ide-iops.o ide-taskfile.o ide.o ide-lib.o ide-default.o
+obj-$(CONFIG_BLK_DEV_IDE)		+= ide-mod.o ide-probe.o
 obj-$(CONFIG_BLK_DEV_IDEDISK)		+= ide-disk.o
 obj-$(CONFIG_BLK_DEV_IDECD)		+= ide-cd.o
 obj-$(CONFIG_BLK_DEV_IDETAPE)		+= ide-tape.o
@@ -23,6 +24,9 @@
 obj-$(CONFIG_BLK_DEV_IDE_TCQ)		+= ide-tcq.o
 obj-$(CONFIG_BLK_DEV_IDEPNP)		+= ide-pnp.o
 
+ifeq ($(CONFIG_BLK_DEV_IDE),m)
+ide-mod-objs				+= ide-proc.o
+endif
 ifeq ($(CONFIG_BLK_DEV_IDE),y)
 obj-$(CONFIG_PROC_FS)			+= ide-proc.o
 endif
drivers/ide/ide-default.c +1 -0
@@ -48,6 +48,7 @@
 	.attach		=	idedefault_attach,
 	.drives		=	LIST_HEAD_INIT(idedefault_driver.drives)
 };
+EXPORT_SYMBOL(idedefault_driver);
 
 static int idedefault_attach (ide_drive_t *drive)
 {
drivers/ide/ide-io.c +1 -0
@@ -975,6 +975,7 @@
 {
 	ide_do_request(q->queuedata, IDE_NO_IRQ);
 }
+EXPORT_SYMBOL(do_ide_request);
 
 /*
  * un-busy the hwgroup etc, and clear any pending DMA status. we want to
drivers/ide/ide.c +2 -0
@@ -176,6 +176,7 @@
 static int initializing;	/* set while initializing built-in drivers */
 
 DECLARE_MUTEX(ide_cfg_sem);
+EXPORT_SYMBOL(ide_cfg_sem);
 spinlock_t ide_lock __cacheline_aligned_in_smp = SPIN_LOCK_UNLOCKED;
 
 #ifdef CONFIG_BLK_DEV_IDEPCI
@@ -1436,6 +1437,7 @@
 	if (drive->media != ide_disk)
 		ide_add_setting(drive,	"ide-scsi",		SETTING_RW,					-1,		HDIO_SET_IDE_SCSI,		TYPE_BYTE,	0,	1,				1,		1,		&drive->scsi,			ide_atapi_to_scsi);
 }
+EXPORT_SYMBOL(ide_add_generic_settings);
 
 /*
  * Delay for *at least* 50ms.  As we don't know how much time is left
#1 lore raw
Quoted 1 line · Lothar Wassmann

Hi,

Hi,

Quoted 2 lines

the following patch enables building the ide driver as a kernel module:

It makes them compile, but such modules won't work correctly for some cases. It should be fixed similarly as in 2.4.23 (IIRC), I've tried to (patch was posted on lkml but without [PATCH] in the subject), but was reported that it doesn't work. This issue requires more work (please read archives for details).

Quoted 3 lines

(BTW: the MAINTAINERS file lists '[email protected]' as
the maintainers email address, while all the source files say:
'<[email protected]>') --- linux-2.6.0/drivers/block/ll_rw_blk.c 17 Dec

Both work currently. Please use [email protected], [email protected] is just a forward.

--bart