All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Kelley <mikelley@microsoft.com>
To: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: KY Srinivasan <kys@microsoft.com>, Long Li <longli@microsoft.com>,
	"wei.liu@kernel.org" <wei.liu@kernel.org>,
	"jejb@linux.ibm.com" <jejb@linux.ibm.com>,
	"linux-hyperv@vger.kernel.org" <linux-hyperv@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>
Subject: RE: [PATCH 1/3] scsi: storvsc: Miscellaneous code cleanups
Date: Wed, 16 Jun 2021 20:10:50 +0000	[thread overview]
Message-ID: <MWHPR21MB159365DE648C8911E6AA53D2D70F9@MWHPR21MB1593.namprd21.prod.outlook.com> (raw)
In-Reply-To: <yq1lf794m98.fsf@ca-mkp.ca.oracle.com>

From: Martin K. Petersen <martin.petersen@oracle.com> Sent: Wednesday, June 16, 2021 1:07 PM
> 
> > Unfortunately, it's not quite right.  The line of code in question
> > needs to be
> >
> > if ((vstor_packet->vm_srb.scsi_status & 0xFF) == SAM_STAT_CHECK_CONDITION &&
> 
> > The status_byte() helper was doing the masking as well as the right
> > shift, so the masking will need to be open coded.
> 
> CHECK_CONDITION is obsolete so no shifting is required for the SAM
> status. And as far as I can tell vm_srb.scsi_status is a u8:
> 
> struct vmscsi_request {
>         u16 length;
>         u8 srb_status;
>         u8 scsi_status;
> [...]
> 

Indeed, you are right!  I was trying to preserve the masking with 0xFF
from the original code before my patch, but that masking was
spurious.  :-(   So yes, it's good.

Thanks,

Michael



      reply	other threads:[~2021-06-16 20:11 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-04 17:21 [PATCH 1/3] scsi: storvsc: Miscellaneous code cleanups Michael Kelley
2021-06-04 17:21 ` [PATCH 2/3] scsi: storvsc: Update error logging Michael Kelley
2021-06-04 17:21 ` [PATCH 3/3] scsi: storvsc: Correctly handle multiple flags in srb_status Michael Kelley
2021-06-07 22:25   ` Long Li
2021-06-08 14:48     ` Michael Kelley
2021-06-16  2:25 ` [PATCH 1/3] scsi: storvsc: Miscellaneous code cleanups Martin K. Petersen
2021-06-16 19:54   ` Michael Kelley
2021-06-16 20:06     ` Martin K. Petersen
2021-06-16 20:10       ` Michael Kelley [this message]

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=MWHPR21MB159365DE648C8911E6AA53D2D70F9@MWHPR21MB1593.namprd21.prod.outlook.com \
    --to=mikelley@microsoft.com \
    --cc=jejb@linux.ibm.com \
    --cc=kys@microsoft.com \
    --cc=linux-hyperv@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=longli@microsoft.com \
    --cc=martin.petersen@oracle.com \
    --cc=wei.liu@kernel.org \
    /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 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.