public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@SteelEye.com>
To: Jeff Garzik <jeff@garzik.org>
Cc: linux-scsi <linux-scsi@vger.kernel.org>
Subject: Re: [PATCH] libsas, aic94xx: fix dma mapping cockups with ATA
Date: Mon, 16 Jul 2007 15:21:57 -0500	[thread overview]
Message-ID: <1184617317.3447.33.camel@localhost.localdomain> (raw)
In-Reply-To: <469BD2C2.4040002@garzik.org>

On Mon, 2007-07-16 at 16:19 -0400, Jeff Garzik wrote:
> James Bottomley wrote:
> > This one was noticed by Gilbert Wu of Adaptec:
> > 
> > The libata core actually does the DMA mapping for you, so there has to
> > be an exception in the device drivers that *don't* do dma mapping for
> > ATA commands.  However, since we've already done this, libsas must now
> > dma map any ATA commands that it wishes to issue ... and yes, this is a
> > horrible mess.
> 
> Can you help me understand this logic?
> 
> libsas must DMA map an ATA command... because libata also DMA maps an 
> ATA command?  That does not make sense to me.

Why not? ... since the driver must *not* map an ATA command (to prevent
double mapping from libata), it can't tell if the command comes from
libsas or libata ... so libsas has to map any internal ATA commands it
uses.

I think you're perhaps thinking libsas must map an ATA command libata
has already mapped?  If so, no, libsas must only map the commands it is
using internally independent of libata.

James



  reply	other threads:[~2007-07-16 20:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-16 18:41 [PATCH] libsas, aic94xx: fix dma mapping cockups with ATA James Bottomley
2007-07-16 20:19 ` Jeff Garzik
2007-07-16 20:21   ` James Bottomley [this message]
2007-07-16 21:42     ` 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=1184617317.3447.33.camel@localhost.localdomain \
    --to=james.bottomley@steeleye.com \
    --cc=jeff@garzik.org \
    --cc=linux-scsi@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