From 4f43004836de7c322b428165bf2f2c1195da4a5b Mon Sep 17 00:00:00 2001 From: mjacob Date: Sun, 24 Jun 2007 01:41:16 +0000 Subject: If we're going to (for 23XX and 24XX cards) DMA firmware from the request queues rather than shove it down a word at a time, we have to remember to put it into little endian format. Use the macros ISP_IOXPUT_{16,32} for this purpose. Otherwise, on sparc the firmware is loaded garbled and we get a (not surprisingly) firmware checksum failure and the card won't start and we don't attach it. Approved by: re (bruce) MFC after: 3 days --- sys/dev/isp/isp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/dev/isp') diff --git a/sys/dev/isp/isp.c b/sys/dev/isp/isp.c index 25b6e8f..b099a5a 100644 --- a/sys/dev/isp/isp.c +++ b/sys/dev/isp/isp.c @@ -812,7 +812,7 @@ isp_reset(ispsoftc_t *isp) } cp = isp->isp_rquest; for (i = 0; i < nw; i++) { - cp[i] = ptr[wi++]; + ISP_IOXPUT_32(isp, ptr[wi++], &cp[i]); wl--; } MEMORYBARRIER(isp, SYNC_REQUEST, @@ -875,7 +875,7 @@ isp_reset(ispsoftc_t *isp) } cp = isp->isp_rquest; for (i = 0; i < nw; i++) { - cp[i] = ptr[wi++]; + ISP_IOXPUT_16(isp, ptr[wi++], &cp[i]); wl--; } MEMORYBARRIER(isp, SYNC_REQUEST, -- cgit v1.1