can't get serial number for JBOD disk

Hi,

It does appear I’m not successfull to get a serial number for disks in a
JBOD (Just a Bunch of Disks), which is connected throu FC adapter(ql2300).
I’m using spti and the code works for direct-attached disks. The funny
thing is that I’m not getting an error but the returned ‘unit serial number
page’/buffer is not properly filled up.

code: (as from DDK spti exmaple)

ZeroMemory(&sptwb,sizeof(SCSI_PASS_THROUGH_WITH_BUFFERS));
ZeroMemory(buffer,2048);

sptwb.spt.Length = sizeof(SCSI_PASS_THROUGH);
sptwb.spt.PathId = 0;
sptwb.spt.TargetId = 0;
sptwb.spt.Lun = 0;
sptwb.spt.CdbLength = CDB6GENERIC_LENGTH;
sptwb.spt.SenseInfoLength = 24;
sptwb.spt.DataIn = SCSI_IOCTL_DATA_IN;
sptwb.spt.DataTransferLength = 192;
sptwb.spt.TimeOutValue = 2;
sptwb.spt.DataBufferOffset =
offsetof(SCSI_PASS_THROUGH_WITH_BUFFERS,ucDataBuf);
sptwb.spt.SenseInfoOffset =
offsetof(SCSI_PASS_THROUGH_WITH_BUFFERS,ucSenseBuf);
sptwb.spt.Cdb[0] = SCSIOP_INQUIRY;
sptwb.spt.Cdb[1] = 0x01;
sptwb.spt.Cdb[2] = 0x80;
sptwb.spt.Cdb[4] = 192;
length = offsetof(SCSI_PASS_THROUGH_WITH_BUFFERS,ucDataBuf) +
sptwb.spt.DataTransferLength;

status = DeviceIoControl(fileHandle,
IOCTL_SCSI_PASS_THROUGH,
&sptwb,
sizeof(SCSI_PASS_THROUGH),
&sptwb,
length,
&returned,
FALSE);

PrintStatusResults(status,returned,&sptwb,length);

this code works OK (same machine) with a direct-attached (local) disk
(output as from DDK sample):
Read 74h bytes of inquiry data Information.

Bus
Num TID LUN Claimed String Inquiry Header


0 0 0 Y SEAGATE ST39236LW 0010 00 00 03 12 8B 00 01 3E
0 4 0 Y SEAGATE ST318437LW 0105 00 00 03 12 8B 00 01 3E

***** INQUIRY – *****
***** with SenseInfo buffer *****
Scsi status: 00h, Bytes returned: 68h, Data buffer length: 18h

00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F

000 2C 00 00 00 00 00 06 00 01 00 00 00 18 00 00 00
010 02 00 00 00 50 00 00 00 30 00 00 00 12 01 80 00
020 C0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
030 58 28 24 81 58 28 24 81 60 28 24 81 60 28 24 81
040 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*050 00 80 00 14 33 42 4E 30 58 36 42 41 30 30 30 30
060 37 31 32 30 47 53 54 52 00 00 00 00 00 00 00 00
070 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
080 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

and the output for the JBOD disk (btw. IOCTL_SCSI_GET_INQUIRY_DATA works
fine)

Read 40h bytes of inquiry data Information.

Bus
Num TID LUN Claimed String Inquiry Header


0 0 0 Y EUROLOGCFC2500 5751 00 00 02 12 33 00 00 02

***** INQUIRY – *****
***** with SenseInfo buffer *****

Scsi status: 00h, Bytes returned: 68h, Data buffer length: 18h

00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F

000 2C 00 00 00 00 00 06 00 01 00 00 00 18 00 00 00
010 02 00 00 00 50 00 00 00 30 00 00 00 12 01 80 00
020 C0 00 00 00 00 00 00 00 00 00 00 00 01 65 04 2E
030 00 00 00 00 3C 64 10 81 3C 64 10 81 3D 02 00 00
040 19 00 00 00 03 00 00 00 78 02 00 00 19 00 00 00
*050 00 80 00 14 00 00 00 00 20 00 00 80 E5 11 CE 31
060 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
070 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

fot those not familir with spti sample number:
unit serial page number starts in line beggining with ‘050’ :
byte 00: peripheral ‘qualifier && dev. type’
byte 01: page code ( 80h )
byte 02: reserved
byte 03: page length
byte 04-: serial number in ascii (should have only alphanumeric values
but it is not the case with JBOD disk

first four bytes are OK but the rest from 04- seems bad!( null char.?)

PS. the JBOD disk does have a serial number because I can see it with
JBOD’s vendor app.

any help would be appreciated,
Davor


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com