From: Albert Lee <albertcc@tw.ibm.com>
To: dougg@torque.net
Cc: albertl@mail.com, Alan Cox <alan@lxorguk.ukuu.org.uk>,
YUP <yupadmin@gmail.com>,
Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>,
linux-ide@vger.kernel.org,
Sergei Shtylyov <sshtylyov@ru.mvista.com>,
Jeff Garzik <jeff@garzik.org>
Subject: Re: libata: CD and dvd devices not recognized
Date: Mon, 26 Mar 2007 13:50:41 +0800 [thread overview]
Message-ID: <46075F31.7010806@tw.ibm.com> (raw)
In-Reply-To: <4603F00B.30801@torque.net>
Douglas Gilbert wrote:
> Albert Lee wrote:
>
>>Alan Cox wrote:
>>
>>>>We have two possible solutions here:
>>>>a. Patch Ubuntu, such that the incorrect INQUIRY is fixed.
>>>>b. Patch kernel, such that the AOpen drives are blacklisted.
>>>> Each INQUIRY is inspected for the blacklisted drives.
>>>> If the INQUIRY looks wrong, the INQUIRY is rejected.
>>>>
>>>>I guess a. is the preferred solution...
>>>
>>>We have two problems here
>>>
>>>#1 Ubuntu got the inquiry command wrong
>>>
>>>#2 Until now we considered "INQUIRY" a safe command for SG_IO passthrough.
>>>
>>>We can't really take INQUIRY out of SG_IO so do we decide its the
>>>hardware vendors problem or do something cleverer in the filters ?
>
>
> Albert,
> "Definitions:
> ....
> Reserved: A keyword referring to bits, bytes, words, fields
> and code values set aside for future standardization. A
> reserved bit, byte, word or field shall be set to zero, or
> in accordance with a future version to this standard.
> Recipients are not required to check reserved bit, bytes,
> words or fields for zero values. ..." [SPC-4 rev 9]
>
> I haven't seen anywhere that says that a recipient may
> crash and burn if it receives a non zero value in
> a reserved field.
>
Thanks for the advice (also Sergei and Alan's). Yurema did
more test on the Aopen 56X/AKH and it seems has trouble with
other commands, too. (It also chokes on GET_CONFIGURATION, etc.
during request sense.) Agreed it's the drive/firmware problem,
not the reserved EVPD bit nor Ubuntu/hald/scsi_id's fault.
Maybe the best fix is firmware update. I will ask AOpen about
any firmware update available for it.
> That suggests to me that the ATAPI drive (TORiSAN) should
> be black listed.
It's the AOpen 56X/AKH drive that chokes on INQUIRY with EVPD=1.
The TORiSAN drive has another ATAPI DMA problem and max_sector
limitation. Sorry for the mix-up.
>
>
>>Maybe the SG_IO author has better idea (ccing Doug)?
>
>
> Filtering is madness. We can have:
> - ATA commands passing through SCSI commands
> - encapsulated SCSI commands (security freaks)
> - and of course vendor specific commands
>
> to name a few.
>
> Setting the EVPD bit is to fetch VPD pages (and the
> failure shown in this thread is an attempt to fetch
> a list of supported VPD pages). The device identification
> VPD page (0x83) is very important in FCP, SAS, SAT.
> ATA8-ACS allocates 8 bytes in its IDENTIFY DEVICE response
> for a wwn. Not sure if any wwn has been proposed for ATAPI
> devices.
>
>
>>BTW, in addition to the AOpen "INQUIRY with EVPD" problem, we have
>>another imperfect ATAPI drive (TORiSAN) that freezes when "READ >= 128KB".
>>(http://bugzilla.kernel.org/show_bug.cgi?id=6710)
>>
>>We can limit "dev->max_sectors" to workaround the TORiSAN problem.
>>But I don't know whether "dev->max_sectors" also works for SG_IO?
>>If no, some user space application, unaware of the problem,
>>might send a "correct" READ that locks the drive completely.
>
>
> Currently only SCSI subsystem LLDs set max_sectors
> (although libata might). Can it be set via sysfs?
> Recent versions of the sg driver honour max_sectors
> and the block layer SG_IO ioctl implementation always
> has.
It's good to know that the sg driver honors max_sectors.
So, my previous concern about user space app might send commands with
invalid max_sect that kills the TORiSAN drive is solved. :)
>
> SCSI direct access devices (i.e. SCSI disks) have a VPD
> page that supplies block limit (and optimal) values
> for data transfers. Linux doesn't currently ask that
> particular question. Of course the standard that defines
> block limits also defines an error response if it is
> exceeded.
>
Thanks,
Albert
next prev parent reply other threads:[~2007-03-26 5:50 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-14 22:14 libata: CD and dvd devices not recognized YUP
2007-03-15 3:56 ` Albert Lee
2007-03-15 13:11 ` YUP
2007-03-15 17:32 ` Albert Lee
2007-03-16 10:16 ` YUP
2007-03-16 15:06 ` Albert Lee
2007-03-16 15:50 ` YUP
2007-03-17 13:29 ` Bartlomiej Zolnierkiewicz
2007-03-17 14:39 ` Albert Lee
2007-03-17 15:00 ` Bartlomiej Zolnierkiewicz
2007-03-17 18:38 ` YUP
2007-03-17 18:47 ` YUP
2007-03-17 19:12 ` Bartlomiej Zolnierkiewicz
2007-03-17 19:22 ` YUP
2007-03-17 20:07 ` Bartlomiej Zolnierkiewicz
2007-03-18 10:07 ` YUP
2007-03-18 15:10 ` Bartlomiej Zolnierkiewicz
2007-03-18 15:22 ` YUP
2007-03-18 15:54 ` Bartlomiej Zolnierkiewicz
2007-03-18 15:49 ` YUP
2007-03-18 22:48 ` YUP
2007-03-19 3:31 ` Albert Lee
2007-03-19 8:22 ` YUP
2007-03-19 8:29 ` Albert Lee
2007-03-19 12:10 ` Sergei Shtylyov
2007-03-19 19:35 ` YUP
2007-03-20 7:27 ` Albert Lee
2007-03-20 9:07 ` Albert Lee
2007-03-21 4:52 ` Albert Lee
2007-03-21 9:01 ` YUP
2007-03-22 6:06 ` Albert Lee
2007-03-22 7:09 ` Tejun Heo
2007-03-22 12:37 ` Alan Cox
2007-03-23 3:40 ` Albert Lee
2007-03-23 15:19 ` Douglas Gilbert
2007-03-26 5:50 ` Albert Lee [this message]
2007-03-22 14:50 ` Sergei Shtylyov
2007-03-23 3:21 ` Albert Lee
2007-03-19 23:02 ` YUP
2007-03-20 15:23 ` Sergei Shtylyov
2007-03-23 22:13 ` Bartlomiej Zolnierkiewicz
2007-03-26 5:53 ` Albert Lee
2007-03-18 6:42 ` YUP
2007-03-16 22:37 ` YUP
2007-03-17 3:24 ` Albert Lee
2007-03-17 9:09 ` YUP
2007-03-17 10:51 ` Albert Lee
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=46075F31.7010806@tw.ibm.com \
--to=albertcc@tw.ibm.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=albertl@mail.com \
--cc=bzolnier@gmail.com \
--cc=dougg@torque.net \
--cc=jeff@garzik.org \
--cc=linux-ide@vger.kernel.org \
--cc=sshtylyov@ru.mvista.com \
--cc=yupadmin@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.