summaryrefslogtreecommitdiff
path: root/sys/dev/ic
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2006-05-31 00:52:06 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2006-05-31 00:52:06 +0000
commit469a21dbb459d19703026d7e12966825434f9191 (patch)
tree3f11e34da25d71878d7332281a04d7f1169d1b08 /sys/dev/ic
parentb1eaa6d51454b4a9f935eed825805210c12aa241 (diff)
int32 i >> 32 is undefined, so cast to unsigned long long first, ok dlg
Diffstat (limited to 'sys/dev/ic')
-rw-r--r--sys/dev/ic/mpi.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/ic/mpi.c b/sys/dev/ic/mpi.c
index 0656ae031ae..043f91358a0 100644
--- a/sys/dev/ic/mpi.c
+++ b/sys/dev/ic/mpi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mpi.c,v 1.15 2006/05/31 00:32:51 dlg Exp $ */
+/* $OpenBSD: mpi.c,v 1.16 2006/05/31 00:52:05 deraadt Exp $ */
/*
* Copyright (c) 2005, 2006 David Gwynne <dlg@openbsd.org>
@@ -895,7 +895,7 @@ mpi_load_xs(struct mpi_ccb *ccb)
sge = nsge;
sge->sg_hdr = htole32(flags | dmap->dm_segs[i].ds_len);
- addr = (u_int32_t)(dmap->dm_segs[i].ds_addr >> 32);
+ addr = (u_int32_t)((unsigned long long)dmap->dm_segs[i].ds_addr >> 32);
sge->sg_hi_addr = htole32(addr);
addr = (u_int32_t)dmap->dm_segs[i].ds_addr;
sge->sg_lo_addr = htole32(addr);
@@ -1321,11 +1321,11 @@ mpi_iocinit(struct mpi_softc *sc)
iiq.reply_frame_size = htole16(MPI_REPLY_SIZE);
- hi_addr = (u_int32_t)(MPI_DMA_DVA(sc->sc_requests) >> 32);
+ hi_addr = (u_int32_t)((unsigned long long)MPI_DMA_DVA(sc->sc_requests) >> 32);
iiq.host_mfa_hi_addr = htole32(hi_addr);
iiq.sense_buffer_hi_addr = htole32(hi_addr);
- hi_addr = (u_int32_t)(MPI_DMA_DVA(sc->sc_replies) >> 32);
+ hi_addr = (u_int32_t)((unsigned long long)MPI_DMA_DVA(sc->sc_replies) >> 32);
iiq.reply_fifo_host_signalling_addr = htole32(hi_addr);
iiq.msg_version_maj = 0x01;