Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
aic7xxx_osm.c File Reference
#include "aic7xxx_osm.h"
#include "aic7xxx_inline.h"
#include <scsi/scsicam.h>
#include <linux/init.h>
#include <linux/mm.h>
#include <linux/blkdev.h>
#include <linux/delay.h>
#include <linux/slab.h>

Go to the source code of this file.

Data Structures

struct  adapter_tag_info_t
 

Macros

#define AIC7XXX_RESET_DELAY   5000
 
#define AIC7XXX_CMDS_PER_DEVICE   AHC_MAX_QUEUE
 
#define AIC7XXX_CONFIGED_TAG_COMMANDS
 
#define DID_UNDERFLOW   DID_ERROR
 
#define BUILD_SCSIID(ahc, cmd)
 

Functions

void ahc_print_path (struct ahc_softc *ahc, struct scb *scb)
 
 MODULE_AUTHOR ("Maintainer: Hannes Reinecke <[email protected]>")
 
 MODULE_DESCRIPTION ("Adaptec AIC77XX/78XX SCSI Host Bus Adapter driver")
 
 MODULE_LICENSE ("Dual BSD/GPL")
 
 MODULE_VERSION (AIC7XXX_DRIVER_VERSION)
 
 module_param (aic7xxx, charp, 0444)
 
 MODULE_PARM_DESC (aic7xxx,"period-delimited options string:\n"" verbose Enable verbose/diagnostic logging\n"" allow_memio Allow device registers to be memory mapped\n"" debug Bitmask of debug values to enable\n"" no_probe Toggle EISA/VLB controller probing\n"" probe_eisa_vl Toggle EISA/VLB controller probing\n"" no_reset Suppress initial bus resets\n"" extended Enable extended geometry on all controllers\n"" periodic_otag Send an ordered tagged transaction\n"" periodically to prevent tag starvation.\n"" This may be required by some older disk\n"" drives or RAID arrays.\n"" tag_info:<tag_str> Set per-target tag depth\n"" global_tag_depth:<int> Global tag depth for every target\n"" on every bus\n"" seltime:<int> Selection Timeout\n"" (0/256ms,1/128ms,2/64ms,3/32ms)\n""\n"" Sample modprobe configuration file:\n"" # Toggle EISA/VLB probing\n"" # Set tag depth on Controller 1/Target 1 to 10 tags\n"" # Shorten the selection timeout to 128ms\n""\n"" options aic7xxx 'aic7xxx=probe_eisa_vl.tag_info:{{}.{.10}}.seltime:1'\n")
 
void ahc_delay (long usec)
 
uint8_t ahc_inb (struct ahc_softc *ahc, long port)
 
void ahc_outb (struct ahc_softc *ahc, long port, uint8_t val)
 
void ahc_outsb (struct ahc_softc *ahc, long port, uint8_t *array, int count)
 
void ahc_insb (struct ahc_softc *ahc, long port, uint8_t *array, int count)
 
int ahc_dma_tag_create (struct ahc_softc *ahc, bus_dma_tag_t parent, bus_size_t alignment, bus_size_t boundary, dma_addr_t lowaddr, dma_addr_t highaddr, bus_dma_filter_t *filter, void *filterarg, bus_size_t maxsize, int nsegments, bus_size_t maxsegsz, int flags, bus_dma_tag_t *ret_tag)
 
void ahc_dma_tag_destroy (struct ahc_softc *ahc, bus_dma_tag_t dmat)
 
int ahc_dmamem_alloc (struct ahc_softc *ahc, bus_dma_tag_t dmat, void **vaddr, int flags, bus_dmamap_t *mapp)
 
void ahc_dmamem_free (struct ahc_softc *ahc, bus_dma_tag_t dmat, void *vaddr, bus_dmamap_t map)
 
int ahc_dmamap_load (struct ahc_softc *ahc, bus_dma_tag_t dmat, bus_dmamap_t map, void *buf, bus_size_t buflen, bus_dmamap_callback_t *cb, void *cb_arg, int flags)
 
void ahc_dmamap_destroy (struct ahc_softc *ahc, bus_dma_tag_t dmat, bus_dmamap_t map)
 
int ahc_dmamap_unload (struct ahc_softc *ahc, bus_dma_tag_t dmat, bus_dmamap_t map)
 
 __setup ("aic7xxx=", aic7xxx_setup)
 
int ahc_linux_register_host (struct ahc_softc *ahc, struct scsi_host_template *template)
 
int ahc_platform_alloc (struct ahc_softc *ahc, void *platform_arg)
 
void ahc_platform_free (struct ahc_softc *ahc)
 
void ahc_platform_freeze_devq (struct ahc_softc *ahc, struct scb *scb)
 
void ahc_platform_set_tags (struct ahc_softc *ahc, struct scsi_device *sdev, struct ahc_devinfo *devinfo, ahc_queue_alg alg)
 
int ahc_platform_abort_scbs (struct ahc_softc *ahc, int target, char channel, int lun, u_int tag, role_t role, uint32_t status)
 
irqreturn_t ahc_linux_isr (int irq, void *dev_id)
 
void ahc_platform_flushwork (struct ahc_softc *ahc)
 
void ahc_send_async (struct ahc_softc *ahc, char channel, u_int target, u_int lun, ac_code code)
 
void ahc_done (struct ahc_softc *ahc, struct scb *scb)
 
void ahc_platform_dump_card_state (struct ahc_softc *ahc)
 
 module_init (ahc_linux_init)
 
 module_exit (ahc_linux_exit)
 

Variables

uint32_t aic7xxx_allow_memio = ~0
 
struct scsi_host_template aic7xxx_driver_template
 
uint32_t aic7xxx_verbose
 

Macro Definition Documentation

#define AIC7XXX_CMDS_PER_DEVICE   AHC_MAX_QUEUE

Definition at line 218 of file aic7xxx_osm.c.

#define AIC7XXX_CONFIGED_TAG_COMMANDS
Value:
{ \
AIC7XXX_CMDS_PER_DEVICE, AIC7XXX_CMDS_PER_DEVICE, \
AIC7XXX_CMDS_PER_DEVICE, AIC7XXX_CMDS_PER_DEVICE, \
AIC7XXX_CMDS_PER_DEVICE, AIC7XXX_CMDS_PER_DEVICE, \
AIC7XXX_CMDS_PER_DEVICE, AIC7XXX_CMDS_PER_DEVICE, \
AIC7XXX_CMDS_PER_DEVICE, AIC7XXX_CMDS_PER_DEVICE, \
AIC7XXX_CMDS_PER_DEVICE, AIC7XXX_CMDS_PER_DEVICE, \
AIC7XXX_CMDS_PER_DEVICE, AIC7XXX_CMDS_PER_DEVICE, \
AIC7XXX_CMDS_PER_DEVICE, AIC7XXX_CMDS_PER_DEVICE \
}

Definition at line 221 of file aic7xxx_osm.c.

#define AIC7XXX_RESET_DELAY   5000

Definition at line 144 of file aic7xxx_osm.c.

#define BUILD_SCSIID (   ahc,
  cmd 
)
Value:
((((cmd)->device->id << TID_SHIFT) & TID) \
| (((cmd)->device->channel == 0) ? (ahc)->our_id : (ahc)->our_id_b) \
| (((cmd)->device->channel == 0) ? 0 : TWIN_CHNLB))

Definition at line 829 of file aic7xxx_osm.c.

#define DID_UNDERFLOW   DID_ERROR

Definition at line 260 of file aic7xxx_osm.c.

Function Documentation

__setup ( )
void ahc_delay ( long  usec)

Definition at line 394 of file aic7xxx_osm.c.

int ahc_dma_tag_create ( struct ahc_softc ahc,
bus_dma_tag_t  parent,
bus_size_t  alignment,
bus_size_t  boundary,
dma_addr_t  lowaddr,
dma_addr_t  highaddr,
bus_dma_filter_t filter,
void filterarg,
bus_size_t  maxsize,
int  nsegments,
bus_size_t  maxsegsz,
int  flags,
bus_dma_tag_t ret_tag 
)

Definition at line 836 of file aic7xxx_osm.c.

void ahc_dma_tag_destroy ( struct ahc_softc ahc,
bus_dma_tag_t  dmat 
)

Definition at line 864 of file aic7xxx_osm.c.

void ahc_dmamap_destroy ( struct ahc_softc ahc,
bus_dma_tag_t  dmat,
bus_dmamap_t  map 
)

Definition at line 906 of file aic7xxx_osm.c.

int ahc_dmamap_load ( struct ahc_softc ahc,
bus_dma_tag_t  dmat,
bus_dmamap_t  map,
void buf,
bus_size_t  buflen,
bus_dmamap_callback_t cb,
void cb_arg,
int  flags 
)

Definition at line 889 of file aic7xxx_osm.c.

int ahc_dmamap_unload ( struct ahc_softc ahc,
bus_dma_tag_t  dmat,
bus_dmamap_t  map 
)

Definition at line 911 of file aic7xxx_osm.c.

int ahc_dmamem_alloc ( struct ahc_softc ahc,
bus_dma_tag_t  dmat,
void **  vaddr,
int  flags,
bus_dmamap_t mapp 
)

Definition at line 870 of file aic7xxx_osm.c.

void ahc_dmamem_free ( struct ahc_softc ahc,
bus_dma_tag_t  dmat,
void vaddr,
bus_dmamap_t  map 
)

Definition at line 881 of file aic7xxx_osm.c.

void ahc_done ( struct ahc_softc ahc,
struct scb scb 
)

Definition at line 1720 of file aic7xxx_osm.c.

uint8_t ahc_inb ( struct ahc_softc ahc,
long  port 
)

Definition at line 409 of file aic7xxx_osm.c.

void ahc_insb ( struct ahc_softc ahc,
long  port,
uint8_t array,
int  count 
)

Definition at line 448 of file aic7xxx_osm.c.

irqreturn_t ahc_linux_isr ( int  irq,
void dev_id 
)

Definition at line 1608 of file aic7xxx_osm.c.

int ahc_linux_register_host ( struct ahc_softc ahc,
struct scsi_host_template template 
)

Definition at line 1097 of file aic7xxx_osm.c.

void ahc_outb ( struct ahc_softc ahc,
long  port,
uint8_t  val 
)

Definition at line 423 of file aic7xxx_osm.c.

void ahc_outsb ( struct ahc_softc ahc,
long  port,
uint8_t array,
int  count 
)

Definition at line 434 of file aic7xxx_osm.c.

int ahc_platform_abort_scbs ( struct ahc_softc ahc,
int  target,
char  channel,
int  lun,
u_int  tag,
role_t  role,
uint32_t  status 
)

Definition at line 1366 of file aic7xxx_osm.c.

int ahc_platform_alloc ( struct ahc_softc ahc,
void platform_arg 
)

Definition at line 1221 of file aic7xxx_osm.c.

void ahc_platform_dump_card_state ( struct ahc_softc ahc)

Definition at line 2359 of file aic7xxx_osm.c.

void ahc_platform_flushwork ( struct ahc_softc ahc)

Definition at line 1622 of file aic7xxx_osm.c.

void ahc_platform_free ( struct ahc_softc ahc)

Definition at line 1240 of file aic7xxx_osm.c.

void ahc_platform_freeze_devq ( struct ahc_softc ahc,
struct scb scb 
)

Definition at line 1274 of file aic7xxx_osm.c.

void ahc_platform_set_tags ( struct ahc_softc ahc,
struct scsi_device sdev,
struct ahc_devinfo devinfo,
ahc_queue_alg  alg 
)

Definition at line 1283 of file aic7xxx_osm.c.

void ahc_print_path ( struct ahc_softc ahc,
struct scb scb 
)

Definition at line 263 of file aic7xxx_osm.c.

void ahc_send_async ( struct ahc_softc ahc,
char  channel,
u_int  target,
u_int  lun,
ac_code  code 
)

Definition at line 1628 of file aic7xxx_osm.c.

MODULE_AUTHOR ( "Maintainer: Hannes Reinecke <[email protected]>"  )
MODULE_DESCRIPTION ( "Adaptec AIC77XX/78XX SCSI Host Bus Adapter driver"  )
module_exit ( ahc_linux_exit  )
module_init ( ahc_linux_init  )
MODULE_LICENSE ( "Dual BSD/GPL"  )
module_param ( aic7xxx  ,
charp  ,
0444   
)
MODULE_PARM_DESC ( aic7xxx  )
MODULE_VERSION ( AIC7XXX_DRIVER_VERSION  )

Variable Documentation

uint32_t aic7xxx_allow_memio = ~0

Definition at line 310 of file aic7xxx_osm.c.

struct scsi_host_template aic7xxx_driver_template
Initial value:
= {
.module = THIS_MODULE,
.name = "aic7xxx",
.proc_name = "aic7xxx",
.proc_info = ahc_linux_proc_info,
.info = ahc_linux_info,
.queuecommand = ahc_linux_queue,
.eh_abort_handler = ahc_linux_abort,
.eh_device_reset_handler = ahc_linux_dev_reset,
.eh_bus_reset_handler = ahc_linux_bus_reset,
.can_queue = AHC_MAX_QUEUE,
.this_id = -1,
.max_sectors = 8192,
.cmd_per_lun = 2,
.use_clustering = ENABLE_CLUSTERING,
.slave_alloc = ahc_linux_slave_alloc,
.slave_configure = ahc_linux_slave_configure,
.target_alloc = ahc_linux_target_alloc,
.target_destroy = ahc_linux_target_destroy,
}

Definition at line 802 of file aic7xxx_osm.c.

uint32_t aic7xxx_verbose

Definition at line 1094 of file aic7xxx_osm.c.