public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Robert Hancock <hancockr@shaw.ca>
To: Jeff Garzik <jeff@garzik.org>,
	linux-kernel <linux-kernel@vger.kernel.org>
Cc: Matthew Wilcox <matthew@wil.cx>
Subject: Re: [PATCH 2/2] [TULIP] Check the return value from pci_set_mwi()
Date: Fri, 06 Oct 2006 18:15:36 -0600	[thread overview]
Message-ID: <4526F1A8.3020907@shaw.ca> (raw)
In-Reply-To: <fa.lMwhGlM7h3gT94gAUyYURPCF1Qg@ifi.uio.no>

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/


       reply	other threads:[~2006-10-07  0:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <fa.5vbPpPQ5p6Rqb6w5IQvYeIEZ+o4@ifi.uio.no>
     [not found] ` <fa.5fHFiSyxiA8IzX/z36b4ccRdkwk@ifi.uio.no>
     [not found]   ` <fa.xexLYpZ2s3jlzi3H4j8CMu5nU5M@ifi.uio.no>
     [not found]     ` <fa.DScE5F/ioZsTJQxVaKgCvzyY/+o@ifi.uio.no>
     [not found]       ` <fa.lMwhGlM7h3gT94gAUyYURPCF1Qg@ifi.uio.no>
2006-10-07  0:15         ` Robert Hancock [this message]
2006-10-06 19:05 [PATCH 1/2] [PCI] Check that MWI bit really did get set Matthew Wilcox
2006-10-06 19:05 ` [PATCH 2/2] [TULIP] Check the return value from pci_set_mwi() Matthew Wilcox
2006-10-06 19:15   ` Jeff Garzik
2006-10-06 19:28     ` Matthew Wilcox
2006-10-06 19:59       ` Jeff Garzik
2006-10-07  5:34         ` Grant Grundler
2006-10-07 14:44           ` Jeff Garzik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4526F1A8.3020907@shaw.ca \
    --to=hancockr@shaw.ca \
    --cc=jeff@garzik.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matthew@wil.cx \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox