Writing Device Drivers

SCSI Functions

Table B-35 SCSI Functions

Function Name 

Description 

scsi_probe 

probe a SCSI device 

scsi_unprobe 

free resources allocated during initial probing 

scsi_alloc_consistent_buf 

allocate an I/O buffer for SCSI DMA 

scsi_free_consistent_buf 

free a previously allocated SCSI DMA I/O buffer 

scsi_init_pkt 

prepare a complete SCSI packet 

scsi_destroy_pkt 

free an allocated SCSI packet and its DMA resource 

scsi_setup_cdb 

setup SCSI command descriptor block (CDB) 

scsi_transport 

start a SCSI command  

scsi_poll 

run a polled SCSI command 

scsi_ifgetcap 

get SCSI transport capability 

scsi_ifsetcap 

set SCSI transport capability 

scsi_sync_pkt 

synchronize CPU and I/O views of memory 

scsi_abort 

abort a SCSI command 

scsi_reset 

reset a SCSI bus or target 

scsi_reset_notify 

notify target driver of bus resets 

scsi_cname 

decode a SCSI command 

scsi_dname 

decode a SCSI peripheral device type 

scsi_mname 

decode a SCSI message 

scsi_rname 

decode a SCSI packet completion reason 

scsi_sname 

decode a SCSI sense key 

scsi_errmsg 

display a SCSI request sense message  

scsi_log 

display a SCSI-device-related message  

scsi_vu_errmsg 

display a SCSI request sense message  

  

scsi_hba_init 

SCSI HBA system initialization routine 

scsi_hba_fini 

SCSI HBA system completion routine 

scsi_hba_attach_setup 

SCSI HBA attach routine 

scsi_hba_detach 

SCSI HBA detach routine 

scsi_hba_probe 

default SCSI HBA probe function 

scsi_hba_tran_alloc 

allocate a transport structure 

scsi_hba_tran_free 

free a transport structure 

scsi_hba_pkt_alloc 

allocate a scsi_pkt structure 

scsi_hba_pkt_free 

free a scsi_pkt structure 

scsi_hba_lookup_capstr 

return index matching capability string 

Table B-36 Deprecated SCSI Functions

Deprecated Functions 

Replacement 

free_pktiopb 

scsi_free_consisten_buf 

get_pktiopb 

scsi_alloc_consistent_buf 

makecom_g0 

scsi_setup_cdb 

makecom_g0_s 

scsi_setup_cdb 

makecom_g1 

scsi_setup_cdb 

makecom_g5 

scsi_setup_cdb 

scsi_dmafree 

scsi_destroy_pkt 

scsi_dmaget 

scsi_init_pkt 

scsi_hba_attach 

scsi_hba_attach_setup 

scsi_pktalloc 

scsi_init_pkt 

scsi_pktfree 

scsi_destroy_pkt 

scsi_resalloc 

scsi_init_pkt 

scsi_resfree 

scsi_destroy_pkt 

scsi_slave 

scsi_probe 

scsi_unslave 

scsi_unprobe