drivers/usb/storage/isd200.c
Source file repositories/reference/linux-study-clean/drivers/usb/storage/isd200.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/usb/storage/isd200.c- Extension
.c- Size
- 46031 bytes
- Lines
- 1587
- Domain
- Driver Families
- Bucket
- drivers/usb
- 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.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/jiffies.hlinux/errno.hlinux/module.hlinux/slab.hlinux/ata.hlinux/hdreg.hlinux/scatterlist.hscsi/scsi.hscsi/scsi_cmnd.hscsi/scsi_device.husb.htransport.hprotocol.hdebug.hscsiglue.hunusual_isd200.h
Detected Declarations
struct inquiry_datastruct isd200_configstruct isd200_infostruct read_capacity_datastruct read_block_limitsstruct sense_datafunction isd200_build_sensefunction isd200_set_srbfunction isd200_srb_set_bufflenfunction isd200_actionfunction isd200_read_regsfunction isd200_invoke_transportfunction isd200_log_configfunction isd200_write_configfunction isd200_read_configfunction isd200_atapi_soft_resetfunction isd200_srstfunction isd200_manual_enumfunction isd200_manual_enumfunction isd200_fix_driveidfunction isd200_dump_driveidfunction isd200_get_inquiry_datafunction isd200_scsi_to_atafunction isd200_free_info_ptrsfunction Allocatesfunction isd200_Initializationfunction protocolfunction isd200_probe
Annotated Snippet
struct inquiry_data {
unsigned char DeviceType;
unsigned char DeviceTypeModifier;
unsigned char Versions;
unsigned char Format;
unsigned char AdditionalLength;
unsigned char Reserved[2];
unsigned char Capability;
unsigned char VendorId[8];
unsigned char ProductId[16];
unsigned char ProductRevisionLevel[4];
unsigned char VendorSpecific[20];
unsigned char Reserved3[40];
} __attribute__ ((packed));
/*
* INQUIRY data buffer size
*/
#define INQUIRYDATABUFFERSIZE 36
/*
* ISD200 CONFIG data struct
*/
#define ATACFG_TIMING 0x0f
#define ATACFG_ATAPI_RESET 0x10
#define ATACFG_MASTER 0x20
#define ATACFG_BLOCKSIZE 0xa0
#define ATACFGE_LAST_LUN 0x07
#define ATACFGE_DESC_OVERRIDE 0x08
#define ATACFGE_STATE_SUSPEND 0x10
#define ATACFGE_SKIP_BOOT 0x20
#define ATACFGE_CONF_DESC2 0x40
#define ATACFGE_INIT_STATUS 0x80
#define CFG_CAPABILITY_SRST 0x01
struct isd200_config {
unsigned char EventNotification;
unsigned char ExternalClock;
unsigned char ATAInitTimeout;
unsigned char ATAConfig;
unsigned char ATAMajorCommand;
unsigned char ATAMinorCommand;
unsigned char ATAExtraConfig;
unsigned char Capability;
}__attribute__ ((packed));
/*
* ISD200 driver information struct
*/
struct isd200_info {
struct inquiry_data InquiryData;
u16 *id;
struct isd200_config ConfigData;
unsigned char *RegsBuf;
unsigned char ATARegs[8];
unsigned char DeviceHead;
unsigned char DeviceFlags;
/* maximum number of LUNs supported */
unsigned char MaxLUNs;
unsigned char cmnd[MAX_COMMAND_SIZE];
struct scsi_cmnd srb;
struct scatterlist sg;
};
/*
* Read Capacity Data - returned in Big Endian format
*/
struct read_capacity_data {
__be32 LogicalBlockAddress;
__be32 BytesPerBlock;
};
/*
* Read Block Limits Data - returned in Big Endian format
* This structure returns the maximum and minimum block
* size for a TAPE device.
*/
struct read_block_limits {
unsigned char Reserved;
Annotation
- Immediate include surface: `linux/jiffies.h`, `linux/errno.h`, `linux/module.h`, `linux/slab.h`, `linux/ata.h`, `linux/hdreg.h`, `linux/scatterlist.h`, `scsi/scsi.h`.
- Detected declarations: `struct inquiry_data`, `struct isd200_config`, `struct isd200_info`, `struct read_capacity_data`, `struct read_block_limits`, `struct sense_data`, `function isd200_build_sense`, `function isd200_set_srb`, `function isd200_srb_set_bufflen`, `function isd200_action`.
- Atlas domain: Driver Families / drivers/usb.
- 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.