1 |
From ee33e2b771f9e9e4aaba2bb2ace7b727fe451a8b Mon Sep 17 00:00:00 2001 |
2 |
From: Dan Williams <dan.j.williams@intel.com> |
3 |
Date: Fri, 29 Jul 2011 17:16:45 -0700 |
4 |
Subject: [PATCH] [SCSI] isci: fix 32-bit operation when CONFIG_HIGHMEM64G=n |
5 |
|
6 |
The unsolicited frame control infrastructure requires a table of dma |
7 |
addresses for the hardware to lookup the frame buffer location by an |
8 |
index. The hardware expects the elements of this table to be 64-bit |
9 |
quantities, so we cannot reference these elements as dma_addr_t. All |
10 |
unsolicited frame protocols are affected, particularly SATA-PIO and SMP |
11 |
which prevented direct-attached SATA drives and expander-attached drives |
12 |
to not be discovered. |
13 |
|
14 |
Cc: <stable@kernel.org> |
15 |
Reported-by: Jacek Danecki <jacek.danecki@intel.com> |
16 |
Signed-off-by: Dan Williams <dan.j.williams@intel.com> |
17 |
Signed-off-by: James Bottomley <JBottomley@Parallels.com> |
18 |
--- |
19 |
drivers/scsi/isci/unsolicited_frame_control.c | 2 +- |
20 |
drivers/scsi/isci/unsolicited_frame_control.h | 2 +- |
21 |
2 files changed, 2 insertions(+), 2 deletions(-) |
22 |
|
23 |
diff --git a/drivers/scsi/isci/unsolicited_frame_control.c b/drivers/scsi/isci/unsolicited_frame_control.c |
24 |
index e9e1e2a..16f88ab 100644 |
25 |
--- a/drivers/scsi/isci/unsolicited_frame_control.c |
26 |
+++ b/drivers/scsi/isci/unsolicited_frame_control.c |
27 |
@@ -72,7 +72,7 @@ int sci_unsolicited_frame_control_construct(struct isci_host *ihost) |
28 |
*/ |
29 |
buf_len = SCU_MAX_UNSOLICITED_FRAMES * SCU_UNSOLICITED_FRAME_BUFFER_SIZE; |
30 |
header_len = SCU_MAX_UNSOLICITED_FRAMES * sizeof(struct scu_unsolicited_frame_header); |
31 |
- size = buf_len + header_len + SCU_MAX_UNSOLICITED_FRAMES * sizeof(dma_addr_t); |
32 |
+ size = buf_len + header_len + SCU_MAX_UNSOLICITED_FRAMES * sizeof(uf_control->address_table.array[0]); |
33 |
|
34 |
/* |
35 |
* The Unsolicited Frame buffers are set at the start of the UF |
36 |
diff --git a/drivers/scsi/isci/unsolicited_frame_control.h b/drivers/scsi/isci/unsolicited_frame_control.h |
37 |
index 31cb950..75d8966 100644 |
38 |
--- a/drivers/scsi/isci/unsolicited_frame_control.h |
39 |
+++ b/drivers/scsi/isci/unsolicited_frame_control.h |
40 |
@@ -214,7 +214,7 @@ struct sci_uf_address_table_array { |
41 |
* starting address of the UF address table. |
42 |
* 64-bit pointers are required by the hardware. |
43 |
*/ |
44 |
- dma_addr_t *array; |
45 |
+ u64 *array; |
46 |
|
47 |
/** |
48 |
* This field specifies the physical address location for the UF |
49 |
-- |
50 |
1.7.7.2 |
51 |
|