diff mbox series

[02/12] lpfc: Fix lpfc_sli4_read_config return value check

Message ID 20181023204112.18213-3-jsmart2021@gmail.com (mailing list archive)
State Accepted
Headers show
Series lpfc updates for 12.0.0.8 | expand

Commit Message

James Smart Oct. 23, 2018, 8:41 p.m. UTC
An error is an error - but not to the existing return value check.

Revise check to handle any failure, not just EIO.

Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: James Smart <jsmart2021@gmail.com>
---
 drivers/scsi/lpfc/lpfc_init.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Hannes Reinecke Oct. 29, 2018, 11:24 a.m. UTC | #1
On 10/23/18 10:41 PM, James Smart wrote:
> An error is an error - but not to the existing return value check.
> 
> Revise check to handle any failure, not just EIO.
> 
> Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
> Signed-off-by: James Smart <jsmart2021@gmail.com>
> ---
>   drivers/scsi/lpfc/lpfc_init.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
> index c78ae81b5701..098b5ef3e9b8 100644
> --- a/drivers/scsi/lpfc/lpfc_init.c
> +++ b/drivers/scsi/lpfc/lpfc_init.c
> @@ -4896,11 +4896,11 @@ lpfc_sli4_async_sli_evt(struct lpfc_hba *phba, struct lpfc_acqe_sli *acqe_sli)
>   
>   		/* Issue READ_CONFIG mbox command to refresh supported speeds */
>   		rc = lpfc_sli4_read_config(phba);
> -		if (rc == -EIO) {
> +		if (rc) {
>   			phba->lmt = 0;
>   			lpfc_printf_log(phba, KERN_ERR, LOG_SLI,
>   					"3194 Unable to retrieve supported "
> -					"speeds\n");
> +					"speeds, rc = 0x%x\n", rc);
>   		}
>   		vports = lpfc_create_vport_work_array(phba);
>   		if (vports != NULL) {
> 
Reviewed-by: Hannes Reinecke <hare@suse.com>

Cheers,

Hannes
diff mbox series

Patch

diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
index c78ae81b5701..098b5ef3e9b8 100644
--- a/drivers/scsi/lpfc/lpfc_init.c
+++ b/drivers/scsi/lpfc/lpfc_init.c
@@ -4896,11 +4896,11 @@  lpfc_sli4_async_sli_evt(struct lpfc_hba *phba, struct lpfc_acqe_sli *acqe_sli)
 
 		/* Issue READ_CONFIG mbox command to refresh supported speeds */
 		rc = lpfc_sli4_read_config(phba);
-		if (rc == -EIO) {
+		if (rc) {
 			phba->lmt = 0;
 			lpfc_printf_log(phba, KERN_ERR, LOG_SLI,
 					"3194 Unable to retrieve supported "
-					"speeds\n");
+					"speeds, rc = 0x%x\n", rc);
 		}
 		vports = lpfc_create_vport_work_array(phba);
 		if (vports != NULL) {