2.3 Scatter/Gather List

Scatter/Gather is mandatory in NWPA.

This section specifies the format of NWPA's scatter/gather request list. The term scatter/gather request is defined in NWPA as a request that is contiguous on the device but scattered in system memory. NWPA doesn't issue a request in scatter/gather format unless the HAM supporting the device indicates that the host adapter to which the device is attached has scatter/gather capabilities. How the HAM makes this indication is discussed under the attributeFlags field of the DeviceInfoStruct.

The CDM determines whether a request is in scatter/gather format by masking the upper WORD of the CDM message's (CDMMessageStruct) function field. If

    ((UpperWORD & 0x0080) != 0)
    

the request is in scatter/gather format, and the CDM must set the Scatter_Gather_Bit in the HACB's controlInfo field before sending it to the HAM. The HAM determines whether a HACB request is in scatter/gather format by checking the HACB's Scatter_Gather_Bit upon receipt of the HACB. NWPA's scatter/gather list is a table that maps how the request is placed in system memory.

In building a HACB for a scatter/gather request, the CDM simply places the information from the CDMMessageStruct into the appropriate fields of the HACB as described in the previous sections of this chapter. The HAM must interpret the dataBufferLen, vDataBufferPtr, and pDataBufferPtr fields differently for a scatter/gather request.

In the scatter/gather case, the dataBufferLen field contains the number of elements in the scatter/gather request list. The vDataBufferPtr field contains the NetWare® logical address of the scatter/gather list, and the pDataBufferPtr field contains the absolute, or physical, address of the scatter/gather list. Figure 2-1 illustrates this mapping:

Figure 2-1 NWPA Scatter/Gather List

The following are true for all scatter/gather requests: