Thread (2 messages) read the whole thread 2 messages, 2 authors, 2021-06-16

RE: [PATCH 1/3] scsi: storvsc: Miscellaneous code cleanups

From: Michael Kelley <hidden>
Date: 2021-06-16 20:11:14
Also in: linux-scsi, lkml

From: Martin K. Petersen <martin.petersen@oracle.com> Sent: Wednesday, June 16, 2021 1:07 PM
quoted
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 &&
quoted
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

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help