Commit 45b5d56b authored by Jeff Garzik's avatar Jeff Garzik

Small cleanups for the PCI MWI feature:

* Generic helper function name change, s/pdev_set_mwi/pci_generic_prep_mwi/
* Fix: Generic helper function ifdef'd out if arch function present
* PCI MWI arch handler name change, s/pcibios_set_mwi/pcibios_prep_mwi/
* Fix typos and speling errors in comments.
* Cleanup printk message a bit.
parent 597db13e
......@@ -548,7 +548,7 @@ int pci_controller_num(struct pci_dev *pdev)
return ret;
}
int pcibios_set_mwi(struct pci_dev *dev)
int pcibios_prep_mwi(struct pci_dev *dev)
{
/* We set correct PCI_CACHE_LINE_SIZE register values for every
* device probed on this platform. So there is nothing to check
......
......@@ -849,18 +849,19 @@ pci_set_master(struct pci_dev *dev)
pcibios_set_master(dev);
}
#ifndef HAVE_ARCH_PCI_MWI
/**
* pdev_set_mwi - helper function for pci_set_mwi
* pci_generic_prep_mwi - helper function for pci_set_mwi
* @dev: the PCI device for which MWI is enabled
*
* Helper function for generic implementation of pci_set_mwi
* Helper function for generic implementation of pcibios_prep_mwi
* function. Originally copied from drivers/net/acenic.c.
* Copyright 1998-2001 by Jes Sorensen, <jes@trained-monkey.org>.
*
* RETURNS: An appriopriate -ERRNO error value on eror, or zero for success.
* RETURNS: An appropriate -ERRNO error value on eror, or zero for success.
*/
static int
pdev_set_mwi(struct pci_dev *dev)
pci_generic_prep_mwi(struct pci_dev *dev)
{
int rc = 0;
u8 cache_size;
......@@ -874,8 +875,8 @@ pdev_set_mwi(struct pci_dev *dev)
pci_read_config_byte(dev, PCI_CACHE_LINE_SIZE, &cache_size);
cache_size <<= 2;
if (cache_size != SMP_CACHE_BYTES) {
printk(KERN_WARNING "PCI: %s PCI cache line size set incorrectly "
"(%i bytes) by BIOS/FW, ",
printk(KERN_WARNING "PCI: %s PCI cache line size set "
"incorrectly (%i bytes) by BIOS/FW, ",
dev->slot_name, cache_size);
if (cache_size > SMP_CACHE_BYTES) {
printk("expecting %i\n", SMP_CACHE_BYTES);
......@@ -889,6 +890,7 @@ pdev_set_mwi(struct pci_dev *dev)
return rc;
}
#endif /* !HAVE_ARCH_PCI_MWI */
/**
* pci_set_mwi - enables memory-write-validate PCI transaction
......@@ -907,9 +909,9 @@ pci_set_mwi(struct pci_dev *dev)
u16 cmd;
#ifdef HAVE_ARCH_PCI_MWI
rc = pcibios_set_mwi(dev);
rc = pcibios_prep_mwi(dev);
#else
rc = pdev_set_mwi(dev);
rc = pci_generic_prep_mwi(dev);
#endif
if (rc)
......
......@@ -203,7 +203,7 @@ extern int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma,
/* Platform specific MWI support. */
#define HAVE_ARCH_PCI_MWI
extern int pcibios_set_mwi(struct pci_dev *dev);
extern int pcibios_prep_mwi(struct pci_dev *dev);
#endif /* __KERNEL__ */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment