Linux ATA/IDE development
 help / color / mirror / Atom feed
From: Mathieu Fluhr <mfluhr@nero.com>
To: Jeff Garzik <jeff@garzik.org>
Cc: Robert Hancock <hancockr@shaw.ca>,
	James Bottomley <James.Bottomley@SteelEye.com>,
	LKML <linux-kernel@vger.kernel.org>,
	ide <linux-ide@vger.kernel.org>,
	linux-scsi <linux-scsi@vger.kernel.org>
Subject: Re: Inquiry data and emulated SG devices
Date: Thu, 18 Oct 2007 13:57:30 +0200	[thread overview]
Message-ID: <1192708650.3266.38.camel@de-c-l-110.nero-de.internal> (raw)
In-Reply-To: <4717302D.4050107@garzik.org>

On Thu, 2007-10-18 at 06:06 -0400, Jeff Garzik wrote:

> The SCSI midlayer makes a lot of "if scsi version <= 2" choices.  In the 
> case of ATAPI, we do not want to force ATAPI down the path of ancient 
> SCSI devices, as this disables some MMC features that modern ATAPI 
> devices support.

If I fully understand your point, if this faking code wasn't present,
and if the inquiry data was left as it is, all modern ATAPI devices
would be considered as really old SCSI devices. Am I right?

And then why external (FireWire and USB) devices reports the inquiry
data correctly? After all they are also considered to be SCSI devices...
 -> But apparently, from what /proc/scsi/scsi outputs, the ANSI SCSI   
    revision is set to 0 (for both ieee1394 and USB devices). This 
    seems to be coherent with what the inquiry data buffer outputs.


Also another question, more from the developer point of view, you have
to know which real interface is behind a device. You might get
performance loss if the real type is not known.

For example, I send a BLANK cdb to fully blank a disc, with the 'immed'
flag not set, so that the requested operation is processed to completion
prior to returning status.
- for real SCSI devices, this is not harmfull, as the bus is not blocked
- for IDE devices, AFAIK, the bus will be blocked until the command
termination... so for a CD erased a 1x, the bus might be blocked for
74min.


Also the SCSI commands that are sent to the device depends from its
hardware bus type. Not only for the CDB length, but also for MODE
SENSE/MODE SELECT CDBs in which for example a MODE SENSE (6) would fail
on an IDE device... even if it is described in the SPC-3 standard.

As far as I saw in libata-scsi.c there a SCSI-to-ATAPI and ATAPI-to-SCSI
translator that automatically transform the command sent... Am I also
right on this point?
    
	Mathieu


  reply	other threads:[~2007-10-18 11:59 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <fa.PgEHbZ0E5ogcX8bZwvrUeZB+eJs@ifi.uio.no>
2007-10-18  1:22 ` Inquiry data and emulated SG devices Robert Hancock
2007-10-18  1:31   ` Jeff Garzik
2007-10-18  9:59     ` Mathieu Fluhr
2007-10-18 10:06       ` Jeff Garzik
2007-10-18 11:57         ` Mathieu Fluhr [this message]
2007-10-18 12:13           ` James Bottomley
2007-10-18 12:44             ` Mathieu Fluhr
2007-10-18 10:57     ` James Bottomley

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=1192708650.3266.38.camel@de-c-l-110.nero-de.internal \
    --to=mfluhr@nero.com \
    --cc=James.Bottomley@SteelEye.com \
    --cc=hancockr@shaw.ca \
    --cc=jeff@garzik.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox