summaryrefslogtreecommitdiff
path: root/drivers/base
diff options
context:
space:
mode:
authorSarah Catania <sarah.catania@broadcom.com>2025-12-10 16:16:57 -0800
committerMartin K. Petersen <martin.petersen@oracle.com>2025-12-16 21:56:48 -0500
commitbd2bc528691e11ea945fbac485eb84c102a521d8 (patch)
treee1d5db81d1f14cdf5d5b668abaacc4daa216abb5 /drivers/base
parent8f0b4cce4481fb22653697cced8d0d04027cb1e8 (diff)
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 <sarah.catania@broadcom.com> Signed-off-by: Justin Tee <justin.tee@broadcom.com> Link: https://patch.msgid.link/20251211001659.138635-2-justintee8345@gmail.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/base')
-rw-r--r--drivers/base/transport_class.c8
1 files changed, 8 insertions, 0 deletions
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);
}