@@ -662,11 +662,17 @@ int pcibios_enable_device(struct pci_dev *dev, int mask)
if ((dev->class >> 16) == PCI_BASE_CLASS_BRIDGE)
cmd |= PCI_COMMAND_IO | PCI_COMMAND_MEMORY;
- if (cmd != old_cmd) {
+ /*
+ * Some devices (e.g. the Lava Quattro quad-port 16550A card)
+ * can incorrectly report I/O decoding being enabled while it
+ * is in fact not, so unconditionally perform the config space
+ * write.
+ */
+ if (cmd != old_cmd)
printk("PCI: enabling device %s (%04x -> %04x)\n",
pci_name(dev), old_cmd, cmd);
- pci_write_config_word(dev, PCI_COMMAND, cmd);
- }
+ pci_write_config_word(dev, PCI_COMMAND, cmd);
+
return 0;
}
@@ -322,10 +322,16 @@ int pci_enable_resources(struct pci_dev *dev, int mask)
cmd |= PCI_COMMAND_MEMORY;
}
- if (cmd != old_cmd) {
+ /*
+ * Some devices (e.g. the Lava Quattro quad-port 16550A card)
+ * can incorrectly report I/O decoding being enabled while it
+ * is in fact not, so unconditionally perform the config space
+ * write.
+ */
+ if (cmd != old_cmd)
dev_info(&dev->dev, "enabling device (%04x -> %04x)\n",
old_cmd, cmd);
- pci_write_config_word(dev, PCI_COMMAND, cmd);
- }
+ pci_write_config_word(dev, PCI_COMMAND, cmd);
+
return 0;
}