⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ide.h

📁 此工具是arm-linux-GCC交叉编译工具(cross-3.4.4)
💻 H
📖 第 1 页 / 共 4 页
字号:
#elif defined(__BIG_ENDIAN_BITFIELD)		unsigned high		:8;	/* MSB */		unsigned low		:8;	/* LSB */#else#error "Please fix <asm/byteorder.h>"#endif	} b;} ata_nsector_t, ata_data_t, atapi_bcount_t, ata_index_t;/* * ATA-IDE Error Register * * mark		: Bad address mark * tzero	: Couldn't find track 0 * abrt		: Aborted Command * mcr		: Media Change Request * id		: ID field not found * mce		: Media Change Event * ecc		: Uncorrectable ECC error * bdd		: dual meaing */typedef union {	unsigned all			:8;	struct {#if defined(__LITTLE_ENDIAN_BITFIELD)		unsigned mark		:1;		unsigned tzero		:1;		unsigned abrt		:1;		unsigned mcr		:1;		unsigned id		:1;		unsigned mce		:1;		unsigned ecc		:1;		unsigned bdd		:1;#elif defined(__BIG_ENDIAN_BITFIELD)		unsigned bdd		:1;		unsigned ecc		:1;		unsigned mce		:1;		unsigned id		:1;		unsigned mcr		:1;		unsigned abrt		:1;		unsigned tzero		:1;		unsigned mark		:1;#else#error "Please fix <asm/byteorder.h>"#endif	} b;} ata_error_t;/* * ATA-IDE Select Register, aka Device-Head * * head		: always zeros here * unit		: drive select number: 0/1 * bit5		: always 1 * lba		: using LBA instead of CHS * bit7		: always 1 */typedef union {	unsigned all			: 8;	struct {#if defined(__LITTLE_ENDIAN_BITFIELD)		unsigned head		: 4;		unsigned unit		: 1;		unsigned bit5		: 1;		unsigned lba		: 1;		unsigned bit7		: 1;#elif defined(__BIG_ENDIAN_BITFIELD)		unsigned bit7		: 1;		unsigned lba		: 1;		unsigned bit5		: 1;		unsigned unit		: 1;		unsigned head		: 4;#else#error "Please fix <asm/byteorder.h>"#endif	} b;} select_t, ata_select_t;/* * The ATA-IDE Status Register. * The ATAPI Status Register. * * check	: Error occurred * idx		: Index Error * corr		: Correctable error occurred * drq		: Data is request by the device * dsc		: Disk Seek Complete			: ata *		: Media access command finished		: atapi * df		: Device Fault				: ata *		: Reserved				: atapi * drdy		: Ready, Command Mode Capable		: ata *		: Ignored for ATAPI commands		: atapi * bsy		: Disk is Busy *		: The device has access to the command block */typedef union {	unsigned all			:8;	struct {#if defined(__LITTLE_ENDIAN_BITFIELD)		unsigned check		:1;		unsigned idx		:1;		unsigned corr		:1;		unsigned drq		:1;		unsigned dsc		:1;		unsigned df		:1;		unsigned drdy		:1;		unsigned bsy		:1;#elif defined(__BIG_ENDIAN_BITFIELD)		unsigned bsy		:1;		unsigned drdy		:1;		unsigned df		:1;		unsigned dsc		:1;		unsigned drq		:1;		unsigned corr           :1;		unsigned idx		:1;		unsigned check		:1;#else#error "Please fix <asm/byteorder.h>"#endif	} b;} ata_status_t, atapi_status_t;/* * ATA-IDE Control Register * * bit0		: Should be set to zero * nIEN		: device INTRQ to host * SRST		: host soft reset bit * bit3		: ATA-2 thingy, Should be set to 1 * reserved456	: Reserved * HOB		: 48-bit address ordering, High Ordered Bit */typedef union {	unsigned all			: 8;	struct {#if defined(__LITTLE_ENDIAN_BITFIELD)		unsigned bit0		: 1;		unsigned nIEN		: 1;		unsigned SRST		: 1;		unsigned bit3		: 1;		unsigned reserved456	: 3;		unsigned HOB		: 1;#elif defined(__BIG_ENDIAN_BITFIELD)		unsigned HOB		: 1;		unsigned reserved456	: 3;		unsigned bit3		: 1;		unsigned SRST		: 1;		unsigned nIEN		: 1;		unsigned bit0		: 1;#else#error "Please fix <asm/byteorder.h>"#endif	} b;} ata_control_t;/* * ATAPI Feature Register * * dma		: Using DMA or PIO * reserved321	: Reserved * reserved654	: Reserved (Tag Type) * reserved7	: Reserved */typedef union {	unsigned all			:8;	struct {#if defined(__LITTLE_ENDIAN_BITFIELD)		unsigned dma		:1;		unsigned reserved321	:3;		unsigned reserved654	:3;		unsigned reserved7	:1;#elif defined(__BIG_ENDIAN_BITFIELD)		unsigned reserved7	:1;		unsigned reserved654	:3;		unsigned reserved321	:3;		unsigned dma		:1;#else#error "Please fix <asm/byteorder.h>"#endif	} b;} atapi_feature_t;/* * ATAPI Interrupt Reason Register. * * cod		: Information transferred is command (1) or data (0) * io		: The device requests us to read (1) or write (0) * reserved	: Reserved */typedef union {	unsigned all			:8;	struct {#if defined(__LITTLE_ENDIAN_BITFIELD)		unsigned cod		:1;		unsigned io		:1;		unsigned reserved	:6;#elif defined(__BIG_ENDIAN_BITFIELD)		unsigned reserved	:6;		unsigned io		:1;		unsigned cod		:1;#else#error "Please fix <asm/byteorder.h>"#endif	} b;} atapi_ireason_t;/* * The ATAPI error register. * * ili		: Illegal Length Indication * eom		: End Of Media Detected * abrt		: Aborted command - As defined by ATA * mcr		: Media Change Requested - As defined by ATA * sense_key	: Sense key of the last failed packet command */typedef union {	unsigned all			:8;	struct {#if defined(__LITTLE_ENDIAN_BITFIELD)		unsigned ili		:1;		unsigned eom		:1;		unsigned abrt		:1;		unsigned mcr		:1;		unsigned sense_key	:4;#elif defined(__BIG_ENDIAN_BITFIELD)		unsigned sense_key	:4;		unsigned mcr		:1;		unsigned abrt		:1;		unsigned eom		:1;		unsigned ili		:1;#else#error "Please fix <asm/byteorder.h>"#endif	} b;} atapi_error_t;/* * ATAPI floppy Drive Select Register * * sam_lun	: Logical unit number * reserved3	: Reserved * drv		: The responding drive will be drive 0 (0) or drive 1 (1) * one5		: Should be set to 1 * reserved6	: Reserved * one7		: Should be set to 1 */typedef union {	unsigned all			:8;	struct {#if defined(__LITTLE_ENDIAN_BITFIELD)		unsigned sam_lun	:3;		unsigned reserved3	:1;		unsigned drv		:1;		unsigned one5		:1;		unsigned reserved6	:1;		unsigned one7		:1;#elif defined(__BIG_ENDIAN_BITFIELD)		unsigned one7		:1;		unsigned reserved6	:1;		unsigned one5		:1;		unsigned drv		:1;		unsigned reserved3	:1;		unsigned sam_lun	:3;#else#error "Please fix <asm/byteorder.h>"#endif	} b;} atapi_select_t;/* * Status returned from various ide_ functions */typedef enum {	ide_stopped,	/* no drive operation was started */	ide_started,	/* a drive operation was started, handler was set */} ide_startstop_t;struct ide_driver_s;struct ide_settings_s;typedef struct ide_drive_s {	char		name[4];	/* drive name, such as "hda" */        char            driver_req[10];	/* requests specific driver */	request_queue_t		*queue;	/* request queue */	struct request		*rq;	/* current request */	struct ide_drive_s 	*next;	/* circular list of hwgroup drives */	void		*driver_data;	/* extra driver data */	struct hd_driveid	*id;	/* drive model identification info */	struct proc_dir_entry *proc;	/* /proc/ide/ directory entry */	struct ide_settings_s *settings;/* /proc/ide/ drive settings */	char		devfs_name[64];	/* devfs crap */	struct hwif_s		*hwif;	/* actually (ide_hwif_t *) */	unsigned long sleep;		/* sleep until this time */	unsigned long service_start;	/* time we started last request */	unsigned long service_time;	/* service time of last request */	unsigned long timeout;		/* max time to wait for irq */	special_t	special;	/* special action flags */	select_t	select;		/* basic drive/head select reg value */	u8	keep_settings;		/* restore settings after drive reset */	u8	autodma;		/* device can safely use dma on host */	u8	using_dma;		/* disk is using dma for read/write */	u8	retry_pio;		/* retrying dma capable host in pio */	u8	state;			/* retry state */	u8	waiting_for_dma;	/* dma currently in progress */	u8	unmask;			/* okay to unmask other irqs */	u8	bswap;			/* byte swap data */	u8	dsc_overlap;		/* DSC overlap */	u8	nice1;			/* give potential excess bandwidth */	unsigned present	: 1;	/* drive is physically present */	unsigned dead		: 1;	/* device ejected hint */	unsigned id_read	: 1;	/* 1=id read from disk 0 = synthetic */	unsigned noprobe 	: 1;	/* from:  hdx=noprobe */	unsigned removable	: 1;	/* 1 if need to do check_media_change */	unsigned attach		: 1;	/* needed for removable devices */	unsigned is_flash	: 1;	/* 1 if probed as flash */	unsigned forced_geom	: 1;	/* 1 if hdx=c,h,s was given at boot */	unsigned no_unmask	: 1;	/* disallow setting unmask bit */	unsigned no_io_32bit	: 1;	/* disallow enabling 32bit I/O */	unsigned atapi_overlap	: 1;	/* ATAPI overlap (not supported) */	unsigned nice0		: 1;	/* give obvious excess bandwidth */	unsigned nice2		: 1;	/* give a share in our own bandwidth */	unsigned doorlocking	: 1;	/* for removable only: door lock/unlock works */	unsigned autotune	: 2;	/* 0=default, 1=autotune, 2=noautotune */	unsigned remap_0_to_1	: 1;	/* 0=noremap, 1=remap 0->1 (for EZDrive) */	unsigned blocked        : 1;	/* 1=powermanagment told us not to do anything, so sleep nicely */	unsigned vdma		: 1;	/* 1=doing PIO over DMA 0=doing normal DMA */	unsigned addressing;		/*      : 3;					 *  0=28-bit					 *  1=48-bit					 *  2=48-bit doing 28-bit					 *  3=64-bit					 */	unsigned scsi		: 1;	/* 0=default, 1=ide-scsi emulation */	unsigned sleeping	: 1;	/* 1=sleeping & sleep field valid */	unsigned post_reset	: 1;        u8	quirk_list;	/* considered quirky, set for a specific host */        u8	init_speed;	/* transfer rate set at boot */        u8	pio_speed;      /* unused by core, used by some drivers for fallback from DMA */        u8	current_speed;	/* current transfer rate set */        u8	dn;		/* now wide spread use */        u8	wcache;		/* status of write cache */	u8	acoustic;	/* acoustic management */	u8	media;		/* disk, cdrom, tape, floppy, ... */	u8	ctl;		/* "normal" value for IDE_CONTROL_REG */	u8	ready_stat;	/* min status value for drive ready */	u8	mult_count;	/* current multiple sector setting */	u8	mult_req;	/* requested multiple sector setting */	u8	tune_req;	/* requested drive tuning setting */	u8	io_32bit;	/* 0=16-bit, 1=32-bit, 2/3=32bit+sync */	u8	bad_wstat;	/* used for ignoring WRERR_STAT */	u8	nowerr;		/* used for ignoring WRERR_STAT */	u8	sect0;		/* offset of first sector for DM6:DDO */	u8	head;		/* "real" number of heads */	u8	sect;		/* "real" sectors per track */	u8	bios_head;	/* BIOS/fdisk/LILO number of heads */	u8	bios_sect;	/* BIOS/fdisk/LILO sectors per track */	unsigned int	bios_cyl;	/* BIOS/fdisk/LILO number of cyls */	unsigned int	cyl;		/* "real" number of cyls */	unsigned int	drive_data;	/* use by tuneproc/selectproc */	unsigned int	usage;		/* current "open()" count for drive */	unsigned int	failures;	/* current failure count */	unsigned int	max_failures;	/* maximum allowed failure count */	u64		capacity64;	/* total number of sectors */	int		lun;		/* logical unit */	int		crc_count;	/* crc counter to reduce drive speed */	struct list_head list;	struct device	gendev;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -