summaryrefslogtreecommitdiff
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorChristopher Pascoe <pascoe@cvs.openbsd.org>2007-03-06 05:40:35 +0000
committerChristopher Pascoe <pascoe@cvs.openbsd.org>2007-03-06 05:40:35 +0000
commit68843b47d90c2f657cb2b4cb2d9fa40dcd9d9fff (patch)
tree24fa5909505f0a09782be02dab735b6c37a3c0d5 /sys/dev/pci
parent744b4033470a4ea9f3d703919c2d692b79a02f40 (diff)
dlg@ advises that the bus_space operations will endian convert the DMA base
addresses for me when it writes to the registers. Don't swap them manually.
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/ahci.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/dev/pci/ahci.c b/sys/dev/pci/ahci.c
index 29bd1c3ac3d..5be4daf2d6e 100644
--- a/sys/dev/pci/ahci.c
+++ b/sys/dev/pci/ahci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ahci.c,v 1.68 2007/03/06 05:38:55 pascoe Exp $ */
+/* $OpenBSD: ahci.c,v 1.69 2007/03/06 05:40:34 pascoe Exp $ */
/*
* Copyright (c) 2006 David Gwynne <dlg@openbsd.org>
@@ -767,8 +767,8 @@ ahci_port_alloc(struct ahci_softc *sc, u_int port)
/* Setup RFIS base address */
ap->ap_rfis = (struct ahci_rfis *) AHCI_DMA_KVA(ap->ap_dmamem_rfis);
dva = AHCI_DMA_DVA(ap->ap_dmamem_rfis);
- ahci_pwrite(ap, AHCI_PREG_FBU, htole32((u_int32_t)(dva >> 32)));
- ahci_pwrite(ap, AHCI_PREG_FB, htole32((u_int32_t)dva));
+ ahci_pwrite(ap, AHCI_PREG_FBU, (u_int32_t)(dva >> 32));
+ ahci_pwrite(ap, AHCI_PREG_FB, (u_int32_t)dva);
/* Enable FIS reception and activate port. */
cmd = ahci_pread(ap, AHCI_PREG_CMD) & ~AHCI_PREG_CMD_ICC;
@@ -806,8 +806,8 @@ nomem:
/* Setup command list base address */
dva = AHCI_DMA_DVA(ap->ap_dmamem_cmd_list);
- ahci_pwrite(ap, AHCI_PREG_CLBU, htole32((u_int32_t)(dva >> 32)));
- ahci_pwrite(ap, AHCI_PREG_CLB, htole32((u_int32_t)dva));
+ ahci_pwrite(ap, AHCI_PREG_CLBU, (u_int32_t)(dva >> 32));
+ ahci_pwrite(ap, AHCI_PREG_CLB, (u_int32_t)dva);
/* Split CCB allocation into CCBs and assign to command header/table */
TAILQ_INIT(&ap->ap_ccb_free);