linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Garzik <jgarzik@pobox.com>
To: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Cc: Linux IDE <linux-ide@vger.kernel.org>
Subject: Re: libata vs ATAPI
Date: Tue, 12 Oct 2004 16:50:20 -0400	[thread overview]
Message-ID: <416C438C.4010902@pobox.com> (raw)
In-Reply-To: <58cb370e04101213215ce9a23c@mail.gmail.com>

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


> Then REPORT_LUNS errors out (dev_stat = 0x51)...

This doesn't surprise me, I bet that many ATAPI devices might not like 
REPORT LUNS


> I've noticed that DMA is used by default for all packet commands
> which doesn't seem to be wise thing to do so I disabled it.

DMA is _never_ used for packet commands, only for packet data.

libata enables DMA at the maximum level supported by both the device and 
host controller.  I definitely want to do this by default.


> 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.  :)

> Also ATAPI-SCSI emulation is still missing in libata-scsi.c.

I wish to minimize the emulation.  That means no read/write emulation, 
just modify INQUIRY to report MMC, and do auto-sense (as it is presented 
to the SCSI layer).


> I'm sure you know more about what needs to be done.
> Could you make some nice, detailed TODO? :-)

Pat LaVarre had IOmega ATAPI devices working, once he hand-hacked 
REQUEST SENSE.  As for to-do list, I think this email covers it.  Here's 
a summary...

* possibly avoid REPORT LUNS for ATAPI devices
* when check condition occurs, automatically request sense inside 
driver, and put that data into the sense buffer
* make INQUIRY report SCSI version MMC-3 (or later...)
* support strange sector sizes

	Jeff



  reply	other threads:[~2004-10-12 20:50 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 [this message]
2004-10-12 21:17   ` Bartlomiej Zolnierkiewicz
2004-10-12 21:22     ` Jeff Garzik
2004-10-12 21:36       ` Bartlomiej Zolnierkiewicz
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=416C438C.4010902@pobox.com \
    --to=jgarzik@pobox.com \
    --cc=bzolnier@gmail.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).