Skip to contentSkip to conversation

Modular IDE completely broken

PATCH In review Taral 4 participants 6 messages Jun 1, 2003 – Jun 2, 2003 PCI

lore
Share & tools
lore

Taral

author
#0 lore raw

PATCH 1/1 Modular IDE completely broken

I've submitted this patch before, but I think it got ignored. This makes modular IDE at least compile and removes the circular dependencies.

If there's a reason this patch isn't being applied (it's crappy, someone else is working on this problem already, etc.), _please_ tell me!

Signature · 4 lines
Taral <[email protected]>
This message is digitally signed. Please PGP encrypt mail to me.
"Most parents have better things to do with their time than take care of
their children." -- Me
drivers/ide/Makefile +11 -7
diff -Nru a/drivers/ide/Makefile b/drivers/ide/Makefile
@@ -12,19 +12,23 @@
 
 # Core IDE code - must come before legacy
 
-obj-$(CONFIG_BLK_DEV_IDE)		+= ide-io.o ide-probe.o ide-geometry.o ide-iops.o ide-taskfile.o ide.o ide-lib.o ide-default.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
 obj-$(CONFIG_BLK_DEV_IDEFLOPPY)		+= ide-floppy.o
 
-obj-$(CONFIG_BLK_DEV_IDEPCI)		+= setup-pci.o
-obj-$(CONFIG_BLK_DEV_IDEDMA_PCI)	+= ide-dma.o
-obj-$(CONFIG_BLK_DEV_IDE_TCQ)		+= ide-tcq.o
-obj-$(CONFIG_BLK_DEV_IDEPNP)		+= ide-pnp.o
-
+ide-mod-y					:= ide-probe.o ide-io.o ide-geometry.o ide-iops.o ide-taskfile.o ide.o ide-lib.o ide-default.o
+ide-mod-n					:=
+ide-mod-$(CONFIG_PROC_FS)			+= ide-proc.o
+ide-mod-$(CONFIG_BLK_DEV_IDEPCI)		+= setup-pci.o
+ide-mod-$(CONFIG_BLK_DEV_IDEDMA_PCI)	+= ide-dma.o
+ide-mod-$(CONFIG_BLK_DEV_IDE_TCQ)		+= ide-tcq.o
+ide-mod-$(CONFIG_BLK_DEV_IDEPNP)		+= ide-pnp.o
 ifeq ($(CONFIG_BLK_DEV_IDE),y)
-obj-$(CONFIG_PROC_FS)			+= ide-proc.o
+obj-y += $(ide-mod-y)
+endif
+ifeq ($(CONFIG_BLK_DEV_IDE),m)
+obj-m += ide-mod.o
 endif
 
 obj-$(CONFIG_BLK_DEV_IDE)		+= legacy/ ppc/ arm/
drivers/ide/ide-default.c +0 -4
diff -Nru a/drivers/ide/ide-default.c b/drivers/ide/ide-default.c
@@ -65,7 +65,3 @@
 	}
 	return 0;
 }
-
-MODULE_DESCRIPTION("IDE Default Driver");
-
-MODULE_LICENSE("GPL");
drivers/ide/ide-geometry.c +3 -1
diff -Nru a/drivers/ide/ide-geometry.c b/drivers/ide/ide-geometry.c
@@ -2,6 +2,7 @@
  * linux/drivers/ide/ide-geometry.c
  */
 #include <linux/config.h>
+#include <linux/module.h>
 #include <linux/ide.h>
 #include <linux/mc146818rtc.h>
 #include <asm/io.h>
@@ -69,7 +70,7 @@
  * Returns 1 if the geometry translation was successful.
  */
 
-int ide_xlate_1024 (struct block_device *bdev, int xparm, int ptheads, const char *msg)
+int ide_xlate_1024(struct block_device *bdev, int xparm, int ptheads, const char *msg)
 {
 	ide_drive_t *drive = bdev->bd_disk->private_data;
 	const char *msg1 = "";
@@ -133,3 +134,4 @@
 		       drive->bios_cyl, drive->bios_head, drive->bios_sect);
 	return ret;
 }
+EXPORT_SYMBOL(ide_xlate_1024);
drivers/ide/ide-io.c +1 -11
diff -Nru a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c
@@ -577,7 +577,7 @@
  *	FIXME: this function needs a rename
  */
  
-ide_startstop_t start_request (ide_drive_t *drive, struct request *rq)
+static ide_startstop_t start_request (ide_drive_t *drive, struct request *rq)
 {
 	ide_startstop_t startstop;
 	unsigned long block;
@@ -633,8 +633,6 @@
 	return ide_stopped;
 }
 
-EXPORT_SYMBOL(start_request);
-
 /**
  *	ide_stall_queue		-	pause an IDE device
  *	@drive: drive to stall
@@ -867,14 +865,6 @@
 }
 
 EXPORT_SYMBOL(ide_do_request);
-
-/*
- * Passes the stuff to ide_do_request
- */
-void do_ide_request(request_queue_t *q)
-{
-	ide_do_request(q->queuedata, IDE_NO_IRQ);
-}
 
 /*
  * un-busy the hwgroup etc, and clear any pending DMA status. we want to
drivers/ide/ide-probe.c +9 -46

97 lines not on this page · raw message

drivers/ide/ide.c +3 -2
diff -Nru a/drivers/ide/ide.c b/drivers/ide/ide.c
@@ -178,6 +178,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;
 
 static int ide_scan_direction; /* THIS was formerly 2.2.x pci=reverse */
@@ -1366,6 +1367,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
@@ -2196,7 +2198,6 @@
 	 */
 	probe_for_hwifs ();
 
-#ifdef CONFIG_BLK_DEV_IDE
 	if (ide_hwifs[0].io_ports[IDE_DATA_OFFSET])
 		ide_get_lock(NULL, NULL); /* for atari only */
 
@@ -2204,7 +2205,6 @@
 
 	if (ide_hwifs[0].io_ports[IDE_DATA_OFFSET])
 		ide_release_lock();	/* for atari only */
-#endif /* CONFIG_BLK_DEV_IDE */
 
 #ifdef CONFIG_PROC_FS
 	proc_ide_create();
@@ -2467,6 +2467,7 @@
 struct bus_type ide_bus_type = {
 	.name		= "ide",
 };
+EXPORT_SYMBOL(ide_bus_type);
 
 /*
  * This is gets invoked once during initialization, to set *everything* up
drivers/pci/pci.c +1 -0
diff -Nru a/drivers/pci/pci.c b/drivers/pci/pci.c
@@ -736,6 +736,7 @@
 EXPORT_SYMBOL(isa_bridge);
 #endif
 
+EXPORT_SYMBOL(pci_enable_device_bars);
 EXPORT_SYMBOL(pci_enable_device);
 EXPORT_SYMBOL(pci_disable_device);
 EXPORT_SYMBOL(pci_max_busnr);
#1 lore raw
Quoted 7 lines

[[email protected]]

I've submitted this patch before, but I think it got ignored. This makes modular IDE at least compile and removes the circular dependencies.

If there's a reason this patch isn't being applied (it's crappy, someone else is working on this problem already, etc.), _please_ tell me!

Alan Cox is working on the problem ATM, check 2.4.21-rc6-ac1.

Signature · 1 line
Tomas Szepe <[email protected]>
author
#2 lore raw
Quoted 9 lines · Tomas Szepe
Quoted 7 lines

[[email protected]]

I've submitted this patch before, but I think it got ignored. This makes modular IDE at least compile and removes the circular dependencies.

If there's a reason this patch isn't being applied (it's crappy, someone else is working on this problem already, etc.), _please_ tell me!

Alan Cox is working on the problem ATM, check 2.4.21-rc6-ac1.

Is this work for 2.5 as well? My patch is against 2.5.69.

Signature · 4 lines
Taral <[email protected]>
This message is digitally signed. Please PGP encrypt mail to me.
"Most parents have better things to do with their time than take care of
their children." -- Me
#3 lore raw
Quoted 6 lines · Taral
Quoted 5 lines · Tomas Szepe
Quoted 5 lines

[[email protected]]

I've submitted this patch before, but I think it got ignored. This makes modular IDE at least compile and removes the circular dependencies.

Quoted 6 lines
Quoted 4 lines
Quoted 2 lines

If there's a reason this patch isn't being applied (it's crappy, someone else is working on this problem already, etc.), _please_ tell me!

Alan Cox is working on the problem ATM, check 2.4.21-rc6-ac1.

Is this work for 2.5 as well? My patch is against 2.5.69.

The same logic applies to 2.5, and it may be more useful there as it can be used to clean up a pile of other ordering stuff

#4 lore raw
In reply to Taral

On Sun, 1 Jun 2003 00:54:14 -0500 Taral <[email protected]> wrote:

| I've submitted this patch before, but I think it got ignored. This makes
| modular IDE at least compile and removes the circular dependencies.
| 
| If there's a reason this patch isn't being applied (it's crappy, someone
| else is working on this problem already, etc.), _please_ tell me!

What kernel version is this [was attached] patch for?

It's probably clear to some people, but stating that explicitly sure would be Good.

--
~Randy

author
#5 lore raw
Quoted 8 lines · Randy.Dunlap

On Sun, 1 Jun 2003 00:54:14 -0500 Taral <[email protected]> wrote:

| I've submitted this patch before, but I think it got ignored. This makes
| modular IDE at least compile and removes the circular dependencies.
| 
| If there's a reason this patch isn't being applied (it's crappy, someone
| else is working on this problem already, etc.), _please_ tell me!
Quoted 4 lines

What kernel version is this [was attached] patch for?

It's probably clear to some people, but stating that explicitly sure would be Good.

2.5.69

Signature · 4 lines
Taral <[email protected]>
This message is digitally signed. Please PGP encrypt mail to me.
"Most parents have better things to do with their time than take care of
their children." -- Me