Switch to full style
In-depth technology research: finding new ways to recover data, accessing firmware, writing programs, reading bits off the platter, recovering data from dust.

Forum rules

Please do not post questions about data recovery cases here (use this forum instead). This forum is for topics on finding new ways to recover data. Accessing firmware, writing programs, reading bits off the platter, recovering data from dust...
Post a reply

SCSI newbie trying to issue SCSI "MODE SELECT"

January 15th, 2013, 20:57

I'm trying to issue a MODE SELECT, and am getting SK/ASC/ASCQ == 5/0x26/0
[ILLEGAL REQUEST / INVALID FIELD IN PARAMETER LIST].

There are so many ways to obtain that result... I'd love someone to review what I've got, to knock out any trivial problems. Thanks in advance:

Platform: FreeBSD 9.0
Controller: Adaptec 51645
Software: in-house HDD control software

I'm successfully issuing MODE SENSE, with the following results:

Code:
PS=1; SPF=0; PC=0x8; LEN=18
DEFAULT MODE PARAMS:
0000: 14 00 ff ff 00 00 00 00
0008: ff ff 80 08 00 00 00 00
0016: 00 00


Code:
PS=1; SPF=0; PC=0x8; LEN=18
CURRENT MODE PARAMS:
0000: 10 00 ff ff 00 00 00 00
0008: ff ff 80 08 00 00 00 00
0016: 00 00



I see that the 'WCE' (write cache enable) bit is not set in current page, but is on default page. One might presume it's supported, and it's desirable to have it enabled. I issue the following MODE SELECT:

Code:
CDB: 55 10 00 00 00 00 00 00 1c 00
DATA:
0000: 00 00 00 00 00 00 00 00
0008: 08 12 14 00 ff ff 00 00
0016: 00 00 ff ff 80 08 00 00
0020: 00 00 00 00


and obtain: SK=0x5; ASC=0x26; ASCQ=0x0

Anything obvious?

Re: SCSI newbie trying to issue SCSI "MODE SELECT"

January 15th, 2013, 22:59

You forgot the page code(8) in CDB2
I'm also not sure why you using LLBA bit in CDB1

Re: SCSI newbie trying to issue SCSI "MODE SELECT"

January 15th, 2013, 23:12

Clarify, my bad: these are MODE SENSE (10) and MODE SELECT (10).

LLBAA is on the MODE SENSE;
bit in similar position on MODE SELECT (10) is "PF".

Regardless, I did find a problem elsewhere - and it's working just fine now. Thanks for your eyes!

Re: SCSI newbie trying to issue SCSI "MODE SELECT"

January 16th, 2013, 10:21

Right, sorry for misleading you
Post a reply