diff options
author | Scott Long <scottl@FreeBSD.org> | 2003-07-09 19:19:16 +0000 |
---|---|---|
committer | Scott Long <scottl@FreeBSD.org> | 2003-07-09 19:19:16 +0000 |
commit | 4b00f859d0ff4542cdd690a3d2b2ee73ed79b9c0 (patch) | |
tree | f16480f9ff4beadf0de0451c7519d61244bbcc11 /sys/dev/aac/aac.c | |
parent | 4b11e601bfc7d3f17fc4e9db00fc36db0f54189e (diff) | |
download | src-4b00f859d0ff4542cdd690a3d2b2ee73ed79b9c0.tar.gz src-4b00f859d0ff4542cdd690a3d2b2ee73ed79b9c0.zip |
Add a new quirk for cards that incorrectly interpret the amount of memory
in the system. This might also have a small performance gain.
Notes
Notes:
svn path=/head/; revision=117361
Diffstat (limited to 'sys/dev/aac/aac.c')
-rw-r--r-- | sys/dev/aac/aac.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/dev/aac/aac.c b/sys/dev/aac/aac.c index 72fee9cec904..db2b8dd57598 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 */ /* |