xref: /titanic_52/usr/src/man/man9f/scsi_hba_pkt_comp.9f (revision 9e293969c29a9c274758e70e5a7349223cef86c1)
te
Copyright (c) 2009, 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_hba_pkt_comp 9F "29 Jan 2009" "SunOS 5.11" ""
NAME
scsi_hba_pkt_comp - scsi_pkt completion routine
SYNOPSIS

#include <sys/scsi/scsi.h>

void scsi_hba_pkt_comp(struct scsi_pkt *pkt);
PARAMETERS

pkt

Pointer to a scsi_pkt(9S) structure.

INTERFACE LEVEL

Solaris DDI specific (Solaris DDI).

DESCRIPTION

After filling in scsi_pkt(9S) fields with packet completion information, an HBA driver should call the scsi_hba_pkt_comp() function. This function is the recommended way for an HBA driver to signal completion of a scsi_pkt structure. Use is mandatory for HBA drivers that use tran_setup_pkt(9E).

Calling the scsi_hba_pkt_comp() function allows SCSA to observe, and possibly react to, the completion of a scsi_pkt request.

A call to the scsi_hba_pkt_comp() function will always result in a call to the pkt_comp() callback function defined in scsi_pkt(9S). This pkt_comp() callback may, however, occur after return from scsi_hba_pkt_comp(), and may occur from a different thread executing on a different CPU.

CONTEXT

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

ATTRIBUTES

See attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPEATTRIBUTE VALUE
Interface StabilityCommitted
SEE ALSO

attributes(5), tran_setup_pkt(9E), scsi_pkt(9S)

NOTES

HBA driver calls scsi_hba_pkt_comp() instead of calling scsi_pkt(9S) pkt_comp directly.