xref: /titanic_41/usr/src/man/man9f/scsi_abort.9f (revision 721df37ded2cce623b0249cc35a872c3ce291b9b)
te
Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved
The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
SCSI_ABORT 9F "Jan 16, 2006"
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