Go to main content

man pages section 9: DDI and DKI Kernel Functions

Exit Print View

Updated: July 2017
 
 

scsi_abort(9F)

Name

scsi_abort - abort a SCSI command

Synopsis

#include <sys/scsi/scsi.h>

intscsi_abort(struct scsi_address *ap, struct scsi_pkt *pkt);

Interface Level

Solaris DDI specific (Solaris DDI).

Parameters

ap

Pointer to a scsi_address structure.

pkt

Pointer to a scsi_pkt(9S) structure.

Description

The scsi_abort() function terminates a command that has been transported to the host adapter driver. A NULL pkt causes all outstanding packets to be aborted. On a successful abort, the pkt_reason is set to CMD_ABORTED and pkt_statistics is OR'ed with STAT_ABORTED.

Return Values

The scsi_abort() function returns:

1

on success.

0

on failure.

Context

The scsi_abort() function can be called from user, interrupt, or kernel context.

Examples

Example 1 Terminating a command.
if (scsi_abort(&devp->sd_address, pkt) == 0) {
        (void) scsi_reset(&devp->sd_address, RESET_ALL);
}

See Also

tran_abort(9E), scsi_reset(9F), scsi_pkt(9S)

Writing Device Drivers for Oracle Solaris 11.3