Re: [PATCH 15/42] NCR5380: use SCSI result accessors

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 4/21/21 11:11 PM, Bart Van Assche wrote:
On 4/21/21 10:47 AM, Hannes Reinecke wrote:
Use accessors to set the SCSI result.

Signed-off-by: Hannes Reinecke <hare@xxxxxxx>
---
  drivers/scsi/NCR5380.c | 28 ++++++++++++++--------------
  1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/drivers/scsi/NCR5380.c b/drivers/scsi/NCR5380.c
index d7594b794d3c..855edda9db41 100644
--- a/drivers/scsi/NCR5380.c
+++ b/drivers/scsi/NCR5380.c
@@ -538,7 +538,7 @@ static void complete_cmd(struct Scsi_Host *instance,
      if (hostdata->sensing == cmd) {
          /* Autosense processing ends here */
-        if (status_byte(cmd->result) != GOOD) {
+        if (get_status_byte(cmd) != SAM_STAT_GOOD) {
              scsi_eh_restore_cmnd(cmd, &hostdata->ses);
          } else {
              scsi_eh_restore_cmnd(cmd, &hostdata->ses);

Do all SCSI devices from the nineties report SCSI status values with the lower bit set to 0? If so, can the status_byte() macro be removed entirely?

As indicated in the previous reply, yes, that is the plan (removing the status_byte() macro). And the drivers will have to report SCSI status values with the lower bit cleared, otherwise the linux SCSI status codes would never have worked in the first place.

So I'll be adding a new patch for dropping the 'status_byte()' macro in the next round.

Cheers,

Hannes
--
Dr. Hannes Reinecke                Kernel Storage Architect
hare@xxxxxxx                              +49 911 74053 688
SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux