xref: /illumos-gate/usr/src/man/man9e/tran_sync_pkt.9e (revision 1a2d662a91cee3bf82f41cd47c7ae6f3825d9db2)
te
Copyright (c) 1993, Sun Microsystems, Inc.
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]
TRAN_SYNC_PKT 9E "Nov 1, 1993"
NAME
tran_sync_pkt - SCSI HBA memory synchronization entry point
SYNOPSIS
#include <sys/scsi/scsi.h>



void prefixtran_sync_pkt(struct scsi_address *ap,
 struct scsi_pkt *pkt);
INTERFACE LEVEL
illumos architecture specific (illumos DDI).
PARAMETERS
ap

A pointer to a scsi_address(9S) structure.

pkt

A pointer to a scsi_pkt(9S) structure.

DESCRIPTION
The tran_sync_pkt() vector in the scsi_hba_tran(9S) structure must be initialized during the HBA driver's attach(9E) to point to an HBA driver entry point to be called when a target driver calls scsi_sync_pkt(9F).

tran_sync_pkt() must synchronize a HBA's or device's view of the data associated with the pkt, typically by calling ddi_dma_sync(9F). The operation may also involve HBA hardware-specific details, such as flushing I/O caches, or stalling until hardware buffers have been drained.

SEE ALSO
attach (9E), tran_init_pkt (9E), ddi_dma_sync (9F), scsi_hba_attach (9F), scsi_init_pkt (9F), scsi_sync_pkt (9F), scsi_address (9S), scsi_hba_tran (9S), scsi_pkt (9S)

Writing Device Drivers

NOTES
A target driver may call tran_sync_pkt() on packets for which no DMA resources were allocated.