summaryrefslogtreecommitdiff
path: root/drivers/scsi/isci/unsolicited_frame_control.c
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2011-07-30 04:16:45 +0400
committerJames Bottomley <JBottomley@Parallels.com>2011-08-24 06:50:27 +0400
commitee33e2b771f9e9e4aaba2bb2ace7b727fe451a8b (patch)
treed7aeaef179c98df3135d4ad5a872643d226b691c /drivers/scsi/isci/unsolicited_frame_control.c
parent1a878284473284f9577d44babf16d87152a05c33 (diff)
downloadlinux-ee33e2b771f9e9e4aaba2bb2ace7b727fe451a8b.tar.xz
[SCSI] isci: fix 32-bit operation when CONFIG_HIGHMEM64G=n
The unsolicited frame control infrastructure requires a table of dma addresses for the hardware to lookup the frame buffer location by an index. The hardware expects the elements of this table to be 64-bit quantities, so we cannot reference these elements as dma_addr_t. All unsolicited frame protocols are affected, particularly SATA-PIO and SMP which prevented direct-attached SATA drives and expander-attached drives to not be discovered. Cc: <stable@kernel.org> Reported-by: Jacek Danecki <jacek.danecki@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/isci/unsolicited_frame_control.c')
-rw-r--r--drivers/scsi/isci/unsolicited_frame_control.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/isci/unsolicited_frame_control.c b/drivers/scsi/isci/unsolicited_frame_control.c
index e9e1e2abacb9..16f88ab939c8 100644
--- a/drivers/scsi/isci/unsolicited_frame_control.c
+++ b/drivers/scsi/isci/unsolicited_frame_control.c
@@ -72,7 +72,7 @@ int sci_unsolicited_frame_control_construct(struct isci_host *ihost)
*/
buf_len = SCU_MAX_UNSOLICITED_FRAMES * SCU_UNSOLICITED_FRAME_BUFFER_SIZE;
header_len = SCU_MAX_UNSOLICITED_FRAMES * sizeof(struct scu_unsolicited_frame_header);
- size = buf_len + header_len + SCU_MAX_UNSOLICITED_FRAMES * sizeof(dma_addr_t);
+ size = buf_len + header_len + SCU_MAX_UNSOLICITED_FRAMES * sizeof(uf_control->address_table.array[0]);
/*
* The Unsolicited Frame buffers are set at the start of the UF