scsi: mvsas: Add libsas SATA sysfs attributes group
authorIgor Pylypiv <ipylypiv@google.com>
Thu, 7 Mar 2024 21:44:15 +0000 (13:44 -0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Mon, 25 Mar 2024 20:00:07 +0000 (16:00 -0400)
The added sysfs attributes group enables the configuration of NCQ Priority
feature for HBAs that rely on libsas to manage SATA devices.

Reviewed-by: John Garry <john.g.garry@oracle.com>
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Reviewed-by: Jason Yan <yanaijie@huawei.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Igor Pylypiv <ipylypiv@google.com>
Link: https://lore.kernel.org/r/20240307214418.3812290-5-ipylypiv@google.com
Reviewed-by: Niklas Cassel <cassel@kernel.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/mvsas/mv_init.c

index 43ebb331e21673b68acee5b3824c0ae35e0b8500..f1090bb5f2c9333bc971d84650a5ae2f51c6b72e 100644 (file)
@@ -26,6 +26,7 @@ static const struct mvs_chip_info mvs_chips[] = {
 };
 
 static const struct attribute_group *mvst_host_groups[];
+static const struct attribute_group *mvst_sdev_groups[];
 
 #define SOC_SAS_NUM 2
 
@@ -53,6 +54,7 @@ static const struct scsi_host_template mvs_sht = {
        .compat_ioctl           = sas_ioctl,
 #endif
        .shost_groups           = mvst_host_groups,
+       .sdev_groups            = mvst_sdev_groups,
        .track_queue_depth      = 1,
 };
 
@@ -779,6 +781,11 @@ static struct attribute *mvst_host_attrs[] = {
 
 ATTRIBUTE_GROUPS(mvst_host);
 
+static const struct attribute_group *mvst_sdev_groups[] = {
+       &sas_ata_sdev_attr_group,
+       NULL
+};
+
 module_init(mvs_init);
 module_exit(mvs_exit);