summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMalahal Naineni <malahal@us.ibm.com>2007-03-12 18:41:26 +0100
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2007-03-20 16:49:40 +0100
commitb889d531b635da66ce2704a47febfed68173d9db (patch)
tree065b48c2c2d991dd332c92089f4ee80c794d0baf
parent[SCSI] make scsi_wait_scan always modular (diff)
downloadlinux-b889d531b635da66ce2704a47febfed68173d9db.tar.xz
linux-b889d531b635da66ce2704a47febfed68173d9db.zip
[SCSI] qla2xxx: fix RSCN handling on big-endian systems
qla2xxx driver fails to handle RSCN events affecting area or domain due to an endian issue on big endian systems. This fixes the port_id_t structure on big endian systems. Signed-off-by: Malahal Naineni <malahal@us.ibm.com> Acked-by: Seokmann Ju <seokmann.ju@qlogic.com> Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
-rw-r--r--drivers/scsi/qla2xxx/qla_def.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h
index 05f4f2a378eb..e8948b679f5b 100644
--- a/drivers/scsi/qla2xxx/qla_def.h
+++ b/drivers/scsi/qla2xxx/qla_def.h
@@ -1478,14 +1478,17 @@ typedef union {
uint32_t b24 : 24;
struct {
- uint8_t d_id[3];
- uint8_t rsvd_1;
- } r;
-
- struct {
+#ifdef __BIG_ENDIAN
+ uint8_t domain;
+ uint8_t area;
+ uint8_t al_pa;
+#elif __LITTLE_ENDIAN
uint8_t al_pa;
uint8_t area;
uint8_t domain;
+#else
+#error "__BIG_ENDIAN or __LITTLE_ENDIAN must be defined!"
+#endif
uint8_t rsvd_1;
} b;
} port_id_t;