SCSI_SYNC_PKT(9F) Kernel Functions for Drivers SCSI_SYNC_PKT(9F)
scsi_sync_pkt - synchronize CPU and I/O views of memory
#include <sys/scsi/scsi.h> void scsi_sync_pkt
(struct scsi_pkt *pktp
illumos DDI specific (illumos DDI).
Pointer to a scsi_pkt(9S)
function is used to selectively synchronize a CPU
or device's view of the data associated with the SCSI
packet that has
been mapped for I/O
. This may involve operations such as flushes of CPU
caches, as well as other more complex operations such as stalling
until hardware write buffers have drained.
This function need only be called under certain circumstances. When a SCSI
packet is mapped for I/O
and destroyed using scsi_destroy_pkt(9F)
, then an implicit scsi_sync_pkt()
will be performed.
However, if the memory object has been modified by either the device or a CPU
after the mapping by scsi_init_pkt(9F)
, then a call to scsi_sync_pkt()
If the same scsi_pkt is reused for a data transfer from memory to a
device, then scsi_sync_pkt()
must be called before calling scsi_transport(9F)
. If the same packet is reused for a data transfer from
a device to memory scsi_sync_pkt()
must be called after the completion of
the packet but before accessing the data in memory.
function may be called from user, interrupt, or
SEE ALSO tran_sync_pkt(9E)
, scsi_pkt(9S) Writing Device Drivers
January 16, 2006 SCSI_SYNC_PKT(9F)