lkml.org 
[lkml]   [1998]   [Jul]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Date
Subjectlinux-2.1.111 patch: modularized ps2esdi driver, please test

Does anyone out there have PS/2 ESDI machine running 2.1?
If so, I invite you to test the attached patch that modularizes
ps/2 esdi hard disk support.

This is the last hardware block device driver in the linux
2.1.111 to be modularized. With this change, and the larger networking
device driver modularization patch for which I posted a URL minutes
ago, the only unmodularized hardware block, character or network device
drivers in the 2.1.111 kernel are for the VGA console with PC
keyboard, and some miscellaneous stuff that needs to be present
earlier in the boot process than when kernel modules can be loaded
(for example, the Advanced Power Management).

A number of simple pseudo-device drivers remain unmodularized
because they are either too trivial to be worth modularizing (/dev/mem,
/dev/kmem, /dev/null, /dev/zero, etc.) or are referenced by the
built in drivers (/dev/random).

Modularizing of the ps2esdi driver is especially
significant because it basically is the "golden spike" for a
hardware independent kernel binary. Now many users can run the
same kernel binary and have an initial ramdisk load just load
whatever modules they need for booting. I believe that this
will contribute greatly to the ease of use of Linux systems.

With that said, I have attached the patch below. Please test
this if you happen to be using the applicable hardware.

Adam J. Richter __ ______________ 4880 Stevens Creek Blvd, Suite 205
adam@yggdrasil.com \ / 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."
---------------------------CUT HERE---------------------------------

--- /tmp/linux-2.1.111/drivers/block/Config.in Fri Jul 24 11:34:07 1998
+++ linux/drivers/block/Config.in Tue Jul 28 00:28:03 1998
@@ -57,7 +57,7 @@
fi
fi
if [ "$CONFIG_MCA" = "y" ]; then
- bool 'PS/2 ESDI hard disk support' CONFIG_BLK_DEV_PS2
+ tristate 'PS/2 ESDI hard disk support' CONFIG_BLK_DEV_PS2
fi

comment 'Additional Block Devices'
--- /tmp/linux-2.1.111/drivers/block/ps2esdi.c Wed May 6 10:56:08 1998
+++ linux/drivers/block/ps2esdi.c Tue Jul 28 00:28:11 1998
@@ -197,6 +197,46 @@

} /* ps2esdi_init */

+#ifdef MODULE
+
+int cyl[2] = {-1,-1};
+int head[2] = {-1, -1};
+int sect[2] = {-1, -1};
+
+MODULE_PARM(tp720esdi, "i");
+MODULE_PARM(cyl, "i");
+MODULE_PARM(head, "i");
+MODULE_PARM(track, "i");
+
+int init_module(void) {
+ int drive;
+
+ for(drive = 0; drive <= 1; drive++) {
+ struct ps2_esdi_i_struct *info = &ps2esdi_info[drive];
+
+ if (cyl[drive] != -1) {
+ info->cyl = info->lzone = cyl[drive];
+ info->wpcom = 0;
+ }
+ if (head[drive] != -1) {
+ info->head = head[drive];
+ info->ctl = (head[drive] > 8 ? 8 : 0);
+ }
+ if (sect[drive] != -1) info->sect = sect[drive];
+ }
+ return ps2esdi_init();
+}
+
+void
+cleanup_module(void)
+{
+ release_region(io_base, 4);
+ free_dma(dma_arb_level);
+ free_irq(PS2ESDI_IRQ, NULL)
+ unregister_blkdev(MAJOR_NR, "ed");
+}
+#endif /* MODULE */
+
/* handles boot time command line parameters */
__initfunc(void tp720_setup(char *str, int *ints))
{
@@ -382,6 +422,9 @@
}
for (i = 0; i < (MAX_HD << 6); i++)
ps2esdi_blocksizes[i] = 1024;
+
+ request_dma(dma_arb_level, "ed");
+ request_region(io_base, 4, "ed");
blksize_size[MAJOR_NR] = ps2esdi_blocksizes;
} /* ps2esdi_geninit */

-
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.altern.org/andrebalsa/doc/lkml-faq.html

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