From: Bart Van Assche <bvanassche@acm.org>
To: Rene Rebe <rene@exactcode.com>, linux-scsi@vger.kernel.org
Cc: Himanshu Madhani <himanshu.madhani@oracle.com>
Subject: Re: [PATCH] fix qla2xxx regression on sparc64
Date: Sat, 22 Aug 2020 08:53:22 -0700 [thread overview]
Message-ID: <b7719680-e451-5687-1fb7-c8c059a880d4@acm.org> (raw)
In-Reply-To: <20200822.135941.315149880460809536.rene@exactcode.com>
On 2020-08-22 04:59, 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.
>
> 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);
Drivers should use cpu_to_le16() instead of __constant_cpu_to_le16().
Additionally, this patch introduces the following new sparse warnings:
$ make C=2 M=drivers/scsi/qla2xxx
CC [M] drivers/scsi/qla2xxx/qla_os.o
CHECK drivers/scsi/qla2xxx/qla_os.c
CC [M] drivers/scsi/qla2xxx/qla_init.o
CHECK drivers/scsi/qla2xxx/qla_init.c
drivers/scsi/qla2xxx/qla_init.c:4606:48: warning: incorrect type in assignment (different base types)
drivers/scsi/qla2xxx/qla_init.c:4606:48: expected unsigned short [usertype] frame_payload_size
drivers/scsi/qla2xxx/qla_init.c:4606:48: got restricted __le16 [usertype]
drivers/scsi/qla2xxx/qla_init.c:4613:48: warning: incorrect type in assignment (different base types)
drivers/scsi/qla2xxx/qla_init.c:4613:48: expected unsigned short [usertype] frame_payload_size
drivers/scsi/qla2xxx/qla_init.c:4613:48: got restricted __le16 [usertype]
drivers/scsi/qla2xxx/qla_init.c:4617:48: warning: incorrect type in assignment (different base types)
drivers/scsi/qla2xxx/qla_init.c:4617:48: expected unsigned short [usertype] frame_payload_size
drivers/scsi/qla2xxx/qla_init.c:4617:48: got restricted __le16 [usertype]
Please fix these.
Bart.
next prev parent reply other threads:[~2020-08-22 15:53 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-22 11:59 [PATCH] fix qla2xxx regression on sparc64 Rene Rebe
2020-08-22 15:53 ` Bart Van Assche [this message]
-- 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b7719680-e451-5687-1fb7-c8c059a880d4@acm.org \
--to=bvanassche@acm.org \
--cc=himanshu.madhani@oracle.com \
--cc=linux-scsi@vger.kernel.org \
--cc=rene@exactcode.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox