summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoremaste <emaste@FreeBSD.org>2007-10-15 17:34:58 +0000
committeremaste <emaste@FreeBSD.org>2007-10-15 17:34:58 +0000
commit2906dd04e87e8096a2505643089f92266359b10a (patch)
tree5b2ea21e95d4028990c1a4d4ee0f44fec345595f
parent83d7763578d79ef1914bf28e6de8b82ac8f36503 (diff)
downloadFreeBSD-src-2906dd04e87e8096a2505643089f92266359b10a.zip
FreeBSD-src-2906dd04e87e8096a2505643089f92266359b10a.tar.gz
Correct calculation of aac_sg_tablesize.
Obtained from: Adaptec, via driver b11669
-rw-r--r--sys/dev/aac/aac.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/sys/dev/aac/aac.c b/sys/dev/aac/aac.c
index 078f809..54c7c1c 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);
OpenPOWER on IntegriCloud