Windows REPORT LUNS request for storport

Hi,

I noticed, at least on Vista, windows sends a REPORT LUNS with allocation size of 16 which is only space for a single LUN. Why is it doing that? Example, I can make LUN 1 available, shows up, Then make LUN 3, but doesn’t show up (disk management). If I then make LUN 0 available, then LUN 3 is shown as well. I send back the list using peripheral device addressing method (basically LUN number in offset 1 of each entry in the LUN List). How do you get windows to know LUN1 and LUN3 exist without a LUN0 or LUN2.

TIA!!

actually using Simple logical unit addressing format.

Here’s the reason, you need to return what can be returned. The “If the amount of information that is available to be transferred exceeds the maximum value that the ALLOCATION LENGTH field in combination with other fields in the CDB is capable of specifying, then no data shall be transferred and the command shall be terminated with CHECK CONDITION status, with the sense key set to ILLEGAL REQUEST, and the additional sense code set to INVALID FIELD IN CDB.” refers to if it the amount to transfers exceeds the maximum ALLOCATION LENGTH the command allows.