Searched hist:e78276ca (Results 1 – 2 of 2) sorted by relevance
/openbmc/linux/drivers/scsi/pm8001/ |
H A D | pm8001_init.c | e78276ca Thu Jul 07 12:52:10 CDT 2022 Changyuan Lyu <changyuanl@google.com> scsi: pm80xx: Fix 'Unknown' max/min linkrate
Currently, the data flow of the max/min linkrate in the driver is
* in pm8001_get_lrate_mode(): hardcoded value ==> struct sas_phy
* in pm8001_bytes_dmaed(): struct pm8001_phy ==> struct sas_phy
* in pm8001_phy_control(): libsas data ==> struct pm8001_phy
Since pm8001_bytes_dmaed() follows pm8001_get_lrate_mode(), and the fields in struct pm8001_phy are not initialized, sysfs `/sys/class/sas_phy/phy-*/maximum_linkrate` always shows `Unknown`.
To fix the issue, change the dataflow to the following:
* in pm8001_phy_init(): initial value ==> struct pm8001_phy
* in pm8001_get_lrate_mode(): struct pm8001_phy ==> struct sas_phy
* in pm8001_phy_control(): libsas data ==> struct pm8001_phy
For negotiated linkrate, the current dataflow is:
* in pm8001_get_lrate_mode(): iomb data ==> struct asd_sas_phy ==> struct sas_phy
* in pm8001_bytes_dmaed(): struct asd_sas_phy ==> struct sas_phy
Since pm8001_bytes_dmaed() follows pm8001_get_lrate_mode(), the assignment statements in pm8001_bytes_dmaed() are unnecessary and cleaned up.
Link: https://lore.kernel.org/r/20220707175210.528858-1-changyuanl@google.com Reviewed-by: Igor Pylypiv <ipylypiv@google.com> Acked-by: Jack Wang <jinpu.wang@ionos.com> Signed-off-by: Changyuan Lyu <changyuanl@google.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
|
H A D | pm8001_hwi.c | e78276ca Thu Jul 07 12:52:10 CDT 2022 Changyuan Lyu <changyuanl@google.com> scsi: pm80xx: Fix 'Unknown' max/min linkrate
Currently, the data flow of the max/min linkrate in the driver is
* in pm8001_get_lrate_mode(): hardcoded value ==> struct sas_phy
* in pm8001_bytes_dmaed(): struct pm8001_phy ==> struct sas_phy
* in pm8001_phy_control(): libsas data ==> struct pm8001_phy
Since pm8001_bytes_dmaed() follows pm8001_get_lrate_mode(), and the fields in struct pm8001_phy are not initialized, sysfs `/sys/class/sas_phy/phy-*/maximum_linkrate` always shows `Unknown`.
To fix the issue, change the dataflow to the following:
* in pm8001_phy_init(): initial value ==> struct pm8001_phy
* in pm8001_get_lrate_mode(): struct pm8001_phy ==> struct sas_phy
* in pm8001_phy_control(): libsas data ==> struct pm8001_phy
For negotiated linkrate, the current dataflow is:
* in pm8001_get_lrate_mode(): iomb data ==> struct asd_sas_phy ==> struct sas_phy
* in pm8001_bytes_dmaed(): struct asd_sas_phy ==> struct sas_phy
Since pm8001_bytes_dmaed() follows pm8001_get_lrate_mode(), the assignment statements in pm8001_bytes_dmaed() are unnecessary and cleaned up.
Link: https://lore.kernel.org/r/20220707175210.528858-1-changyuanl@google.com Reviewed-by: Igor Pylypiv <ipylypiv@google.com> Acked-by: Jack Wang <jinpu.wang@ionos.com> Signed-off-by: Changyuan Lyu <changyuanl@google.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
|