xref: /titanic_44/usr/src/man/man9f/scsi_destroy_pkt.9f (revision b8afd3a780ce850ff107bb3be330465bf47f84bd)
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_destroy_pkt 9F "16 Jan 2006" "SunOS 5.11" "Kernel Functions for Drivers"
NAME
scsi_destroy_pkt - free an allocated SCSI packet and its DMA resource
SYNOPSIS

#include <sys/scsi/scsi.h>



void scsi_destroy_pkt(struct scsi_pkt *pktp);
INTERFACE LEVEL

Solaris DDI specific (Solaris DDI).

PARAMETERS

pktp

Pointer to a scsi_pkt(9S) structure.

DESCRIPTION

The scsi_destroy_pkt() function releases all necessary resources, typically at the end of an I/O transfer. The data is synchronized to memory, then the DMA resources are deallocated and pktp is freed.

CONTEXT

The scsi_destroy_pkt() function may be called from user, interrupt, or kernel context.

EXAMPLES

Example 1 Releasing resources

scsi_destroy_pkt(un->un_rqs);
SEE ALSO

tran_destroy_pkt(9E), scsi_init_pkt(9F), scsi_pkt(9S)

Writing Device Drivers