A disk may report the health of a storage element as being within or outside of the manufacturer's specification limits using a range of values for the health field. However, in scsi_proto.h, we only define the start of each range using the SCSI_PHYS_ELEM_HEALTH_WITHIN_SPEC_LIMITS and SCSI_PHYS_ELEM_HEALTH_OUTSIDE_SPEC_LIMITS enum value. Define the full range by renaming SCSI_PHYS_ELEM_HEALTH_WITHIN_SPEC_LIMITS to SCSI_PHYS_ELEM_HEALTH_WITHIN_SPEC_LIMITS_MIN and by defining the healthy range end with SCSI_PHYS_ELEM_HEALTH_WITHIN_SPEC_LIMITS_MAX. The same treatment is done for the outside range with the renaming of SCSI_PHYS_ELEM_HEALTH_OUTSIDE_SPEC_LIMITS to SCSI_PHYS_ELEM_HEALTH_OUTSIDE_SPEC_LIMITS_MIN, and the definition of the range upper value with SCSI_PHYS_ELEM_HEALTH_OUTSIDE_SPEC_LIMITS_MAX. Signed-off-by: Damien Le Moal Reviewed-by: Hannes Reinecke Reviewed-by: Christoph Hellwig --- include/scsi/scsi_proto.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/scsi/scsi_proto.h b/include/scsi/scsi_proto.h index 9c7d31aa6bae..f290a214e3e0 100644 --- a/include/scsi/scsi_proto.h +++ b/include/scsi/scsi_proto.h @@ -408,9 +408,11 @@ enum scsi_phys_element_type { /* SCSI physical element health. */ enum scsi_phys_element_health { SCSI_PHYS_ELEM_HEALTH_NOT_REPORTED = 0x00, - SCSI_PHYS_ELEM_HEALTH_WITHIN_SPEC_LIMITS = 0x01, + SCSI_PHYS_ELEM_HEALTH_WITHIN_SPEC_LIMITS_MIN = 0x01, + SCSI_PHYS_ELEM_HEALTH_WITHIN_SPEC_LIMITS_MAX = 0x63, SCSI_PHYS_ELEM_HEALTH_AT_SPEC_LIMITS = 0x64, - SCSI_PHYS_ELEM_HEALTH_OUTSIDE_SPEC_LIMITS = 0x65, + SCSI_PHYS_ELEM_HEALTH_OUTSIDE_SPEC_LIMITS_MIN = 0x65, + SCSI_PHYS_ELEM_HEALTH_OUTSIDE_SPEC_LIMITS_MAX = 0xCF, SCSI_PHYS_ELEM_HEALTH_DEPOP_REVOKE_ERR = 0xFB, SCSI_PHYS_ELEM_HEALTH_DEPOP_REVOKE_IN_PROGRESS = 0xFC, SCSI_PHYS_ELEM_HEALTH_DEPOP_ERR = 0xFD, -- 2.56.0