summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx/qla_mr.c
diff options
context:
space:
mode:
authorBart Van Assche <bvanassche@acm.org>2020-02-20 05:34:39 +0100
committerMartin K. Petersen <martin.petersen@oracle.com>2020-02-29 01:54:59 +0100
commit471298cab82d255e358901ea5baff24abe1a53b8 (patch)
tree4542666fabfdccc05beab2a497836f1a4cbad8e1 /drivers/scsi/qla2xxx/qla_mr.c
parentscsi: qla2xxx: Suppress endianness complaints in qla2x00_configure_local_loop() (diff)
downloadlinux-471298cab82d255e358901ea5baff24abe1a53b8.tar.xz
linux-471298cab82d255e358901ea5baff24abe1a53b8.zip
scsi: qla2xxx: Fix sparse warnings triggered by the PCI state checking code
This patch fixes the following sparse warnings: drivers/scsi/qla2xxx/qla_mbx.c:120:21: warning: restricted pci_channel_state_t degrades to integer drivers/scsi/qla2xxx/qla_mbx.c:120:37: warning: restricted pci_channel_state_t degrades to integer >From include/linux/pci.h: enum pci_channel_state { /* I/O channel is in normal state */ pci_channel_io_normal = (__force pci_channel_state_t) 1, /* I/O to channel is blocked */ pci_channel_io_frozen = (__force pci_channel_state_t) 2, /* PCI card is dead */ pci_channel_io_perm_failure = (__force pci_channel_state_t) 3, }; Link: https://lore.kernel.org/r/20200220043441.20504-4-bvanassche@acm.org Cc: Roman Bolshakov <r.bolshakov@yadro.com> Cc: Martin Wilck <mwilck@suse.com> Cc: Quinn Tran <qutran@marvell.com> Reviewed-by: Daniel Wagner <dwagner@suse.de> Reviewed-by: Roman Bolshakov <r.bolshakov@yadro.com> Acked-by: Himanshu Madhani <hmadhani@marvell.com> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_mr.c')
-rw-r--r--drivers/scsi/qla2xxx/qla_mr.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/scsi/qla2xxx/qla_mr.c b/drivers/scsi/qla2xxx/qla_mr.c
index cad1fc2a1b28..6d120457478e 100644
--- a/drivers/scsi/qla2xxx/qla_mr.c
+++ b/drivers/scsi/qla2xxx/qla_mr.c
@@ -53,10 +53,9 @@ qlafx00_mailbox_command(scsi_qla_host_t *vha, struct mbx_cmd_32 *mcp)
struct qla_hw_data *ha = vha->hw;
scsi_qla_host_t *base_vha = pci_get_drvdata(ha->pdev);
- if (ha->pdev->error_state > pci_channel_io_frozen) {
+ if (ha->pdev->error_state == pci_channel_io_perm_failure) {
ql_log(ql_log_warn, vha, 0x115c,
- "error_state is greater than pci_channel_io_frozen, "
- "exiting.\n");
+ "PCI channel failed permanently, exiting.\n");
return QLA_FUNCTION_TIMEOUT;
}