lkml.org 
[lkml]   [2000]   [Feb]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject2.2.14 patch to rebuild /proc/ide tree when PCMCIA card is inserted/removed
Date
I took a look at RedHat's 6.2beta PCMCIA installer disk image, and noted that
installer could not detect IDE/PCMCIA devices (in my case, a CDROM).

Problem: the installer scans /proc/ide to find CD-ROM devices, but /proc/ide
tree is not updated when IDE/PCMCIA module is insmod'ed, althrough it found the
device (as can be seen at log messages etc.) and the PCMCIA device /dev/hd[x]
works.

So I made a patch to kernel's ide.c functions: ide_register and ide_unregister,
they will destroy & rebuild the proc/ide tree when invoked by someone (that
will be probably a PCMCIA or parallel driver module or so.)

I would like that IDE people evaluate the solution I took, maybe there is a
better way to do it.

--- linux-2.2.14.old/drivers/block/ide.c Wed Feb 23 21:04:55 2000
+++ linux-2.2.14/drivers/block/ide.c Wed Feb 23 21:05:33 2000
@@ -1887,6 +1887,10 @@
kfree(gd);
}
init_hwif_data (index); /* restore hwif data to pristine status */
+#ifdef CONFIG_PROC_FS
+ proc_ide_destroy();
+ proc_ide_create();
+#endif
abort:
restore_flags(flags); /* all CPUs */
}
@@ -1924,6 +1928,10 @@
hwif->noprobe = 0;
ide_init_module(IDE_PROBE_MODULE);
ide_init_module(IDE_DRIVER_MODULE);
+#ifdef CONFIG_PROC_FS
+ proc_ide_destroy();
+ proc_ide_create();
+#endif
return hwif->present ? index : -1;
}

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:56    [W:0.034 / U:0.544 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site