include/scsi/scsi_transport_spi.h
Source file repositories/reference/linux-study-clean/include/scsi/scsi_transport_spi.h
File Facts
- System
- Linux kernel
- Corpus path
include/scsi/scsi_transport_spi.h- Extension
.h- Size
- 6690 bytes
- Lines
- 150
- Domain
- Repository Root And Misc
- Bucket
- include
- Inferred role
- Repository Root And Misc: implementation source
- Status
- source implementation candidate
Why This File Exists
Top-level or miscellaneous repository surface. Use this as map coverage unless a later manual pass promotes the file into a deeper subsystem dossier.
- Top-level or miscellaneous repository surface. Use this as map coverage unless a later manual pass promotes the file into a deeper subsystem dossier.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/transport_class.hlinux/mutex.h
Detected Declarations
struct scsi_transport_templatestruct scsi_targetstruct scsi_devicestruct Scsi_Hoststruct spi_transport_attrsstruct spi_host_attrsstruct spi_function_templateenum spi_signal_type
Annotated Snippet
struct spi_transport_attrs {
int period; /* value in the PPR/SDTR command */
int min_period;
int offset;
int max_offset;
unsigned int width:1; /* 0 - narrow, 1 - wide */
unsigned int max_width:1;
unsigned int iu:1; /* Information Units enabled */
unsigned int max_iu:1;
unsigned int dt:1; /* DT clocking enabled */
unsigned int qas:1; /* Quick Arbitration and Selection enabled */
unsigned int max_qas:1;
unsigned int wr_flow:1; /* Write Flow control enabled */
unsigned int rd_strm:1; /* Read streaming enabled */
unsigned int rti:1; /* Retain Training Information */
unsigned int pcomp_en:1;/* Precompensation enabled */
unsigned int hold_mcs:1;/* Hold Margin Control Settings */
unsigned int initial_dv:1; /* DV done to this target yet */
unsigned long flags; /* flags field for drivers to use */
/* Device Properties fields */
unsigned int support_sync:1; /* synchronous support */
unsigned int support_wide:1; /* wide support */
unsigned int support_dt:1; /* allows DT phases */
unsigned int support_dt_only; /* disallows ST phases */
unsigned int support_ius; /* support Information Units */
unsigned int support_qas; /* supports quick arbitration and selection */
/* Private Fields */
unsigned int dv_pending:1; /* Internal flag: DV Requested */
unsigned int dv_in_progress:1; /* Internal: DV started */
struct mutex dv_mutex; /* semaphore to serialise dv */
};
enum spi_signal_type {
SPI_SIGNAL_UNKNOWN = 1,
SPI_SIGNAL_SE,
SPI_SIGNAL_LVD,
SPI_SIGNAL_HVD,
};
struct spi_host_attrs {
enum spi_signal_type signalling;
};
/* accessor functions */
#define spi_period(x) (((struct spi_transport_attrs *)&(x)->starget_data)->period)
#define spi_min_period(x) (((struct spi_transport_attrs *)&(x)->starget_data)->min_period)
#define spi_offset(x) (((struct spi_transport_attrs *)&(x)->starget_data)->offset)
#define spi_max_offset(x) (((struct spi_transport_attrs *)&(x)->starget_data)->max_offset)
#define spi_width(x) (((struct spi_transport_attrs *)&(x)->starget_data)->width)
#define spi_max_width(x) (((struct spi_transport_attrs *)&(x)->starget_data)->max_width)
#define spi_iu(x) (((struct spi_transport_attrs *)&(x)->starget_data)->iu)
#define spi_max_iu(x) (((struct spi_transport_attrs *)&(x)->starget_data)->max_iu)
#define spi_dt(x) (((struct spi_transport_attrs *)&(x)->starget_data)->dt)
#define spi_qas(x) (((struct spi_transport_attrs *)&(x)->starget_data)->qas)
#define spi_max_qas(x) (((struct spi_transport_attrs *)&(x)->starget_data)->max_qas)
#define spi_wr_flow(x) (((struct spi_transport_attrs *)&(x)->starget_data)->wr_flow)
#define spi_rd_strm(x) (((struct spi_transport_attrs *)&(x)->starget_data)->rd_strm)
#define spi_rti(x) (((struct spi_transport_attrs *)&(x)->starget_data)->rti)
#define spi_pcomp_en(x) (((struct spi_transport_attrs *)&(x)->starget_data)->pcomp_en)
#define spi_hold_mcs(x) (((struct spi_transport_attrs *)&(x)->starget_data)->hold_mcs)
#define spi_initial_dv(x) (((struct spi_transport_attrs *)&(x)->starget_data)->initial_dv)
#define spi_dv_pending(x) (((struct spi_transport_attrs *)&(x)->starget_data)->dv_pending)
#define spi_support_sync(x) (((struct spi_transport_attrs *)&(x)->starget_data)->support_sync)
#define spi_support_wide(x) (((struct spi_transport_attrs *)&(x)->starget_data)->support_wide)
#define spi_support_dt(x) (((struct spi_transport_attrs *)&(x)->starget_data)->support_dt)
#define spi_support_dt_only(x) (((struct spi_transport_attrs *)&(x)->starget_data)->support_dt_only)
#define spi_support_ius(x) (((struct spi_transport_attrs *)&(x)->starget_data)->support_ius)
#define spi_support_qas(x) (((struct spi_transport_attrs *)&(x)->starget_data)->support_qas)
#define spi_flags(x) (((struct spi_transport_attrs *)&(x)->starget_data)->flags)
#define spi_signalling(h) (((struct spi_host_attrs *)(h)->shost_data)->signalling)
/* The functions by which the transport class and the driver communicate */
struct spi_function_template {
void (*get_period)(struct scsi_target *);
void (*set_period)(struct scsi_target *, int);
void (*get_offset)(struct scsi_target *);
void (*set_offset)(struct scsi_target *, int);
void (*get_width)(struct scsi_target *);
void (*set_width)(struct scsi_target *, int);
void (*get_iu)(struct scsi_target *);
void (*set_iu)(struct scsi_target *, int);
void (*get_dt)(struct scsi_target *);
void (*set_dt)(struct scsi_target *, int);
void (*get_qas)(struct scsi_target *);
void (*set_qas)(struct scsi_target *, int);
void (*get_wr_flow)(struct scsi_target *);
Annotation
- Immediate include surface: `linux/transport_class.h`, `linux/mutex.h`.
- Detected declarations: `struct scsi_transport_template`, `struct scsi_target`, `struct scsi_device`, `struct Scsi_Host`, `struct spi_transport_attrs`, `struct spi_host_attrs`, `struct spi_function_template`, `enum spi_signal_type`.
- Atlas domain: Repository Root And Misc / include.
- 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.