how to retrieve the Inquiry Data?

Hi All,

I had written a small utility which will get the Inquiry Data from the
SCSI Devices. For this i was using the Scsi PassThru Sample available in
DDK. But this seems to just display the limited info of the SCSI Devices.
But i need to display the complete info of the SCSI Devices. So Can anyone
guide me on how to implement this?

Regards,
Vishwanath Maram

Sending IOCTL_SCSI_GET_INQUIRY_DATA to the port device will provide you the information about all the devices attached to the port.
If you are interested in more information than you can find in the INQUIRYDATA structure, you will have to use specific IOCTLs.

Regards,
Gregory

-----Original Message-----
From: VishwanathM [mailto:xxxxx@emc.com]
Sent: Wednesday, November 19, 2003 11:15
To: Windows System Software Devs Interest List
Subject: [ntdev] how to retrieve the Inquiry Data?

Hi All,

I had written a small utility which will get the Inquiry Data from the
SCSI Devices. For this i was using the Scsi PassThru Sample available in
DDK. But this seems to just display the limited info of the SCSI Devices.
But i need to display the complete info of the SCSI Devices. So Can anyone
guide me on how to implement this?

Regards,
Vishwanath Maram


Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@store-age.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

*** IMPORTANT: Do not open attachments from unrecognized senders ***

******************************************************************************************
The contents of this email and any attachments are confidential.
It is intended for the named recipient(s) only.
If you have received this email in error please notify the system manager or the
sender immediately and do not disclose the contents to any one or make copies.

******************************************************************************************

************************************************************************************
This footnote confirms that this email message has been scanned by
PineApp Mail-SeCure for the presence of malicious code, vandals & computer viruses.
************************************************************************************

Yeah i understand what u have suggested but i wanted to know on how to use
the IOCTLs and get the complete Inquiry Data. since i had already tried, i
was not able to achieve it. So Could any guide by some code snippet or
give me some idea on how to go about it?

Regards,
Vishwanath Maram

You need to send a SCSI passthrough command (IOCTL_SCSI_PASS_THROUGH or
IOCTL_SCSI_PASS_THROUGH_DIRECT) to the PDO. Let’s say that you have a
disk. In that case you need to open the physical device
(CreateFile(“\\.\PhysicalDrive1”,…) ) and use that handle to send
the passthrough command (INQUIRY CDB). The SPTI sample on the Server
2003 DDK shows several commands (MODE SENSE, TEST UNIT READY, READ
BUFFER). If you are failing the command, it is probably one or more of
the following:

  1. you are not opening the correct device object (you can’t use the
    port FDO \.\ScsiN) if the device is claimed by a class driver).
  2. you are not setting the access or share mode correctly
  3. you are running from a non-admin account
  4. you are attempting to set the address fields in the passthrough
    structure - these must be 0 when opening the PDO or the SCSI address
    when opening the port (see 1). Looks like the sample mistakenly sets the
    target ID to 1.
  5. you are not honoring the miniport’s alignment (see spti.c)

-----Original Message-----
From: VishwanathM [mailto:xxxxx@emc.com]
Sent: Wednesday, November 19, 2003 7:49 PM
Subject: RE: how to retrieve the Inquiry Data?

Yeah i understand what u have suggested but i wanted to know on how to
use
the IOCTLs and get the complete Inquiry Data. since i had already tried,
i
was not able to achieve it. So Could any guide by some code snippet or
give me some idea on how to go about it?

Regards,
Vishwanath Maram

Can you explain the problem precisely? Does IOCTL_SCSI_GET_INQUIRY_DATA work for you? Can you get the INQUIRYDATA structure?

Gregory

-----Original Message-----
From: VishwanathM [mailto:xxxxx@emc.com]
Sent: Thursday, November 20, 2003 05:49
To: Windows System Software Devs Interest List
Subject: [ntdev] RE: how to retrieve the Inquiry Data?

Yeah i understand what u have suggested but i wanted to know on how to use
the IOCTLs and get the complete Inquiry Data. since i had already tried, i
was not able to achieve it. So Could any guide by some code snippet or
give me some idea on how to go about it?

Regards,
Vishwanath Maram


Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@store-age.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

*** IMPORTANT: Do not open attachments from unrecognized senders ***

******************************************************************************************
The contents of this email and any attachments are confidential.
It is intended for the named recipient(s) only.
If you have received this email in error please notify the system manager or the
sender immediately and do not disclose the contents to any one or make copies.

******************************************************************************************

************************************************************************************
This footnote confirms that this email message has been scanned by
PineApp Mail-SeCure for the presence of malicious code, vandals & computer viruses.
************************************************************************************

Yeah i was able to run the IOCTL_SCSI_GET_INQUIRY_DATA and also it
displays all the available disks details. But now i wanted to know the
complete information of an each and every device detected by the
IOCTL_SCSI_GET_INQUIRY_DATA info. So I even tried what one of our Dude has
suggested, but i was ended up getting only few info.
So i wanted to get the info like serialnumber of the drive, Drive Model
Number, Drive Controller Revision Number, Controller Buffer Size on Drive,
Drive Type, Drive Size and other possible info which ever it is possible
to get.
So i wanted the above details using the Inquiry Command. So is it possible
to get the info.

Regards,
Vishwanath Maram