From 45ca2a8268774a98128ca898d0e5f0bba7628fb5 Mon Sep 17 00:00:00 2001 From: sos Date: Fri, 9 Dec 2005 14:23:24 +0000 Subject: [PATCH] Unbreak hotplug support on the ICH6 and ICH7 chipsets. --- sys/dev/ata/ata-chipset.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sys/dev/ata/ata-chipset.c b/sys/dev/ata/ata-chipset.c index 3421f3c7b098..cc21aa0b7f10 100644 --- a/sys/dev/ata/ata-chipset.c +++ b/sys/dev/ata/ata-chipset.c @@ -569,10 +569,10 @@ ata_ahci_intr(void *data) int offset = (ch->unit << 7); error = ATA_INL(ctlr->r_res2, ATA_AHCI_P_SERR + offset); - ATA_OUTL(ctlr->r_res2, ATA_AHCI_P_SERR + offset, error); status = ATA_INL(ctlr->r_res2, ATA_AHCI_P_IS + offset); - ATA_OUTL(ctlr->r_res2, ATA_AHCI_P_IS + offset, status); issued = ATA_INL(ctlr->r_res2, ATA_AHCI_P_CI + offset); + ATA_OUTL(ctlr->r_res2, ATA_AHCI_P_SERR + offset, error); + ATA_OUTL(ctlr->r_res2, ATA_AHCI_P_IS + offset, status); /* do we have cold connect surprise */ if (status & ATA_AHCI_P_IX_CPD) { @@ -581,7 +581,8 @@ ata_ahci_intr(void *data) } /* check for and handle connect events */ - if ((status & ATA_AHCI_P_IX_PC) && + if (((status & (ATA_AHCI_P_IX_PRC | ATA_AHCI_P_IX_PC)) == + ATA_AHCI_P_IX_PC) && (tp = (struct ata_connect_task *) malloc(sizeof(struct ata_connect_task), M_ATA, M_NOWAIT | M_ZERO))) {