Re: [PATCH V3 11/25] smartpqi: add host level stream detection enable

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

 



On Thu, 2020-12-10 at 14:35 -0600, Don Brace wrote:
> * Allow R5/R6 stream detection to be disabled/enabled.
>   using sysfs entry enable_stream_detection.
> 
> Example usage:
> 
> lsscsi
> [2:2:0:0]    storage Adaptec  3258P-32i /e     0010
>  ^
>  |
>  +---- NOTE: here host is host2
> 
> find /sys -name \*enable_stream\*
> /sys/devices/pci0000:36/0000:36:00.0/0000:37:00.0/0000:38:00.0/0000:3
> 9:00.0/host2/scsi_host/host2/enable_stream_detection
> /sys/devices/pci0000:5b/0000:5b:00.0/0000:5c:00.0/host3/scsi_host/hos
> t3/enable_stream_detection
> 
> Current stream detection:
> cat
> /sys/devices/pci0000:36/0000:36:00.0/0000:37:00.0/0000:38:00.0/0000:3
> 9:00.0/host2/scsi_host/host2/enable_stream_detection
> 1
> 
> Turn off stream detection:
> echo 0 >
> /sys/devices/pci0000:36/0000:36:00.0/0000:37:00.0/0000:38:00.0/0000:3
> 9:00.0/host2/scsi_host/host2/enable_stream_detection
> 
> Turn on stream detection:
> echo 1 >
> /sys/devices/pci0000:36/0000:36:00.0/0000:37:00.0/0000:38:00.0/0000:3
> 9:00.0/host2/scsi_host/host2/enable_stream_detection
> 
> Reviewed-by: Scott Benesh <scott.benesh@xxxxxxxxxxxxx>
> Reviewed-by: Scott Teel <scott.teel@xxxxxxxxxxxxx>
> Reviewed-by: Kevin Barnett <kevin.barnett@xxxxxxxxxxxxx>
> Signed-off-by: Don Brace <don.brace@xxxxxxxxxxxxx>

Nitpick below, but

Reviewed-by: Martin Wilck <mwilck@xxxxxxxx>

> ---
>  drivers/scsi/smartpqi/smartpqi_init.c |   32
> ++++++++++++++++++++++++++++++++
>  1 file changed, 32 insertions(+)
> 
> diff --git a/drivers/scsi/smartpqi/smartpqi_init.c
> b/drivers/scsi/smartpqi/smartpqi_init.c
> index 96383d047a88..9a449bbc1898 100644
> --- a/drivers/scsi/smartpqi/smartpqi_init.c
> +++ b/drivers/scsi/smartpqi/smartpqi_init.c
> @@ -6724,6 +6724,34 @@ static ssize_t pqi_lockup_action_store(struct
> device *dev,
>         return -EINVAL;
>  }
>  
> +static ssize_t pqi_host_enable_stream_detection_show(struct device
> *dev,
> +       struct device_attribute *attr, char *buffer)
> +{
> +       struct Scsi_Host *shost = class_to_shost(dev);
> +       struct pqi_ctrl_info *ctrl_info = shost_to_hba(shost);
> +
> +       return scnprintf(buffer, 10, "%hhx\n",
> +                       ctrl_info->enable_stream_detection);

Nitpick: As noted before, %hhx is discouraged.

Regards,
Martin





[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