All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3] fix qla2xxx regression on sparc64
@ 2020-08-27 20:27 Rene Rebe
  2020-08-27 20:30 ` Himanshu Madhani
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Rene Rebe @ 2020-08-27 20:27 UTC (permalink / raw)
  To: linux-scsi; +Cc: Himanshu Madhani, Bart Van Assche

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. Also
mark the second frame_payload_size in nvram_t __le16 to avoid new
sparse warnings.

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_def.h b/drivers/scsi/qla2xxx/qla_def.h
index 8c92af5e4390..00782e859ef8 100644
--- a/drivers/scsi/qla2xxx/qla_def.h
+++ b/drivers/scsi/qla2xxx/qla_def.h
@@ -1626,7 +1626,7 @@ typedef struct {
 	 */
 	uint8_t	 firmware_options[2];
 
-	uint16_t frame_payload_size;
+	__le16	frame_payload_size;
 	__le16	max_iocb_allocation;
 	__le16	execution_throttle;
 	uint8_t	 retry_count;
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 = 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 related	[flat|nested] 5+ messages in thread

* Re: [PATCH v3] fix qla2xxx regression on sparc64
  2020-08-27 20:27 [PATCH v3] fix qla2xxx regression on sparc64 Rene Rebe
@ 2020-08-27 20:30 ` Himanshu Madhani
  2020-08-28  3:30 ` Bart Van Assche
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Himanshu Madhani @ 2020-08-27 20:30 UTC (permalink / raw)
  To: Rene Rebe; +Cc: linux-scsi, Bart Van Assche



> On Aug 27, 2020, at 3:27 PM, Rene Rebe <rene@exactcode.com> wrote:
> 
> 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. Also
> mark the second frame_payload_size in nvram_t __le16 to avoid new
> sparse warnings.
> 
> 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_def.h b/drivers/scsi/qla2xxx/qla_def.h
> index 8c92af5e4390..00782e859ef8 100644
> --- a/drivers/scsi/qla2xxx/qla_def.h
> +++ b/drivers/scsi/qla2xxx/qla_def.h
> @@ -1626,7 +1626,7 @@ typedef struct {
> 	 */
> 	uint8_t	 firmware_options[2];
> 
> -	uint16_t frame_payload_size;
> +	__le16	frame_payload_size;
> 	__le16	max_iocb_allocation;
> 	__le16	execution_throttle;
> 	uint8_t	 retry_count;
> 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 = 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://urldefense.com/v3/__https://exactcode.com__;!!GqivPVa7Brio!OiHyjIceMlSLvY201K45s3J5OfycTE7Z8SH-AOktRAnXCmsreUUnZY8iX7nQVshbmnOO$  | https://urldefense.com/v3/__https://t2sde.org__;!!GqivPVa7Brio!OiHyjIceMlSLvY201K45s3J5OfycTE7Z8SH-AOktRAnXCmsreUUnZY8iX7nQVlPyHRLL$  | https://urldefense.com/v3/__https://rene.rebe.de__;!!GqivPVa7Brio!OiHyjIceMlSLvY201K45s3J5OfycTE7Z8SH-AOktRAnXCmsreUUnZY8iX7nQVulmVRVj$ 

Looks Good.

Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>

--
Himanshu Madhani	 Oracle Linux Engineering


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

* Re: [PATCH v3] fix qla2xxx regression on sparc64
  2020-08-27 20:27 [PATCH v3] fix qla2xxx regression on sparc64 Rene Rebe
  2020-08-27 20:30 ` Himanshu Madhani
@ 2020-08-28  3:30 ` Bart Van Assche
  2020-08-28  8:12 ` Arun Easi
  2020-09-03  3:01 ` Martin K. Petersen
  3 siblings, 0 replies; 5+ messages in thread
From: Bart Van Assche @ 2020-08-28  3:30 UTC (permalink / raw)
  To: Rene Rebe, linux-scsi; +Cc: Himanshu Madhani

On 2020-08-27 13:27, Rene Rebe wrote:
> 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. Also
> mark the second frame_payload_size in nvram_t __le16 to avoid new
> sparse warnings.

Thank you for having fixed the endianness warnings.

Reviewed-by: Bart Van Assche <bvanassche@acm.org>

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

* Re: [PATCH v3] fix qla2xxx regression on sparc64
  2020-08-27 20:27 [PATCH v3] fix qla2xxx regression on sparc64 Rene Rebe
  2020-08-27 20:30 ` Himanshu Madhani
  2020-08-28  3:30 ` Bart Van Assche
@ 2020-08-28  8:12 ` Arun Easi
  2020-09-03  3:01 ` Martin K. Petersen
  3 siblings, 0 replies; 5+ messages in thread
From: Arun Easi @ 2020-08-28  8:12 UTC (permalink / raw)
  To: Rene Rebe; +Cc: linux-scsi, Himanshu Madhani, Bart Van Assche

[-- Attachment #1: Type: text/plain, Size: 795 bytes --]

On Thu, 27 Aug 2020, 1:27pm, Rene Rebe wrote:

> 
> 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. Also
> mark the second frame_payload_size in nvram_t __le16 to avoid new
> sparse warnings.
> 
> Fixes: 98aee70d19a7e ("qla2xxx: Add endianizer to max_payload_size modifier.")
> Signed-off-by: René Rebe <rene@exactcode.de>
> 

Looks good. Other *nvram_config changes are already taken care by one of 
the recent fixes, this was the only one missing.

I was surprised that this really exception path (bad HBA nvram) was 
causing a regression; apparently this is not an exception path in this old 
machine.

Thanks Rene.

Regards,
-Arun

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

* Re: [PATCH v3] fix qla2xxx regression on sparc64
  2020-08-27 20:27 [PATCH v3] fix qla2xxx regression on sparc64 Rene Rebe
                   ` (2 preceding siblings ...)
  2020-08-28  8:12 ` Arun Easi
@ 2020-09-03  3:01 ` Martin K. Petersen
  3 siblings, 0 replies; 5+ messages in thread
From: Martin K. Petersen @ 2020-09-03  3:01 UTC (permalink / raw)
  To: Rene Rebe, linux-scsi
  Cc: Martin K . Petersen, Himanshu Madhani, Bart Van Assche

On Thu, 27 Aug 2020 22:27:29 +0200 (CEST), Rene Rebe wrote:

> 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. Also
> mark the second frame_payload_size in nvram_t __le16 to avoid new
> sparse warnings.

Applied to 5.9/scsi-fixes, thanks!

[1/1] scsi: qla2xxx: Fix regression on sparc64
      https://git.kernel.org/mkp/scsi/c/2a87d485c4cb

-- 
Martin K. Petersen	Oracle Linux Engineering

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

end of thread, other threads:[~2020-09-03  3:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-27 20:27 [PATCH v3] fix qla2xxx regression on sparc64 Rene Rebe
2020-08-27 20:30 ` Himanshu Madhani
2020-08-28  3:30 ` Bart Van Assche
2020-08-28  8:12 ` Arun Easi
2020-09-03  3:01 ` Martin K. Petersen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.