Main Page | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

eesox.c File Reference

#include <linux/module.h>
#include <linux/blk.h>
#include <linux/kernel.h>
#include <linux/string.h>
#include <linux/ioport.h>
#include <linux/sched.h>
#include <linux/proc_fs.h>
#include <linux/unistd.h>
#include <linux/stat.h>
#include <linux/delay.h>
#include <asm/io.h>
#include <asm/irq.h>
#include <asm/dma.h>
#include <asm/ecard.h>
#include <asm/pgtable.h>
#include "../../scsi/sd.h"
#include "../../scsi/hosts.h"
#include "eesox.h"

Include dependency graph for eesox.c:

Go to the source code of this file.

Defines

#define EESOX_XTALFREQ   40
#define EESOX_ASYNC_PERIOD   200
#define EESOX_SYNC_DEPTH   7
#define EESOXSCSI_LIST   { MANU_EESOX, PROD_EESOX_SCSI2 }
#define EESOX_FAS216_OFFSET   0xc00
#define EESOX_FAS216_SHIFT   3
#define EESOX_STATUS   0xa00
#define EESOX_STAT_INTR   0x01
#define EESOX_STAT_DMA   0x02
#define EESOX_CONTROL   0xa00
#define EESOX_INTR_ENABLE   0x04
#define EESOX_TERM_ENABLE   0x02
#define EESOX_RESET   0x01
#define EESOX_DMA_OFFSET   0xe00
#define VER_MAJOR   0
#define VER_MINOR   0
#define VER_PATCH   2

Functions

 MODULE_AUTHOR ("Russell King")
 MODULE_DESCRIPTION ("EESOX SCSI driver")
 MODULE_PARM (term,"1-8i")
 MODULE_PARM_DESC (term,"SCSI bus termination")
static void eesoxscsi_irqenable (struct expansion_card *ec, int irqnr)
static void eesoxscsi_irqdisable (struct expansion_card *ec, int irqnr)
static void eesoxscsi_terminator_ctl (struct Scsi_Host *host, int on_off)
static void eesoxscsi_intr (int irq, void *dev_id, struct pt_regs *regs)
static void eesoxscsi_invalidate (char *addr, long len, fasdmadir_t direction)
static fasdmatype_t eesoxscsi_dma_setup (struct Scsi_Host *host, Scsi_Pointer *SCp, fasdmadir_t direction, fasdmatype_t min_type)
static void eesoxscsi_dma_pseudo (struct Scsi_Host *host, Scsi_Pointer *SCp, fasdmadir_t dir, int transfer_size)
static void eesoxscsi_dma_stop (struct Scsi_Host *host, Scsi_Pointer *SCp)
int eesoxscsi_detect (Scsi_Host_Template *tpnt)
int eesoxscsi_release (struct Scsi_Host *host)
const char * eesoxscsi_info (struct Scsi_Host *host)
static int eesoxscsi_set_proc_info (struct Scsi_Host *host, char *buffer, int length)
int eesoxscsi_proc_info (char *buffer, char **start, off_t offset, int length, int host_no, int inout)

Variables

static struct expansion_cardecs [MAX_ECARDS]
int term [MAX_ECARDS] = { 1, 1, 1, 1, 1, 1, 1, 1 }
static struct proc_dir_entry proc_scsi_eesox
static const expansioncard_ops_t eesoxscsi_ops


Define Documentation

#define EESOX_ASYNC_PERIOD   200
 

Definition at line 43 of file eesox.c.

Referenced by eesoxscsi_detect().

#define EESOX_CONTROL   0xa00
 

Definition at line 58 of file eesox.c.

Referenced by eesoxscsi_detect().

#define EESOX_DMA_OFFSET   0xe00
 

Definition at line 63 of file eesox.c.

Referenced by eesoxscsi_detect().

#define EESOX_FAS216_OFFSET   0xc00
 

Definition at line 51 of file eesox.c.

Referenced by eesoxscsi_detect(), and eesoxscsi_release().

#define EESOX_FAS216_SHIFT   3
 

Definition at line 52 of file eesox.c.

Referenced by eesoxscsi_detect(), and eesoxscsi_release().

#define EESOX_INTR_ENABLE   0x04
 

Definition at line 59 of file eesox.c.

Referenced by eesoxscsi_irqdisable(), and eesoxscsi_irqenable().

#define EESOX_RESET   0x01
 

Definition at line 61 of file eesox.c.

#define EESOX_STAT_DMA   0x02
 

Definition at line 56 of file eesox.c.

Referenced by eesoxscsi_dma_pseudo().

#define EESOX_STAT_INTR   0x01
 

Definition at line 55 of file eesox.c.

Referenced by eesoxscsi_detect(), and eesoxscsi_dma_pseudo().

#define EESOX_STATUS   0xa00
 

Definition at line 54 of file eesox.c.

Referenced by eesoxscsi_detect(), and eesoxscsi_dma_pseudo().

#define EESOX_SYNC_DEPTH   7
 

Definition at line 44 of file eesox.c.

Referenced by eesoxscsi_detect().

#define EESOX_TERM_ENABLE   0x02
 

Definition at line 60 of file eesox.c.

Referenced by eesoxscsi_detect(), eesoxscsi_info(), eesoxscsi_proc_info(), and eesoxscsi_terminator_ctl().

#define EESOX_XTALFREQ   40
 

Definition at line 42 of file eesox.c.

Referenced by eesoxscsi_detect().

#define EESOXSCSI_LIST   { MANU_EESOX, PROD_EESOX_SCSI2 }
 

Definition at line 49 of file eesox.c.

Referenced by eesoxscsi_detect().

#define VER_MAJOR   0
 

Definition at line 68 of file eesox.c.

#define VER_MINOR   0
 

Definition at line 69 of file eesox.c.

#define VER_PATCH   2
 

Definition at line 70 of file eesox.c.


Function Documentation

int eesoxscsi_detect Scsi_Host_Template tpnt  ) 
 

Definition at line 330 of file eesox.c.

References CNTL3_BS8, CNTL3_FASTCLK, CNTL3_FASTSCSI, EESOXScsi_Info::control, control::control, count, FAS216_Info::dma, Scsi_Host::dma_channel, EESOXScsi_Info::dmaarea, ecard_address(), ecard_claim, ECARD_FAST, ecard_find(), ECARD_IOC, ecard_release, ecard_startfind(), EESOX_ASYNC_PERIOD, EESOX_CONTROL, EESOX_DMA_OFFSET, EESOX_FAS216_OFFSET, EESOX_FAS216_SHIFT, EESOX_STAT_INTR, EESOX_STATUS, EESOX_SYNC_DEPTH, EESOX_TERM_ENABLE, EESOX_XTALFREQ, eesoxscsi_dma_pseudo(), eesoxscsi_dma_setup(), eesoxscsi_dma_stop(), eesoxscsi_intr(), EESOXSCSI_LIST, fas216_init(), Scsi_Host::host_no, FAS216_Info::ifcfg, EESOXScsi_Info::info, Scsi_Host::io_port, control::io_port, ioaddr, Scsi_Host::irq, memset, NO_DMA, NO_IRQ, outb, printk, SHT::proc_dir, request_dma(), request_irq(), request_region, SA_INTERRUPT, FAS216_Info::scsi, scsi_register(), and term.

Here is the call graph for this function:

static void eesoxscsi_dma_pseudo struct Scsi_Host host,
Scsi_Pointer SCp,
fasdmadir_t  dir,
int  transfer_size
[static]
 

Definition at line 224 of file eesox.c.

References c, DMA_IN, EESOXScsi_Info::dmaarea, EESOX_STAT_DMA, EESOX_STAT_INTR, EESOX_STATUS, end, inb, inw, Scsi_Host::io_port, l, l1, l2, length(), outw, scsi_pointer::ptr, s, status, and scsi_pointer::this_residual.

Referenced by eesoxscsi_detect().

Here is the call graph for this function:

static fasdmatype_t eesoxscsi_dma_setup struct Scsi_Host host,
Scsi_Pointer SCp,
fasdmadir_t  direction,
fasdmatype_t  min_type
[static]
 

Definition at line 181 of file eesox.c.

References __virt_to_bus, __virt_to_phys, scatterlist::address, dmasg_t::address, buf, scsi_pointer::buffer, scsi_pointer::buffers_residual, disable_dma(), Scsi_Host::dma_channel, DMA_MODE_READ, DMA_MODE_WRITE, DMA_OUT, EESOXScsi_Info::dmasg, eesoxscsi_invalidate(), enable_dma(), fasdma_pseudo, fasdma_real_all, scatterlist::length, dmasg_t::length, NO_DMA, NR_SG, scsi_pointer::ptr, set_dma_mode(), set_dma_sg(), and scsi_pointer::this_residual.

Referenced by eesoxscsi_detect().

Here is the call graph for this function:

static void eesoxscsi_dma_stop struct Scsi_Host host,
Scsi_Pointer SCp
[static]
 

Definition at line 318 of file eesox.c.

References disable_dma(), Scsi_Host::dma_channel, and NO_DMA.

Referenced by eesoxscsi_detect().

Here is the call graph for this function:

const char* eesoxscsi_info struct Scsi_Host host  ) 
 

Definition at line 437 of file eesox.c.

References EESOXScsi_Info::control, control::control, Scsi_Host::dma_channel, EESOX_TERM_ENABLE, Scsi_Host::hostt, EESOXScsi_Info::info, Scsi_Host::io_port, Scsi_Host::irq, SHT::name, NO_DMA, NO_IRQ, p, FAS216_Info::scsi, sprintf(), VER_MAJOR, VER_MINOR, and VER_PATCH.

Here is the call graph for this function:

static void eesoxscsi_intr int  irq,
void *  dev_id,
struct pt_regs regs
[static]
 

Definition at line 156 of file eesox.c.

References fas216_intr().

Referenced by eesoxscsi_detect().

Here is the call graph for this function:

static void eesoxscsi_invalidate char *  addr,
long  len,
fasdmadir_t  direction
[static]
 

Definition at line 164 of file eesox.c.

References dma_cache_inv, dma_cache_wback, and DMA_OUT.

Referenced by eesoxscsi_dma_setup().

static void eesoxscsi_irqdisable struct expansion_card ec,
int  irqnr
[static]
 

Definition at line 110 of file eesox.c.

References control::control, EESOX_INTR_ENABLE, control::io_port, expansion_card::irq_data, and outb.

static void eesoxscsi_irqenable struct expansion_card ec,
int  irqnr
[static]
 

Definition at line 95 of file eesox.c.

References control::control, EESOX_INTR_ENABLE, control::io_port, expansion_card::irq_data, and outb.

int eesoxscsi_proc_info char *  buffer,
char **  start,
off_t  offset,
int  length,
int  host_no,
int  inout
 

Definition at line 509 of file eesox.c.

References EESOXScsi_Info::control, control::control, Scsi_Host::dma_channel, EESOX_TERM_ENABLE, eesoxscsi_set_proc_info(), Scsi_Host::host_no, Scsi_Host::host_queue, EESOXScsi_Info::info, Scsi_Host::io_port, Scsi_Host::irq, len, Scsi_Host::next, pos, proc_print_scsidevice(), FAS216_Info::scsi, scsi_hostlist, sprintf(), FAS216_Info::stats, VER_MAJOR, VER_MINOR, and VER_PATCH.

Here is the call graph for this function:

int eesoxscsi_release struct Scsi_Host host  ) 
 

Definition at line 413 of file eesox.c.

References Scsi_Host::dma_channel, ecard_address(), ECARD_FAST, ECARD_IOC, ecard_release, EESOX_FAS216_OFFSET, EESOX_FAS216_SHIFT, fas216_release(), free_dma(), free_irq(), i, Scsi_Host::io_port, Scsi_Host::irq, MAX_ECARDS, NO_DMA, NO_IRQ, and release_region.

Here is the call graph for this function:

static int eesoxscsi_set_proc_info struct Scsi_Host host,
char *  buffer,
int  length
[static]
 

Definition at line 473 of file eesox.c.

References eesoxscsi_terminator_ctl(), EINVAL, ret, and strncmp().

Referenced by eesoxscsi_proc_info().

Here is the call graph for this function:

static void eesoxscsi_terminator_ctl struct Scsi_Host host,
int  on_off
[static]
 

Definition at line 134 of file eesox.c.

References control::control, EESOXScsi_Info::control, EESOX_TERM_ENABLE, control::io_port, outb, restore_flags, and save_flags_cli.

Referenced by eesoxscsi_set_proc_info().

MODULE_AUTHOR "Russell King"   ) 
 

MODULE_DESCRIPTION "EESOX SCSI driver  ) 
 

MODULE_PARM term  ,
"1-8i" 
 

MODULE_PARM_DESC term  ,
"SCSI bus termination" 
 


Variable Documentation

struct expansion_card* ecs[MAX_ECARDS] [static]
 

Definition at line 72 of file eesox.c.

const expansioncard_ops_t eesoxscsi_ops [static]
 

Initial value:

Definition at line 119 of file eesox.c.

struct proc_dir_entry proc_scsi_eesox [static]
 

Initial value:

 {
        PROC_SCSI_QLOGICISP, 5, "eesox",
        S_IFDIR | S_IRUGO | S_IXUGO, 2
}

Definition at line 84 of file eesox.c.

int term[MAX_ECARDS] = { 1, 1, 1, 1, 1, 1, 1, 1 }
 

Definition at line 82 of file eesox.c.