linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
To: Grant Grundler <grundler@google.com>
Cc: linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 03/10] ide: destroy DMA mappings after ending DMA
Date: Sat, 14 Mar 2009 20:51:57 +0100	[thread overview]
Message-ID: <200903142051.57971.bzolnier@gmail.com> (raw)
In-Reply-To: <da824cf30903140012g1565696kd6c69b4cd513f15b@mail.gmail.com>


Hi,

On Saturday 14 March 2009, Grant Grundler wrote:
> On Fri, Feb 20, 2009 at 6:12 PM, Bartlomiej Zolnierkiewicz
> <bzolnier@gmail.com> wrote:
> > From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
> > Subject: [PATCH] ide: destroy DMA mappings after ending DMA
> >
> > Move ide_destroy_dmatable() call out from ->dma_end method to
> > {ide_pc,cdrom_newpc,ide_dma}_intr(), ide_dma_timeout_retry()
> > and sgiioc4_resetproc().
> ...
> > --- a/drivers/ide/ide-dma-sff.c
> > +++ b/drivers/ide/ide-dma-sff.c
> > @@ -310,8 +310,6 @@ int ide_dma_end(ide_drive_t *drive)
> >        /* clear INTR & ERROR bits */
> >        ide_dma_sff_write_status(hwif, dma_stat | ATA_DMA_ERR | ATA_DMA_INTR);
> >
> > -       /* purge DMA mappings */
> > -       ide_destroy_dmatable(drive);
> >        wmb();
> 
> Bartlomiej,
> I think the wmb() could removed as well. The outb/writeb functions are
> required to be strongly ordered and I don't see anything else touching
> DMA-able memory here.

Indeed.  IIRC this code precedes the requeirement for outb/writeb to be
strongly ordered.

Seems like wmb() in ide_dma_start() is also superfluous nowadays...

> BTW, care to remove "mask" usage from this function?
> It's really not needed (can be replaced with #define).

Feel free to remove it. :)

> I can create separate patches for both. Which git tree should I base
> them against?

linux-next git tree
(or pata-2.6 quilt tree)

> ...
> > --- a/drivers/ide/scc_pata.c
> > +++ b/drivers/ide/scc_pata.c
> > @@ -365,8 +365,6 @@ static int __scc_dma_end(ide_drive_t *dr
> >        dma_stat = scc_dma_sff_read_status(hwif);
> >        /* clear the INTR & ERROR bits */
> >        scc_ide_outb(dma_stat | 6, hwif->dma_base + 4);
> > -       /* purge DMA mappings */
> > -       ide_destroy_dmatable(drive);
> >        /* verify good DMA status */
> >        wmb();
> 
> I think this wmb() can be removed too.
> 
> ....
> > --- a/drivers/ide/tx4939ide.c
> > +++ b/drivers/ide/tx4939ide.c
> > @@ -335,11 +335,9 @@ static int tx4939ide_dma_end(ide_drive_t
> >        /* read and clear the INTR & ERROR bits */
> >        dma_stat = tx4939ide_clear_dma_status(base);
> >
> > -       /* purge DMA mappings */
> > -       ide_destroy_dmatable(drive);
> > -       /* verify good DMA status */
> >        wmb();
> 
> and this one as well.

Seems so but please cc: scc_pata & tx4939 maintainers on your patch.

Thanks,
Bart

  reply	other threads:[~2009-03-14 19:50 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-20 17:11 [PATCH 00/10] ide: DMA methods cleanups/sanitizations Bartlomiej Zolnierkiewicz
2009-02-20 17:11 ` [PATCH 01/10] ide: add ->dma_clear method and remove ->dma_timeout one Bartlomiej Zolnierkiewicz
2009-03-08 22:17   ` Sergei Shtylyov
2009-02-20 17:11 ` [PATCH 02/10] ide: inline ide_dma_timeout() into ide_dma_timeout_retry() Bartlomiej Zolnierkiewicz
2009-03-08 22:18   ` Sergei Shtylyov
2009-02-20 17:12 ` [PATCH 03/10] ide: destroy DMA mappings after ending DMA Bartlomiej Zolnierkiewicz
2009-03-09 14:00   ` Sergei Shtylyov
2009-03-14  7:12   ` Grant Grundler
2009-03-14 19:51     ` Bartlomiej Zolnierkiewicz [this message]
2009-03-14 20:45       ` Grant Grundler
2009-03-14 20:50         ` James Bottomley
2009-02-20 17:12 ` [PATCH 04/10] ide: add ide_dma_prepare() helper Bartlomiej Zolnierkiewicz
2009-03-09 14:36   ` Sergei Shtylyov
2009-02-20 17:12 ` [PATCH 05/10] ns87415: use custom ->dma_{start,end} to handle ns87415_prepare_drive() Bartlomiej Zolnierkiewicz
2009-03-08 22:22   ` Sergei Shtylyov
2009-02-20 17:12 ` [PATCH 06/10] trm290: use custom ->dma_{start,end} to handle trm290_prepare_drive() Bartlomiej Zolnierkiewicz
2009-03-08 22:26   ` Sergei Shtylyov
2009-02-20 17:12 ` [PATCH 07/10] ide: add ->dma_check method Bartlomiej Zolnierkiewicz
2009-03-08 22:32   ` Sergei Shtylyov
2009-03-11 16:36     ` Bartlomiej Zolnierkiewicz
2009-02-20 17:12 ` [PATCH 08/10] ide: move ide_map_sg() call out from ->dma_setup method Bartlomiej Zolnierkiewicz
2009-03-09 14:42   ` Sergei Shtylyov
2009-03-11 16:36     ` Bartlomiej Zolnierkiewicz
2009-03-11 17:10       ` Sergei Shtylyov
2009-03-11 17:36         ` Bartlomiej Zolnierkiewicz
2009-02-20 17:12 ` [PATCH 09/10] ide: set/clear drive->waiting_for_dma flag in the core code Bartlomiej Zolnierkiewicz
2009-03-10 15:05   ` Sergei Shtylyov
2009-02-20 17:12 ` [PATCH 10/10] ide: sanitize ide_build_sglist() and ide_destroy_dmatable() Bartlomiej Zolnierkiewicz

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=200903142051.57971.bzolnier@gmail.com \
    --to=bzolnier@gmail.com \
    --cc=grundler@google.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@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).