From: Mathieu Fluhr <mfluhr@nero.com>
To: Tejun Heo <htejun@gmail.com>
Cc: jgarzik@pobox.com, linux-ide@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: READ SCSI cmd seems to fail on SATA optical devices...
Date: Tue, 14 Nov 2006 11:08:11 +0100 [thread overview]
Message-ID: <1163498891.3005.11.camel@de-c-l-110.nero-de.internal> (raw)
In-Reply-To: <455923B5.3030608@gmail.com>
On Tue, 2006-11-14 at 11:02 +0900, Tejun Heo wrote:
> Hello, Mattieu Fluhr.
>
> Mathieu Fluhr wrote:
> > The problem is that, on SATA devices controlled by libata, on some big
> > files (like for example a 600 MB file) the READ command seems to fail
> > and outputs garbage (not 1 or 2 bytes diff, but the whole buffer).
> > -> This problem does not come out everytime, and each time on
> > different sectors.
> >
> > Please note that:
> > - it is not chipset dependant (tested on nforce4 and sii3114)
> > - it is not medium or device dependant
>
> Hmmm... Interesting. So, you're reading the media by directly issuing
> commands through the sg interface, right? Can you please try the
> followings?
>
> * Try using /dev/srX or /dev/scdX device instead of /dev/sgX. You can
> use the command SG_IO but the code path is different, so it will help us
> rule out sg bug.
>
> * Perform rounds of read-verify test using standard block interface (ie.
> simply opening /dev/srX and reading it).
I will try this and report the results.
>
> [--snip--]
> > - When I force the bus type to be IDE, our software will then send ATA
> > commands. In this case, everything works like a charm. No errors at all.
>
> What do you mean by 'sending ATA commands'? libata exports all devices
> as SCSI devices. For ATA devices, you can use ATA passthrough but you
> send CDBs to ATAPI devices anyway.
Inside our code, we first guess which the bus type of every device using
an INQUIRY cmd (0x12).
- If the device appears to be a SCSI one, then we send "pure" SCSI CDBs
- For an IDE device, we do, as described in the Annex A of the MMC-5
spec, and pad each CDBs to 12 bytes.
So in the case of a READ CDB, we send 10 bytes if the device is a SCSI
one and 12 for IDE one.
>
> Thanks.
>
prev parent reply other threads:[~2006-11-14 10:08 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-13 16:19 READ SCSI cmd seems to fail on SATA optical devices Mathieu Fluhr
2006-11-13 18:49 ` Phillip Susi
2006-11-13 18:56 ` Mathieu Fluhr
2006-11-13 19:32 ` Arjan van de Ven
2006-11-14 15:45 ` Mathieu Fluhr
2006-11-14 17:24 ` Tejun Heo
2006-11-15 15:19 ` Mathieu Fluhr
2006-11-15 16:04 ` Tejun Heo
2006-11-15 16:17 ` Phillip Susi
2006-11-15 16:20 ` Arjan van de Ven
2006-11-15 16:28 ` Alan
2006-11-14 2:02 ` Tejun Heo
2006-11-14 10:08 ` Mathieu Fluhr [this message]
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=1163498891.3005.11.camel@de-c-l-110.nero-de.internal \
--to=mfluhr@nero.com \
--cc=htejun@gmail.com \
--cc=jgarzik@pobox.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@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