Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261655AbVDZQXu (ORCPT ); Tue, 26 Apr 2005 12:23:50 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261642AbVDZQUb (ORCPT ); Tue, 26 Apr 2005 12:20:31 -0400 Received: from colo.lackof.org ([198.49.126.79]:57307 "EHLO colo.lackof.org") by vger.kernel.org with ESMTP id S261618AbVDZQQi (ORCPT ); Tue, 26 Apr 2005 12:16:38 -0400 Date: Tue, 26 Apr 2005 10:19:07 -0600 From: Grant Grundler To: "Richard B. Johnson" Cc: Grant Grundler , Alan Stern , Alexander Nyberg , Greg KH , Amit Gud , linux-kernel@vger.kernel.org, linux-pci@atrey.karlin.mff.cuni.cz, akpm@osdl.org, jgarzik@pobox.com, cramerj@intel.com, USB development list Subject: Re: [PATCH] PCI: Add pci shutdown ability Message-ID: <20050426161907.GD2612@colo.lackof.org> References: <1114458325.983.17.camel@localhost.localdomain> <20050426154149.GA2612@colo.lackof.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Home-Page: http://www.parisc-linux.org/ User-Agent: Mutt/1.5.6+20040907i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2108 Lines: 50 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. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/