From 7e7a458e45ab09a1627b462db952ae0e842f57e4 Mon Sep 17 00:00:00 2001 From: Ed Maste Date: Mon, 15 Oct 2007 17:34:58 +0000 Subject: [PATCH] Correct calculation of aac_sg_tablesize. Obtained from: Adaptec, via driver b11669 --- sys/dev/aac/aac.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/sys/dev/aac/aac.c b/sys/dev/aac/aac.c index 078f8094d35..54c7c1cf527 100644 --- a/sys/dev/aac/aac.c +++ b/sys/dev/aac/aac.c @@ -1670,14 +1670,12 @@ aac_check_firmware(struct aac_softc *sc) sc->aac_max_sectors = 128; /* 64KB */ if (sc->flags & AAC_FLAGS_SG_64BIT) sc->aac_sg_tablesize = (AAC_FIB_DATASIZE - - sizeof(struct aac_blockwrite64) - + sizeof(struct aac_sg_table64)) - / sizeof(struct aac_sg_table64); + - sizeof(struct aac_blockwrite64)) + / sizeof(struct aac_sg_entry64); else sc->aac_sg_tablesize = (AAC_FIB_DATASIZE - - sizeof(struct aac_blockwrite) - + sizeof(struct aac_sg_table)) - / sizeof(struct aac_sg_table); + - sizeof(struct aac_blockwrite)) + / sizeof(struct aac_sg_entry); if (!aac_sync_command(sc, AAC_MONKER_GETCOMMPREF, 0, 0, 0, 0, NULL)) { options = AAC_GET_MAILBOX(sc, 1);