Re: [PATCH 2/2] [TULIP] Check the return value from pci_set_mwi()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 [email protected]
Home Page: http://www.roberthancock.com/

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux