--- Begin Message ---
- To: Jeff Polk <polk_(_at_)_BSDI_(_dot_)_COM>
- Subject: SCSI scsi status
- From: "Randy B. Lim" <rblim_(_at_)_aht_(_dot_)_com>
- Date: Sun, 25 May 1997 18:41:49 -0700
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,
--- End Message ---