ahci: attachment to atapi device

Matthew Dillon dillon at apollo.backplane.com
Thu Jun 18 08:20:52 PDT 2009


    Ok guys, also try this patch and see if it prints out 
    that BIOS disabled line on the console.  In addition to the
    other patch.

    And after that, maybe try uncommenting the pci_write_config
    for 0x92...  but not after testing the patch as-is.

					-Matt
					Matthew Dillon 
					<dillon at backplane.com>

diff --git a/sys/dev/disk/ahci/ahci_attach.c b/sys/dev/disk/ahci/ahci_attach.c
index 68f4059..67551aa 100644
--- a/sys/dev/disk/ahci/ahci_attach.c
+++ b/sys/dev/disk/ahci/ahci_attach.c
@@ -159,6 +159,15 @@ ahci_pci_attach(device_t dev)
 	int error;
 	const char *revision;
 
+/*
+	pci_write_config(dev, 0x92, pci_read_config(dev, 0x92, 2) | 0x0F, 2);
+*/
+	if (pci_read_config(dev, PCIR_COMMAND, 2) & 0x0400) {
+		device_printf(dev, "BIOS disabled PCI interrupt, re-enabling\n");
+		pci_write_config(dev, PCIR_COMMAND,
+			pci_read_config(dev, PCIR_COMMAND, 2) & ~0x0400, 2);
+	}
+
 	/*
 	 * Map the AHCI controller's IRQ and BAR(5) (hardware registers)
 	 */





More information about the Bugs mailing list