linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: Linux IDE <linux-ide@vger.kernel.org>, Jens Axboe <axboe@suse.de>
Subject: Re: libata vs ATAPI
Date: Tue, 12 Oct 2004 23:36:22 +0200	[thread overview]
Message-ID: <58cb370e0410121436749e2bfb@mail.gmail.com> (raw)
In-Reply-To: <20041012212225.GA2625@havoc.gtf.org>

On Tue, 12 Oct 2004 17:22:25 -0400, Jeff Garzik <jgarzik@pobox.com> wrote:
> On Tue, Oct 12, 2004 at 11:17:38PM +0200, Bartlomiej Zolnierkiewicz wrote:
> > On Tue, 12 Oct 2004 16:50:20 -0400, Jeff Garzik <jgarzik@pobox.com> wrote:
> > > Bartlomiej Zolnierkiewicz wrote:
> > > > Hi Jeff,
> > > >
> > > > Is libata currently supposed to work with ATAPI
> > > > (I know about lack of REQUEST_SENSE support)?
> > > >
> > > > With ATA_ENABLE_ATAPI defined INQUIRY seems to succeed for my
> > > > TOSHIBA ODD-DVD SD-R6372 but empty info is printed by SCSI layer.
> > >
> > > I get this too
> >
> > OTOH ide-scsi gets correct INQUIRY output
> 
> I spoke incorrect, I meant to say the exact opposite...!
> 
> I get correct INQUIRY output.

damn ;-)

> > > libata enables DMA at the maximum level supported by both the device and
> > > host controller.  I definitely want to do this by default.
> >
> > Me too but I suppose that there are many devices which don't like it
> > (otherwise restrictions in ide-cd and ide-scsi make no sense).
> >
> > Jens?
> 
> The IDE layer currently figures that all my test CD-ROMs support DMA, so
> I would like libata to do that too ;-)

INQUIRY is done in PIO in ide-scsi and it works for this device

> > > > Unfortunately it doesn't help because atapi_pio_sector() assumes
> > > > transfer length to be % SECTOR_SIZE and transfer length for INQUIRY
> > > > is mere 36 bytes so this fails.
> > >
> > > Yes, you are welcome to fix this assumption.  :)
> >
> > Another bug in this area: bcount is set to 64 * 1024 (0xFFFF) but
> > ATA/ATAPI spec defines max bcount as 0xFFFE and there must
> > be some reason why ide-scsi limits it to 63 * 1024 and ide-cd to
> > 32 * 1024.
> 
> bcount should be set to 8K (one SATA FIS) for PIO,
> and 0xFFFF for DMA.  It's not used for DMA.

According to ATA/ATAPI-5 spec bcount is ignored for
non-PIO transfers.

It sets bcount also for no-data which seems wrong.

> Where is this code in libata?

atapi_xlat() in libata-scsi.c

Bartlomiej

  reply	other threads:[~2004-10-12 21:36 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-12 20:21 libata vs ATAPI Bartlomiej Zolnierkiewicz
2004-10-12 20:50 ` Jeff Garzik
2004-10-12 21:17   ` Bartlomiej Zolnierkiewicz
2004-10-12 21:22     ` Jeff Garzik
2004-10-12 21:36       ` Bartlomiej Zolnierkiewicz [this message]
2004-10-12 21:45         ` Jeff Garzik
2004-10-12 23:03           ` Bartlomiej Zolnierkiewicz
2004-10-15 13:13           ` Jens Axboe
2004-10-15 17:17             ` Jeff Garzik
2004-10-12 21:30     ` Jeff Garzik
2004-10-12 21:39       ` Bartlomiej Zolnierkiewicz
2004-10-12 21:46         ` Jeff Garzik
2004-10-14  7:13     ` Jens Axboe
2004-10-14 19:19       ` Bartlomiej Zolnierkiewicz
2004-10-14 21:15         ` Bartlomiej Zolnierkiewicz
2004-10-15  5:00           ` Jeff Garzik

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=58cb370e0410121436749e2bfb@mail.gmail.com \
    --to=bzolnier@gmail.com \
    --cc=axboe@suse.de \
    --cc=jgarzik@pobox.com \
    --cc=linux-ide@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;
as well as URLs for NNTP newsgroup(s).