SGL->NumberOfElements

I have a storport miniport driver. This driver serves to requests from application by submitting them to the controller(HBA) and communicating the response received from the controller, back to the user.
I am sometimes receiving a large value for ‘PSTOR_SCATTER_GATHER_LIST->NumberOfElements’ , unlike the usual values for the same request(i.e. for the same data transfer size).
For eg. For a particular request, for which I ideally/generally receive 2 or 3 as the NumberOfElements. But sometimes I get very big values like 0x350 for the same request.

Is this a valid value and is this behaviour expected. If yes then in what scenarios can this happen.

See what’s in the SRB->Mdl.
What’s your maximum transfer size you reported during registration? 0x350 is under 4 MB of data.

xxxxx@gmail.com wrote:

I have a storport miniport driver. This driver serves to requests from application by submitting them to the controller(HBA) and communicating the response received from the controller, back to the user.
I am sometimes receiving a large value for ‘PSTOR_SCATTER_GATHER_LIST->NumberOfElements’ , unlike the usual values for the same request(i.e. for the same data transfer size).
For eg. For a particular request, for which I ideally/generally receive 2 or 3 as the NumberOfElements. But sometimes I get very big values like 0x350 for the same request.

Is this a valid value and is this behaviour expected. If yes then in what scenarios can this happen.

It’s odd to me that you didn’t mention the transfer size, because that’s
the key indicator. If you have a 16kB transfer, then clearly having 848
pages in the list is ludicrous. But if this is a 14MB transfer, then
848 pages is exactly what I would expect.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Thanks for your responses.

The data transfer size is 0x3fc1a8 in both the case (success and failure).

Transfer size 0x3fc1a8 is 0x3FD pages, which can take up to 0x3FE SGE.

You need to sperate the large item to fit the max transfer length of element that your device supported.

Thank you all for the responses.