Re: [PATCH v8 04/23] scsi: sd: Differentiate system and runtime start/stop management

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux