summaryrefslogtreecommitdiffstats
path: root/sys/dev/aac/aac.c
diff options
context:
space:
mode:
authorscottl <scottl@FreeBSD.org>2003-02-19 23:33:56 +0000
committerscottl <scottl@FreeBSD.org>2003-02-19 23:33:56 +0000
commita707a60ec37959134933a06cd48349d5295e5400 (patch)
treeffcac7c5dc5f66c1d4cdc2a36967d4c2e7ab1c46 /sys/dev/aac/aac.c
parent490f7849d94d8ab5baa625e353f57007487bfd5f (diff)
downloadFreeBSD-src-a707a60ec37959134933a06cd48349d5295e5400.zip
FreeBSD-src-a707a60ec37959134933a06cd48349d5295e5400.tar.gz
Fix a 64-bit bogon. The hardware command structure only has one 32 bit
field for holding driver-dependant data. Instead of putting the pointer to the driver command struct in there, take advantage of these structs being a (virtually) contiguous array and just put the array index in the field.
Diffstat (limited to 'sys/dev/aac/aac.c')
-rw-r--r--sys/dev/aac/aac.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/aac/aac.c b/sys/dev/aac/aac.c
index 28bb8a0..6ff0fd1 100644
--- a/sys/dev/aac/aac.c
+++ b/sys/dev/aac/aac.c
@@ -753,8 +753,7 @@ aac_start(struct aac_command *cm)
cm->cm_fib->Header.ReceiverFibAddress = cm->cm_fibphys;
/* save a pointer to the command for speedy reverse-lookup */
- cm->cm_fib->Header.SenderData = (u_int32_t)cm; /* XXX 64-bit physical
- * address issue */
+ cm->cm_fib->Header.SenderData = cm->cm_index;
/* put the FIB on the outbound queue */
error = aac_enqueue_fib(sc, cm->cm_queue, cm);
return(error);
@@ -867,7 +866,7 @@ aac_complete(void *context, int pending)
break; /* nothing to do */
/* get the command, unmap and queue for later processing */
- cm = (struct aac_command *)fib->Header.SenderData;
+ cm = sc->aac_commands + fib->Header.SenderData;
if (cm == NULL) {
AAC_PRINT_FIB(sc, fib);
break;
@@ -1161,6 +1160,7 @@ aac_alloc_commands(struct aac_softc *sc)
cm->cm_sc = sc;
cm->cm_fib = fm->aac_fibs + i;
cm->cm_fibphys = fibphys + (i * sizeof(struct aac_fib));
+ cm->cm_index = sc->total_fibs;
if ((error = bus_dmamap_create(sc->aac_buffer_dmat, 0,
&cm->cm_datamap)) == 0)
OpenPOWER on IntegriCloud