aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/ipr.h
diff options
context:
space:
mode:
authorWayne Boyer <wayneb@linux.vnet.ibm.com>2010-06-04 10:26:50 -0700
committerJames Bottomley <James.Bottomley@suse.de>2010-07-27 12:01:30 -0500
commit8701f18504751a5b89be3203e28c5ec04c147167 (patch)
tree58f15f58a76ce73e1d92c72a21c19b350b8ded30 /drivers/scsi/ipr.h
parentda2907ffd08a2d708c829ec171f05fe3ceab1315 (diff)
downloadkernel_samsung_aries-8701f18504751a5b89be3203e28c5ec04c147167.zip
kernel_samsung_aries-8701f18504751a5b89be3203e28c5ec04c147167.tar.gz
kernel_samsung_aries-8701f18504751a5b89be3203e28c5ec04c147167.tar.bz2
[SCSI] ipr: add endian swap enablement for 64 bit adapters
A change in the hardware design of the chip for the new adapters changes the default endianness of MMIO operations. This patch adds a register definition which when written to with a predefined value will change the endianness back to what the driver expects. This patch also fixes two problems found during testing. First, the first reserved field in the ipr_hostrcb64_fabirc_desc structure only reserved one byte. The correct amount to reserve is 2 bytes. Second, the reserved field of the ipr_hostrcb64_error structure only reserved 2 bytes. The correct amount to reserve is 16 bytes. Signed-off-by: Wayne Boyer <wayneb@linux.vnet.ibm.com> Acked-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/ipr.h')
-rw-r--r--drivers/scsi/ipr.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/scsi/ipr.h b/drivers/scsi/ipr.h
index b965f35..ea391ff 100644
--- a/drivers/scsi/ipr.h
+++ b/drivers/scsi/ipr.h
@@ -996,7 +996,7 @@ struct ipr_hostrcb64_fabric_desc {
__be16 length;
u8 descriptor_id;
- u8 reserved;
+ u8 reserved[2];
u8 path_state;
u8 reserved2[2];
@@ -1054,7 +1054,7 @@ struct ipr_hostrcb64_error {
__be64 fd_lun;
u8 fd_res_path[8];
__be64 time_stamp;
- u8 reserved[2];
+ u8 reserved[16];
union {
struct ipr_hostrcb_type_ff_error type_ff_error;
struct ipr_hostrcb_type_12_error type_12_error;
@@ -1254,6 +1254,9 @@ struct ipr_interrupt_offsets {
unsigned long dump_addr_reg;
unsigned long dump_data_reg;
+
+#define IPR_ENDIAN_SWAP_KEY 0x000C0C00
+ unsigned long endian_swap_reg;
};
struct ipr_interrupts {
@@ -1279,6 +1282,8 @@ struct ipr_interrupts {
void __iomem *dump_addr_reg;
void __iomem *dump_data_reg;
+
+ void __iomem *endian_swap_reg;
};
struct ipr_chip_cfg_t {