SCSIOP_REPORT_LUNS

Hi all,

If I have only one LUN, how should I response the SCSIOP_REPORT_LUNS request in Storport Miniport driver ?

Thanks,
Alex

What’s the problem with reporting just one LUN?

-p

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@yahoo.com
Sent: Wednesday, March 10, 2010 2:24 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] SCSIOP_REPORT_LUNS

Hi all,

If I have only one LUN, how should I response the SCSIOP_REPORT_LUNS request in Storport Miniport driver ?

Thanks,
Alex


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

Except :
pSrb->SrbStatus = SRB_STATUS_SUCCESS;
StorPortNotification( RequestComplete, pDE, pSrb );
return (TRUE);

What else should I need to do?

Thanks

Either emulate the command by filling in the data buffer with a valid
response to Report LUNs or emulate a Check Condition with a Sense Key of
Illegal Request, and an Additional Sense Code of Invalid Command Opcode or
some such (there might be a code for Command Not Supported but I’m too
lazy to look it up right now).

xxxxx@yahoo.com
Sent by: xxxxx@lists.osr.com
03/10/2010 06:38 PM
Please respond to
“Windows System Software Devs Interest List”

To
“Windows System Software Devs Interest List”
cc

Subject
RE:[ntdev] SCSIOP_REPORT_LUNS

Except :
pSrb->SrbStatus = SRB_STATUS_SUCCESS;
StorPortNotification( RequestComplete, pDE, pSrb );
return (TRUE);

What else should I need to do?

Thanks


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

I thought “A miniport driver is not required to provide request-sense data after a CHECK CONDITION”, could you be more specific ?

Thanks,
Alex

You might want to fill in some data as well.

-p

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@yahoo.com
Sent: Wednesday, March 10, 2010 3:38 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] SCSIOP_REPORT_LUNS

Except :
pSrb->SrbStatus = SRB_STATUS_SUCCESS;
StorPortNotification( RequestComplete, pDE, pSrb ); return (TRUE);

What else should I need to do?

Thanks


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

You don’t provide sense data “after” a Check Condition - you provide it
WITH the Check Condition. Looks like you are confused about where the
sense data goes. You put the sense data in the buffer pointed to by
Srb->SenseInfoBuffer, not exceeding the length specified in
SenseInfoBufferLength.

I can’t tell how elementary we need to get here. For example, I assume
you know what the format of the sense data buffer is supposed to be and
that you have set AutoRequestSense in your PORT_CONFIGURATION_INFORMATION.

Again, you have the easier alternative of returning success and
manufacturing Report LUNs data in the DataBuffer. Just clear the
DataBuffer, and put an 8 (the LUN list length) in byte 3 and you have a
Report LUNs response spedifying only LUN 0. Simple.

xxxxx@yahoo.com
Sent by: xxxxx@lists.osr.com
03/10/2010 07:58 PM
Please respond to
“Windows System Software Devs Interest List”

To
“Windows System Software Devs Interest List”
cc

Subject
RE:[ntdev] SCSIOP_REPORT_LUNS

I thought “A miniport driver is not required to provide request-sense data
after a CHECK CONDITION”, could you be more specific ?

Thanks,
Alex


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

Alex

You need to do that to conform to logo requirements. You can’t report success with no data and you can’t (shouldn’t) fail the command.

I worry about all the other SCSI Ops you are probably not handling correctly. Please consult http://www.microsoft.com/whdc/device/storage/RAID_design.mspx even if you are not doing RAID.

From: xxxxx@attotech.com [mailto:xxxxx@attotech.com]
Sent: Wednesday, March 10, 2010 8:34 PM
Subject: RE:SCSIOP_REPORT_LUNS

You don’t provide sense data “after” a Check Condition - you provide it WITH the Check Condition. Looks like you are confused about where the sense data goes. You put the sense data in the buffer pointed to by Srb->SenseInfoBuffer, not exceeding the length specified in SenseInfoBufferLength.

I can’t tell how elementary we need to get here. For example, I assume you know what the format of the sense data buffer is supposed to be and that you have set AutoRequestSense in your PORT_CONFIGURATION_INFORMATION.

Again, you have the easier alternative of returning success and manufacturing Report LUNs data in the DataBuffer. Just clear the DataBuffer, and put an 8 (the LUN list length) in byte 3 and you have a Report LUNs response spedifying only LUN 0. Simple.

xxxxx@yahoo.commailto:xxxxx
Sent by: xxxxx@lists.osr.commailto:xxxxx

03/10/2010 07:58 PM
Please respond to
“Windows System Software Devs Interest List” >

To

“Windows System Software Devs Interest List” >

cc

Subject

RE:[ntdev] SCSIOP_REPORT_LUNS

I thought “A miniport driver is not required to provide request-sense data after a CHECK CONDITION”, could you be more specific ?

Thanks,
Alex


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer</mailto:xxxxx></mailto:xxxxx>

Thanks a lot, Jeff and Jerry.
I will give it a try and may have more questions for you guys.

Alex