summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/ata/atascsi.c4
-rw-r--r--sys/dev/ata/atascsi.h3
-rw-r--r--sys/dev/pci/ahci.c9
3 files changed, 9 insertions, 7 deletions
diff --git a/sys/dev/ata/atascsi.c b/sys/dev/ata/atascsi.c
index f30594ef693..ee3e8b389aa 100644
--- a/sys/dev/ata/atascsi.c
+++ b/sys/dev/ata/atascsi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: atascsi.c,v 1.19 2007/03/20 06:43:06 pascoe Exp $ */
+/* $OpenBSD: atascsi.c,v 1.20 2007/03/20 07:09:42 pascoe Exp $ */
/*
* Copyright (c) 2007 David Gwynne <dlg@openbsd.org>
@@ -281,7 +281,7 @@ ata_setup_identify(struct ata_port *ap, int nosleep)
xa->cmd.st_bmask = 0x40; /* XXX magic WDCS_DRDY */;
xa->cmd.st_pmask = 0x00;
- xa->flags = ATA_F_READ;
+ xa->flags = ATA_F_READ | ATA_F_PIO;
return (xa);
}
diff --git a/sys/dev/ata/atascsi.h b/sys/dev/ata/atascsi.h
index 33c624435f6..6e78aceb069 100644
--- a/sys/dev/ata/atascsi.h
+++ b/sys/dev/ata/atascsi.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: atascsi.h,v 1.10 2007/03/20 05:33:02 pascoe Exp $ */
+/* $OpenBSD: atascsi.h,v 1.11 2007/03/20 07:09:42 pascoe Exp $ */
/*
* Copyright (c) 2007 David Gwynne <dlg@openbsd.org>
@@ -114,6 +114,7 @@ struct ata_xfer {
#define ATA_F_WRITE (1<<1)
#define ATA_F_NOWAIT (1<<2)
#define ATA_F_POLL (1<<3)
+#define ATA_F_PIO (1<<4)
volatile int state;
#define ATA_S_SETUP 0
#define ATA_S_PENDING 1
diff --git a/sys/dev/pci/ahci.c b/sys/dev/pci/ahci.c
index 0252a72157e..68daf8830f9 100644
--- a/sys/dev/pci/ahci.c
+++ b/sys/dev/pci/ahci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ahci.c,v 1.81 2007/03/20 06:43:06 pascoe Exp $ */
+/* $OpenBSD: ahci.c,v 1.82 2007/03/20 07:09:42 pascoe Exp $ */
/*
* Copyright (c) 2006 David Gwynne <dlg@openbsd.org>
@@ -40,7 +40,7 @@
#define AHCI_D_VERBOSE 0x01
#define AHCI_D_INTR 0x02
#define AHCI_D_XFER 0x08
-int ahcidebug = AHCI_D_VERBOSE | AHCI_D_INTR;
+int ahcidebug = AHCI_D_VERBOSE;
#else
#define DPRINTF(m, f...)
#endif
@@ -922,7 +922,7 @@ nomem:
/* Enable port interrupts */
ahci_pwrite(ap, AHCI_PREG_IE, AHCI_PREG_IE_TFEE | AHCI_PREG_IE_HBFE |
AHCI_PREG_IE_IFE | AHCI_PREG_IE_OFE | AHCI_PREG_IE_DPE |
- AHCI_PREG_IE_UFE);
+ AHCI_PREG_IE_UFE | AHCI_PREG_IE_DHRE);
freeport:
if (rc != 0)
@@ -1242,7 +1242,8 @@ ahci_load_prdt(struct ahci_ccb *ccb)
#endif
prd->flags = htole32(dmap->dm_segs[i].ds_len - 1);
}
- prd->flags |= htole32(AHCI_PRDT_FLAG_INTR);
+ if (xa->flags & ATA_F_PIO)
+ prd->flags |= htole32(AHCI_PRDT_FLAG_INTR);
cmd_slot->prdtl = htole16(dmap->dm_nsegs);