linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Albert Lee <albertcc@tw.ibm.com>
To: Tejun Heo <htejun@gmail.com>
Cc: Mark Lord <liml@rtr.ca>, Jeff Garzik <jgarzik@pobox.com>,
	IDE/ATA development list <linux-ide@vger.kernel.org>,
	Alan Cox <alan@redhat.com>,
	Ricardo Salveti de Araujo <rsalveti@br.ibm.com>
Subject: Re: [PATCH] libata: automatically use DMADIR if drive/bridge requires it
Date: Fri, 22 Feb 2008 18:09:42 +0800	[thread overview]
Message-ID: <47BE9F66.5040404@tw.ibm.com> (raw)
In-Reply-To: <47BCFD4E.4070100@gmail.com>

Tejun Heo wrote:
> Back in 2.6.17-rc2, a libata module parameter was added for atapi_dmadir.
> 
> That's nice, but most SATA devices which need it will tell us about it
> in their IDENTIFY PACKET response, as bit-15 of word-62 of the
> returned data (as per ATA7, ATA8 specifications).
> 
> So for those which specify it, we should automatically use the DMADIR bit.
> Otherwise, disc writing will fail by default on many SATA-ATAPI drives.
> 
> This patch adds ATA_DFLAG_DMADIR and make ata_dev_configure() set it
> if atapi_dmadir is set or identify data indicates DMADIR is necessary.
> atapi_xlat() is converted to check ATA_DFLAG_DMADIR before setting
> DMADIR.
> 
> Original patch is from Mark Lord.
> 
> Signed-off-by: Tejun Heo <htejun@gmail.com>
> Cc: Mark Lord <mlord@pobox.com>
> ---
> I don't have a bridge which sets DMADIR but so only checked atapi_dmadir
> parameter.  Thanks.
> 

The patch looks good. However, it seems there is no realworld IDE-to-SATA
bridge that requires DMADIR and also mangles IDENTIFY PACKET bit-15 of
word-62 to indicate its presence.

>From the previous test of the IDE-to-SATA bridges, only the Sil 3611
requires the host software to hint on ATAPI DMADIR. But Sil 3611 doesn't
mangle IDENTIFY PACKET word-62:
http://www.spinics.net/lists/linux-ide/msg01514.html

Maybe we could use ata_dev_knobble() instead? i.e. If it's an ATAPI
device && ata_dev_knobble() then we turn on DMADIR (regardless the
bridge chip used since setting DMADIR won't hurt those don't need it.)
--
albert


  reply	other threads:[~2008-02-22 10:10 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-18 19:02 atapi_dmadir: why do we not (also) auto-detect it from IDENTIFY PACKET ?? Mark Lord
2008-02-18 20:53 ` [PATCH] libata-scsi: automatically use DMADIR if drive/bridge requires it Mark Lord
2008-02-18 22:20   ` Alan Cox
2008-02-19  0:41     ` Mark Lord
2008-02-20 17:18   ` Jeff Garzik
2008-02-20 18:53     ` Mark Lord
2008-02-21  4:25       ` [PATCH] libata: " Tejun Heo
2008-02-22 10:09         ` Albert Lee [this message]
2008-02-22 13:33           ` Mark Lord
2008-02-22 14:11             ` Mark Lord
2008-02-22 16:32             ` Jeff Garzik
2008-02-24  5:29         ` 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=47BE9F66.5040404@tw.ibm.com \
    --to=albertcc@tw.ibm.com \
    --cc=alan@redhat.com \
    --cc=albertl@mail.com \
    --cc=htejun@gmail.com \
    --cc=jgarzik@pobox.com \
    --cc=liml@rtr.ca \
    --cc=linux-ide@vger.kernel.org \
    --cc=rsalveti@br.ibm.com \
    /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).