From bd2bc528691e11ea945fbac485eb84c102a521d8 Mon Sep 17 00:00:00 2001 From: Sarah Catania Date: Wed, 10 Dec 2025 16:16:57 -0800 Subject: scsi: scsi_transport_fc: Introduce encryption group in fc_rport attribute Introduce a new structure for reporting an encrypted session over an fc_rport. The encryption group is added as an attribute in struct fc_rport and reports information in fc_encryption_info. This structure contains a status member variable, which stores a bit value indicating an encrypted session. Signed-off-by: Sarah Catania Signed-off-by: Justin Tee Link: https://patch.msgid.link/20251211001659.138635-2-justintee8345@gmail.com Signed-off-by: Martin K. Petersen --- drivers/base/transport_class.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'drivers/base') diff --git a/drivers/base/transport_class.c b/drivers/base/transport_class.c index 09ee2a1e35bb..69c6ac2e8263 100644 --- a/drivers/base/transport_class.c +++ b/drivers/base/transport_class.c @@ -169,6 +169,12 @@ static int transport_add_class_device(struct attribute_container *cont, goto err_del; } + if (tcont->encryption) { + error = sysfs_create_group(&classdev->kobj, tcont->encryption); + if (error) + goto err_del; + } + return 0; err_del: @@ -244,6 +250,8 @@ static int transport_remove_classdev(struct attribute_container *cont, if (tclass->remove != anon_transport_dummy_function) { if (tcont->statistics) sysfs_remove_group(&classdev->kobj, tcont->statistics); + if (tcont->encryption) + sysfs_remove_group(&classdev->kobj, tcont->encryption); attribute_container_class_device_del(classdev); } -- cgit v1.2.3