mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-03-07 06:17:09 +07:00
powerpc/powernv: Handle OPAL_WRONG_STATE in opal_get_sensor_data()
OPAL returns OPAL_WRONG_STATE upon failing to provide sensor data due to core sleeping/offline. Add a check in opal_get_sensor_data() for sensor read failure with OPAL_WRONG_STATE return code and return -EIO. Signed-off-by: Vipin K Parashar <vipin@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
This commit is contained in:
parent
4f9b514b76
commit
17bb69515c
@ -64,6 +64,10 @@ int opal_get_sensor_data(u32 sensor_hndl, u32 *sensor_data)
|
||||
*sensor_data = be32_to_cpu(data);
|
||||
break;
|
||||
|
||||
case OPAL_WRONG_STATE:
|
||||
ret = -EIO;
|
||||
break;
|
||||
|
||||
default:
|
||||
ret = opal_error_code(ret);
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user