Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
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: Ensure we re-enable devices on resume
x86/PCI: parse additional host bridge window resource types
PCI: revert broken device warning
PCI aerdrv: use correct bit defines and add 2ms delay to aer_root_reset
x86/PCI: ignore Consumer/Producer bit in ACPI window descriptions

+52 -29
+36 -6
arch/x86/pci/acpi.c
··· 66 66 struct acpi_resource_address64 *addr) 67 67 { 68 68 acpi_status status; 69 + struct acpi_resource_memory24 *memory24; 70 + struct acpi_resource_memory32 *memory32; 71 + struct acpi_resource_fixed_memory32 *fixed_memory32; 69 72 70 - status = acpi_resource_to_address64(resource, addr); 71 - if (ACPI_SUCCESS(status) && 72 - (addr->resource_type == ACPI_MEMORY_RANGE || 73 - addr->resource_type == ACPI_IO_RANGE) && 74 - addr->address_length > 0 && 75 - addr->producer_consumer == ACPI_PRODUCER) { 73 + memset(addr, 0, sizeof(*addr)); 74 + switch (resource->type) { 75 + case ACPI_RESOURCE_TYPE_MEMORY24: 76 + memory24 = &resource->data.memory24; 77 + addr->resource_type = ACPI_MEMORY_RANGE; 78 + addr->minimum = memory24->minimum; 79 + addr->address_length = memory24->address_length; 80 + addr->maximum = addr->minimum + addr->address_length - 1; 76 81 return AE_OK; 82 + case ACPI_RESOURCE_TYPE_MEMORY32: 83 + memory32 = &resource->data.memory32; 84 + addr->resource_type = ACPI_MEMORY_RANGE; 85 + addr->minimum = memory32->minimum; 86 + addr->address_length = memory32->address_length; 87 + addr->maximum = addr->minimum + addr->address_length - 1; 88 + return AE_OK; 89 + case ACPI_RESOURCE_TYPE_FIXED_MEMORY32: 90 + fixed_memory32 = &resource->data.fixed_memory32; 91 + addr->resource_type = ACPI_MEMORY_RANGE; 92 + addr->minimum = fixed_memory32->address; 93 + addr->address_length = fixed_memory32->address_length; 94 + addr->maximum = addr->minimum + addr->address_length - 1; 95 + return AE_OK; 96 + case ACPI_RESOURCE_TYPE_ADDRESS16: 97 + case ACPI_RESOURCE_TYPE_ADDRESS32: 98 + case ACPI_RESOURCE_TYPE_ADDRESS64: 99 + status = acpi_resource_to_address64(resource, addr); 100 + if (ACPI_SUCCESS(status) && 101 + (addr->resource_type == ACPI_MEMORY_RANGE || 102 + addr->resource_type == ACPI_IO_RANGE) && 103 + addr->address_length > 0) { 104 + return AE_OK; 105 + } 106 + break; 77 107 } 78 108 return AE_ERROR; 79 109 }
+1 -5
drivers/pci/pci.c
··· 679 679 */ 680 680 int __pci_complete_power_transition(struct pci_dev *dev, pci_power_t state) 681 681 { 682 - return state > PCI_D0 ? 682 + return state >= PCI_D0 ? 683 683 pci_platform_power_transition(dev, state) : -EINVAL; 684 684 } 685 685 EXPORT_SYMBOL_GPL(__pci_complete_power_transition); ··· 714 714 * ignore the request if we're doing anything other than putting 715 715 * it into D0 (which would only happen on boot). 716 716 */ 717 - return 0; 718 - 719 - /* Check if we're already there */ 720 - if (dev->current_state == state) 721 717 return 0; 722 718 723 719 __pci_start_power_transition(dev, state);
+8 -2
drivers/pci/pcie/aer/aerdrv.c
··· 244 244 245 245 /* Assert Secondary Bus Reset */ 246 246 pci_read_config_word(dev, PCI_BRIDGE_CONTROL, &p2p_ctrl); 247 - p2p_ctrl |= PCI_CB_BRIDGE_CTL_CB_RESET; 247 + p2p_ctrl |= PCI_BRIDGE_CTL_BUS_RESET; 248 248 pci_write_config_word(dev, PCI_BRIDGE_CONTROL, p2p_ctrl); 249 249 250 + /* 251 + * we should send hot reset message for 2ms to allow it time to 252 + * propogate to all downstream ports 253 + */ 254 + msleep(2); 255 + 250 256 /* De-assert Secondary Bus Reset */ 251 - p2p_ctrl &= ~PCI_CB_BRIDGE_CTL_CB_RESET; 257 + p2p_ctrl &= ~PCI_BRIDGE_CTL_BUS_RESET; 252 258 pci_write_config_word(dev, PCI_BRIDGE_CONTROL, p2p_ctrl); 253 259 254 260 /*
+7 -16
drivers/pci/probe.c
··· 174 174 pci_read_config_dword(dev, pos, &sz); 175 175 pci_write_config_dword(dev, pos, l); 176 176 177 - if (!sz) 178 - goto fail; /* BAR not implemented */ 179 - 180 177 /* 181 178 * All bits set in sz means the device isn't working properly. 182 - * If it's a memory BAR or a ROM, bit 0 must be clear; if it's 183 - * an io BAR, bit 1 must be clear. 179 + * If the BAR isn't implemented, all bits must be 0. If it's a 180 + * memory BAR or a ROM, bit 0 must be clear; if it's an io BAR, bit 181 + * 1 must be clear. 184 182 */ 185 - if (sz == 0xffffffff) { 186 - dev_err(&dev->dev, "reg %x: invalid size %#x; broken device?\n", 187 - pos, sz); 183 + if (!sz || sz == 0xffffffff) 188 184 goto fail; 189 - } 190 185 191 186 /* 192 187 * I don't know how l can have all bits set. Copied from old code. ··· 244 249 pos, res); 245 250 } 246 251 } else { 247 - u32 size = pci_size(l, sz, mask); 252 + sz = pci_size(l, sz, mask); 248 253 249 - if (!size) { 250 - dev_err(&dev->dev, "reg %x: invalid size " 251 - "(l %#x sz %#x mask %#x); broken device?", 252 - pos, l, sz, mask); 254 + if (!sz) 253 255 goto fail; 254 - } 255 256 256 257 res->start = l; 257 - res->end = l + size; 258 + res->end = l + sz; 258 259 259 260 dev_printk(KERN_DEBUG, &dev->dev, "reg %x: %pR\n", pos, res); 260 261 }