Sun Microsystems, Inc.
spacerspacer
spacer   www.sun.com docs.sun.com | | |  
spacer
black dot
   
A   B   C   D   E   F   G   H   I   J   K   L   M   N   O   P   Q   R   S   T   U   V   W   X   Y   Z
    
 
Kernel Functions for Driversscsi_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

 

scsi_abort() 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

 

scsi_abort() returns:

1
on success.
0
on failure.

CONTEXT

 

scsi_abort() can be called from user or interrupt 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


SunOS 5.9Go To TopLast Changed 30 Aug 1995

 
      
      
Copyright 2002 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.