From: Jeff Garzik <jeff@garzik.org>
To: Mark Lord <liml@rtr.ca>
Cc: Linux IDE <linux-ide@vger.kernel.org>, Tejun Heo <htejun@gmail.com>
Subject: Re: [PATCH] libata: add support for ATA_16 commands to ATAPI devices
Date: Tue, 02 Jan 2007 19:50:10 -0500 [thread overview]
Message-ID: <459AFDC2.6060900@garzik.org> (raw)
In-Reply-To: <200701021939.10496.liml@rtr.ca>
Mark Lord wrote:
> This patch adds support for passing ATA_16 commands
> through to ATAPI devices in libata. In practice, the upper layers will
> still currently prevent ATA_16 commands, as no (?) ATAPI drives support
> them yet. But it will work if such a drive is ever encountered.
>
> Support for ATA_16 is necessary for using SG_IO from userspace,
> and an upcoming hdparm release will be updated to use this interface.
>
> This version is very similar to the earlier first submission,
> except that ATA_12 is no longer passed through to ATAPI
> because of the conflict it has with the SCSI BLANK opcode.
>
> Signed-off-by: Mark Lord <mlord@pobox.com>
>
> --- old/drivers/ata/libata-scsi.c 2007-01-02 19:20:23.000000000 -0500
> +++ new/drivers/ata/libata-scsi.c 2007-01-02 19:20:49.000000000 -0500
> @@ -2650,6 +2650,12 @@
>
> static inline ata_xlat_func_t ata_get_xlat_func(struct ata_device *dev, u8 cmd)
> {
> + if (cmd == ATA_16)
> + return ata_scsi_pass_thru;
> +
> + if (dev->class == ATA_DEV_ATAPI)
> + return atapi_xlat;
> +
As I said, provide some avenue for the user to choose.
I do not wish to completely eliminate the current behavior, which passes
through all opcodes to the ATAPI device. You cannot guarantee that
ATA_16 is never used for a vendor-reserved opcode, for example.
Your proposed change to the default behavior is ACK'd, as long as the
current behavior is not completely eliminated, as you have done above.
Jeff
next prev parent reply other threads:[~2007-01-03 0:50 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-03 0:39 [PATCH] libata: add support for ATA_16 commands to ATAPI devices Mark Lord
2007-01-03 0:44 ` Mark Lord
2007-01-03 0:50 ` Jeff Garzik [this message]
2007-01-03 1:07 ` [PATCH] " Alan
2007-01-03 1:06 ` Jeff Garzik
2007-01-03 5:44 ` Mark Lord
2007-01-03 11:34 ` Alan
2007-01-03 14:18 ` Mark Lord
2007-01-03 5:47 ` Mark Lord
2007-01-03 6:01 ` [PATCH] libata: add atapi_passthru=1 parameter Mark Lord
2007-01-03 6:24 ` [PATCH] RESPIN: " Mark Lord
2007-01-03 18:17 ` Mark Lord
2007-01-20 0:08 ` Jeff Garzik
2007-01-26 2:39 ` Mark Lord
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=459AFDC2.6060900@garzik.org \
--to=jeff@garzik.org \
--cc=htejun@gmail.com \
--cc=liml@rtr.ca \
--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).