diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-04-06 16:24:49 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-04-06 16:24:49 -0400 |
commit | 22eb5aa6c7940861f9603581665b9d9a1c60be30 (patch) | |
tree | 22890bcebae5647bcc1a29e7b544a1c5de2b1f8b /drivers/scsi/aacraid/comminit.c | |
parent | d7ca6f8cdffa5765e486edb3dada9121fba8e6aa (diff) | |
parent | 015640edb1f346e0b2eda703587c4cd1c310ec1d (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (74 commits)
[SCSI] sg: fix q->queue_lock on scsi_error_handler path
[SCSI] replace __inline with inline
[SCSI] a2091: make 2 functions static
[SCSI] a3000: make 2 functions static
[SCSI] ses: #if 0 the unused ses_match_host()
[SCSI] use kmem_cache_zalloc instead of kmem_cache_alloc/memset
[SCSI] sg: fix iovec bugs introduced by the block layer conversion
[SCSI] qlogicpti: use request_firmware
[SCSI] advansys: use request_firmware
[SCSI] qla1280: use request_firmware
[SCSI] libiscsi: fix iscsi pool error path
[SCSI] cxgb3i: call ddp release function directly
[SCSI] cxgb3i: merge cxgb3i_ddp into cxgb3i module
[SCSI] cxgb3i: close all tcp connections upon chip reset
[SCSI] cxgb3i: re-read ddp settings information after chip reset
[SCSI] cxgb3i: re-initialize ddp settings after chip reset
[SCSI] cxgb3i: subscribe to error notification from cxgb3 driver
[SCSI] aacraid driver update
[SCSI] mptsas: remove unneeded check
[SCSI] config: Make need for SCSI_CDROM clearer
...
Diffstat (limited to 'drivers/scsi/aacraid/comminit.c')
-rw-r--r-- | drivers/scsi/aacraid/comminit.c | 14 |
1 files changed, 13 insertions, 1 deletions
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 | |||
54 | const unsigned long printfbufsiz = 256; | 54 | const unsigned long printfbufsiz = 256; |
55 | struct aac_init *init; | 55 | struct aac_init *init; |
56 | dma_addr_t phys; | 56 | dma_addr_t phys; |
57 | unsigned long aac_max_hostphysmempages; | ||
57 | 58 | ||
58 | size = fibsize + sizeof(struct aac_init) + commsize + commalign + printfbufsiz; | 59 | size = fibsize + sizeof(struct aac_init) + commsize + commalign + printfbufsiz; |
59 | 60 | ||
@@ -90,7 +91,18 @@ static int aac_alloc_comm(struct aac_dev *dev, void **commaddr, unsigned long co | |||
90 | init->AdapterFibsPhysicalAddress = cpu_to_le32((u32)phys); | 91 | init->AdapterFibsPhysicalAddress = cpu_to_le32((u32)phys); |
91 | init->AdapterFibsSize = cpu_to_le32(fibsize); | 92 | init->AdapterFibsSize = cpu_to_le32(fibsize); |
92 | init->AdapterFibAlign = cpu_to_le32(sizeof(struct hw_fib)); | 93 | init->AdapterFibAlign = cpu_to_le32(sizeof(struct hw_fib)); |
93 | init->HostPhysMemPages = cpu_to_le32(AAC_MAX_HOSTPHYSMEMPAGES); | 94 | /* |
95 | * number of 4k pages of host physical memory. The aacraid fw needs | ||
96 | * this number to be less than 4gb worth of pages. New firmware doesn't | ||
97 | * have any issues with the mapping system, but older Firmware did, and | ||
98 | * had *troubles* dealing with the math overloading past 32 bits, thus | ||
99 | * we must limit this field. | ||
100 | */ | ||
101 | aac_max_hostphysmempages = dma_get_required_mask(&dev->pdev->dev) >> 12; | ||
102 | if (aac_max_hostphysmempages < AAC_MAX_HOSTPHYSMEMPAGES) | ||
103 | init->HostPhysMemPages = cpu_to_le32(aac_max_hostphysmempages); | ||
104 | else | ||
105 | init->HostPhysMemPages = cpu_to_le32(AAC_MAX_HOSTPHYSMEMPAGES); | ||
94 | 106 | ||
95 | init->InitFlags = 0; | 107 | init->InitFlags = 0; |
96 | if (dev->comm_interface == AAC_COMM_MESSAGE) { | 108 | if (dev->comm_interface == AAC_COMM_MESSAGE) { |