mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Correct calculation of aac_sg_tablesize.
Obtained from: Adaptec, via driver b11669
This commit is contained in:
parent
ea2138fc25
commit
7e7a458e45
1 changed files with 4 additions and 6 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue