|
|
#include <sys/types.h> #include <sys/sdi.h> #include <sys/ddi.h>int sdi_xicmd(int hbaflag, struct sb *pt, int sleepflag);
sb_type member of the sb structure
must be set to either SFB_TYPE or SCB_TYPE.
In contrast to an operation using an sfb(D4sdi), operations using an scb send the job to the requested logical unit.
Coming in at immediate-priority, operations using an sfb are executed in the order submitted and take priority over scb operations. Only one instance of each immediate command type (SFB_TYPE or ISCB_TYPE) may be outstanding to a particular logical unit.
The command block must be allocated from the host adapter pool of command blocks, and the addresses translated using the sdi_xtranslate(D3sdi) function.
If flag is set to KM_SLEEP, user context.
int sdi_icmd(struct sb *pt, int flag);sdi_icmd( ) requests are translated with the sdi_translate(D3sdi) function rather than sdi_xtranslate( ).
``Extended SCSI addressing scheme'' in HDK Technical Reference
void
diskint(sb_ptr)
struct sb *sb_ptr;
{
...
/* Check the completion code of the SCB to see if the
* command needs to be retried.
*/
if (sb_ptr->SCB.sc_comp_code & SDI_RETRY )
{
/* Retry the command request using sdi_xicmd */
if (sdi_xicmd(HBA_EXT_ADDRESS, sb_ptr, flag) != SDI_RET_OK)
{
/* If the return value of sdi_xicmd is not OK,
* print an error message.
*/
cmn_err(CE_WARN, "DISK: Bad SB type to SDI.");
}
return;
}
...