icmd(D2I) icmd(D2I)
NAME
icmd - perform a request immediately on a Host Bus Adapter
SYNOPSIS
#include <sys/sdi.h>
#include <sys/ddi.h>
long prefixicmd(struct hbadata *hbap, int flag);
Arguments
hbap A pointer to the device-specific request block defining
the request to be performed.
flag Indicates whether subsequent allocation requests, if
any, may sleep or not, and is set to either KM_SLEEP or
KM_NOSLEEP.
DESCRIPTION
icmd(D2I) is a special case of the Host Bus Adapter (HBA)
send(D2I) routine. It sends the request directly to the
controller, bypassing the queue mechanism used by send(D2I).
Return Values
On success, icmd returns SDI_RET_OK. On failure, it returns
SDI_RET_ERR.
USAGE
The main use for this routine is in instances where the HBA
controller is in some bad state and flushing the jobs from the
queue is required to return the controller to a normal state.
At minimum, the HBA driver's icmd routine needs to support the
following commands:
SFB_ABORTM
Send an abort message to the specified device.
SFB_FLUSHR
Flush the HBA's job queue.
SFB_RESETM
Reset the bus (SCSI bus or controller device).
SFB_RESUME
Resume sending queued jobs to the device specified in
the sb.
Copyright 1994 Novell, Inc. Page 1
icmd(D2I) icmd(D2I)
SFB_SUSPEND
Suspend sending queued jobs to the device specified in
the sb.
SFB_ADD_DEV
Add the device specified in the sb. The driver should
prepare any structures or queues to accept commands for
this device. It should fail if a device is already at
this address or it is unable to initialize the
structures. This command is necessary for drivers that
support hot insertion/removal.
SFB_RM_DEV
Remove the device specified in the sb. The driver
should flush any cache on the controller. The driver
should invalidate or remove any structures for this
device. It should fail if the device is not present or
there are any pending jobs to that device.
SFB_PAUSE
Stop sending jobs to the controller and do not return
until all jobs sent to the controller have returned.
SFB_CONTINUE
Resume sending jobs to the controller.
In addition to these SCSI SFB commands, the HBA's icmd routine
should accept and pass to the controller all supported SCSI
SCB commands.
Level
Base or Interrupt.
REFERENCES
sb(D4I), send(D2I)
NOTICES
Applicability
sdi: 1, 2
Copyright 1994 Novell, Inc. Page 2