Message Interface
3-5
3.3.2 Message Flow
Before requests can be posted to the LSIFC909, the system must
allocate and initialize a pool of message frames, and provide a
mechanism to assign individual message frames, on a per-request basis.
Refer to
Figure 3.2
. The host must also provide one message frame per
target LUN, and prime the Reply Free FIFO with the physical address of
these message frames. Once allocation has been completed, requests
flow from the host to the LSIFC909, as follows:
1.
The host driver receives an I/O request from the operating system.
2.
The host driver allocates a system message frame and builds an I/O
request message within the system message frame. The allocation
method is the responsibility of the host driver.
3.
The host driver creates the Message Frame Descriptor (MFD), and
writes the MFD to the Request Post FIFO.
4.
The Input/Output Controller (IOC) reads the MFD from the Request
Post FIFO and DMA’s the request to a local message frame.
5.
The IOC sends the appropriate FC request, and subsequently
receives the reply from the target.
–
If the I/O status is successful, the IOC writes the
MessageContext value, plus turbo reply bits, to the Reply Post
FIFO, which automatically generates a system interrupt.
–
If the I/O status is not successful, the IOC pops a reply message
frame from the Reply Free FIFO, and generates a reply message
in the reply message frame. The IOC then writes the system
physical address of the reply message frame to the Reply Post
FIFO, which generates a system interrupt.
6.
The host driver receives an interrupt and reads the Reply Interrupt
bit in the Host Interrupt Status register. If the Reply Interrupt bit = 1,
then the host reads the Reply register. If there are no posted
messages, the system reads the value 0xFFFFFFFF.
7.
The host driver responds to the operating system appropriately.
8.
If the I/O status is not successful, the host driver returns the
message frame descriptor to the Reply Free FIFO.