Lines Matching defs:adapter
25 * zfcp_diag_adapter_setup() - Setup storage for adapter diagnostics.
26 * @adapter: the adapter to setup diagnostics for.
28 * Creates the data-structures to store the diagnostics for an adapter. This
36 int zfcp_diag_adapter_setup(struct zfcp_adapter *const adapter)
65 adapter->diagnostics = diag;
70 * zfcp_diag_adapter_free() - Frees all adapter diagnostics allocations.
71 * @adapter: the adapter whose diagnostic structures should be freed.
73 * Frees all data-structures in the given adapter that store diagnostics
76 void zfcp_diag_adapter_free(struct zfcp_adapter *const adapter)
78 kfree(adapter->diagnostics);
79 adapter->diagnostics = NULL;
83 * zfcp_diag_sysfs_setup() - Setup the sysfs-group for adapter-diagnostics.
84 * @adapter: target adapter to which the group should be added.
88 int zfcp_diag_sysfs_setup(struct zfcp_adapter *const adapter)
90 int rc = sysfs_create_group(&adapter->ccw_device->dev.kobj,
93 adapter->diagnostics->sysfs_established = 1;
99 * zfcp_diag_sysfs_destroy() - Remove the sysfs-group for adapter-diagnostics.
100 * @adapter: target adapter from which the group should be removed.
102 void zfcp_diag_sysfs_destroy(struct zfcp_adapter *const adapter)
104 if (adapter->diagnostics == NULL ||
105 !adapter->diagnostics->sysfs_established)
116 adapter->diagnostics->sysfs_established = 0;
117 sysfs_remove_group(&adapter->ccw_device->dev.kobj,
151 * @adapter: Adapter to collect Port Data from.
164 int zfcp_diag_update_port_data_buffer(struct zfcp_adapter *const adapter)
168 rc = zfcp_fsf_exchange_port_data_sync(adapter->qdio, NULL);
181 * @adapter: Adapter to collect Config Data from.
194 int zfcp_diag_update_config_data_buffer(struct zfcp_adapter *const adapter)
198 rc = zfcp_fsf_exchange_config_data_sync(adapter->qdio, NULL);
207 static int __zfcp_diag_update_buffer(struct zfcp_adapter *const adapter,
225 rc = buffer_update(adapter);
263 * @adapter: Adapter to collect the diagnostics from.
284 int zfcp_diag_update_buffer_limited(struct zfcp_adapter *const adapter,
294 !__zfcp_diag_test_buffer_age_isfresh(adapter->diagnostics, hdr);
296 rc = __zfcp_diag_update_buffer(adapter, hdr, buffer_update,