From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tejun Heo Subject: Re: libata, devm_*, and MSI ? Date: Wed, 21 Jan 2009 20:59:04 +0900 Message-ID: <49770E08.6040204@gmail.com> References: <4975F5C1.8090107@rtr.ca> <497614F5.6000301@rtr.ca> <49762BF1.2050101@rtr.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <49762BF1.2050101@rtr.ca> Sender: linux-pci-owner@vger.kernel.org To: Mark Lord Cc: Grant Grundler , IDE/ATA development list , Linux Kernel , Jeff Garzik , linux-pci@vger.kernel.org List-Id: linux-ide@vger.kernel.org Hello, Mark. Sorry about slacking off. Having way too much fun mucking around assembly code lately. Mark Lord wrote: > I believe that other MSI users might want something similar, > or perhaps Tejun could extend devres to include a pair > of suitable functions, devm_enable_msi() and devm_disable_msi(). > Then it would be just automatic for drivers, without any fuss. devres does handle MSI. Please take a look at pcim_release() in drivers/pci/pci.c. msi/msix enabledness is tracked by pdev->msi[x]_enabled and if either one was enabled on a managed PCI device, it would be disabled on driver detach, so there's no reason to worry about it. Also, there is no reason for low level driver to dingle with intx. In fact, it shouldn't as PCI quirk is supposed to handle all the pretty quirkiness. The intx code was there before the quirk code was in place and no one went after them. They should go and probably won't cause any problem in the process. Thanks. -- tejun