Virtual StorPort Miniport getting continuous SCSIOP_REPORT_LUNS

Hi All,

I am building a virtual storage miniport driver and quite new to this field. I got this working with single Target support… everything works fine with single target. But as soon as I add another target and send bus scan notification (BusChangedetected) the upper layers starts doing bus scan by sending report LUNS… it sends it for Target 0 and then for Target 1 followed by usual INQUIRY and MODE SENSE… everything seems fine. No errors reported and seemingly correct INQUIRY data also being returned… but after scanning Target 1 I see that stack restarts the whole process by scanning TARGET 0 again… this goes on in a infinite loop i.e (scanning target 0 and target 1).

Does anybody have any idea and how to debug this?? What might be going wrong?


FYI… just root caused it. It turned out that miniport was returning bogus “Device Identification Page”. Weird thing is this worked with single Target but on adding second target it caused this issue