drivers/scsi/sym53c8xx_2/sym_glue.h
Source file repositories/reference/linux-study-clean/drivers/scsi/sym53c8xx_2/sym_glue.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/scsi/sym53c8xx_2/sym_glue.h- Extension
.h- Size
- 6679 bytes
- Lines
- 258
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/completion.hlinux/delay.hlinux/interrupt.hlinux/ioport.hlinux/pci.hlinux/string.hlinux/timer.hlinux/types.hasm/io.hasm/irq.hscsi/scsi.hscsi/scsi_cmnd.hscsi/scsi_device.hscsi/scsi_transport_spi.hscsi/scsi_host.hsym53c8xx.hsym_defs.hsym_misc.hsym_fw.hsym_hipd.h
Detected Declarations
struct sym_slcbstruct sym_shcbstruct sym_nvramstruct sym_devicestruct sym_datafunction sym_get_hcbfunction sym_set_cam_statusfunction sym_get_cam_statusfunction sym_set_cam_result_ok
Annotated Snippet
struct sym_slcb {
u_short reqtags; /* Number of tags requested by user */
u_short scdev_depth; /* Queue depth set in select_queue_depth() */
};
/*
* System specific command data structure.
* Not needed under Linux.
*/
/* struct sym_sccb */
/*
* System specific host data structure.
*/
struct sym_shcb {
/*
* Chip and controller identification.
*/
int unit;
char inst_name[16];
char chip_name[8];
struct Scsi_Host *host;
void __iomem * ioaddr; /* MMIO kernel io address */
void __iomem * ramaddr; /* RAM kernel io address */
struct timer_list timer; /* Timer handler link header */
u_long lasttime;
u_long settle_time; /* Resetting the SCSI BUS */
u_char settle_time_valid;
};
/*
* Return the name of the controller.
*/
#define sym_name(np) (np)->s.inst_name
struct sym_nvram;
/*
* The IO macros require a struct called 's' and are abused in sym_nvram.c
*/
struct sym_device {
struct pci_dev *pdev;
unsigned long mmio_base;
unsigned long ram_base;
struct {
void __iomem *ioaddr;
void __iomem *ramaddr;
} s;
struct sym_chip chip;
struct sym_nvram *nvram;
u_char host_id;
};
/*
* Driver host data structure.
*/
struct sym_data {
struct sym_hcb *ncb;
struct completion *io_reset; /* PCI error handling */
struct pci_dev *pdev;
};
static inline struct sym_hcb * sym_get_hcb(struct Scsi_Host *host)
{
return ((struct sym_data *)host->hostdata)->ncb;
}
#include "sym_fw.h"
#include "sym_hipd.h"
/*
* Set the status field of a CAM CCB.
*/
static inline void
sym_set_cam_status(struct scsi_cmnd *cmd, int status)
{
cmd->result &= ~(0xff << 16);
cmd->result |= (status << 16);
}
/*
* Get the status field of a CAM CCB.
*/
static inline int
sym_get_cam_status(struct scsi_cmnd *cmd)
{
return host_byte(cmd->result);
Annotation
- Immediate include surface: `linux/completion.h`, `linux/delay.h`, `linux/interrupt.h`, `linux/ioport.h`, `linux/pci.h`, `linux/string.h`, `linux/timer.h`, `linux/types.h`.
- Detected declarations: `struct sym_slcb`, `struct sym_shcb`, `struct sym_nvram`, `struct sym_device`, `struct sym_data`, `function sym_get_hcb`, `function sym_set_cam_status`, `function sym_get_cam_status`, `function sym_set_cam_result_ok`.
- Atlas domain: Driver Families / drivers/scsi.
- 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.