From d8e965076514dcb16410c0d18c6c8de4dcba19fc Mon Sep 17 00:00:00 2001 From: "Leubner, Achim" Date: Wed, 1 Apr 2009 07:16:08 -0700 Subject: [SCSI] aacraid driver update changes: - set aac_cache=2 as default value to avoid performance problem (Novell bugzilla #469922) - Dell/PERC controller boot problem fixed (RedHat bugzilla #457552) - WWN flag added to fix SLES10 SP1/SP2 drive detection problems - 64-bit support changes - DECLARE_PCI_DEVICE_TABLE macro added - controller type changes Signed-off-by: Achim Leubner Signed-off-by: James Bottomley --- drivers/scsi/aacraid/comminit.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'drivers/scsi/aacraid/comminit.c') diff --git a/drivers/scsi/aacraid/comminit.c b/drivers/scsi/aacraid/comminit.c index 16310443b55a..d598eba630d0 100644 --- a/drivers/scsi/aacraid/comminit.c +++ b/drivers/scsi/aacraid/comminit.c @@ -54,6 +54,7 @@ static int aac_alloc_comm(struct aac_dev *dev, void **commaddr, unsigned long co const unsigned long printfbufsiz = 256; struct aac_init *init; dma_addr_t phys; + unsigned long aac_max_hostphysmempages; size = fibsize + sizeof(struct aac_init) + commsize + commalign + printfbufsiz; @@ -90,7 +91,18 @@ static int aac_alloc_comm(struct aac_dev *dev, void **commaddr, unsigned long co init->AdapterFibsPhysicalAddress = cpu_to_le32((u32)phys); init->AdapterFibsSize = cpu_to_le32(fibsize); init->AdapterFibAlign = cpu_to_le32(sizeof(struct hw_fib)); - init->HostPhysMemPages = cpu_to_le32(AAC_MAX_HOSTPHYSMEMPAGES); + /* + * number of 4k pages of host physical memory. The aacraid fw needs + * this number to be less than 4gb worth of pages. New firmware doesn't + * have any issues with the mapping system, but older Firmware did, and + * had *troubles* dealing with the math overloading past 32 bits, thus + * we must limit this field. + */ + aac_max_hostphysmempages = dma_get_required_mask(&dev->pdev->dev) >> 12; + if (aac_max_hostphysmempages < AAC_MAX_HOSTPHYSMEMPAGES) + init->HostPhysMemPages = cpu_to_le32(aac_max_hostphysmempages); + else + init->HostPhysMemPages = cpu_to_le32(AAC_MAX_HOSTPHYSMEMPAGES); init->InitFlags = 0; if (dev->comm_interface == AAC_COMM_MESSAGE) { -- cgit v1.2.3-59-g8ed1b