Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6:
PCI: clear bridge resource range if BIOS assigned bad one
PCI: hotplug/cpqphp, fix NULL dereference
Revert "PCI: create function symlinks in /sys/bus/pci/slots/N/"
PCI: change resource collision messages from KERN_ERR to KERN_INFO

+17 -130
-40
Documentation/ABI/testing/sysfs-bus-pci
··· 133 133 The symbolic link points to the PCI device sysfs entry of the 134 134 Physical Function this device associates with. 135 135 136 - 137 - What: /sys/bus/pci/slots/... 138 - Date: April 2005 (possibly older) 139 - KernelVersion: 2.6.12 (possibly older) 140 - Contact: linux-pci@vger.kernel.org 141 - Description: 142 - When the appropriate driver is loaded, it will create a 143 - directory per claimed physical PCI slot in 144 - /sys/bus/pci/slots/. The names of these directories are 145 - specific to the driver, which in turn, are specific to the 146 - platform, but in general, should match the label on the 147 - machine's physical chassis. 148 - 149 - The drivers that can create slot directories include the 150 - PCI hotplug drivers, and as of 2.6.27, the pci_slot driver. 151 - 152 - The slot directories contain, at a minimum, a file named 153 - 'address' which contains the PCI bus:device:function tuple. 154 - Other files may appear as well, but are specific to the 155 - driver. 156 - 157 - What: /sys/bus/pci/slots/.../function[0-7] 158 - Date: March 2010 159 - KernelVersion: 2.6.35 160 - Contact: linux-pci@vger.kernel.org 161 - Description: 162 - If PCI slot directories (as described above) are created, 163 - and the physical slot is actually populated with a device, 164 - symbolic links in the slot directory pointing to the 165 - device's PCI functions are created as well. 166 - 167 - What: /sys/bus/pci/devices/.../slot 168 - Date: March 2010 169 - KernelVersion: 2.6.35 170 - Contact: linux-pci@vger.kernel.org 171 - Description: 172 - If PCI slot directories (as described above) are created, 173 - a symbolic link pointing to the slot directory will be 174 - created as well. 175 - 176 136 What: /sys/bus/pci/slots/.../module 177 137 Date: June 2009 178 138 Contact: linux-pci@vger.kernel.org
+1
arch/microblaze/pci/pci-common.c
··· 1277 1277 printk(KERN_WARNING "PCI: Cannot allocate resource region " 1278 1278 "%d of PCI bridge %d, will remap\n", i, bus->number); 1279 1279 clear_resource: 1280 + res->start = res->end = 0; 1280 1281 res->flags = 0; 1281 1282 } 1282 1283
+1
arch/mn10300/unit-asb2305/pci-asb2305.c
··· 117 117 * Invalidate the resource to prevent 118 118 * child resource allocations in this 119 119 * range. */ 120 + r->start = r->end = 0; 120 121 r->flags = 0; 121 122 } 122 123 }
+1
arch/powerpc/kernel/pci-common.c
··· 1309 1309 printk(KERN_WARNING "PCI: Cannot allocate resource region " 1310 1310 "%d of PCI bridge %d, will remap\n", i, bus->number); 1311 1311 clear_resource: 1312 + res->start = res->end = 0; 1312 1313 res->flags = 0; 1313 1314 } 1314 1315
+2
arch/x86/pci/i386.c
··· 96 96 * the fact the PCI specs explicitly allow address decoders to be 97 97 * shared between expansion ROMs and other resource regions, it's 98 98 * at least dangerous) 99 + * - bad resource sizes or overlaps with other regions 99 100 * 100 101 * Our solution: 101 102 * (1) Allocate resources for all buses behind PCI-to-PCI bridges. ··· 137 136 * child resource allocations in this 138 137 * range. 139 138 */ 139 + r->start = r->end = 0; 140 140 r->flags = 0; 141 141 } 142 142 }
+7
drivers/pci/hotplug/cpqphp_core.c
··· 828 828 pci_name(pdev), err); 829 829 return err; 830 830 } 831 + 831 832 bus = pdev->subordinate; 833 + if (!bus) { 834 + dev_notice(&pdev->dev, "the device is not a bridge, " 835 + "skipping\n"); 836 + rc = -ENODEV; 837 + goto err_disable_device; 838 + } 832 839 833 840 /* Need to read VID early b/c it's used to differentiate CPQ and INTC 834 841 * discovery
-37
drivers/pci/pci-sysfs.c
··· 1035 1035 return retval; 1036 1036 } 1037 1037 1038 - static void pci_remove_slot_links(struct pci_dev *dev) 1039 - { 1040 - char func[10]; 1041 - struct pci_slot *slot; 1042 - 1043 - sysfs_remove_link(&dev->dev.kobj, "slot"); 1044 - list_for_each_entry(slot, &dev->bus->slots, list) { 1045 - if (slot->number != PCI_SLOT(dev->devfn)) 1046 - continue; 1047 - snprintf(func, 10, "function%d", PCI_FUNC(dev->devfn)); 1048 - sysfs_remove_link(&slot->kobj, func); 1049 - } 1050 - } 1051 - 1052 - static int pci_create_slot_links(struct pci_dev *dev) 1053 - { 1054 - int result = 0; 1055 - char func[10]; 1056 - struct pci_slot *slot; 1057 - 1058 - list_for_each_entry(slot, &dev->bus->slots, list) { 1059 - if (slot->number != PCI_SLOT(dev->devfn)) 1060 - continue; 1061 - result = sysfs_create_link(&dev->dev.kobj, &slot->kobj, "slot"); 1062 - if (result) 1063 - goto out; 1064 - snprintf(func, 10, "function%d", PCI_FUNC(dev->devfn)); 1065 - result = sysfs_create_link(&slot->kobj, &dev->dev.kobj, func); 1066 - } 1067 - out: 1068 - return result; 1069 - } 1070 - 1071 1038 int __must_check pci_create_sysfs_dev_files (struct pci_dev *pdev) 1072 1039 { 1073 1040 int retval; ··· 1097 1130 if (retval) 1098 1131 goto err_vga_file; 1099 1132 1100 - pci_create_slot_links(pdev); 1101 - 1102 1133 return 0; 1103 1134 1104 1135 err_vga_file: ··· 1145 1180 1146 1181 if (!sysfs_initialized) 1147 1182 return; 1148 - 1149 - pci_remove_slot_links(pdev); 1150 1183 1151 1184 pci_remove_capabilities_sysfs(pdev); 1152 1185
+5 -5
drivers/pci/setup-res.c
··· 97 97 98 98 root = pci_find_parent_resource(dev, res); 99 99 if (!root) { 100 - dev_err(&dev->dev, "no compatible bridge window for %pR\n", 101 - res); 100 + dev_info(&dev->dev, "no compatible bridge window for %pR\n", 101 + res); 102 102 return -EINVAL; 103 103 } 104 104 105 105 conflict = request_resource_conflict(root, res); 106 106 if (conflict) { 107 - dev_err(&dev->dev, 108 - "address space collision: %pR conflicts with %s %pR\n", 109 - res, conflict->name, conflict); 107 + dev_info(&dev->dev, 108 + "address space collision: %pR conflicts with %s %pR\n", 109 + res, conflict->name, conflict); 110 110 return -EBUSY; 111 111 } 112 112
-48
drivers/pci/slot.c
··· 97 97 return bus_speed_read(slot->bus->cur_bus_speed, buf); 98 98 } 99 99 100 - static void remove_sysfs_files(struct pci_slot *slot) 101 - { 102 - char func[10]; 103 - struct list_head *tmp; 104 - 105 - list_for_each(tmp, &slot->bus->devices) { 106 - struct pci_dev *dev = pci_dev_b(tmp); 107 - if (PCI_SLOT(dev->devfn) != slot->number) 108 - continue; 109 - sysfs_remove_link(&dev->dev.kobj, "slot"); 110 - 111 - snprintf(func, 10, "function%d", PCI_FUNC(dev->devfn)); 112 - sysfs_remove_link(&slot->kobj, func); 113 - } 114 - } 115 - 116 - static int create_sysfs_files(struct pci_slot *slot) 117 - { 118 - int result; 119 - char func[10]; 120 - struct list_head *tmp; 121 - 122 - list_for_each(tmp, &slot->bus->devices) { 123 - struct pci_dev *dev = pci_dev_b(tmp); 124 - if (PCI_SLOT(dev->devfn) != slot->number) 125 - continue; 126 - 127 - result = sysfs_create_link(&dev->dev.kobj, &slot->kobj, "slot"); 128 - if (result) 129 - goto fail; 130 - 131 - snprintf(func, 10, "function%d", PCI_FUNC(dev->devfn)); 132 - result = sysfs_create_link(&slot->kobj, &dev->dev.kobj, func); 133 - if (result) 134 - goto fail; 135 - } 136 - 137 - return 0; 138 - 139 - fail: 140 - remove_sysfs_files(slot); 141 - return result; 142 - } 143 - 144 100 static void pci_slot_release(struct kobject *kobj) 145 101 { 146 102 struct pci_dev *dev; ··· 108 152 list_for_each_entry(dev, &slot->bus->devices, bus_list) 109 153 if (PCI_SLOT(dev->devfn) == slot->number) 110 154 dev->slot = NULL; 111 - 112 - remove_sysfs_files(slot); 113 155 114 156 list_del(&slot->list); 115 157 ··· 299 345 300 346 INIT_LIST_HEAD(&slot->list); 301 347 list_add(&slot->list, &parent->slots); 302 - 303 - create_sysfs_files(slot); 304 348 305 349 list_for_each_entry(dev, &parent->devices, bus_list) 306 350 if (PCI_SLOT(dev->devfn) == slot_nr)