Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Enumerations | Functions
aic79xx_core.c File Reference
#include <dev/aic7xxx/aic79xx_osm.h>
#include <dev/aic7xxx/aic79xx_inline.h>
#include <dev/aic7xxx/aicasm/aicasm_insformat.h>
#include "aic79xx_seq.h"

Go to the source code of this file.

Data Structures

struct  ahd_hard_error_entry
 

Macros

#define AHD_ASSERT_MODES(ahd, source, dest)   ahd_assert_modes(ahd, source, dest, __FILE__, __LINE__);
 
#define AHD_RUN_QOUTFIFO   0x1
 
#define AHD_RUN_TQINFIFO   0x2
 
#define AHD_MAX_STEPS   2000
 
#define ahd_timer_init   init_timer
 
#define ahd_timer_stop   del_timer_sync
 

Typedefs

typedef void ahd_linux_callback_t (u_long)
 

Enumerations

enum  ahd_msgtype { AHDMSG_1B, AHDMSG_2B, AHDMSG_EXT }
 

Functions

void ahd_set_modes (struct ahd_softc *ahd, ahd_mode src, ahd_mode dst)
 
ahd_mode_state ahd_save_modes (struct ahd_softc *ahd)
 
void ahd_restore_modes (struct ahd_softc *ahd, ahd_mode_state state)
 
int ahd_is_paused (struct ahd_softc *ahd)
 
void ahd_pause (struct ahd_softc *ahd)
 
void ahd_unpause (struct ahd_softc *ahd)
 
voidahd_sg_setup (struct ahd_softc *ahd, struct scb *scb, void *sgptr, dma_addr_t addr, bus_size_t len, int last)
 
void ahd_sync_sglist (struct ahd_softc *ahd, struct scb *scb, int op)
 
struct ahd_initiator_tinfoahd_fetch_transinfo (struct ahd_softc *ahd, char channel, u_int our_id, u_int remote_id, struct ahd_tmode_tstate **tstate)
 
uint16_t ahd_inw (struct ahd_softc *ahd, u_int port)
 
void ahd_outw (struct ahd_softc *ahd, u_int port, u_int value)
 
uint32_t ahd_inl (struct ahd_softc *ahd, u_int port)
 
void ahd_outl (struct ahd_softc *ahd, u_int port, uint32_t value)
 
uint64_t ahd_inq (struct ahd_softc *ahd, u_int port)
 
void ahd_outq (struct ahd_softc *ahd, u_int port, uint64_t value)
 
u_int ahd_get_scbptr (struct ahd_softc *ahd)
 
void ahd_set_scbptr (struct ahd_softc *ahd, u_int scbptr)
 
u_int ahd_inb_scbram (struct ahd_softc *ahd, u_int offset)
 
u_int ahd_inw_scbram (struct ahd_softc *ahd, u_int offset)
 
struct scbahd_lookup_scb (struct ahd_softc *ahd, u_int tag)
 
void ahd_queue_scb (struct ahd_softc *ahd, struct scb *scb)
 
int ahd_intr (struct ahd_softc *ahd)
 
void ahd_find_syncrate (struct ahd_softc *ahd, u_int *period, u_int *ppr_options, u_int maxsync)
 
int ahd_update_neg_request (struct ahd_softc *ahd, struct ahd_devinfo *devinfo, struct ahd_tmode_tstate *tstate, struct ahd_initiator_tinfo *tinfo, ahd_neg_type neg_type)
 
void ahd_set_syncrate (struct ahd_softc *ahd, struct ahd_devinfo *devinfo, u_int period, u_int offset, u_int ppr_options, u_int type, int paused)
 
void ahd_set_width (struct ahd_softc *ahd, struct ahd_devinfo *devinfo, u_int width, u_int type, int paused)
 
void ahd_print_devinfo (struct ahd_softc *ahd, struct ahd_devinfo *devinfo)
 
void ahd_compile_devinfo (struct ahd_devinfo *devinfo, u_int our_id, u_int target, u_int lun, char channel, role_t role)
 
struct ahd_softcahd_alloc (void *platform_arg, char *name)
 
int ahd_softc_init (struct ahd_softc *ahd)
 
void ahd_set_unit (struct ahd_softc *ahd, int unit)
 
void ahd_set_name (struct ahd_softc *ahd, char *name)
 
void ahd_free (struct ahd_softc *ahd)
 
int ahd_reset (struct ahd_softc *ahd, int reinit)
 
struct scbahd_get_scb (struct ahd_softc *ahd, u_int col_idx)
 
void ahd_free_scb (struct ahd_softc *ahd, struct scb *scb)
 
void ahd_controller_info (struct ahd_softc *ahd, char *buf)
 
int ahd_init (struct ahd_softc *ahd)
 
int ahd_default_config (struct ahd_softc *ahd)
 
int ahd_parse_cfgdata (struct ahd_softc *ahd, struct seeprom_config *sc)
 
int ahd_parse_vpddata (struct ahd_softc *ahd, struct vpd_config *vpd)
 
void ahd_intr_enable (struct ahd_softc *ahd, int enable)
 
void ahd_pause_and_flushwork (struct ahd_softc *ahd)
 
void ahd_qinfifo_requeue_tail (struct ahd_softc *ahd, struct scb *scb)
 
int ahd_search_qinfifo (struct ahd_softc *ahd, int target, char channel, int lun, u_int tag, role_t role, uint32_t status, ahd_search_action action)
 
int ahd_reset_channel (struct ahd_softc *ahd, char channel, int initiate_reset)
 
int ahd_print_register (const ahd_reg_parse_entry_t *table, u_int num_entries, const char *name, u_int address, u_int value, u_int *cur_column, u_int wrap_point)
 
void ahd_dump_card_state (struct ahd_softc *ahd)
 
int ahd_read_seeprom (struct ahd_softc *ahd, uint16_t *buf, u_int start_addr, u_int count, int bytestream)
 
int ahd_write_seeprom (struct ahd_softc *ahd, uint16_t *buf, u_int start_addr, u_int count)
 
int ahd_verify_cksum (struct seeprom_config *sc)
 
int ahd_acquire_seeprom (struct ahd_softc *ahd)
 
void ahd_release_seeprom (struct ahd_softc *ahd)
 
int ahd_write_flexport (struct ahd_softc *ahd, u_int addr, u_int value)
 
int ahd_read_flexport (struct ahd_softc *ahd, u_int addr, uint8_t *value)
 

Macro Definition Documentation

#define AHD_ASSERT_MODES (   ahd,
  source,
  dest 
)    ahd_assert_modes(ahd, source, dest, __FILE__, __LINE__);

Definition at line 329 of file aic79xx_core.c.

#define AHD_MAX_STEPS   2000

Definition at line 3440 of file aic79xx_core.c.

#define AHD_RUN_QOUTFIFO   0x1

Definition at line 920 of file aic79xx_core.c.

#define AHD_RUN_TQINFIFO   0x2

Definition at line 921 of file aic79xx_core.c.

#define ahd_timer_init   init_timer

Definition at line 7042 of file aic79xx_core.c.

#define ahd_timer_stop   del_timer_sync

Definition at line 7043 of file aic79xx_core.c.

Typedef Documentation

typedef void ahd_linux_callback_t(u_long)

Definition at line 7044 of file aic79xx_core.c.

Enumeration Type Documentation

Enumerator:
AHDMSG_1B 
AHDMSG_2B 
AHDMSG_EXT 

Definition at line 154 of file aic79xx_core.c.

Function Documentation

int ahd_acquire_seeprom ( struct ahd_softc ahd)

Definition at line 10188 of file aic79xx_core.c.

struct ahd_softc* ahd_alloc ( void platform_arg,
char name 
)
read

Definition at line 6072 of file aic79xx_core.c.

void ahd_compile_devinfo ( struct ahd_devinfo devinfo,
u_int  our_id,
u_int  target,
u_int  lun,
char  channel,
role_t  role 
)

Definition at line 4363 of file aic79xx_core.c.

void ahd_controller_info ( struct ahd_softc ahd,
char buf 
)

Definition at line 7004 of file aic79xx_core.c.

int ahd_default_config ( struct ahd_softc ahd)

Definition at line 7633 of file aic79xx_core.c.

void ahd_dump_card_state ( struct ahd_softc ahd)

Definition at line 9729 of file aic79xx_core.c.

struct ahd_initiator_tinfo* ahd_fetch_transinfo ( struct ahd_softc ahd,
char  channel,
u_int  our_id,
u_int  remote_id,
struct ahd_tmode_tstate **  tstate 
)
read

Definition at line 571 of file aic79xx_core.c.

void ahd_find_syncrate ( struct ahd_softc ahd,
u_int period,
u_int ppr_options,
u_int  maxsync 
)

Definition at line 3746 of file aic79xx_core.c.

void ahd_free ( struct ahd_softc ahd)

Definition at line 6154 of file aic79xx_core.c.

void ahd_free_scb ( struct ahd_softc ahd,
struct scb scb 
)

Definition at line 6754 of file aic79xx_core.c.

struct scb* ahd_get_scb ( struct ahd_softc ahd,
u_int  col_idx 
)
read

Definition at line 6718 of file aic79xx_core.c.

u_int ahd_get_scbptr ( struct ahd_softc ahd)

Definition at line 654 of file aic79xx_core.c.

u_int ahd_inb_scbram ( struct ahd_softc ahd,
u_int  offset 
)

Definition at line 750 of file aic79xx_core.c.

int ahd_init ( struct ahd_softc ahd)

Definition at line 7063 of file aic79xx_core.c.

uint32_t ahd_inl ( struct ahd_softc ahd,
u_int  port 
)

Definition at line 610 of file aic79xx_core.c.

uint64_t ahd_inq ( struct ahd_softc ahd,
u_int  port 
)

Definition at line 628 of file aic79xx_core.c.

int ahd_intr ( struct ahd_softc ahd)

Definition at line 953 of file aic79xx_core.c.

void ahd_intr_enable ( struct ahd_softc ahd,
int  enable 
)

Definition at line 7857 of file aic79xx_core.c.

uint16_t ahd_inw ( struct ahd_softc ahd,
u_int  port 
)

Definition at line 587 of file aic79xx_core.c.

u_int ahd_inw_scbram ( struct ahd_softc ahd,
u_int  offset 
)

Definition at line 775 of file aic79xx_core.c.

int ahd_is_paused ( struct ahd_softc ahd)

Definition at line 357 of file aic79xx_core.c.

struct scb* ahd_lookup_scb ( struct ahd_softc ahd,
u_int  tag 
)
read

Definition at line 796 of file aic79xx_core.c.

void ahd_outl ( struct ahd_softc ahd,
u_int  port,
uint32_t  value 
)

Definition at line 619 of file aic79xx_core.c.

void ahd_outq ( struct ahd_softc ahd,
u_int  port,
uint64_t  value 
)

Definition at line 641 of file aic79xx_core.c.

void ahd_outw ( struct ahd_softc ahd,
u_int  port,
u_int  value 
)

Definition at line 599 of file aic79xx_core.c.

int ahd_parse_cfgdata ( struct ahd_softc ahd,
struct seeprom_config sc 
)

Definition at line 7710 of file aic79xx_core.c.

int ahd_parse_vpddata ( struct ahd_softc ahd,
struct vpd_config vpd 
)

Definition at line 7844 of file aic79xx_core.c.

void ahd_pause ( struct ahd_softc ahd)

Definition at line 370 of file aic79xx_core.c.

void ahd_pause_and_flushwork ( struct ahd_softc ahd)

Definition at line 7911 of file aic79xx_core.c.

void ahd_print_devinfo ( struct ahd_softc ahd,
struct ahd_devinfo devinfo 
)

Definition at line 4338 of file aic79xx_core.c.

int ahd_print_register ( const ahd_reg_parse_entry_t *  table,
u_int  num_entries,
const char name,
u_int  address,
u_int  value,
u_int cur_column,
u_int  wrap_point 
)

Definition at line 9681 of file aic79xx_core.c.

void ahd_qinfifo_requeue_tail ( struct ahd_softc ahd,
struct scb scb 
)

Definition at line 8097 of file aic79xx_core.c.

void ahd_queue_scb ( struct ahd_softc ahd,
struct scb scb 
)

Definition at line 849 of file aic79xx_core.c.

int ahd_read_flexport ( struct ahd_softc ahd,
u_int  addr,
uint8_t value 
)

Definition at line 10258 of file aic79xx_core.c.

int ahd_read_seeprom ( struct ahd_softc ahd,
uint16_t buf,
u_int  start_addr,
u_int  count,
int  bytestream 
)

Definition at line 10026 of file aic79xx_core.c.

void ahd_release_seeprom ( struct ahd_softc ahd)

Definition at line 10211 of file aic79xx_core.c.

int ahd_reset ( struct ahd_softc ahd,
int  reinit 
)

Definition at line 6255 of file aic79xx_core.c.

int ahd_reset_channel ( struct ahd_softc ahd,
char  channel,
int  initiate_reset 
)

Definition at line 8709 of file aic79xx_core.c.

void ahd_restore_modes ( struct ahd_softc ahd,
ahd_mode_state  state 
)

Definition at line 343 of file aic79xx_core.c.

ahd_mode_state ahd_save_modes ( struct ahd_softc ahd)

Definition at line 333 of file aic79xx_core.c.

int ahd_search_qinfifo ( struct ahd_softc ahd,
int  target,
char  channel,
int  lun,
u_int  tag,
role_t  role,
uint32_t  status,
ahd_search_action  action 
)

Definition at line 8197 of file aic79xx_core.c.

void ahd_set_modes ( struct ahd_softc ahd,
ahd_mode  src,
ahd_mode  dst 
)

Definition at line 283 of file aic79xx_core.c.

void ahd_set_name ( struct ahd_softc ahd,
char name 
)

Definition at line 6146 of file aic79xx_core.c.

void ahd_set_scbptr ( struct ahd_softc ahd,
u_int  scbptr 
)

Definition at line 662 of file aic79xx_core.c.

void ahd_set_syncrate ( struct ahd_softc ahd,
struct ahd_devinfo devinfo,
u_int  period,
u_int  offset,
u_int  ppr_options,
u_int  type,
int  paused 
)

Definition at line 3889 of file aic79xx_core.c.

void ahd_set_unit ( struct ahd_softc ahd,
int  unit 
)

Definition at line 6140 of file aic79xx_core.c.

void ahd_set_width ( struct ahd_softc ahd,
struct ahd_devinfo devinfo,
u_int  width,
u_int  type,
int  paused 
)

Definition at line 4035 of file aic79xx_core.c.

void* ahd_sg_setup ( struct ahd_softc ahd,
struct scb scb,
void sgptr,
dma_addr_t  addr,
bus_size_t  len,
int  last 
)

Definition at line 414 of file aic79xx_core.c.

int ahd_softc_init ( struct ahd_softc ahd)

Definition at line 6131 of file aic79xx_core.c.

void ahd_sync_sglist ( struct ahd_softc ahd,
struct scb scb,
int  op 
)

Definition at line 536 of file aic79xx_core.c.

void ahd_unpause ( struct ahd_softc ahd)

Definition at line 393 of file aic79xx_core.c.

int ahd_update_neg_request ( struct ahd_softc ahd,
struct ahd_devinfo devinfo,
struct ahd_tmode_tstate tstate,
struct ahd_initiator_tinfo tinfo,
ahd_neg_type  neg_type 
)

Definition at line 3846 of file aic79xx_core.c.

int ahd_verify_cksum ( struct seeprom_config sc)

Definition at line 10166 of file aic79xx_core.c.

int ahd_write_flexport ( struct ahd_softc ahd,
u_int  addr,
u_int  value 
)

Definition at line 10235 of file aic79xx_core.c.

int ahd_write_seeprom ( struct ahd_softc ahd,
uint16_t buf,
u_int  start_addr,
u_int  count 
)

Definition at line 10071 of file aic79xx_core.c.