From: Benjamin Block <bblock@linux.ibm.com>
To: Hannes Reinecke <hare@suse.de>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>,
Christoph Hellwig <hch@lst.de>,
James Bottomley <james.bottomley@hansenpartnership.com>,
linux-scsi@vger.kernel.org
Subject: Re: [PATCH 27/37] scsi: add 'set_status_byte()' accessor
Date: Fri, 4 Dec 2020 15:16:00 +0100 [thread overview]
Message-ID: <20201204141600.GB7858@t480-pf1aa2c2> (raw)
In-Reply-To: <20201204100140.140863-28-hare@suse.de>
On Fri, Dec 04, 2020 at 11:01:30AM +0100, Hannes Reinecke wrote:
> Add the missing 'set_status_byte()' accessor function.
>
> Signed-off-by: Hannes Reinecke <hare@suse.de>
> ---
> include/scsi/scsi_cmnd.h | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/include/scsi/scsi_cmnd.h b/include/scsi/scsi_cmnd.h
> index 69ade4fb71aa..ace15b5dc956 100644
> --- a/include/scsi/scsi_cmnd.h
> +++ b/include/scsi/scsi_cmnd.h
> @@ -308,6 +308,11 @@ static inline struct scsi_data_buffer *scsi_prot(struct scsi_cmnd *cmd)
> #define scsi_for_each_prot_sg(cmd, sg, nseg, __i) \
> for_each_sg(scsi_prot_sglist(cmd), sg, nseg, __i)
>
> +static inline void set_status_byte(struct scsi_cmnd *cmd, char status)
> +{
> + cmd->result = (cmd->result & 0xffffff00) | status;
> +}
> +
> static inline void set_msg_byte(struct scsi_cmnd *cmd, char status)
> {
> cmd->result = (cmd->result & 0xffff00ff) | (status << 8);
> --
> 2.16.4
>
Reviewed-by: Benjamin Block <bblock@linux.ibm.com>
--
Best Regards, Benjamin Block / Linux on IBM Z Kernel Development / IBM Systems
IBM Deutschland Research & Development GmbH / https://www.ibm.com/privacy
Vorsitz. AufsR.: Gregor Pillen / Geschäftsführung: Dirk Wittkopp
Sitz der Gesellschaft: Böblingen / Registergericht: AmtsG Stuttgart, HRB 243294
next prev parent reply other threads:[~2020-12-04 14:17 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-04 10:01 [PATCHv2 00/37] SCSI result handling cleanup, part 1 Hannes Reinecke
2020-12-04 10:01 ` [PATCH 01/37] scsi: drop gdth driver Hannes Reinecke
2020-12-04 10:01 ` [PATCH 02/37] 3w-xxxx: Whitespace cleanup Hannes Reinecke
2020-12-04 10:01 ` [PATCH 03/37] 3w-9xxx: " Hannes Reinecke
2020-12-04 10:01 ` [PATCH 04/37] 3w-sas: " Hannes Reinecke
2020-12-04 10:01 ` [PATCH 05/37] atp870u: " Hannes Reinecke
2020-12-04 10:01 ` [PATCH 06/37] aic7xxx,aic79xx: " Hannes Reinecke
2020-12-04 10:01 ` [PATCH 07/37] aic7xxx,aic79xx: kill pointless forward declarations Hannes Reinecke
2020-12-04 10:01 ` [PATCH 08/37] aic7xxx,aic79xxx: remove driver-defined SAM status definitions Hannes Reinecke
2020-12-04 10:01 ` [PATCH 09/37] bfa: drop driver-defined SCSI status codes Hannes Reinecke
2020-12-04 10:01 ` [PATCH 10/37] acornscsi: use standard defines Hannes Reinecke
2020-12-04 10:01 ` [PATCH 11/37] nsp32: fixup status handling Hannes Reinecke
2020-12-04 10:01 ` [PATCH 12/37] dc395: drop private SAM status code definitions Hannes Reinecke
2020-12-04 10:01 ` [PATCH 13/37] qla4xxx: use standard SAM status definitions Hannes Reinecke
2020-12-04 10:01 ` [PATCH 14/37] zfcp: do not set COMMAND_COMPLETE Hannes Reinecke
2020-12-04 13:09 ` Benjamin Block
2020-12-04 10:01 ` [PATCH 15/37] aacraid: avoid setting message byte on completion Hannes Reinecke
2020-12-04 10:01 ` [PATCH 16/37] hpsa: do not set COMMAND_COMPLETE Hannes Reinecke
2020-12-04 10:01 ` [PATCH 17/37] stex: " Hannes Reinecke
2020-12-04 10:01 ` [PATCH 18/37] nsp_cs: drop internal SCSI message definition Hannes Reinecke
2020-12-04 10:01 ` [PATCH 19/37] aic7xxx,aic79xx: " Hannes Reinecke
2020-12-04 10:01 ` [PATCH 20/37] dc395x: drop internal SCSI message definitions Hannes Reinecke
2020-12-04 10:01 ` [PATCH 21/37] initio: drop internal SCSI message definition Hannes Reinecke
2020-12-04 10:01 ` [PATCH 22/37] scsi_debug: do not set COMMAND_COMPLETE Hannes Reinecke
2020-12-04 10:01 ` [PATCH 23/37] ufshcd: " Hannes Reinecke
2020-12-04 10:01 ` [PATCH 24/37] atp870u: use standard definitions Hannes Reinecke
2020-12-04 10:01 ` [PATCH 25/37] mac53c94: Do not set invalid command result Hannes Reinecke
2020-12-04 10:01 ` [PATCH 26/37] dpt_i2o: use DID_ERROR instead of INITIATOR_ERROR message Hannes Reinecke
2020-12-04 10:01 ` [PATCH 27/37] scsi: add 'set_status_byte()' accessor Hannes Reinecke
2020-12-04 14:16 ` Benjamin Block [this message]
2020-12-04 10:01 ` [PATCH 28/37] esp_scsi: use host byte as last argument to esp_cmd_is_done() Hannes Reinecke
2020-12-05 4:04 ` Finn Thain
2020-12-04 10:01 ` [PATCH 29/37] esp_scsi: do not set SCSI message byte Hannes Reinecke
2020-12-04 10:01 ` [PATCH 30/37] wd33c93: use SCSI status Hannes Reinecke
2020-12-04 10:01 ` [PATCH 31/37] ips: use correct command completion on error Hannes Reinecke
2020-12-04 10:01 ` [PATCH 32/37] storvsc: Return DID_ERROR for invalid commands Hannes Reinecke
2020-12-04 10:01 ` [PATCH 33/37] qla2xxx: fc_remote_port_chkready() returns a SCSI result value Hannes Reinecke
2020-12-04 10:01 ` [PATCH 34/37] advansys: kill driver_defined status byte accessors Hannes Reinecke
2020-12-04 10:01 ` [PATCH 35/37] ncr53c8xx: Use SAM status values Hannes Reinecke
2020-12-04 10:01 ` [PATCH 36/37] dc395x: drop internal result accessors Hannes Reinecke
2020-12-04 10:01 ` [PATCH 37/37] scsi: use non-shifted status values Hannes Reinecke
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=20201204141600.GB7858@t480-pf1aa2c2 \
--to=bblock@linux.ibm.com \
--cc=hare@suse.de \
--cc=hch@lst.de \
--cc=james.bottomley@hansenpartnership.com \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.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