Subject: [Fwd: SCSI scsi status]
To: None <port-mac68k@NetBSD.ORG>
From: Randy B. Lim <rblim@aht.com>
List: port-mac68k
Date: 05/25/1997 18:45:54
This is a multi-part message in MIME format.
--------------794BDF32446B9B3D2781E494
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Hi,
I am not sure if this is a place for SCSI discussion. If not , please
forward this mail to anywhere , you think, I can get the answer.
thanks a lot in advance!
Randy,
--------------794BDF32446B9B3D2781E494
Content-Type: message/rfc822
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Message-ID: <3388EA5D.41C67EA6@aht.com>
Date: Sun, 25 May 1997 18:41:49 -0700
From: "Randy B. Lim" <rblim@aht.com>
MIME-Version: 1.0
To: Jeff Polk <polk@BSDI.COM>
Subject: SCSI scsi status
References: <199705081404.IAA17313@demiurge.BSDI.COM>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Jeff Polk wrote:
>
> The contents of the cdb (whatever type) are determined by the
> device. You'll have to fill them in appropriately and the system will
> send them to the device without doing anything to them.
>
> Jeff
Hi,
I rewrote the source code of CDR to make them work for scanner.
when I do the Inquiry command , it is ok. However, if I do mode sense
command like the following:
mode_sense_cmd()
{
bf *bftab = current_cmd->cmd_bf;
pm *pmp;
restore_default("dbd", &dis_block_descriptor);
restore_default("pc", &page_control);
restore_default("pcode", &page_code);
save_default("pf", &pf);
save_default("sp", &sp);
set_parameters("code=0x1a,length=255");
scsi_cmd(SUC_READ);
pmp = extract_bf("bdl", 0);
printf("pm_value is %s\n", pmp->pm_value);
bftab[1].bf_len = pmp->pm_byte + pmp->pm_value + 1;
pmp = extract_bf("mdl", 0);
bftab[2].bf_buf = &bftab[1].bf_buf[bftab[1].bf_len];
bftab[2].bf_len = pmp->pm_value + 1 -
(bftab[2].bf_buf - bftab[1].bf_buf);
}
And then I got the message
" scsi status:check condition:illegal request:parameter value invalid."
and program exited with code 01
can you see what is wrong with the parameter value?
Also, if I run the READ10 command and only to get the following:
"scsi status: check condition, class 1, code 10"
how to decode calss 1, code 10
thanks a lot for your helps
regards
Randy,
--------------794BDF32446B9B3D2781E494--