summaryrefslogtreecommitdiffstats
path: root/drivers/s390/scsi/zfcp_sysfs.c
diff options
context:
space:
mode:
authorBenjamin Block <bblock@linux.ibm.com>2019-10-25 18:12:50 +0200
committerMartin K. Petersen <martin.petersen@oracle.com>2019-10-29 03:16:15 +0100
commit8a72db70b5ca3c3feb3ca25519e8a9516cc60cfe (patch)
treeff96c0068ace879f957671e8c0a680ea67822cb2 /drivers/s390/scsi/zfcp_sysfs.c
parentscsi: zfcp: introduce sysfs interface to read the local B2B-Credit (diff)
downloadlinux-8a72db70b5ca3c3feb3ca25519e8a9516cc60cfe.tar.xz
linux-8a72db70b5ca3c3feb3ca25519e8a9516cc60cfe.zip
scsi: zfcp: implicitly refresh config-data diagnostics when reading sysfs
Adds implicit updates of cached diagnostics via Exchange Config Data when reading sysfs attributes interfacing them. Right now this only affects the new B2B-Credit diagnostic attribute. This uses the same mechanism previously also used for cached diagnostics of Exchange Port Data. Link: https://lore.kernel.org/r/60a94f55f2630b74b468fed5f39880208abb2679.1572018132.git.bblock@linux.ibm.com Reviewed-by: Steffen Maier <maier@linux.ibm.com> Signed-off-by: Benjamin Block <bblock@linux.ibm.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to '')
-rw-r--r--drivers/s390/scsi/zfcp_sysfs.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/s390/scsi/zfcp_sysfs.c b/drivers/s390/scsi/zfcp_sysfs.c
index 376d76b9f337..ae8e9137f448 100644
--- a/drivers/s390/scsi/zfcp_sysfs.c
+++ b/drivers/s390/scsi/zfcp_sysfs.c
@@ -687,6 +687,11 @@ static ssize_t zfcp_sysfs_adapter_diag_b2b_credit_show(
diag_hdr = &adapter->diagnostics->config_data.header;
+ rc = zfcp_diag_update_buffer_limited(
+ adapter, diag_hdr, zfcp_diag_update_config_data_buffer);
+ if (rc != 0)
+ goto out;
+
spin_lock_irqsave(&diag_hdr->access_lock, flags);
/* nport_serv_param doesn't contain the ELS_Command code */
nsp = (struct fc_els_flogi *)((unsigned long)