For scsi_hba_pkt_alloc():
scsi_hba_pkt_alloc() allocates space for a scsi_pkt structure. HBA drivers should
use this interface when allocating a scsi_pkt from
their tran_init_pkt(9E)
entry point.
If callback is NULL_FUNC, scsi_hba_pkt_alloc() may not sleep
when allocating resources, and callers should be prepared to deal with allocation
failures.
scsi_hba_pkt_alloc() copies the scsi_address(9S) structure pointed to by ap to the pkt_address field in the scsi_pkt(9S).
scsi_hba_pkt_alloc() also allocates memory for
these scsi_pkt(9S)
data areas, and sets these fields to point to the allocated memory:
-
pkt_ha_private
-
HBA private data area.
-
pkt_private
- Target driver private data area.
-
pkt_scbp
-
SCSI status completion block.
-
pkt_cdbp
-
SCSI command descriptor block.
For scsi_hba_pkt_free():
scsi_hba_pkt_free() frees the space allocated for
the scsi_pkt(9S)
structure.
|