drivers/scsi/aic7xxx/aic7xxx_osm.h
Source file repositories/reference/linux-study-clean/drivers/scsi/aic7xxx/aic7xxx_osm.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/scsi/aic7xxx/aic7xxx_osm.h- Extension
.h- Size
- 19360 bytes
- Lines
- 675
- Domain
- Driver Families
- Bucket
- drivers/scsi
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/types.hlinux/blkdev.hlinux/delay.hlinux/ioport.hlinux/pci.hlinux/interrupt.hlinux/module.hlinux/slab.hasm/byteorder.hasm/io.hscsi/scsi.hscsi/scsi_cmnd.hscsi/scsi_eh.hscsi/scsi_device.hscsi/scsi_host.hscsi/scsi_tcq.hscsi/scsi_transport.hscsi/scsi_transport_spi.hcam.hqueue.hscsi_message.haiclib.haic7xxx.hlinux/spinlock.h
Detected Declarations
struct ahc_softcstruct ahc_linux_dma_tagstruct ahc_linux_devicestruct scb_platform_datastruct ahc_platform_datafunction ahc_dmamap_syncfunction ahc_lockinitfunction ahc_lockfunction ahc_unlockfunction ahc_linux_eisa_initfunction ahc_linux_eisa_exitfunction ahc_get_pci_functionfunction ahc_get_pci_slotfunction ahc_get_pci_busfunction ahc_linux_pci_initfunction ahc_linux_pci_exitfunction ahc_flush_device_writesfunction ahc_cmd_set_transaction_statusfunction ahc_set_transaction_statusfunction ahc_cmd_set_scsi_statusfunction ahc_set_scsi_statusfunction ahc_cmd_get_transaction_statusfunction ahc_get_transaction_statusfunction ahc_cmd_get_scsi_statusfunction ahc_get_scsi_statusfunction ahc_set_transaction_tagfunction ahc_get_transfer_dirfunction ahc_set_residualfunction ahc_set_sense_residualfunction ahc_get_residualfunction ahc_get_sense_residualfunction ahc_perform_autosensefunction ahc_get_sense_bufsizefunction ahc_notify_xfer_settings_changefunction ahc_freeze_scb
Annotated Snippet
struct ahc_linux_device {
/*
* The number of transactions currently
* queued to the device.
*/
int active;
/*
* The currently allowed number of
* transactions that can be queued to
* the device. Must be signed for
* conversion from tagged to untagged
* mode where the device may have more
* than one outstanding active transaction.
*/
int openings;
/*
* A positive count indicates that this
* device's queue is halted.
*/
u_int qfrozen;
/*
* Cumulative command counter.
*/
u_long commands_issued;
/*
* The number of tagged transactions when
* running at our current opening level
* that have been successfully received by
* this device since the last QUEUE FULL.
*/
u_int tag_success_count;
#define AHC_TAG_SUCCESS_INTERVAL 50
ahc_linux_dev_flags flags;
/*
* The high limit for the tags variable.
*/
u_int maxtags;
/*
* The computed number of tags outstanding
* at the time of the last QUEUE FULL event.
*/
u_int tags_on_last_queuefull;
/*
* How many times we have seen a queue full
* with the same number of tags. This is used
* to stop our adaptive queue depth algorithm
* on devices with a fixed number of tags.
*/
u_int last_queuefull_same_count;
#define AHC_LOCK_TAGS_COUNT 50
/*
* How many transactions have been queued
* without the device going idle. We use
* this statistic to determine when to issue
* an ordered tag to prevent transaction
* starvation. This statistic is only updated
* if the AHC_DEV_PERIODIC_OTAG flag is set
* on this device.
*/
u_int commands_since_idle_or_otag;
#define AHC_OTAG_THRESH 500
};
/********************* Definitions Required by the Core ***********************/
/*
* Number of SG segments we require. So long as the S/G segments for
* a particular transaction are allocated in a physically contiguous
* manner and are allocated below 4GB, the number of S/G segments is
* unrestricted.
*/
#define AHC_NSEG 128
/*
* Per-SCB OSM storage.
*/
struct scb_platform_data {
struct ahc_linux_device *dev;
dma_addr_t buf_busaddr;
uint32_t xfer_len;
uint32_t sense_resid; /* Auto-Sense residual */
};
Annotation
- Immediate include surface: `linux/types.h`, `linux/blkdev.h`, `linux/delay.h`, `linux/ioport.h`, `linux/pci.h`, `linux/interrupt.h`, `linux/module.h`, `linux/slab.h`.
- Detected declarations: `struct ahc_softc`, `struct ahc_linux_dma_tag`, `struct ahc_linux_device`, `struct scb_platform_data`, `struct ahc_platform_data`, `function ahc_dmamap_sync`, `function ahc_lockinit`, `function ahc_lock`, `function ahc_unlock`, `function ahc_linux_eisa_init`.
- Atlas domain: Driver Families / drivers/scsi.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
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.