aboutsummaryrefslogtreecommitdiff
path: root/include/scsi
diff options
context:
space:
mode:
authorGravatar Igor Pylypiv <ipylypiv@google.com> 2024-03-07 13:44:13 -0800
committerGravatar Martin K. Petersen <martin.petersen@oracle.com> 2024-03-25 16:00:06 -0400
commitb4d3ddd2df7531e35c5f4e0b048d0999851747ae (patch)
treef7c15bc78904fdf47a5e2a7dc7d119e870a7300d /include/scsi
parentscsi: ata: libata-sata: Factor out NCQ Priority configuration helpers (diff)
downloadlinux-b4d3ddd2df7531e35c5f4e0b048d0999851747ae.tar.gz
linux-b4d3ddd2df7531e35c5f4e0b048d0999851747ae.tar.bz2
linux-b4d3ddd2df7531e35c5f4e0b048d0999851747ae.zip
scsi: libsas: Define NCQ Priority sysfs attributes for SATA devices
libata sysfs attributes cannot be used for libsas-managed SATA devices because the ata_port location is different for libsas. Defined sysfs attributes (visible for SATA devices only): - /sys/block/sda/device/ncq_prio_enable - /sys/block/sda/device/ncq_prio_supported The newly defined attributes will pass the correct ata_port to libata helper functions. Reviewed-by: John Garry <john.g.garry@oracle.com> Reviewed-by: Damien Le Moal <dlemoal@kernel.org> Reviewed-by: Jason Yan <yanaijie@huawei.com> Signed-off-by: Igor Pylypiv <ipylypiv@google.com> Link: https://lore.kernel.org/r/20240307214418.3812290-3-ipylypiv@google.com Reviewed-by: Niklas Cassel <cassel@kernel.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'include/scsi')
-rw-r--r--include/scsi/sas_ata.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/scsi/sas_ata.h b/include/scsi/sas_ata.h
index 2f8c719840a6..92e27e7bf088 100644
--- a/include/scsi/sas_ata.h
+++ b/include/scsi/sas_ata.h
@@ -39,6 +39,9 @@ int smp_ata_check_ready_type(struct ata_link *link);
int sas_discover_sata(struct domain_device *dev);
int sas_ata_add_dev(struct domain_device *parent, struct ex_phy *phy,
struct domain_device *child, int phy_id);
+
+extern const struct attribute_group sas_ata_sdev_attr_group;
+
#else
static inline void sas_ata_disabled_notice(void)
@@ -123,6 +126,9 @@ static inline int sas_ata_add_dev(struct domain_device *parent, struct ex_phy *p
sas_ata_disabled_notice();
return -ENODEV;
}
+
+#define sas_ata_sdev_attr_group ((struct attribute_group) {})
+
#endif
#endif /* _SAS_ATA_H_ */