On Thu, 19 Apr 2018 09:46:30 +1000 (AEST)
Finn Thain <[email protected]> wrote:

> On Wed, 18 Apr 2018, Johannes Thumshirn wrote:
> 
> > --- a/drivers/scsi/dc395x.c
> > +++ b/drivers/scsi/dc395x.c
> > @@ -3473,7 +3473,7 @@ static void srb_done(struct AdapterCtlBlk
> > *acb, struct DeviceCtlBlk *dcb, 
> >     /*if( srb->cmd->cmnd[0] == INQUIRY && */
> >     /*  (host_byte(cmd->result) == DID_OK ||
> > status_byte(cmd->result) & CHECK_CONDITION) ) */
> > -           if ((cmd->result == (DID_OK << 16)
> > +           if ((host_byte(cmd->result) == DID_OK
> >                  || status_byte(cmd->result) &
> >                  CHECK_CONDITION)) {
> >                     if (!dcb->init_tcq_flag) {  
> 
> That's not quite the same. The old test is effectively cmd->result ==
> 0. Maybe this should be a separate patch?
> 

Indeed, as it's actually wrong.
The status byte is not a bitfield, but rather a value, and as such
the '&' check is wrong; it should be '=='.

Cheers,

Hannes

Reply via email to