From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932667AbWJGAPn (ORCPT ); Fri, 6 Oct 2006 20:15:43 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932669AbWJGAPn (ORCPT ); Fri, 6 Oct 2006 20:15:43 -0400 Received: from shawidc-mo1.cg.shawcable.net ([24.71.223.10]:38756 "EHLO pd3mo2so.prod.shaw.ca") by vger.kernel.org with ESMTP id S932667AbWJGAPm (ORCPT ); Fri, 6 Oct 2006 20:15:42 -0400 Date: Fri, 06 Oct 2006 18:15:36 -0600 From: Robert Hancock Subject: Re: [PATCH 2/2] [TULIP] Check the return value from pci_set_mwi() In-reply-to: To: Jeff Garzik , linux-kernel Cc: Matthew Wilcox Message-id: <4526F1A8.3020907@shaw.ca> MIME-version: 1.0 Content-type: text/plain; charset=ISO-8859-1; format=flowed Content-transfer-encoding: 7bit References: User-Agent: Thunderbird 1.5.0.7 (Windows/20060909) Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Jeff Garzik wrote: > The unmodified tulip driver checks both MWI and cacheline-size because > one of the clones (PNIC or PNIC2) will let you set the MWI bit, but > hardwires cacheline size to zero. > > If the arches do not behave consistently, we need to keep the check in > the tulip driver, to avoid incorrectly programming the csr0 MWI bit. > > Jeff I should think that pci_set_mwi should fail if either the cache line size showed 0 (after either setting the correct size or assuming it should have been set already) or the MWI bit ended up clear after we tried to turn it on. That pcibios_prep_mwi code for sparc64 looks wrong, if you plug in a device that doesn't implement MWI at all it will probably not let anything get written to PCI_CACHE_LINE_SIZE other than 0, but it is blindly succeeding in all cases. Even if the arch assumes the firmware already set the size properly it should still make sure it is non-zero before allowing MWI.. -- Robert Hancock Saskatoon, SK, Canada To email, remove "nospam" from hancockr@nospamshaw.ca Home Page: http://www.roberthancock.com/