Add a new quirk for cards that incorrectly interpret the amount of memory

in the system.  This might also have a small performance gain.
This commit is contained in:
Scott Long 2003-07-09 19:19:16 +00:00
parent 4b11e601bf
commit 4b00f859d0
3 changed files with 12 additions and 3 deletions

View File

@ -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 */
/*

View File

@ -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,

View File

@ -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;