drivers/s390/scsi/zfcp_diag.h
Source file repositories/reference/linux-study-clean/drivers/s390/scsi/zfcp_diag.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/s390/scsi/zfcp_diag.h- Extension
.h- Size
- 3012 bytes
- Lines
- 95
- Domain
- Driver Families
- Bucket
- drivers/s390
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/spinlock.hzfcp_fsf.hzfcp_def.h
Detected Declarations
struct zfcp_diag_headerstruct zfcp_diag_adapterstruct zfcp_diag_adapter_port_datastruct zfcp_diag_adapter_config_datafunction zfcp_diag_support_sfp
Annotated Snippet
struct zfcp_diag_header {
spinlock_t access_lock;
/* Flags */
u64 updating :1;
u64 incomplete :1;
unsigned long timestamp;
void *buffer;
size_t buffer_size;
};
/**
* struct zfcp_diag_adapter - central storage for all diagnostics concerning an
* adapter.
* @max_age: maximum age of data in diagnostic buffers before they need to be
* refreshed (in ms).
* @port_data: data retrieved using exchange port data.
* @port_data.header: header with metadata for the cache in @port_data.data.
* @port_data.data: cached QTCB Bottom of command exchange port data.
* @config_data: data retrieved using exchange config data.
* @config_data.header: header with metadata for the cache in @config_data.data.
* @config_data.data: cached QTCB Bottom of command exchange config data.
*/
struct zfcp_diag_adapter {
unsigned long max_age;
struct zfcp_diag_adapter_port_data {
struct zfcp_diag_header header;
struct fsf_qtcb_bottom_port data;
} port_data;
struct zfcp_diag_adapter_config_data {
struct zfcp_diag_header header;
struct fsf_qtcb_bottom_config data;
} config_data;
};
int zfcp_diag_adapter_setup(struct zfcp_adapter *const adapter);
void zfcp_diag_adapter_free(struct zfcp_adapter *const adapter);
void zfcp_diag_update_xdata(struct zfcp_diag_header *const hdr,
const void *const data, const bool incomplete);
/*
* Function-Type used in zfcp_diag_update_buffer_limited() for the function
* that does the buffer-implementation dependent work.
*/
typedef int (*zfcp_diag_update_buffer_func)(struct zfcp_adapter *const adapter);
int zfcp_diag_update_config_data_buffer(struct zfcp_adapter *const adapter);
int zfcp_diag_update_port_data_buffer(struct zfcp_adapter *const adapter);
int zfcp_diag_update_buffer_limited(struct zfcp_adapter *const adapter,
struct zfcp_diag_header *const hdr,
zfcp_diag_update_buffer_func buffer_update);
/**
* zfcp_diag_support_sfp() - Return %true if the @adapter supports reporting
* SFP Data.
* @adapter: adapter to test the availability of SFP Data reporting for.
*/
static inline bool
zfcp_diag_support_sfp(const struct zfcp_adapter *const adapter)
{
return !!(adapter->adapter_features & FSF_FEATURE_REPORT_SFP_DATA);
}
#endif /* ZFCP_DIAG_H */
Annotation
- Immediate include surface: `linux/spinlock.h`, `zfcp_fsf.h`, `zfcp_def.h`.
- Detected declarations: `struct zfcp_diag_header`, `struct zfcp_diag_adapter`, `struct zfcp_diag_adapter_port_data`, `struct zfcp_diag_adapter_config_data`, `function zfcp_diag_support_sfp`.
- Atlas domain: Driver Families / drivers/s390.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.