diff options
author | scottl <scottl@FreeBSD.org> | 2003-07-09 19:19:16 +0000 |
---|---|---|
committer | scottl <scottl@FreeBSD.org> | 2003-07-09 19:19:16 +0000 |
commit | d070a46718091d35ec6eb6c2c0b09136b88624fd (patch) | |
tree | f16480f9ff4beadf0de0451c7519d61244bbcc11 /sys/dev | |
parent | d88d8b47b605162214264eb39f6a53a041db4fb7 (diff) | |
download | FreeBSD-src-d070a46718091d35ec6eb6c2c0b09136b88624fd.zip FreeBSD-src-d070a46718091d35ec6eb6c2c0b09136b88624fd.tar.gz |
Add a new quirk for cards that incorrectly interpret the amount of memory
in the system. This might also have a small performance gain.
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/aac/aac.c | 10 | ||||
-rw-r--r-- | sys/dev/aac/aac_pci.c | 4 | ||||
-rw-r--r-- | sys/dev/aac/aacvar.h | 1 |
3 files changed, 12 insertions, 3 deletions
diff --git a/sys/dev/aac/aac.c b/sys/dev/aac/aac.c index 72fee9c..db2b8dd 100644 --- a/sys/dev/aac/aac.c +++ b/sys/dev/aac/aac.c @@ -1549,8 +1549,16 @@ aac_init(struct aac_softc *sc) offsetof(struct aac_common, ac_printf); ip->PrintfBufferSize = AAC_PRINTF_BUFSIZE; - /* The adapter assumes that pages are 4K in size */ + /* + * The adapter assumes that pages are 4K in size, except on some + * broken firmware versions that do the page->byte conversion twice, + * therefore 'assuming' that this value is in 16MB units (2^24). + * Round up since the granularity is so high. + */ ip->HostPhysMemPages = ctob(physmem) / AAC_PAGE_SIZE; + if (sc->flags & AAC_FLAGS_BROKEN_MEMMAP) { + ip->HostPhysMemPages = + (ip->HostPhysMemPages + AAC_PAGE_SIZE) / AAC_PAGE_SIZE; ip->HostElapsedSeconds = time_second; /* reset later if invalid */ /* diff --git a/sys/dev/aac/aac_pci.c b/sys/dev/aac/aac_pci.c index bedb80a..97717f8 100644 --- a/sys/dev/aac/aac_pci.c +++ b/sys/dev/aac/aac_pci.c @@ -114,8 +114,8 @@ struct aac_ident "Dell PERC 3/Di"}, {0x1011, 0x0046, 0x9005, 0x0364, AAC_HWIF_STRONGARM, 0, "Adaptec AAC-364"}, - {0x1011, 0x0046, 0x9005, 0x0365, AAC_HWIF_STRONGARM, 0, - "Adaptec SCSI RAID 5400S"}, + {0x1011, 0x0046, 0x9005, 0x0365, AAC_HWIF_STRONGARM, + AAC_FLAGS_BROKEN_MEMMAP, "Adaptec SCSI RAID 5400S"}, {0x1011, 0x0046, 0x9005, 0x1364, AAC_HWIF_STRONGARM, AAC_FLAGS_PERC2QC, "Dell PERC 2/QC"}, {0x1011, 0x0046, 0x103c, 0x10c2, AAC_HWIF_STRONGARM, 0, diff --git a/sys/dev/aac/aacvar.h b/sys/dev/aac/aacvar.h index 1ff54112..02db527 100644 --- a/sys/dev/aac/aacvar.h +++ b/sys/dev/aac/aacvar.h @@ -369,6 +369,7 @@ struct aac_softc * 2GB-4GB range */ #define AAC_FLAGS_NO4GB (1 << 6) /* Can't access host mem >2GB */ #define AAC_FLAGS_256FIBS (1 << 7) /* Can only do 256 commands */ +#define AAC_FLAGS_BROKEN_MEMMAP (1 << 8) /* Broken HostPhysMemPages */ u_int32_t supported_options; int aac_max_fibs; |