mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
[SCSI] mpt2sas: Fix failure message displayed during diag reset
The fix is to inhibit the warning message in _scsih_get_sas_address when the MPI2_IOCSTATUS_CONFIG_INVALID_PAGE ioc status is returned. Signed-off-by: Nagalakshmi Nandigama <nagalakshmi.nandigama@lsi.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
This commit is contained in:
parent
0167ac67ff
commit
24f09b598d
@ -388,31 +388,34 @@ _scsih_get_sas_address(struct MPT2SAS_ADAPTER *ioc, u16 handle,
|
|||||||
Mpi2SasDevicePage0_t sas_device_pg0;
|
Mpi2SasDevicePage0_t sas_device_pg0;
|
||||||
Mpi2ConfigReply_t mpi_reply;
|
Mpi2ConfigReply_t mpi_reply;
|
||||||
u32 ioc_status;
|
u32 ioc_status;
|
||||||
|
*sas_address = 0;
|
||||||
|
|
||||||
if (handle <= ioc->sas_hba.num_phys) {
|
if (handle <= ioc->sas_hba.num_phys) {
|
||||||
*sas_address = ioc->sas_hba.sas_address;
|
*sas_address = ioc->sas_hba.sas_address;
|
||||||
return 0;
|
return 0;
|
||||||
} else
|
}
|
||||||
*sas_address = 0;
|
|
||||||
|
|
||||||
if ((mpt2sas_config_get_sas_device_pg0(ioc, &mpi_reply, &sas_device_pg0,
|
if ((mpt2sas_config_get_sas_device_pg0(ioc, &mpi_reply, &sas_device_pg0,
|
||||||
MPI2_SAS_DEVICE_PGAD_FORM_HANDLE, handle))) {
|
MPI2_SAS_DEVICE_PGAD_FORM_HANDLE, handle))) {
|
||||||
printk(MPT2SAS_ERR_FMT "failure at %s:%d/%s()!\n",
|
printk(MPT2SAS_ERR_FMT "failure at %s:%d/%s()!\n", ioc->name,
|
||||||
ioc->name, __FILE__, __LINE__, __func__);
|
__FILE__, __LINE__, __func__);
|
||||||
return -ENXIO;
|
return -ENXIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
ioc_status = le16_to_cpu(mpi_reply.IOCStatus) &
|
ioc_status = le16_to_cpu(mpi_reply.IOCStatus) & MPI2_IOCSTATUS_MASK;
|
||||||
MPI2_IOCSTATUS_MASK;
|
if (ioc_status == MPI2_IOCSTATUS_SUCCESS) {
|
||||||
if (ioc_status != MPI2_IOCSTATUS_SUCCESS) {
|
*sas_address = le64_to_cpu(sas_device_pg0.SASAddress);
|
||||||
printk(MPT2SAS_ERR_FMT "handle(0x%04x), ioc_status(0x%04x)"
|
return 0;
|
||||||
"\nfailure at %s:%d/%s()!\n", ioc->name, handle, ioc_status,
|
|
||||||
__FILE__, __LINE__, __func__);
|
|
||||||
return -EIO;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
*sas_address = le64_to_cpu(sas_device_pg0.SASAddress);
|
/* we hit this becuase the given parent handle doesn't exist */
|
||||||
return 0;
|
if (ioc_status == MPI2_IOCSTATUS_CONFIG_INVALID_PAGE)
|
||||||
|
return -ENXIO;
|
||||||
|
/* else error case */
|
||||||
|
printk(MPT2SAS_ERR_FMT "handle(0x%04x), ioc_status(0x%04x), "
|
||||||
|
"failure at %s:%d/%s()!\n", ioc->name, handle, ioc_status,
|
||||||
|
__FILE__, __LINE__, __func__);
|
||||||
|
return -EIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user