man Pages(9E): DDI and DKI Driver Entry Points
  Search only this book
Download this book in PDF

NAME

tran_reset - reset a SCSI bus or target

SYNOPSIS

#include <sys/scsi/scsi.h>
int prefixtran_reset(struct scsi_address * ap,int level);

INTERFACE LEVEL

Solaris architecture specific (Solaris DDI).

ARGUMENTS

ap
Pointer to the scsi_address(9S) structure.
level
The level of reset required.

DESCRIPTION

The tran_reset( ) vector in the scsi_hba_tran(9S) structure must be initialized during the HBA driver's attach(9E) to point to an HBA entry point to be called when a target driver calls scsi_reset(9F).
tran_reset( ) must reset the SCSI bus or a SCSI target as specified by level.
level must be one of the following:
RESET_ALL
reset the SCSI bus.
RESET_TARGET
reset the target specified by ap.
tran_reset should set the pkt_reason field of all outstanding packets in the transport layer associated with each target that was successfully reset to CMD_RESET and the pkt_statistics field must be OR'ed with either STAT_BUS_RESET or STAT_DEV_RESET .
The HBA driver should use a SCSI Bus Device Reset Message to reset a target device.
Packets that are in the transport layer but not yet active on the bus should be returned with pkt_reason set to CMD_RESET ,and pkt_statistics OR'ed with STAT_ABORTED .

RETURN VALUES

tran_reset( ) should return:
1
on success.
0
on failure.

SEE ALSO

attach(9E), ddi_dma_buf_setup(9F), scsi_hba_attach(9F), scsi_reset(9F), scsi_address(9S), scsi_hba_tran(9S)
Writing Device Drivers

NOTES

If pkt_reason already indicates that an earlier error had occurred for a particular pkt, tran_reset( ) should not overwrite pkt_reason with CMD_RESET .