diff options
author | Quinn Tran <qutran@marvell.com> | 2021-10-26 14:54:10 +0300 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2021-10-27 06:52:00 +0300 |
commit | 36f468bfe98c7de7916ab3391ee5dd6fd2549979 (patch) | |
tree | 235a69f48488d3f4007383a3eb21cf4c18395492 /drivers/scsi/qla2xxx/qla_edif.h | |
parent | 0f6d600a26e89d31d8381b324fc970f72579a126 (diff) | |
download | linux-36f468bfe98c7de7916ab3391ee5dd6fd2549979.tar.xz |
scsi: qla2xxx: edif: Fix inconsistent check of db_flags
db_flags field is a bit field. Replace value check with bit flag check.
Link: https://lore.kernel.org/r/20211026115412.27691-12-njavali@marvell.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: Quinn Tran <qutran@marvell.com>
Signed-off-by: Nilesh Javali <njavali@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_edif.h')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_edif.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/scsi/qla2xxx/qla_edif.h b/drivers/scsi/qla2xxx/qla_edif.h index 2517005fb08c..a965ca8e47ce 100644 --- a/drivers/scsi/qla2xxx/qla_edif.h +++ b/drivers/scsi/qla2xxx/qla_edif.h @@ -41,9 +41,12 @@ struct pur_core { }; enum db_flags_t { - EDB_ACTIVE = 0x1, + EDB_ACTIVE = BIT_0, }; +#define DBELL_ACTIVE(_v) (_v->e_dbell.db_flags & EDB_ACTIVE) +#define DBELL_INACTIVE(_v) (!(_v->e_dbell.db_flags & EDB_ACTIVE)) + struct edif_dbell { enum db_flags_t db_flags; spinlock_t db_lock; @@ -134,7 +137,7 @@ struct enode { !_s->edif.app_sess_online)) #define EDIF_NEGOTIATION_PENDING(_fcport) \ - ((_fcport->vha.e_dbell.db_flags & EDB_ACTIVE) && \ + (DBELL_ACTIVE(_fcport->vha) && \ (_fcport->disc_state == DSC_LOGIN_AUTH_PEND)) #endif /* __QLA_EDIF_H */ |