linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sergei Shtylylov <sshtylyov@ru.mvista.com>
To: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Cc: alan@lxorguk.ukuu.org.uk, B.Zolnierkiewicz@elka.pw.edu.pl,
	linux-ide@vger.kernel.org
Subject: Re: + fix-ide-dma-resource-managment.patch added to -mm tree
Date: Mon, 27 Mar 2006 16:39:36 +0400	[thread overview]
Message-ID: <4427DD08.5030506@ru.mvista.com> (raw)
In-Reply-To: <58cb370e0603270421s4e15b897nc415b8af76a447cf@mail.gmail.com>

Hello.

Bartlomiej Zolnierkiewicz wrote:

>>>>>Resolve several IDE DMA resource management issues:

>>>>>- release DMA engine for memory mapped DMA as well

>>>>NAK - this won't work, see siimage.c how these resources were
>>>>really reserved in the first place [ request_mem_region() ]

>>    NB: it's reserved this way only when available -- this driver can work
>>with both I/O and memory mapped regs...

>>>   Oops, looks like I missed that missing ide_setup_dma() call in that
>>>driver...

>>    No, I've just forgotten that it's called implicitly from setup-pci.c since
>>init_dma() "method" in not defined in that driver. So, looks like you're wrong
>>here -- it should work currently BUT the DMA engine is not released since
>>(mmio == 2) check and return precedes call to ide_release_dma_engine() in
>>ide_release_dma().

> please take a look at siimage.c:init_iops_siimage():
> 
> 	if (pci_get_drvdata(dev) == NULL)
> 		return;

    So what? It just leaves the default I/O mapped iops intact and the driver 
init. continues...

> 	init_mmio_iops_siimage(hwif);

> and siimage.c:init_mmio_iops_siimage():

> 	hwif->mmio			= 2;

> so ->mmio == 2 IFF MMIO is used

    Yes, but ide_setup_dma() is called in _both_ cases with the current IDE 
core. And therefore, ide_release_dma() should've undone what ide_setup_dma() 
did... As I understand now, both the current behavior and what I'm proposing 
are wrong.

> * for ->mmio == 0 current code seem to release resources properly
> * for ->mmio == 2 you need to release the region that was reserved
>   originally (for siimage it is one big fat mem region) and not standard
>   DMA I/O regions, therefore this change is wrong

    Yeah, I saw that prefectly clear before posting the 1st patch but really 
didn't have time for such a drastic change as adding the cleanup hook to a lot 
of drivers (and not much hope to get it accepted :-)

[skipped]

> Thanks,
> Bartlomiej

WBR, Sergei

  reply	other threads:[~2006-03-27 12:41 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200603212323.k2LNNSnJ006228@shell0.pdx.osdl.net>
     [not found] ` <58cb370e0603261309p126fdc64j1140bbf437ffe06e@mail.gmail.com>
2006-03-27 10:54   ` + fix-ide-dma-resource-managment.patch added to -mm tree Sergei Shtylylov
2006-03-27 11:38     ` Sergei Shtylylov
2006-03-27 12:21       ` Bartlomiej Zolnierkiewicz
2006-03-27 12:39         ` Sergei Shtylylov [this message]
2006-03-27 12:58           ` Bartlomiej Zolnierkiewicz
2006-03-27 13:03             ` Sergei Shtylylov
2006-03-28 13:12       ` Sergei Shtylylov
2006-03-28 14:11         ` Bartlomiej Zolnierkiewicz
2006-03-28 14:20           ` Sergei Shtylylov
2006-03-28 16:21             ` Sergei Shtylylov
2006-03-28 19:26               ` Alan Cox
2006-03-28 19:19                 ` Sergei Shtylylov
2006-03-27 12:07     ` Bartlomiej Zolnierkiewicz
2006-03-27 12:21       ` Sergei Shtylylov
2006-03-27 12:33         ` Bartlomiej Zolnierkiewicz
2006-03-27 12:57           ` Sergei Shtylylov
2006-03-27 13:08             ` 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=4427DD08.5030506@ru.mvista.com \
    --to=sshtylyov@ru.mvista.com \
    --cc=B.Zolnierkiewicz@elka.pw.edu.pl \
    --cc=alan@lxorguk.ukuu.org.uk \
    --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).