Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Functions
wd7000.c File Reference
#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")
 

Macro Definition Documentation

#define ASC_COMMAND   0 /* Command, Write */

Definition at line 342 of file wd7000.c.

#define ASC_CONTROL   2 /* Control, Write */

Definition at line 345 of file wd7000.c.

#define ASC_INIT   0x10 /* ASC Initialized Flag */

Definition at line 353 of file wd7000.c.

#define ASC_INTR_ACK   1 /* Acknowledge, Write */

Definition at line 344 of file wd7000.c.

#define ASC_INTR_STAT   1 /* Interrupt Status, Read */

Definition at line 343 of file wd7000.c.

#define ASC_RES   0x01 /* ASC Reset */

Definition at line 415 of file wd7000.c.

#define ASC_STAT   0 /* Status, Read */

Definition at line 341 of file wd7000.c.

#define ASC_STATMASK   0xf0 /* The lower 4 Bytes are reserved */

Definition at line 354 of file wd7000.c.

#define BUS_OFF   15 /* x 125ns = 1875ns (BIOS default) */

Definition at line 293 of file wd7000.c.

#define BUS_ON   64 /* x 125ns = 8000ns (BIOS default) */

Definition at line 292 of file wd7000.c.

#define CMD_RDY   0x40 /* Command Port Ready */

Definition at line 351 of file wd7000.c.

#define CMD_REJ   0x20 /* Command Port Byte Rejected */

Definition at line 352 of file wd7000.c.

#define DISABLE_UNS_INTR   2 /* disable unsolicited interrupts */

Definition at line 367 of file wd7000.c.

#define DMA_EN   0x04 /* DMA Enable */

Definition at line 413 of file wd7000.c.

#define dprintk (   format,
  args... 
)

Definition at line 195 of file wd7000.c.

#define ENABLE_UNS_INTR   3 /* enable unsolicited interrupts */

Definition at line 368 of file wd7000.c.

#define HARD_RESET_ACK   6 /* SCSI bus hard reset acknowledge */

Definition at line 371 of file wd7000.c.

#define ICB_DIAG_DMA   2 /* DMA - system memory diags */

Definition at line 554 of file wd7000.c.

#define ICB_DIAG_FULL   3 /* do both 1 & 2 */

Definition at line 555 of file wd7000.c.

#define ICB_DIAG_POWERUP   0 /* Power-up diags only */

Definition at line 552 of file wd7000.c.

#define ICB_DIAG_WALKING   1 /* walking 1's pattern */

Definition at line 553 of file wd7000.c.

#define ICB_OP_DIAGNOSTICS   0x8D /* execute diagnostics */

Definition at line 495 of file wd7000.c.

#define ICB_OP_GET_EPARMS   0x8F /* read execution parameters */

Definition at line 497 of file wd7000.c.

#define ICB_OP_GET_REVISION   0x8C /* read firmware revision level */

Definition at line 494 of file wd7000.c.

#define ICB_OP_GET_UMASK   0x8B /* read unsolicited interrupt mask */

Definition at line 493 of file wd7000.c.

#define ICB_OP_MASK   0x80 /* distinguishes scbs from icbs */

Definition at line 482 of file wd7000.c.

#define ICB_OP_OPEN_RBUF   0x80 /* open receive buffer */

Definition at line 483 of file wd7000.c.

#define ICB_OP_READ_ID   0x89 /* read adapter's SCSI ID */

Definition at line 491 of file wd7000.c.

#define ICB_OP_READ_INIT   0x88 /* read initialization bytes */

Definition at line 490 of file wd7000.c.

#define ICB_OP_RECV_CMD   0x81 /* receive command from initiator */

Definition at line 484 of file wd7000.c.

#define ICB_OP_RECV_DATA   0x82 /* receive data from initiator */

Definition at line 485 of file wd7000.c.

#define ICB_OP_RECV_SDATA   0x83 /* receive data with status from init. */

Definition at line 486 of file wd7000.c.

#define ICB_OP_SEND_DATA   0x84 /* send data with status to initiator */

Definition at line 487 of file wd7000.c.

#define ICB_OP_SEND_STAT   0x86 /* send command status to initiator */

Definition at line 488 of file wd7000.c.

#define ICB_OP_SET_EPARMS   0x8E /* set execution parameters */

Definition at line 496 of file wd7000.c.

#define ICB_OP_SET_UMASK   0x8A /* set unsolicited interrupt mask */

Definition at line 492 of file wd7000.c.

#define ICMB_CNT   32

Definition at line 205 of file wd7000.c.

#define IMB_INTR   0x40 /* 1 Incoming / 0 Outgoing */

Definition at line 406 of file wd7000.c.

#define INITIALIZATION   1 /* initialization (10 bytes) */

Definition at line 366 of file wd7000.c.

#define INT_EN   0x08 /* Interrupt Enable */

Definition at line 412 of file wd7000.c.

#define INT_IM   0x80 /* Interrupt Image Flag */

Definition at line 350 of file wd7000.c.

#define INTR_ON_FREE_OGMB   4 /* interrupt on free OGMB */

Definition at line 369 of file wd7000.c.

#define MAX_SCBS   32

Definition at line 214 of file wd7000.c.

#define MB_INTR   0xC0 /* Mailbox Service possible/required */

Definition at line 405 of file wd7000.c.

#define MB_MASK   0x3f /* mask for mailbox number */

Definition at line 407 of file wd7000.c.

#define NO_OP   0 /* NO-OP toggles CMD_RDY bit in ASC_STAT */

Definition at line 365 of file wd7000.c.

#define NUM_ADDRS   ARRAY_SIZE(wd7000_biosaddr)

Definition at line 268 of file wd7000.c.

#define NUM_CONFIGS   ARRAY_SIZE(configs)

Definition at line 318 of file wd7000.c.

#define NUM_DMAS   ARRAY_SIZE(wd7000_dma)

Definition at line 282 of file wd7000.c.

#define NUM_IOPORTS   ARRAY_SIZE(wd7000_iobase)

Definition at line 276 of file wd7000.c.

#define NUM_IRQS   ARRAY_SIZE(wd7000_irq)

Definition at line 279 of file wd7000.c.

#define NUM_SIGNATURES   ARRAY_SIZE(signatures)

Definition at line 334 of file wd7000.c.

#define OGMB_CNT   16

Definition at line 204 of file wd7000.c.

#define SCAN_OGMBS   0xc0 /* start multiple commands, signature (n) */

Definition at line 373 of file wd7000.c.

#define SCSI_RES   0x02 /* SCSI Reset */

Definition at line 414 of file wd7000.c.

#define SOFT_RESET   5 /* SCSI bus soft reset */

Definition at line 370 of file wd7000.c.

#define SPRINTF (   args...)    { if (pos < (buffer + length)) pos += sprintf (pos, ## args); }

Definition at line 1299 of file wd7000.c.

#define START_OGMB   0x80 /* start command in OGMB (n) */

Definition at line 372 of file wd7000.c.

#define UNITS   8

Definition at line 289 of file wd7000.c.

#define WAITnexttimeout   200 /* 2 seconds */

Definition at line 759 of file wd7000.c.

#define wd7000_intr_ack (   host)    outb (0, host->iobase + ASC_INTR_ACK)

Definition at line 996 of file wd7000.c.

#define WD7000_Q   16

Definition at line 227 of file wd7000.c.

#define WD7000_SG   16

Definition at line 228 of file wd7000.c.

Typedef Documentation

typedef union icb Icb
typedef struct icbAny IcbAny
typedef struct scb Scb
typedef struct sgb Sgb

Definition at line 114 of file ntlmssp.h.

Function Documentation

__setup ( )
MODULE_AUTHOR ( "Thomas  Wuensche,
John  Boyd,
Miroslav Zagorac"   
)
MODULE_DESCRIPTION ( "Driver for the WD7000 series ISA controllers"  )
MODULE_LICENSE ( "GPL"  )