From ae058e4be51a6ef3182441d44e7242df5b52d3a7 Mon Sep 17 00:00:00 2001 From: emaste Date: Thu, 20 Mar 2008 20:33:48 +0000 Subject: [PATCH] Restore creation of passthrough devices with newer controller firmware by putting the correct size in the fib header. Presumably the older firmware silently ignored a bad size field. (This change tested with a 3805 controller. Passthrough devices were created when running firmware build 12814, but not 15323 or later. With this change they're created for both old and new firmware versions.) Submitted by: Adaptec --- sys/dev/aac/aac.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/aac/aac.c b/sys/dev/aac/aac.c index 816c53e73e55..7c6bfef8e7ad 100644 --- a/sys/dev/aac/aac.c +++ b/sys/dev/aac/aac.c @@ -2045,7 +2045,7 @@ aac_sync_fib(struct aac_softc *sc, u_int32_t command, u_int32_t xferstate, fib->Header.XferState |= xferstate; fib->Header.Command = command; fib->Header.StructType = AAC_FIBTYPE_TFIB; - fib->Header.Size = sizeof(struct aac_fib) + datasize; + fib->Header.Size = sizeof(struct aac_fib_header) + datasize; fib->Header.SenderSize = sizeof(struct aac_fib); fib->Header.SenderFibAddress = 0; /* Not needed */ fib->Header.ReceiverFibAddress = sc->aac_common_busaddr + @@ -3579,7 +3579,7 @@ aac_get_bus_info(struct aac_softc *sc) vmi->IoctlCmd = GetBusInfo; error = aac_sync_fib(sc, ContainerCommand, 0, fib, - sizeof(struct aac_vmioctl)); + sizeof(struct aac_vmi_businf_resp)); if (error) { device_printf(sc->aac_dev, "Error %d sending VMIoctl command\n", error);