Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Enumerations | Functions
NCR53c406a.c File Reference
#include <linux/module.h>
#include <linux/errno.h>
#include <linux/ioport.h>
#include <linux/interrupt.h>
#include <linux/proc_fs.h>
#include <linux/stat.h>
#include <linux/init.h>
#include <linux/bitops.h>
#include <asm/io.h>
#include <asm/dma.h>
#include <asm/irq.h>
#include <linux/blkdev.h>
#include <linux/spinlock.h>
#include "scsi.h"
#include <scsi/scsi_host.h>
#include "scsi_module.c"

Go to the source code of this file.

Macros

#define NCR53C406A_DEBUG   0
 
#define VERBOSE_NCR53C406A_DEBUG   0
 
#define USE_PIO   1
 
#define USE_BIOS   0
 
#define DMA_CHAN   5 /* this is ignored if DMA is disabled */
 
#define USE_FAST_PIO   1
 
#define WATCHDOG   5000000
 
#define SYNC_MODE   0 /* Synchronous transfer mode */
 
#define USE_DMA   0
 
#define C1_IMG   0x07 /* ID=7 */
 
#define C2_IMG   0x48 /* FE SCSI2 */
 
#define C3_IMG   0x20 /* CDB */
 
#define C4_IMG   0x04 /* ANE */
 
#define C5_IMG   0xb6 /* AA PI SIE POL */
 
#define REG0   (outb(C4_IMG, CONFIG4))
 
#define REG1   (outb(C5_IMG, CONFIG5))
 
#define DEB(x)
 
#define VDEB(x)
 
#define LOAD_DMA_COUNT(count)
 
#define DMA_OP   0x80
 
#define SCSI_NOP   0x00
 
#define FLUSH_FIFO   0x01
 
#define CHIP_RESET   0x02
 
#define SCSI_RESET   0x03
 
#define RESELECT   0x40
 
#define SELECT_NO_ATN   0x41
 
#define SELECT_ATN   0x42
 
#define SELECT_ATN_STOP   0x43
 
#define ENABLE_SEL   0x44
 
#define DISABLE_SEL   0x45
 
#define SELECT_ATN3   0x46
 
#define RESELECT3   0x47
 
#define TRANSFER_INFO   0x10
 
#define INIT_CMD_COMPLETE   0x11
 
#define MSG_ACCEPT   0x12
 
#define TRANSFER_PAD   0x18
 
#define SET_ATN   0x1a
 
#define RESET_ATN   0x1b
 
#define SEND_MSG   0x20
 
#define SEND_STATUS   0x21
 
#define SEND_DATA   0x22
 
#define DISCONN_SEQ   0x23
 
#define TERMINATE_SEQ   0x24
 
#define TARG_CMD_COMPLETE   0x25
 
#define DISCONN   0x27
 
#define RECV_MSG   0x28
 
#define RECV_CMD   0x29
 
#define RECV_DATA   0x2a
 
#define RECV_CMD_SEQ   0x2b
 
#define TARGET_ABORT_DMA   0x04
 
#define rtrc(i)   {}
 
#define PORT_COUNT   ARRAY_SIZE(ports)
 
#define INTR_COUNT   ARRAY_SIZE(intrs)
 

Enumerations

enum  Phase {
  idle, data_out, data_in, command_ph,
  status_ph, message_out, message_in, idle,
  data_out, data_in, command_ph, status_ph,
  message_out, message_in
}
 

Functions

 __setup ("ncr53c406a=", NCR53c406a_setup)
 
 MODULE_LICENSE ("GPL")
 

Macro Definition Documentation

#define C1_IMG   0x07 /* ID=7 */

Definition at line 76 of file NCR53c406a.c.

#define C2_IMG   0x48 /* FE SCSI2 */

Definition at line 77 of file NCR53c406a.c.

#define C3_IMG   0x20 /* CDB */

Definition at line 81 of file NCR53c406a.c.

#define C4_IMG   0x04 /* ANE */

Definition at line 83 of file NCR53c406a.c.

#define C5_IMG   0xb6 /* AA PI SIE POL */

Definition at line 84 of file NCR53c406a.c.

#define CHIP_RESET   0x02

Definition at line 111 of file NCR53c406a.c.

#define DEB (   x)

Definition at line 92 of file NCR53c406a.c.

#define DISABLE_SEL   0x45

Definition at line 118 of file NCR53c406a.c.

#define DISCONN   0x27

Definition at line 133 of file NCR53c406a.c.

#define DISCONN_SEQ   0x23

Definition at line 130 of file NCR53c406a.c.

#define DMA_CHAN   5 /* this is ignored if DMA is disabled */

Definition at line 32 of file NCR53c406a.c.

#define DMA_OP   0x80

Definition at line 107 of file NCR53c406a.c.

#define ENABLE_SEL   0x44

Definition at line 117 of file NCR53c406a.c.

#define FLUSH_FIFO   0x01

Definition at line 110 of file NCR53c406a.c.

#define INIT_CMD_COMPLETE   0x11

Definition at line 122 of file NCR53c406a.c.

#define INTR_COUNT   ARRAY_SIZE(intrs)

Definition at line 225 of file NCR53c406a.c.

#define LOAD_DMA_COUNT (   count)
Value:
outb(count & 0xff, TC_LSB); \
outb((count >> 8) & 0xff, TC_MSB); \
outb((count >> 16) & 0xff, TC_HIGH);

Definition at line 101 of file NCR53c406a.c.

#define MSG_ACCEPT   0x12

Definition at line 123 of file NCR53c406a.c.

#define NCR53C406A_DEBUG   0

Definition at line 22 of file NCR53c406a.c.

#define PORT_COUNT   ARRAY_SIZE(ports)

Definition at line 220 of file NCR53c406a.c.

#define RECV_CMD   0x29

Definition at line 135 of file NCR53c406a.c.

#define RECV_CMD_SEQ   0x2b

Definition at line 137 of file NCR53c406a.c.

#define RECV_DATA   0x2a

Definition at line 136 of file NCR53c406a.c.

#define RECV_MSG   0x28

Definition at line 134 of file NCR53c406a.c.

#define REG0   (outb(C4_IMG, CONFIG4))

Definition at line 86 of file NCR53c406a.c.

#define REG1   (outb(C5_IMG, CONFIG5))

Definition at line 87 of file NCR53c406a.c.

#define RESELECT   0x40

Definition at line 113 of file NCR53c406a.c.

#define RESELECT3   0x47

Definition at line 120 of file NCR53c406a.c.

#define RESET_ATN   0x1b

Definition at line 126 of file NCR53c406a.c.

#define rtrc (   i)    {}

Definition at line 155 of file NCR53c406a.c.

#define SCSI_NOP   0x00

Definition at line 109 of file NCR53c406a.c.

#define SCSI_RESET   0x03

Definition at line 112 of file NCR53c406a.c.

#define SELECT_ATN   0x42

Definition at line 115 of file NCR53c406a.c.

#define SELECT_ATN3   0x46

Definition at line 119 of file NCR53c406a.c.

#define SELECT_ATN_STOP   0x43

Definition at line 116 of file NCR53c406a.c.

#define SELECT_NO_ATN   0x41

Definition at line 114 of file NCR53c406a.c.

#define SEND_DATA   0x22

Definition at line 129 of file NCR53c406a.c.

#define SEND_MSG   0x20

Definition at line 127 of file NCR53c406a.c.

#define SEND_STATUS   0x21

Definition at line 128 of file NCR53c406a.c.

#define SET_ATN   0x1a

Definition at line 125 of file NCR53c406a.c.

#define SYNC_MODE   0 /* Synchronous transfer mode */

Definition at line 62 of file NCR53c406a.c.

#define TARG_CMD_COMPLETE   0x25

Definition at line 132 of file NCR53c406a.c.

#define TARGET_ABORT_DMA   0x04

Definition at line 138 of file NCR53c406a.c.

#define TERMINATE_SEQ   0x24

Definition at line 131 of file NCR53c406a.c.

#define TRANSFER_INFO   0x10

Definition at line 121 of file NCR53c406a.c.

#define TRANSFER_PAD   0x18

Definition at line 124 of file NCR53c406a.c.

#define USE_BIOS   0

Definition at line 28 of file NCR53c406a.c.

#define USE_DMA   0

Definition at line 70 of file NCR53c406a.c.

#define USE_FAST_PIO   1

Definition at line 36 of file NCR53c406a.c.

#define USE_PIO   1

Definition at line 26 of file NCR53c406a.c.

#define VDEB (   x)

Definition at line 98 of file NCR53c406a.c.

#define VERBOSE_NCR53C406A_DEBUG   0

Definition at line 23 of file NCR53c406a.c.

#define WATCHDOG   5000000

Definition at line 60 of file NCR53c406a.c.

Enumeration Type Documentation

enum Phase
Enumerator:
idle 
data_out 
data_in 
command_ph 
status_ph 
message_out 
message_in 
idle 
data_out 
data_in 
command_ph 
status_ph 
message_out 
message_in 

Definition at line 159 of file NCR53c406a.c.

Function Documentation

__setup ( )
MODULE_LICENSE ( "GPL"  )