diff options
Diffstat (limited to 'drivers/pci/probe.c')
-rw-r--r-- | drivers/pci/probe.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index 5ed99309c758..19dc247618f8 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c | |||
@@ -216,14 +216,17 @@ int __pci_read_base(struct pci_dev *dev, enum pci_bar_type type, | |||
216 | res->flags |= IORESOURCE_SIZEALIGN; | 216 | res->flags |= IORESOURCE_SIZEALIGN; |
217 | if (res->flags & IORESOURCE_IO) { | 217 | if (res->flags & IORESOURCE_IO) { |
218 | l &= PCI_BASE_ADDRESS_IO_MASK; | 218 | l &= PCI_BASE_ADDRESS_IO_MASK; |
219 | sz &= PCI_BASE_ADDRESS_IO_MASK; | ||
219 | mask = PCI_BASE_ADDRESS_IO_MASK & (u32) IO_SPACE_LIMIT; | 220 | mask = PCI_BASE_ADDRESS_IO_MASK & (u32) IO_SPACE_LIMIT; |
220 | } else { | 221 | } else { |
221 | l &= PCI_BASE_ADDRESS_MEM_MASK; | 222 | l &= PCI_BASE_ADDRESS_MEM_MASK; |
223 | sz &= PCI_BASE_ADDRESS_MEM_MASK; | ||
222 | mask = (u32)PCI_BASE_ADDRESS_MEM_MASK; | 224 | mask = (u32)PCI_BASE_ADDRESS_MEM_MASK; |
223 | } | 225 | } |
224 | } else { | 226 | } else { |
225 | res->flags |= (l & IORESOURCE_ROM_ENABLE); | 227 | res->flags |= (l & IORESOURCE_ROM_ENABLE); |
226 | l &= PCI_ROM_ADDRESS_MASK; | 228 | l &= PCI_ROM_ADDRESS_MASK; |
229 | sz &= PCI_ROM_ADDRESS_MASK; | ||
227 | mask = (u32)PCI_ROM_ADDRESS_MASK; | 230 | mask = (u32)PCI_ROM_ADDRESS_MASK; |
228 | } | 231 | } |
229 | 232 | ||