lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 02 Feb 2007 13:48:06 +0800
From:	Conke Hu <conke.hu@....com>
To:	Jeff Garzik <jeff@...zik.org>
Cc:	Alan <alan@...rguk.ukuu.org.uk>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [LIBATA BUG] sr.c: TEST_UNIT_READY error

On Wed, 2007-02-07 at 07:40 -0500, Jeff Garzik wrote:
> Conke Hu wrote:
> > Hi,
> >    TEST_UNIT_READY in get_capabilities (drivers/scsi/sr.c line 743, or
> > see below) always returns error.
> > 
> >   ---------------- code begin -----------------------------
> >     retries = 0;
> >     do {
> >         memset((void *)cmd, 0, MAX_COMMAND_SIZE);
> >         cmd[0] = TEST_UNIT_READY;
> > 
> >         the_result = scsi_execute_req (cd->device, cmd, DMA_NONE, NULL,
> >                            0, &sshdr, SR_TIMEOUT,
> >                            MAX_RETRIES);
> > 
> >         retries++;
> >     } while (retries < 5 &&
> >          (!scsi_status_is_good(the_result) ||
> >           (scsi_sense_valid(&sshdr) &&
> >            sshdr.sense_key == UNIT_ATTENTION)));
> >   ---------------- code end -----------------------------
> > 
> >   I debugged all kernel versions from 2.6.17 to 2.6.20 on several AMD
> > and other vendor's PATA/IDE controllers, and I get the_result==0x8000002
> > and retries==5; on silicon image 3132, i get the_result=0x2eb.
> >   Does 0x8000002 mean ((DRIVER_SENSE << 24) | SAM_STAT_CHECK_CONDITION)?
> > what's wrong?
> 
> What does the sense data returned in the sense buffer say is wrong?
> 
> 	Jeff

I dump scsi_sense_hdr as follows:
sshdr.response_code = 0x70
sshdr.sense_key = 0x2
sshdr.asc = 0x3a
sshdr.ascq = 0x1
sshdr.additional_length = 0x0

the sense_key is 0x2 (NOT_READY), but the expected UNIT_ATTENTION :(

BTW, I am sorry for a mistake, Sil3132 also returns 0x8000002, not 0x2eb
as I said in the first mail. In a word, all cases return "the_result" as
0x8000002.

Conke



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ