drivers/scsi/53c700.h
Source file repositories/reference/linux-study-clean/drivers/scsi/53c700.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/scsi/53c700.h- Extension
.h- Size
- 16737 bytes
- Lines
- 529
- 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.
- 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/interrupt.hasm/io.hscsi/scsi_device.hscsi/scsi_cmnd.h
Detected Declarations
struct NCR_700_Host_Parametersstruct NCR_700_SG_Liststruct NCR_700_Device_Parametersstruct NCR_700_command_slotstruct NCR_700_Host_Parametersenum NCR_700_Host_Stateenum NCR_700_tag_neg_statefunction NCR_700_set_depthfunction NCR_700_get_depthfunction NCR_700_is_flag_setfunction NCR_700_is_flag_clearfunction NCR_700_set_flagfunction NCR_700_clear_flagfunction NCR_700_get_tag_neg_statefunction NCR_700_set_tag_neg_statefunction NCR_700_readbfunction NCR_700_readlfunction NCR_700_writebfunction NCR_700_writel
Annotated Snippet
struct NCR_700_SG_List {
/* The following is a script fragment to move the buffer onto the
* bus and then link the next fragment or return */
#define SCRIPT_MOVE_DATA_IN 0x09000000
#define SCRIPT_MOVE_DATA_OUT 0x08000000
__u32 ins;
__u32 pAddr;
#define SCRIPT_NOP 0x80000000
#define SCRIPT_RETURN 0x90080000
};
struct NCR_700_Device_Parameters {
/* space for creating a request sense command. Really, except
* for the annoying SCSI-2 requirement for LUN information in
* cmnd[1], this could be in static storage */
unsigned char cmnd[MAX_COMMAND_SIZE];
__u8 depth;
struct scsi_cmnd *current_cmnd; /* currently active command */
};
/* The SYNC negotiation sequence looks like:
*
* If DEV_NEGOTIATED_SYNC not set, tack and SDTR message on to the
* initial identify for the device and set DEV_BEGIN_SYNC_NEGOTIATION
* If we get an SDTR reply, work out the SXFER parameters, squirrel
* them away here, clear DEV_BEGIN_SYNC_NEGOTIATION and set
* DEV_NEGOTIATED_SYNC. If we get a REJECT msg, squirrel
*
*
* 0:7 SXFER_REG negotiated value for this device
* 8:15 Current queue depth
* 16 negotiated SYNC flag
* 17 begin SYNC negotiation flag
* 18 device supports tag queueing */
#define NCR_700_DEV_NEGOTIATED_SYNC (1<<16)
#define NCR_700_DEV_BEGIN_SYNC_NEGOTIATION (1<<17)
#define NCR_700_DEV_PRINT_SYNC_NEGOTIATION (1<<19)
static inline char *NCR_700_get_sense_cmnd(struct scsi_device *SDp)
{
struct NCR_700_Device_Parameters *hostdata = SDp->hostdata;
return hostdata->cmnd;
}
static inline void
NCR_700_set_depth(struct scsi_device *SDp, __u8 depth)
{
struct NCR_700_Device_Parameters *hostdata = SDp->hostdata;
hostdata->depth = depth;
}
static inline __u8
NCR_700_get_depth(struct scsi_device *SDp)
{
struct NCR_700_Device_Parameters *hostdata = SDp->hostdata;
return hostdata->depth;
}
static inline int
NCR_700_is_flag_set(struct scsi_device *SDp, __u32 flag)
{
return (spi_flags(SDp->sdev_target) & flag) == flag;
}
static inline int
NCR_700_is_flag_clear(struct scsi_device *SDp, __u32 flag)
{
return (spi_flags(SDp->sdev_target) & flag) == 0;
}
static inline void
NCR_700_set_flag(struct scsi_device *SDp, __u32 flag)
{
spi_flags(SDp->sdev_target) |= flag;
}
static inline void
NCR_700_clear_flag(struct scsi_device *SDp, __u32 flag)
{
spi_flags(SDp->sdev_target) &= ~flag;
}
enum NCR_700_tag_neg_state {
NCR_700_START_TAG_NEGOTIATION = 0,
NCR_700_DURING_TAG_NEGOTIATION = 1,
NCR_700_FINISHED_TAG_NEGOTIATION = 2,
};
static inline enum NCR_700_tag_neg_state
NCR_700_get_tag_neg_state(struct scsi_device *SDp)
{
Annotation
- Immediate include surface: `linux/interrupt.h`, `asm/io.h`, `scsi/scsi_device.h`, `scsi/scsi_cmnd.h`.
- Detected declarations: `struct NCR_700_Host_Parameters`, `struct NCR_700_SG_List`, `struct NCR_700_Device_Parameters`, `struct NCR_700_command_slot`, `struct NCR_700_Host_Parameters`, `enum NCR_700_Host_State`, `enum NCR_700_tag_neg_state`, `function NCR_700_set_depth`, `function NCR_700_get_depth`, `function NCR_700_is_flag_set`.
- Atlas domain: Driver Families / drivers/scsi.
- Implementation status: source implementation candidate.
- 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.