From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161117AbWFVNZu (ORCPT ); Thu, 22 Jun 2006 09:25:50 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1161118AbWFVNZu (ORCPT ); Thu, 22 Jun 2006 09:25:50 -0400 Received: from h-66-166-126-70.lsanca54.covad.net ([66.166.126.70]:35221 "EHLO myri.com") by vger.kernel.org with ESMTP id S1161117AbWFVNZt (ORCPT ); Thu, 22 Jun 2006 09:25:49 -0400 Message-ID: <449A9A49.4090107@myri.com> Date: Thu, 22 Jun 2006 09:25:29 -0400 From: Brice Goglin User-Agent: Thunderbird 1.5.0.2 (X11/20060516) MIME-Version: 1.0 To: Dave Olson CC: linux-pci@atrey.karlin.mff.cuni.cz, linux-kernel@vger.kernel.org Subject: Re: [PATCH 3/6] Blacklist PCI-E chipsets depending on Hypertransport MSI capabality References: In-Reply-To: X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Dave Olson wrote: > On Wed, 21 Jun 2006, Brice Goglin wrote: > > | [PATCH 3/6] Blacklist PCI-E chipsets depending on Hypertransport MSI capabality > | > | Introduce msi_ht_cap_enabled() to check the MSI capability in the > | Hypertransport configuration space. > | It is used in a generic quirk quirk_msi_ht_cap() to check whether > | MSI is enabled on hypertransport chipset, and a nVidia specific quirk > | quirk_nvidia_ck804_msi_ht_cap() where two 2 HT MSI mappings have to > | be checked. > | Both quirks set the PCI_BUS_FLAGS_NO_MSI flags when MSI is disabled. > ... > | Index: linux-mm/drivers/pci/quirks.c > > | +/* Returns 1 if the HT MSI capability is found and enabled */ > | +static pci_bus_flags_t __devinit msi_ht_cap_enabled(struct pci_dev *dev) > | +{ > | + > | + /* go through all caps looking for a hypertransport msi mapping */ > | + while (pci_read_config_byte(dev, cap_off + 1, &cap_off) == 0 && > > Perhaps this could be modified to use pci_find_capability() and pci_find_next_capability(), > rather than writing your own code to do it? > Right, pci_find_next_capability() should help here. I am rewriting the patch. thanks, Brice