xref: /illumos-gate/usr/src/man/man9f/scsi_destroy_pkt.9f (revision 14b24e2b79293068c8e016a69ef1d872fb5e2fd5)
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 "Jan 16, 2006"
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