getblk(D2I) getblk(D2I)
NAME
getblk - get a Host Bus Adapter device-specific request block
SYNOPSIS
struct hbadata *prefixgetblk(int flag);
Arguments
flag Indicates whether the allocation may sleep or not, and
is set to either KM_SLEEP or KM_NOSLEEP.
DESCRIPTION
This entry point is for Host Bus Adapter (HBA) drivers.
getblk(D2I) allocates HBA driver-specific request blocks,
which are used in passing requests from the target drivers to
the HBA driver. Each HBA driver defines and allocates its own
supply of request blocks, allowing for flexibility in
servicing the needs of individual HBAs.
The getblk routine returns a struct hbadata *. Typically, the
HBA drivers use some other structure and cast it to a struct
hbadata * before returning. The request block consists,
minimally, of struct xsb * and may contain additional HBA-
specific data after the struct xsb *.
Return Values
On success, getblk returns a pointer to the newly allocated
request block. On failure, it returns an appropriate error
number corresponding to the failure.
USAGE
getblk is accessed only by SDI.
Level
Base or Interrupt.
REFERENCES
freeblk(D2I)
NOTICES
Applicability
sdi: 1, 2
Copyright 1994 Novell, Inc. Page 1