Damien, > The underlying device and driver of a SCSI disk may have different > system and runtime power mode control requirements. This is because > runtime power management affects only the SCSI disk, while sustem level /s/sustem/system/ > power management affects all devices, including the controller for the > SCSI disk. > > +manage_start_stop_show(struct device *dev, > + struct device_attribute *attr, char *buf) > { > struct scsi_disk *sdkp = to_scsi_disk(dev); > struct scsi_device *sdp = sdkp->device; > > - return sprintf(buf, "%u\n", sdp->manage_start_stop); > + return sprintf(buf, "%u\n", > + sdp->manage_system_start_stop && > + sdp->manage_runtime_start_stop); > } > +static DEVICE_ATTR_RO(manage_start_stop); Nitpick: I suggest you turn these sprintf() calls into sysfs_emit() before the checker bots notice. Otherwise this looks OK to me. Reviewed-by: Martin K. Petersen <martin.petersen@xxxxxxxxxx> -- Martin K. Petersen Oracle Linux Engineering