public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fix qla2xxx regression on sparc64
@ 2020-08-22 11:59 Rene Rebe
  2020-08-22 15:53 ` Bart Van Assche
  0 siblings, 1 reply; 11+ messages in thread
From: Rene Rebe @ 2020-08-22 11:59 UTC (permalink / raw)
  To: linux-scsi; +Cc: Himanshu Madhani

Commit 98aee70d19a7e3203649fa2078464e4f402a0ad8 in 2014 broke qla2xxx on
sparc64, e.g. as in the Sun Blade 1000 / 2000. Unbreak by partial revert to
fix endianess in nvram firmware default initialization.

Fixes: 98aee70d19a7e ("qla2xxx: Add endianizer to max_payload_size modifier.")
Signed-off-by: René Rebe <rene@exactcode.de>

diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
index 57a2d76aa691..0916c33eb076 100644
--- a/drivers/scsi/qla2xxx/qla_init.c
+++ b/drivers/scsi/qla2xxx/qla_init.c
@@ -4603,18 +4603,18 @@ qla2x00_nvram_config(scsi_qla_host_t *vha)
 			nv->firmware_options[1] = BIT_7 | BIT_5;
 			nv->add_firmware_options[0] = BIT_5;
 			nv->add_firmware_options[1] = BIT_5 | BIT_4;
-			nv->frame_payload_size = 2048;
+			nv->frame_payload_size = __constant_cpu_to_le16(2048);
 			nv->special_options[1] = BIT_7;
 		} else if (IS_QLA2200(ha)) {
 			nv->firmware_options[0] = BIT_2 | BIT_1;
 			nv->firmware_options[1] = BIT_7 | BIT_5;
 			nv->add_firmware_options[0] = BIT_5;
 			nv->add_firmware_options[1] = BIT_5 | BIT_4;
-			nv->frame_payload_size = 1024;
+			nv->frame_payload_size = __constant_cpu_to_le16(1024);
 		} else if (IS_QLA2100(ha)) {
 			nv->firmware_options[0] = BIT_3 | BIT_1;
 			nv->firmware_options[1] = BIT_5;
-			nv->frame_payload_size = 1024;
+			nv->frame_payload_size = __constant_cpu_to_le16(1024);
 		}
 
 		nv->max_iocb_allocation = cpu_to_le16(256);


-- 
  René Rebe, ExactCODE GmbH, Lietzenburger Str. 42, DE-10789 Berlin
  https://exactcode.com | https://t2sde.org | https://rene.rebe.de

^ permalink raw reply related	[flat|nested] 11+ messages in thread
* [PATCH] fix qla2xxx regression on sparc64
@ 2020-08-21 12:28 Rene Rebe
  2020-08-21 13:49 ` Himanshu Madhani
  2020-08-21 20:55 ` Bart Van Assche
  0 siblings, 2 replies; 11+ messages in thread
From: Rene Rebe @ 2020-08-21 12:28 UTC (permalink / raw)
  To: linux-scsi


Commit 9a50aaefc1b896e734bf7faf3d085f71a360ce97 in 2014 broke
qla2xxx on sparc64, e.g. as in the Sun Blade 1000 / 2000.
Unbreak by fixing endianess in nvram firmware defaults
initialization.

Signed-off-by: René Rebe <rene@exactcode.de>

--- linux-5.8/drivers/scsi/qla2xxx/qla_init.c.vanilla	2020-08-21 09:55:18.600926737 +0200
+++ linux-5.8/drivers/scsi/qla2xxx/qla_init.c	2020-08-21 09:57:35.992926885 +0200
@@ -4603,18 +4603,18 @@
 			nv->firmware_options[1] = BIT_7 | BIT_5;
 			nv->add_firmware_options[0] = BIT_5;
 			nv->add_firmware_options[1] = BIT_5 | BIT_4;
-			nv->frame_payload_size = 2048;
+			nv->frame_payload_size = cpu_to_le16(2048);
 			nv->special_options[1] = BIT_7;
 		} else if (IS_QLA2200(ha)) {
 			nv->firmware_options[0] = BIT_2 | BIT_1;
 			nv->firmware_options[1] = BIT_7 | BIT_5;
 			nv->add_firmware_options[0] = BIT_5;
 			nv->add_firmware_options[1] = BIT_5 | BIT_4;
-			nv->frame_payload_size = 1024;
+			nv->frame_payload_size = cpu_to_le16(1024);
 		} else if (IS_QLA2100(ha)) {
 			nv->firmware_options[0] = BIT_3 | BIT_1;
 			nv->firmware_options[1] = BIT_5;
-			nv->frame_payload_size = 1024;
+			nv->frame_payload_size = cpu_to_le16(1024);
 		}
 
 		nv->max_iocb_allocation = cpu_to_le16(256);

-- 
  René Rebe, ExactCODE GmbH, Lietzenburger Str. 42, DE-10789 Berlin
  https://exactcode.com | https://t2sde.org | https://rene.rebe.de

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2020-08-22 15:53 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-22 11:59 [PATCH] fix qla2xxx regression on sparc64 Rene Rebe
2020-08-22 15:53 ` Bart Van Assche
  -- strict thread matches above, loose matches on Subject: below --
2020-08-21 12:28 Rene Rebe
2020-08-21 13:49 ` Himanshu Madhani
2020-08-21 14:47   ` René Rebe
2020-08-21 15:17     ` Himanshu Madhani
2020-08-21 17:49       ` René Rebe
2020-08-21 18:00         ` Himanshu Madhani
2020-08-21 20:21           ` René Rebe
2020-08-21 20:36             ` Himanshu Madhani
2020-08-21 20:55 ` Bart Van Assche

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox