drivers/scsi/scsi_priv.h
Source file repositories/reference/linux-study-clean/drivers/scsi/scsi_priv.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/scsi/scsi_priv.h- Extension
.h- Size
- 6977 bytes
- Lines
- 208
- Domain
- Driver Families
- Bucket
- drivers/scsi
- Inferred role
- Driver Families: operation-table or driver-model contract
- Status
- pattern 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 an operation table; this is where Linux turns generic core objects into subsystem-specific behavior.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/device.hscsi/scsi_device.hlinux/sbitmap.h
Detected Declarations
struct bsg_devicestruct request_queuestruct requeststruct scsi_cmndstruct scsi_devicestruct scsi_targetstruct scsi_host_templatestruct Scsi_Hoststruct scsi_nl_hdrenum scsi_ml_statusenum scsi_devinfo_keyfunction scsi_ml_bytefunction scsi_log_sendfunction scsi_log_completionfunction scsi_netlink_initfunction scsi_autopm_get_targetfunction scsi_autopm_put_hostfunction scsi_dh_add_device
Annotated Snippet
extern const struct bus_type scsi_bus_type;
extern const struct attribute_group *scsi_shost_groups[];
/* scsi_netlink.c */
#ifdef CONFIG_SCSI_NETLINK
extern void scsi_netlink_init(void);
extern void scsi_netlink_exit(void);
extern struct sock *scsi_nl_sock;
#else
static inline void scsi_netlink_init(void) {}
static inline void scsi_netlink_exit(void) {}
#endif
/* scsi_pm.c */
#ifdef CONFIG_PM
extern const struct dev_pm_ops scsi_bus_pm_ops;
extern void scsi_autopm_get_target(struct scsi_target *);
extern void scsi_autopm_put_target(struct scsi_target *);
extern int scsi_autopm_get_host(struct Scsi_Host *);
extern void scsi_autopm_put_host(struct Scsi_Host *);
#else
static inline void scsi_autopm_get_target(struct scsi_target *t) {}
static inline void scsi_autopm_put_target(struct scsi_target *t) {}
static inline int scsi_autopm_get_host(struct Scsi_Host *h) { return 0; }
static inline void scsi_autopm_put_host(struct Scsi_Host *h) {}
#endif /* CONFIG_PM */
/* scsi_dh.c */
#ifdef CONFIG_SCSI_DH
void scsi_dh_add_device(struct scsi_device *sdev);
void scsi_dh_release_device(struct scsi_device *sdev);
#else
static inline void scsi_dh_add_device(struct scsi_device *sdev) { }
static inline void scsi_dh_release_device(struct scsi_device *sdev) { }
#endif
struct bsg_device *scsi_bsg_register_queue(struct scsi_device *sdev);
extern int scsi_device_max_queue_depth(struct scsi_device *sdev);
/*
* internal scsi timeout functions: for use by mid-layer and transport
* classes.
*/
#define SCSI_DEVICE_BLOCK_MAX_TIMEOUT 600 /* units in seconds */
#endif /* _SCSI_PRIV_H */
Annotation
- Immediate include surface: `linux/device.h`, `scsi/scsi_device.h`, `linux/sbitmap.h`.
- Detected declarations: `struct bsg_device`, `struct request_queue`, `struct request`, `struct scsi_cmnd`, `struct scsi_device`, `struct scsi_target`, `struct scsi_host_template`, `struct Scsi_Host`, `struct scsi_nl_hdr`, `enum scsi_ml_status`.
- Atlas domain: Driver Families / drivers/scsi.
- Implementation status: pattern 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.