drivers/scsi/aic7xxx/aic79xx_osm.h
Source file repositories/reference/linux-study-clean/drivers/scsi/aic7xxx/aic79xx_osm.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/scsi/aic7xxx/aic79xx_osm.h- Extension
.h- Size
- 19089 bytes
- Lines
- 659
- 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.hscsi_iu.haiclib.haic79xx.hlinux/spinlock.h
Detected Declarations
struct ahd_softcstruct ahd_linux_dma_tagstruct ahd_linux_devicestruct scb_platform_datastruct ahd_platform_datafunction ahd_lockinitfunction ahd_lockfunction ahd_unlockfunction ahd_get_pci_functionfunction ahd_get_pci_slotfunction ahd_get_pci_busfunction ahd_flush_device_writesfunction ahd_cmd_set_transaction_statusfunction ahd_set_transaction_statusfunction ahd_cmd_set_scsi_statusfunction ahd_set_scsi_statusfunction ahd_cmd_get_transaction_statusfunction ahd_get_transaction_statusfunction ahd_cmd_get_scsi_statusfunction ahd_get_scsi_statusfunction ahd_set_transaction_tagfunction ahd_get_transfer_dirfunction ahd_set_residualfunction ahd_set_sense_residualfunction ahd_get_residualfunction ahd_get_sense_residualfunction ahd_perform_autosensefunction ahd_get_sense_bufsizefunction ahd_notify_xfer_settings_changefunction ahd_freeze_scb
Annotated Snippet
struct ahd_linux_device {
TAILQ_ENTRY(ahd_linux_device) links;
/*
* 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 AHD_TAG_SUCCESS_INTERVAL 50
ahd_linux_dev_flags flags;
/*
* Per device timer.
*/
struct timer_list timer;
/*
* 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 AHD_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 AHD_DEV_PERIODIC_OTAG flag is set
* on this device.
*/
u_int commands_since_idle_or_otag;
#define AHD_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 AHD_NSEG 128
/*
* Per-SCB OSM storage.
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 ahd_softc`, `struct ahd_linux_dma_tag`, `struct ahd_linux_device`, `struct scb_platform_data`, `struct ahd_platform_data`, `function ahd_lockinit`, `function ahd_lock`, `function ahd_unlock`, `function ahd_get_pci_function`, `function ahd_get_pci_slot`.
- 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.