public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Grant Grundler <grundler@parisc-linux.org>
To: "Richard B. Johnson" <linux-os@analogic.com>
Cc: Grant Grundler <grundler@parisc-linux.org>,
	Alan Stern <stern@rowland.harvard.edu>,
	Alexander Nyberg <alexn@dsv.su.se>, Greg KH <greg@kroah.com>,
	Amit Gud <gud@eth.net>,
	linux-kernel@vger.kernel.org, linux-pci@atrey.karlin.mff.cuni.cz,
	akpm@osdl.org, jgarzik@pobox.com, cramerj@intel.com,
	USB development list <linux-usb-devel@lists.sourceforge.net>
Subject: Re: [PATCH] PCI: Add pci shutdown ability
Date: Tue, 26 Apr 2005 10:19:07 -0600	[thread overview]
Message-ID: <20050426161907.GD2612@colo.lackof.org> (raw)
In-Reply-To: <Pine.LNX.4.61.0504261156470.15142@chaos.analogic.com>

On Tue, Apr 26, 2005 at 12:07:41PM -0400, Richard B. Johnson wrote:
> DMAs don't go on "forever"

They don't. But we also don't know when they will stop.
E.g. NICs will stop DMA when the RX descriptor ring is full.
I don't know when USB stop on it's own.

>   and at the time they are started they
> are doing DMA to or from memory that is "owned" by the user of
> the DMA device. In order for DMAs to continue past that point,
> there needs to be something that got notified of a previous
> completion to start the next one that you state is erroneous.
> If such an erroneous DMA is occurring, it can only occur as
> as result of an interrupt and ISR that is still in-place to
> reprogram and restart DMA on the interrupting device.

No. BIOS (parisc PDC in my case) left the device enabled.
PDC does NOT use interrupts which is exactly why they've left
the device enabled for DMA.

> Therefore,
> all you need to do to quiet any such erroneous DMA operations,
> if they are occurring at all, is to mask off the interrupts
> on anything that hasn't been initialized yet.
> 
> The newer PCI code design has a built-in problem that you
> can't find out the interrupt it will use until you enable
> the device.

DMA does not need to be enabled to read PCI_INTERRUPT_LINE (config space).
Or grab the IRQ # from pci_dev->irq if PCI is already initialized.

grant

>  This means that there is some possibility of
> a race between getting that information and putting in a
> ISR to quiet the device which may still be active because
> it was used during the boot. It think this is the more
> likely scenario than some DMA that is still active.
> 
> Cheers,
> Dick Johnson
> Penguin : Linux version 2.6.11 on an i686 machine (5537.79 BogoMips).
>  Notice : All mail here is now cached for review by Dictator Bush.
>                  98.36% of all statistics are fiction.

  reply	other threads:[~2005-04-26 16:23 UTC|newest]

Thread overview: 57+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <Pine.LNX.4.44L0.0504251128070.5751-100000@iolanthe.rowland.org>
     [not found] ` <SVLXCHCON1syWVLEFN00000099e@SVLXCHCON1.enterprise.veritas.com>
     [not found]   ` <20050425182951.GA23209@kroah.com>
     [not found]     ` <20050425185113.GC23209@kroah.com>
2005-04-25 19:06       ` [PATCH] PCI: Add pci shutdown ability Greg KH
2005-04-25 19:23         ` Jeff Garzik
2005-04-25 20:07           ` Greg KH
2005-04-25 20:11           ` Adam Belay
2005-04-25 19:45         ` Alexander Nyberg
2005-04-25 20:12           ` Greg KH
2005-04-26  3:59             ` Benjamin Herrenschmidt
2005-04-25 20:14           ` Alan Stern
2005-04-25 20:52             ` Alexander Nyberg
2005-04-25 21:12               ` Alan Stern
2005-04-26 15:49                 ` Grant Grundler
2005-04-26 16:04                   ` Alan Stern
2005-04-26 16:37                     ` Grant Grundler
2005-04-26 17:14                       ` Alan Stern
2005-04-26 17:41                         ` Grant Grundler
2005-05-11  5:33                 ` Vivek Goyal
2005-05-11 14:38                   ` Alan Stern
2005-04-25 21:58             ` Andrew Morton
2005-04-25 22:13               ` Dave Jones
2005-04-25 23:23                 ` Adam Belay
2005-04-26  4:32                   ` Benjamin Herrenschmidt
2005-04-26  6:23                     ` Adam Belay
2005-04-26  7:14                       ` [linux-pm] " Nigel Cunningham
2005-04-26  9:16                       ` Pavel Machek
2005-04-26  9:41                   ` Pavel Machek
2005-04-26  3:52                 ` Benjamin Herrenschmidt
2005-04-26 15:14                   ` Alan Stern
2005-04-26  9:39                 ` Pavel Machek
2005-04-26 17:50                   ` Dave Jones
2005-04-26 20:23                     ` Pavel Machek
2005-04-26  3:45               ` Benjamin Herrenschmidt
2005-04-26 15:11               ` Alan Stern
2005-04-26 16:01                 ` Alexander Nyberg
2005-04-26 15:41             ` Grant Grundler
2005-04-26 16:07               ` Richard B. Johnson
2005-04-26 16:19                 ` Grant Grundler [this message]
2005-04-26 17:12                   ` Alan Stern
2005-04-26 17:19                     ` Lee Revell
2005-04-25 20:08         ` Adam Belay
2005-04-25 20:19           ` Greg KH
2005-04-25 20:24             ` Adam Belay
2005-04-25 20:42         ` Pavel Machek
2005-04-25 20:55           ` Adam Belay
2005-04-25 21:06             ` Pavel Machek
2005-04-26  4:30               ` Benjamin Herrenschmidt
2005-04-26 16:12                 ` Grant Grundler
2005-04-26 13:44               ` [linux-usb-devel] " David Brownell
2005-04-26 21:15                 ` Pavel Machek
2005-04-25 21:00           ` Greg KH
2005-04-25 21:13             ` Pavel Machek
2005-04-26  3:41             ` Benjamin Herrenschmidt
2005-04-26 10:11               ` Pavel Machek
2005-04-25 21:13           ` [linux-usb-devel] " David Brownell
2005-04-26  3:39           ` Benjamin Herrenschmidt
2005-04-26  6:33             ` Adam Belay
2005-04-26  6:44               ` Greg KH
2005-05-04  7:02 [PATCH] PCI: fix up word-aligned 16-bit PCI config access through sysfs Greg KH
2005-05-04  7:02 ` [PATCH] PCI: Add pci shutdown ability Greg KH

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=20050426161907.GD2612@colo.lackof.org \
    --to=grundler@parisc-linux.org \
    --cc=akpm@osdl.org \
    --cc=alexn@dsv.su.se \
    --cc=cramerj@intel.com \
    --cc=greg@kroah.com \
    --cc=gud@eth.net \
    --cc=jgarzik@pobox.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-os@analogic.com \
    --cc=linux-pci@atrey.karlin.mff.cuni.cz \
    --cc=linux-usb-devel@lists.sourceforge.net \
    --cc=stern@rowland.harvard.edu \
    /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