SCSIHA(7M) SCSIHA(7M)
scsiha - SCSI bus and loop operation driver
/hw/scsi_ctlr/<number>/bus
The scsiha driver is used to pass requests to the scsi host adapter
drivers to perform activities that aren't related to SCSI commands issued
to individual devices. On parallel SCSI, this includes operations like
resetting a SCSI bus and probing for devices. With Fibrechannel, it adds
loop initialization, device reset and port bypass.
All communication through the scsiha driver is via ioctls. Opens and
closes automatically succeed. The ioctl structure is defined in
<sys/scsi.h>, and is called scsi_ha_op . The scsi_ha_op structure:
struct scsi_ha_op
{
uint sb_opt; /* command option */
uint sb_arg; /* usually data count */
uintptr_t sb_addr; /* usually user address */
};
typedef struct scsi_ha_op scsi_ha_op_t;
The sb_opt field is typically used to specify different options to the
ioctl. For example, the debug level of the host adapter driver, or a
sub-operation code.
The sb_arg field is typically used to specify how much data to transfer
to/from the user level application and the driver.
The sb_addr field should contain the user address to transfer the data
to/from.
There are a number of different ioctls that can be issued.
SOP_RESET - fields unused
SOP_SCAN - fields unused
SOP_DEBUGLEVEL - uses sb_opt
SOP_LIP - fields unused
SOP_LIPRST - sb_opt is target ID to reset (255 = all targets)
SOP_LPB - sb_opt is target ID to bypass
SOP_LPE - sb_opt is target ID to enable
SOP_LPEALL - fields unused
SOP_QUIESCE - sb_opt is time for quiesce attempt, sb_arg is time for
quiesce to be active
SOP_QUIESCE_STATE - sb_addr is address of state variable
SOP_UN_QUIESCE - fields unused
SOP_GET_SCSI_PARMS - sb_addr is address to receive data
Page 1
SCSIHA(7M) SCSIHA(7M)
Hardware Interface Driver Support
IOCTL WD93 WD95 SCIP QL ADP78 FCADP QLFC
------------------------------------------------------------------------
SOP_RESET YES YES YES YES YES YES YES
SOP_SCAN YES YES YES YES YES YES YES
SOP_DEBUGLEVEL NO NO NO YES NO YES YES
SOP_LIP NO NO NO NO NO YES YES
SOP_LIPRST NO NO NO NO NO YES YES
SOP_LPB NO NO NO NO NO YES NO
SOP_LPE NO NO NO NO NO YES NO
SOP_LPEALL NO NO NO NO NO YES NO
SOP_QUIESCE NO NO NO YES NO YES YES
SOP_QUIESCE_STATE NO NO NO YES NO YES YES
SOP_UNQUIESCE NO NO NO YES NO YES YES
SOP_GET_SCSI_PARMS NO NO NO YES YES NO NO
Utilization By Program
IOCTL scsiha scsiadminswap scsiquiesce
-------------------------------------------------------
SOP_RESET YES NO NO
SOP_SCAN YES YES YES
SOP_DEBUGLEVEL YES NO NO
SOP_LIP YES NO NO
SOP_LIPRST YES NO NO
SOP_LPB YES NO NO
SOP_LPE YES NO NO
SOP_LPEALL YES NO NO
SOP_QUIESCE NO YES YES
SOP_QUIESCE_STATE NO YES YES
SOP_UNQUIESCE NO YES YES
SOP_GET_SCSI_PARMS YES NO NO
The qlfc and fcadp drivers make the adapter's portname (sometimes known
as the World Wide Name) available as a hardware graph attribute
"_fc_portname" on the controller's bus vertex. The attribute's value is
8 bytes long and stored as a uint64_t. See attr_get(2) for details on
retrieving this value.
Since the driver provides direct access to the SCSI host adapter, the
system administrator must be very careful in setting up the permissions
on the device files, lest security holes occur, no checking is performed
for potentially dangerous actions (bus reset, get data, send data, port
bypass). There should be no reason for non-superuser use of this driver
interface. Resetting a SCSI bus can affect currently running programs.
Anything that is using a tape drive will be aborted when the bus is
reset.
Page 2
SCSIHA(7M) SCSIHA(7M)
/hw/scsi_ctlr/#/bus
ds(7M) to issue SCSI commands directly to devices.
scsiha(1m), scsiquiesce(1m), scsiadminswap(1m), for programs that use
this driver.
PPPPaaaaggggeeee 3333 [ Back ]
|