|
Linux Kernel
3.7.1
|
#include <linux/delay.h>#include <linux/module.h>#include <linux/interrupt.h>#include <linux/kernel.h>#include <linux/types.h>#include <linux/string.h>#include <linux/spinlock.h>#include <linux/ioport.h>#include <linux/proc_fs.h>#include <linux/blkdev.h>#include <linux/init.h>#include <linux/stat.h>#include <linux/io.h>#include <asm/dma.h>#include <scsi/scsi.h>#include <scsi/scsi_cmnd.h>#include <scsi/scsi_device.h>#include <scsi/scsi_host.h>#include <scsi/scsicam.h>#include "scsi_module.c"Go to the source code of this file.
Data Structures | |
| struct | mailbox |
| struct | adapter |
| struct | Config |
| struct | signature |
| struct | initCmd |
| struct | sgb |
| struct | scb |
| struct | icbRecvCmd |
| struct | icbSendStat |
| struct | icbRevLvl |
| struct | icbUnsMask |
| struct | icbDiag |
| struct | icbParms |
| struct | icbAny |
| union | icb |
Macros | |
| #define | dprintk(format, args...) |
| #define | OGMB_CNT 16 |
| #define | ICMB_CNT 32 |
| #define | MAX_SCBS 32 |
| #define | WD7000_Q 16 |
| #define | WD7000_SG 16 |
| #define | NUM_ADDRS ARRAY_SIZE(wd7000_biosaddr) |
| #define | NUM_IOPORTS ARRAY_SIZE(wd7000_iobase) |
| #define | NUM_IRQS ARRAY_SIZE(wd7000_irq) |
| #define | NUM_DMAS ARRAY_SIZE(wd7000_dma) |
| #define | UNITS 8 |
| #define | BUS_ON 64 /* x 125ns = 8000ns (BIOS default) */ |
| #define | BUS_OFF 15 /* x 125ns = 1875ns (BIOS default) */ |
| #define | NUM_CONFIGS ARRAY_SIZE(configs) |
| #define | NUM_SIGNATURES ARRAY_SIZE(signatures) |
| #define | ASC_STAT 0 /* Status, Read */ |
| #define | ASC_COMMAND 0 /* Command, Write */ |
| #define | ASC_INTR_STAT 1 /* Interrupt Status, Read */ |
| #define | ASC_INTR_ACK 1 /* Acknowledge, Write */ |
| #define | ASC_CONTROL 2 /* Control, Write */ |
| #define | INT_IM 0x80 /* Interrupt Image Flag */ |
| #define | CMD_RDY 0x40 /* Command Port Ready */ |
| #define | CMD_REJ 0x20 /* Command Port Byte Rejected */ |
| #define | ASC_INIT 0x10 /* ASC Initialized Flag */ |
| #define | ASC_STATMASK 0xf0 /* The lower 4 Bytes are reserved */ |
| #define | NO_OP 0 /* NO-OP toggles CMD_RDY bit in ASC_STAT */ |
| #define | INITIALIZATION 1 /* initialization (10 bytes) */ |
| #define | DISABLE_UNS_INTR 2 /* disable unsolicited interrupts */ |
| #define | ENABLE_UNS_INTR 3 /* enable unsolicited interrupts */ |
| #define | INTR_ON_FREE_OGMB 4 /* interrupt on free OGMB */ |
| #define | SOFT_RESET 5 /* SCSI bus soft reset */ |
| #define | HARD_RESET_ACK 6 /* SCSI bus hard reset acknowledge */ |
| #define | START_OGMB 0x80 /* start command in OGMB (n) */ |
| #define | SCAN_OGMBS 0xc0 /* start multiple commands, signature (n) */ |
| #define | MB_INTR 0xC0 /* Mailbox Service possible/required */ |
| #define | IMB_INTR 0x40 /* 1 Incoming / 0 Outgoing */ |
| #define | MB_MASK 0x3f /* mask for mailbox number */ |
| #define | INT_EN 0x08 /* Interrupt Enable */ |
| #define | DMA_EN 0x04 /* DMA Enable */ |
| #define | SCSI_RES 0x02 /* SCSI Reset */ |
| #define | ASC_RES 0x01 /* ASC Reset */ |
| #define | ICB_OP_MASK 0x80 /* distinguishes scbs from icbs */ |
| #define | ICB_OP_OPEN_RBUF 0x80 /* open receive buffer */ |
| #define | ICB_OP_RECV_CMD 0x81 /* receive command from initiator */ |
| #define | ICB_OP_RECV_DATA 0x82 /* receive data from initiator */ |
| #define | ICB_OP_RECV_SDATA 0x83 /* receive data with status from init. */ |
| #define | ICB_OP_SEND_DATA 0x84 /* send data with status to initiator */ |
| #define | ICB_OP_SEND_STAT 0x86 /* send command status to initiator */ |
| #define | ICB_OP_READ_INIT 0x88 /* read initialization bytes */ |
| #define | ICB_OP_READ_ID 0x89 /* read adapter's SCSI ID */ |
| #define | ICB_OP_SET_UMASK 0x8A /* set unsolicited interrupt mask */ |
| #define | ICB_OP_GET_UMASK 0x8B /* read unsolicited interrupt mask */ |
| #define | ICB_OP_GET_REVISION 0x8C /* read firmware revision level */ |
| #define | ICB_OP_DIAGNOSTICS 0x8D /* execute diagnostics */ |
| #define | ICB_OP_SET_EPARMS 0x8E /* set execution parameters */ |
| #define | ICB_OP_GET_EPARMS 0x8F /* read execution parameters */ |
| #define | ICB_DIAG_POWERUP 0 /* Power-up diags only */ |
| #define | ICB_DIAG_WALKING 1 /* walking 1's pattern */ |
| #define | ICB_DIAG_DMA 2 /* DMA - system memory diags */ |
| #define | ICB_DIAG_FULL 3 /* do both 1 & 2 */ |
| #define | WAITnexttimeout 200 /* 2 seconds */ |
| #define | wd7000_intr_ack(host) outb (0, host->iobase + ASC_INTR_ACK) |
| #define | SPRINTF(args...) { if (pos < (buffer + length)) pos += sprintf (pos, ## args); } |
Typedefs | |
| typedef struct mailbox | Mailbox |
| typedef struct adapter | Adapter |
| typedef struct signature | Signature |
| typedef struct initCmd | InitCmd |
| typedef struct sgb | Sgb |
| typedef struct scb | Scb |
| typedef struct icbRecvCmd | IcbRecvCmd |
| typedef struct icbSendStat | IcbSendStat |
| typedef struct icbRevLvl | IcbRevLvl |
| typedef struct icbUnsMask | IcbUnsMask |
| typedef struct icbDiag | IcbDiag |
| typedef struct icbParms | IcbParms |
| typedef struct icbAny | IcbAny |
| typedef union icb | Icb |
Functions | |
| __setup ("wd7000=", wd7000_setup) | |
| MODULE_AUTHOR ("Thomas Wuensche, John Boyd, Miroslav Zagorac") | |
| MODULE_DESCRIPTION ("Driver for the WD7000 series ISA controllers") | |
| MODULE_LICENSE ("GPL") | |
| #define ASC_STATMASK 0xf0 /* The lower 4 Bytes are reserved */ |
| #define DISABLE_UNS_INTR 2 /* disable unsolicited interrupts */ |
| #define ENABLE_UNS_INTR 3 /* enable unsolicited interrupts */ |
| #define ICB_OP_GET_EPARMS 0x8F /* read execution parameters */ |
| #define ICB_OP_GET_REVISION 0x8C /* read firmware revision level */ |
| #define ICB_OP_GET_UMASK 0x8B /* read unsolicited interrupt mask */ |
| #define ICB_OP_MASK 0x80 /* distinguishes scbs from icbs */ |
| #define ICB_OP_READ_INIT 0x88 /* read initialization bytes */ |
| #define ICB_OP_RECV_CMD 0x81 /* receive command from initiator */ |
| #define ICB_OP_RECV_DATA 0x82 /* receive data from initiator */ |
| #define ICB_OP_RECV_SDATA 0x83 /* receive data with status from init. */ |
| #define ICB_OP_SEND_DATA 0x84 /* send data with status to initiator */ |
| #define ICB_OP_SEND_STAT 0x86 /* send command status to initiator */ |
| #define ICB_OP_SET_EPARMS 0x8E /* set execution parameters */ |
| #define ICB_OP_SET_UMASK 0x8A /* set unsolicited interrupt mask */ |
| #define MB_INTR 0xC0 /* Mailbox Service possible/required */ |
| #define NUM_ADDRS ARRAY_SIZE(wd7000_biosaddr) |
| #define NUM_CONFIGS ARRAY_SIZE(configs) |
| #define NUM_DMAS ARRAY_SIZE(wd7000_dma) |
| #define NUM_IOPORTS ARRAY_SIZE(wd7000_iobase) |
| #define NUM_IRQS ARRAY_SIZE(wd7000_irq) |
| #define NUM_SIGNATURES ARRAY_SIZE(signatures) |
| #define SCAN_OGMBS 0xc0 /* start multiple commands, signature (n) */ |
| #define wd7000_intr_ack | ( | host | ) | outb (0, host->iobase + ASC_INTR_ACK) |
| typedef struct icbRecvCmd IcbRecvCmd |
| typedef struct icbSendStat IcbSendStat |
| typedef struct icbUnsMask IcbUnsMask |
| __setup | ( | ) |
| MODULE_AUTHOR | ( | "Thomas | Wuensche, |
| John | Boyd, | ||
| Miroslav Zagorac" | |||
| ) |
| MODULE_LICENSE | ( | "GPL" | ) |
1.8.2