From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jesse Barnes Subject: Re: [PATCH] [PCI] move ICHx GbE NVM write-protection from e1000e to PCI quirk Date: Thu, 30 Oct 2008 09:16:00 -0700 Message-ID: <200810300916.01468.jbarnes@virtuousgeek.org> References: <20081025011358.9975.77556.stgit@gitlost.lost> <490282FE.9040602@garzik.org> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Cc: Jeff Garzik , "Kirsher, Jeffrey T" , "davem@davemloft.net" , "netdev@vger.kernel.org" , "linux-pci@vger.kernel.org" To: "Allan, Bruce W" Return-path: In-Reply-To: Content-Disposition: inline Sender: linux-pci-owner@vger.kernel.org List-Id: netdev.vger.kernel.org On Monday, October 27, 2008 1:26 pm Allan, Bruce W wrote: > >> This PCI quirk is put in ./drivers/net/e1000e in order to share > >> defines and structs found in the driver source, and is only applicable > >> to ICHx GbE LOMs supported by that driver anyway. > > > >Seems to be it is not difficult to put it into drivers/pci/quirks.c, > >where it belongs. > > > > Jeff > > Yes, it wouldn't be difficult to put it elsewhere but does it really belong > in drivers/pci/quirks.c? The quirk is applicable only to the GbE LOM found > on Intel ICH8/9/10-based platforms so one could argue it should be in > arch-specific code (arch/x86/pci/fixup.c). OTOH, quirks in driver > directories are not unprecedented (e.g. drivers/clocksource/acpi_pm.c, > drivers/usb/host/pci-quirks.c). I patched it into the driver's directory > as it would be an obvious reminder when adding support for future parts to > check whether the quirk is applicable and update the list of devices > accordingly. > > So, what is the "right" place? If you think it's likely to apply to future devices as well, I'd say you may as well keep it in the driver. Jesse