Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions | Variables
acornscsi.c File Reference
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/string.h>
#include <linux/signal.h>
#include <linux/errno.h>
#include <linux/proc_fs.h>
#include <linux/ioport.h>
#include <linux/blkdev.h>
#include <linux/delay.h>
#include <linux/interrupt.h>
#include <linux/init.h>
#include <linux/bitops.h>
#include <linux/stringify.h>
#include <linux/io.h>
#include <asm/ecard.h>
#include "../scsi.h"
#include <scsi/scsi_dbg.h>
#include <scsi/scsi_host.h>
#include <scsi/scsi_transport_spi.h>
#include "acornscsi.h"
#include "msgqueue.h"
#include "scsi.h"
#include <scsi/scsicam.h>

Go to the source code of this file.

Data Structures

struct  sync_xfer_tbl
 

Macros

#define DEBUG_NO_WRITE   1
 
#define DEBUG_QUEUES   2
 
#define DEBUG_DMA   4
 
#define DEBUG_ABORT   8
 
#define DEBUG_DISCON   16
 
#define DEBUG_CONNECT   32
 
#define DEBUG_PHASES   64
 
#define DEBUG_WRITE   128
 
#define DEBUG_LINK   256
 
#define DEBUG_MESSAGES   512
 
#define DEBUG_RESET   1024
 
#define DEBUG_ALL
 
#define SDTR_SIZE   12
 
#define SDTR_PERIOD   125
 
#define DEFAULT_PERIOD   500
 
#define DEBUG   (DEBUG_RESET|DEBUG_WRITE|DEBUG_NO_WRITE)
 
#define NO_WRITE   0xFE
 
#define TIMEOUT_TIME   10
 
#define USE_DMAC
 
#define DBG(cmd, xxx...)   xxx
 
#define VER_MAJOR   2
 
#define VER_MINOR   0
 
#define VER_PATCH   6
 
#define ABORT_TAG   0xd
 
#define INIT_DEVCON0   (DEVCON0_RQL|DEVCON0_EXW|DEVCON0_CMP)
 
#define INIT_DEVCON1   (DEVCON1_BHLD)
 
#define DMAC_READ   (MODECON_READ)
 
#define DMAC_WRITE   (MODECON_WRITE)
 
#define INIT_SBICDMA   (CTRL_DMABURST)
 
#define scsi_xferred   have_data_in
 
#define DMAC_BUFFER_SIZE   65536
 
#define STATUS_BUFFER_TO_PRINT   24
 
#define SBIC_REGIDX   0x2000
 
#define SBIC_REGVAL   0x2004
 
#define DMAC_OFFSET   0x3000
 
#define INT_REG   0x2000
 
#define PAGE_REG   0x3000
 
#define sbic_arm_writenext(host, val)   writeb((val), (host)->base + SBIC_REGVAL)
 
#define sbic_arm_readnext(host)   readb((host)->base + SBIC_REGVAL)
 
#define dmac_read(host, reg)   readb((host)->base + DMAC_OFFSET + ((reg) << 2))
 
#define dmac_write(host, reg, value)   ({ writeb((value), (host)->base + DMAC_OFFSET + ((reg) << 2)); })
 
#define dmac_clearintr(host)   writeb(0, (host)->fast + INT_REG)
 

Enumerations

enum  res_abort { res_not_running, res_success, res_success_clear, res_snooze }
 

Functions

int acornscsi_abort (struct scsi_cmnd *SCpnt)
 
int acornscsi_bus_reset (struct scsi_cmnd *SCpnt)
 
const characornscsi_info (struct Scsi_Host *host)
 
int acornscsi_proc_info (struct Scsi_Host *instance, char *buffer, char **start, off_t offset, int length, int inout)
 
 module_init (acornscsi_init)
 
 module_exit (acornscsi_exit)
 
 MODULE_AUTHOR ("Russell King")
 
 MODULE_DESCRIPTION ("AcornSCSI driver")
 
 MODULE_LICENSE ("GPL")
 

Variables

unsigned int sdtr_period = SDTR_PERIOD
 
unsigned int sdtr_size = SDTR_SIZE
 

Macro Definition Documentation

#define ABORT_TAG   0xd

Definition at line 158 of file acornscsi.c.

#define DBG (   cmd,
  xxx... 
)    xxx

Definition at line 123 of file acornscsi.c.

#define DEBUG   (DEBUG_RESET|DEBUG_WRITE|DEBUG_NO_WRITE)

Definition at line 91 of file acornscsi.c.

#define DEBUG_ABORT   8

Definition at line 34 of file acornscsi.c.

#define DEBUG_ALL
Value:

Definition at line 42 of file acornscsi.c.

#define DEBUG_CONNECT   32

Definition at line 36 of file acornscsi.c.

#define DEBUG_DISCON   16

Definition at line 35 of file acornscsi.c.

#define DEBUG_DMA   4

Definition at line 33 of file acornscsi.c.

#define DEBUG_LINK   256

Definition at line 39 of file acornscsi.c.

#define DEBUG_MESSAGES   512

Definition at line 40 of file acornscsi.c.

#define DEBUG_NO_WRITE   1

Definition at line 31 of file acornscsi.c.

#define DEBUG_PHASES   64

Definition at line 37 of file acornscsi.c.

#define DEBUG_QUEUES   2

Definition at line 32 of file acornscsi.c.

#define DEBUG_RESET   1024

Definition at line 41 of file acornscsi.c.

#define DEBUG_WRITE   128

Definition at line 38 of file acornscsi.c.

#define DEFAULT_PERIOD   500

Definition at line 82 of file acornscsi.c.

#define DMAC_BUFFER_SIZE   65536

Definition at line 182 of file acornscsi.c.

#define dmac_clearintr (   host)    writeb(0, (host)->fast + INT_REG)

Definition at line 233 of file acornscsi.c.

#define DMAC_OFFSET   0x3000

Definition at line 203 of file acornscsi.c.

#define DMAC_READ   (MODECON_READ)

Definition at line 173 of file acornscsi.c.

#define dmac_read (   host,
  reg 
)    readb((host)->base + DMAC_OFFSET + ((reg) << 2))

Definition at line 227 of file acornscsi.c.

#define DMAC_WRITE   (MODECON_WRITE)

Definition at line 174 of file acornscsi.c.

#define dmac_write (   host,
  reg,
  value 
)    ({ writeb((value), (host)->base + DMAC_OFFSET + ((reg) << 2)); })

Definition at line 230 of file acornscsi.c.

#define INIT_DEVCON0   (DEVCON0_RQL|DEVCON0_EXW|DEVCON0_CMP)

Definition at line 171 of file acornscsi.c.

#define INIT_DEVCON1   (DEVCON1_BHLD)

Definition at line 172 of file acornscsi.c.

#define INIT_SBICDMA   (CTRL_DMABURST)

Definition at line 175 of file acornscsi.c.

#define INT_REG   0x2000

Definition at line 206 of file acornscsi.c.

#define NO_WRITE   0xFE

Definition at line 93 of file acornscsi.c.

#define PAGE_REG   0x3000

Definition at line 207 of file acornscsi.c.

#define sbic_arm_readnext (   host)    readb((host)->base + SBIC_REGVAL)

Definition at line 224 of file acornscsi.c.

#define sbic_arm_writenext (   host,
  val 
)    writeb((val), (host)->base + SBIC_REGVAL)

Definition at line 223 of file acornscsi.c.

#define SBIC_REGIDX   0x2000

Definition at line 201 of file acornscsi.c.

#define SBIC_REGVAL   0x2004

Definition at line 202 of file acornscsi.c.

#define scsi_xferred   have_data_in

Definition at line 177 of file acornscsi.c.

#define SDTR_PERIOD   125

Definition at line 81 of file acornscsi.c.

#define SDTR_SIZE   12

Definition at line 80 of file acornscsi.c.

#define STATUS_BUFFER_TO_PRINT   24

Definition at line 185 of file acornscsi.c.

#define TIMEOUT_TIME   10

Definition at line 101 of file acornscsi.c.

#define USE_DMAC

Definition at line 111 of file acornscsi.c.

#define VER_MAJOR   2

Definition at line 153 of file acornscsi.c.

#define VER_MINOR   0

Definition at line 154 of file acornscsi.c.

#define VER_PATCH   6

Definition at line 155 of file acornscsi.c.

Enumeration Type Documentation

enum res_abort
Enumerator:
res_not_running 
res_success 
res_success_clear 
res_snooze 

Definition at line 2590 of file acornscsi.c.

Function Documentation

int acornscsi_abort ( struct scsi_cmnd SCpnt)

Definition at line 2690 of file acornscsi.c.

int acornscsi_bus_reset ( struct scsi_cmnd SCpnt)

Definition at line 2770 of file acornscsi.c.

const char* acornscsi_info ( struct Scsi_Host host)

Definition at line 2815 of file acornscsi.c.

int acornscsi_proc_info ( struct Scsi_Host instance,
char buffer,
char **  start,
off_t  offset,
int  length,
int  inout 
)

Definition at line 2839 of file acornscsi.c.

MODULE_AUTHOR ( "Russell King"  )
MODULE_DESCRIPTION ( "AcornSCSI driver )
module_exit ( acornscsi_exit  )
module_init ( acornscsi_init  )
MODULE_LICENSE ( "GPL"  )

Variable Documentation

unsigned int sdtr_period = SDTR_PERIOD

Definition at line 187 of file acornscsi.c.

unsigned int sdtr_size = SDTR_SIZE

Definition at line 188 of file acornscsi.c.