drivers/usb/storage/ene_ub6250.c
Source file repositories/reference/linux-study-clean/drivers/usb/storage/ene_ub6250.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/usb/storage/ene_ub6250.c- Extension
.c- Size
- 68606 bytes
- Lines
- 2441
- 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.
- 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.
- 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.hscsi/scsi.hscsi/scsi_cmnd.hlinux/firmware.husb.htransport.hprotocol.hdebug.hscsiglue.hunusual_ene_ub6250.h
Detected Declarations
struct ms_bootblock_cisstruct ms_bootblock_idistruct ms_bootblock_sysent_recstruct ms_bootblock_sysentstruct ms_bootblock_sysinfstruct ms_bootblock_headerstruct ms_bootblock_page0struct ms_bootblock_cis_idistruct ms_lib_type_extdatstruct ms_lib_ctrlstruct ene_ub6250_infofunction ene_ub6250_info_destructorfunction ene_send_scsi_cmdfunction do_scsi_request_sensefunction do_scsi_inquiryfunction sd_scsi_test_unit_readyfunction sd_scsi_mode_sensefunction sd_scsi_read_capacityfunction sd_scsi_readfunction sd_scsi_writefunction ms_lib_set_logicalpairfunction ms_lib_set_logicalblockmarkfunction ms_lib_set_initialerrorblockfunction ms_lib_set_bootblockmarkfunction ms_lib_free_logicalmapfunction ms_lib_alloc_logicalmapfunction ms_lib_clear_writebuffunction ms_count_freeblockfunction ms_read_readpagefunction ms_lib_process_bootblockfunction ms_lib_free_writebuffunction ms_lib_free_allocatedareafunction ms_lib_alloc_writebuffunction ms_lib_force_setlogical_pairfunction ms_read_copyblockfunction ms_read_eraseblockfunction ms_lib_check_disableblockfunction ms_lib_setacquired_errorblockfunction ms_lib_overwrite_extrafunction ms_lib_error_phyblockfunction ms_lib_erase_phyblockfunction ms_lib_read_extrafunction ms_libsearch_block_from_physicalfunction ms_libsearch_block_from_logicalfunction ms_scsi_test_unit_readyfunction ms_scsi_mode_sensefunction ms_scsi_read_capacityfunction ms_lib_phy_to_log_range
Annotated Snippet
struct ms_bootblock_cis {
u8 bCistplDEVICE[6]; /* 0 */
u8 bCistplDEVICE0C[6]; /* 6 */
u8 bCistplJEDECC[4]; /* 12 */
u8 bCistplMANFID[6]; /* 16 */
u8 bCistplVER1[32]; /* 22 */
u8 bCistplFUNCID[4]; /* 54 */
u8 bCistplFUNCE0[4]; /* 58 */
u8 bCistplFUNCE1[5]; /* 62 */
u8 bCistplCONF[7]; /* 67 */
u8 bCistplCFTBLENT0[10];/* 74 */
u8 bCistplCFTBLENT1[8]; /* 84 */
u8 bCistplCFTBLENT2[12];/* 92 */
u8 bCistplCFTBLENT3[8]; /* 104 */
u8 bCistplCFTBLENT4[17];/* 112 */
u8 bCistplCFTBLENT5[8]; /* 129 */
u8 bCistplCFTBLENT6[17];/* 137 */
u8 bCistplCFTBLENT7[8]; /* 154 */
u8 bCistplNOLINK[3]; /* 162 */
} ;
struct ms_bootblock_idi {
#define MS_IDI_GENERAL_CONF 0x848A
u16 wIDIgeneralConfiguration; /* 0 */
u16 wIDInumberOfCylinder; /* 1 */
u16 wIDIreserved0; /* 2 */
u16 wIDInumberOfHead; /* 3 */
u16 wIDIbytesPerTrack; /* 4 */
u16 wIDIbytesPerSector; /* 5 */
u16 wIDIsectorsPerTrack; /* 6 */
u16 wIDItotalSectors[2]; /* 7-8 high,low */
u16 wIDIreserved1[11]; /* 9-19 */
u16 wIDIbufferType; /* 20 */
u16 wIDIbufferSize; /* 21 */
u16 wIDIlongCmdECC; /* 22 */
u16 wIDIfirmVersion[4]; /* 23-26 */
u16 wIDImodelName[20]; /* 27-46 */
u16 wIDIreserved2; /* 47 */
u16 wIDIlongWordSupported; /* 48 */
u16 wIDIdmaSupported; /* 49 */
u16 wIDIreserved3; /* 50 */
u16 wIDIpioTiming; /* 51 */
u16 wIDIdmaTiming; /* 52 */
u16 wIDItransferParameter; /* 53 */
u16 wIDIformattedCylinder; /* 54 */
u16 wIDIformattedHead; /* 55 */
u16 wIDIformattedSectorsPerTrack;/* 56 */
u16 wIDIformattedTotalSectors[2];/* 57-58 */
u16 wIDImultiSector; /* 59 */
u16 wIDIlbaSectors[2]; /* 60-61 */
u16 wIDIsingleWordDMA; /* 62 */
u16 wIDImultiWordDMA; /* 63 */
u16 wIDIreserved4[192]; /* 64-255 */
};
struct ms_bootblock_sysent_rec {
u32 dwStart;
u32 dwSize;
u8 bType;
u8 bReserved[3];
};
struct ms_bootblock_sysent {
struct ms_bootblock_sysent_rec entry[MS_NUMBER_OF_SYSTEM_ENTRY];
};
struct ms_bootblock_sysinf {
u8 bMsClass; /* must be 1 */
u8 bCardType; /* see below */
u16 wBlockSize; /* n KB */
u16 wBlockNumber; /* number of physical block */
u16 wTotalBlockNumber; /* number of logical block */
u16 wPageSize; /* must be 0x200 */
u8 bExtraSize; /* 0x10 */
u8 bSecuritySupport;
u8 bAssemblyDate[8];
u8 bFactoryArea[4];
u8 bAssemblyMakerCode;
u8 bAssemblyMachineCode[3];
u16 wMemoryMakerCode;
u16 wMemoryDeviceCode;
u16 wMemorySize;
u8 bReserved1;
u8 bReserved2;
u8 bVCC;
u8 bVPP;
u16 wControllerChipNumber;
u16 wControllerFunction; /* New MS */
u8 bReserved3[9]; /* New MS */
u8 bParallelSupport; /* New MS */
Annotation
- Immediate include surface: `linux/jiffies.h`, `linux/errno.h`, `linux/module.h`, `linux/slab.h`, `scsi/scsi.h`, `scsi/scsi_cmnd.h`, `linux/firmware.h`, `usb.h`.
- Detected declarations: `struct ms_bootblock_cis`, `struct ms_bootblock_idi`, `struct ms_bootblock_sysent_rec`, `struct ms_bootblock_sysent`, `struct ms_bootblock_sysinf`, `struct ms_bootblock_header`, `struct ms_bootblock_page0`, `struct ms_bootblock_cis_idi`, `struct ms_lib_type_extdat`, `struct ms_lib_ctrl`.
- Atlas domain: Driver Families / drivers/usb.
- 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.