]> git.hungrycats.org Git - linux/commitdiff
Small cleanups for the PCI MWI feature:
authorJeff Garzik <jgarzik@mandrakesoft.com>
Wed, 13 Mar 2002 18:31:55 +0000 (13:31 -0500)
committerJeff Garzik <jgarzik@mandrakesoft.com>
Wed, 13 Mar 2002 18:31:55 +0000 (13:31 -0500)
* 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.

arch/sparc64/kernel/pci.c
drivers/pci/pci.c
include/asm-sparc64/pci.h

index c54afbc63dcee185cfa17c9759e9c5983bdda89e..4507491109569a118c6711e9e00f230b7258da2a 100644 (file)
@@ -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
index ad948cb487eef16b8c0268fa3a1eacbeb4cc7699..d64c570e051e464555af99393b9fa6cc8190c09b 100644 (file)
@@ -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)
index 00f24f2c1ee4242396ca5c48434b01f60b320b09..884102954ceb3a10c2c0f79cfdae3101fde8738b 100644 (file)
@@ -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__ */