1scsi_sync_pkt(9F)        Kernel Functions for Drivers        scsi_sync_pkt(9F)
2
3
4

NAME

6       scsi_sync_pkt - synchronize CPU and I/O views of memory
7

SYNOPSIS

9       #include <sys/scsi/scsi.h>
10
11
12
13       void scsi_sync_pkt(struct scsi_pkt *pktp);
14
15

INTERFACE LEVEL

17       Solaris DDI specific (Solaris DDI).
18

PARAMETERS

20       pktp    Pointer to a scsi_pkt(9S) structure.
21
22

DESCRIPTION

24       The scsi_sync_pkt() function is used to selectively synchronize a CPU's
25       or device's view of the data associated with the SCSI packet  that  has
26       been mapped for I/O. This may involve operations such as flushes of CPU
27       or I/O caches, as  well  as  other  more  complex  operations  such  as
28       stalling until hardware write buffers have drained.
29
30
31       This  function  need only be called under certain circumstances. When a
32       SCSI packet is mapped for I/O  using  scsi_init_pkt(9F)  and  destroyed
33       using  scsi_destroy_pkt(9F),  then  an implicit scsi_sync_pkt() will be
34       performed. However, if the memory object has been  modified  by  either
35       the device or a CPU after the mapping by scsi_init_pkt(9F), then a call
36       to scsi_sync_pkt() is required.
37
38
39       If the same scsi_pkt is reused for a data transfer  from  memory  to  a
40       device,  then scsi_sync_pkt() must be called before calling scsi_transā€
41       port(9F). If the same packet is reused  for  a  data  transfer  from  a
42       device to memory scsi_sync_pkt() must be called after the completion of
43       the packet but before accessing the data in memory.
44

CONTEXT

46       The scsi_sync_pkt() function may be called  from  user,  interrupt,  or
47       kernel context.
48

SEE ALSO

50       tran_sync_pkt(9E),        ddi_dma_sync(9F),       scsi_destroy_pkt(9F),
51       scsi_init_pkt(9F), scsi_transport(9F), scsi_pkt(9S)
52
53
54       Writing Device Drivers
55
56
57
58SunOS 5.11                        16 Jan 2006                scsi_sync_pkt(9F)
Impressum