/* * Qlogic FAS408 ISA card driver * * Copyright 1994, Tom Zerucha. * tz@execpc.com * * Redistributable under terms of the GNU General Public License * * For the avoidance of doubt the "preferred form" of this code is one which * is in an open non patent encumbered format. Where cryptographic key signing * forms part of the process of creating an executable the information * including keys needed to generate an equivalently functional executable * are deemed to be part of the source code. * * Check qlogicfas408.c for more credits and info.
*/
#include <linux/module.h> #include <linux/blkdev.h> /* to get disk capacity */ #include <linux/kernel.h> #include <linux/string.h> #include <linux/init.h> #include <linux/interrupt.h> #include <linux/ioport.h> #include <linux/proc_fs.h> #include <linux/unistd.h> #include <linux/spinlock.h> #include <linux/stat.h>
/* Set the following to 2 to use normal interrupt (active high/totempole- * tristate), otherwise use 0 (REQUIRED FOR PCMCIA) for active low, open * drain
*/ #define INT_TYPE 2
staticchar qlogicfas_name[] = "qlogicfas";
/* * Look for qlogic card and init if found
*/
staticstruct Scsi_Host *__qlogicfas_detect(struct scsi_host_template *host, int qbase, int qlirq)
{ int qltyp; /* type of chip */ int qinitid; struct Scsi_Host *hreg; /* registered host structure */ struct qlogicfas408_priv *priv;
/* Qlogic Cards only exist at 0x230 or 0x330 (the chip itself * decodes the address - I check 230 first since MIDI cards are * typically at 0x330 * * Theoretically, two Qlogic cards can coexist in the same system. * This should work by simply using this as a loadable module for * the second card, but I haven't tested this.
*/
if (!qbase || qlirq == -1) goto err;
if (!request_region(qbase, 0x10, qlogicfas_name)) {
printk(KERN_INFO "%s: address %#x is busy\n", qlogicfas_name,
qbase); goto err;
}
if (!qlogicfas408_detect(qbase, INT_TYPE)) {
printk(KERN_WARNING "%s: probe failed for %#x\n",
qlogicfas_name,
qbase); goto err_release_mem;
}
printk(KERN_INFO "%s: Using preset base address of %03x," " IRQ %d\n", qlogicfas_name, qbase, qlirq);
qltyp = qlogicfas408_get_chip_type(qbase, INT_TYPE);
qinitid = host->this_id; if (qinitid < 0)
qinitid = 7; /* if no ID, use 7 */
static __init int qlogicfas_init(void)
{ if (!qlogicfas_detect(&qlogicfas_driver_template)) { /* no cards found */
printk(KERN_INFO "%s: no cards were found, please specify " "I/O address and IRQ using iobase= and irq= " "options", qlogicfas_name); return -ENODEV;
}
MODULE_AUTHOR("Tom Zerucha, Michael Griffith");
MODULE_DESCRIPTION("Driver for the Qlogic FAS408 based ISA card");
MODULE_LICENSE("GPL");
module_init(qlogicfas_init);
module_exit(qlogicfas_exit);
Messung V0.5
¤ Dauer der Verarbeitung: 0.11 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.