Showing error 804

User: Jiri Slaby
Error type: Resource Leak
Error type description: The code omits to put the resource to the system for reuse
File location: drivers/pci/quirks.c
Line in file: 1858
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2011-11-07 22:40:13 UTC


Source:

1828DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SERVERWORKS,
1829                         PCI_DEVICE_ID_SERVERWORKS_HT1000_PXB,
1830                         ht_enable_msi_mapping);
1831
1832/* The P5N32-SLI Premium motherboard from Asus has a problem with msi
1833 * for the MCP55 NIC. It is not yet determined whether the msi problem
1834 * also affects other devices. As for now, turn off msi for this device.
1835 */
1836static void __devinit nvenet_msi_disable(struct pci_dev *dev)
1837{
1838        if (dmi_name_in_vendors("P5N32-SLI PREMIUM")) {
1839                dev_info(&dev->dev,
1840                         "Disabling msi for MCP55 NIC on P5N32-SLI Premium\n");
1841                dev->no_msi = 1;
1842        }
1843}
1844DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_NVIDIA,
1845                        PCI_DEVICE_ID_NVIDIA_NVENET_15,
1846                        nvenet_msi_disable);
1847
1848static void __devinit nv_msi_ht_cap_quirk(struct pci_dev *dev)
1849{
1850        struct pci_dev *host_bridge;
1851        int pos, ttl = 48;
1852
1853        /*
1854         * HT MSI mapping should be disabled on devices that are below
1855         * a non-Hypertransport host bridge. Locate the host bridge...
1856         */
1857        host_bridge = pci_get_bus_and_slot(0, PCI_DEVFN(0, 0));
1858        if (host_bridge == NULL) {
1859                dev_warn(&dev->dev,
1860                         "nv_msi_ht_cap_quirk didn't locate host bridge\n");
1861                return;
1862        }
1863
1864        pos = pci_find_ht_capability(host_bridge, HT_CAPTYPE_SLAVE);
1865        if (pos != 0) {
1866                /* Host bridge is to HT */
1867                ht_enable_msi_mapping(dev);
1868                return;
Show full sources