X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=include%2Flinux%2Fide.h;h=0665428356d3aad9fa06241a05b06973456e6123;hb=b4e44369a380c1836d0983c2a5011099b7b26eb1;hp=14a87f619d17c538e158d9d10425b1d753eb3808;hpb=2134758d2a5429325cee4d4ce8959af5314eeba1;p=linux-2.6-omap-h63xx.git diff --git a/include/linux/ide.h b/include/linux/ide.h index 14a87f619d1..0665428356d 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h @@ -555,7 +555,7 @@ 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_queue *queue; /* request queue */ struct request *rq; /* current request */ struct ide_drive_s *next; /* circular list of hwgroup drives */ @@ -681,6 +681,10 @@ typedef struct hwif_s { u8 straight8; /* Alan's straight 8 check */ u8 bus_state; /* power state of the IDE bus */ + u8 host_flags; + + u8 pio_mask; + u8 atapi_dma; /* host supports atapi_dma */ u8 ultra_mask; u8 mwdma_mask; @@ -719,6 +723,7 @@ typedef struct hwif_s { /* driver soft-power interface */ int (*busproc)(ide_drive_t *, int); #endif + u8 (*mdma_filter)(ide_drive_t *); u8 (*udma_filter)(ide_drive_t *); void (*ata_input_data)(ide_drive_t *, void *, u32); @@ -1202,7 +1207,7 @@ extern void ide_stall_queue(ide_drive_t *drive, unsigned long timeout); extern int ide_spin_wait_hwgroup(ide_drive_t *); extern void ide_timer_expiry(unsigned long); extern irqreturn_t ide_intr(int irq, void *dev_id); -extern void do_ide_request(request_queue_t *); +extern void do_ide_request(struct request_queue *); void ide_init_disk(struct gendisk *, ide_drive_t *); @@ -1245,7 +1250,12 @@ typedef struct ide_pci_enablebit_s { enum { /* Uses ISA control ports not PCI ones. */ IDE_HFLAG_ISA_PORTS = (1 << 0), + /* single port device */ IDE_HFLAG_SINGLE = (1 << 1), + /* don't use legacy PIO blacklist */ + IDE_HFLAG_PIO_NO_BLACKLIST = (1 << 2), + /* don't use conservative PIO "downgrade" */ + IDE_HFLAG_PIO_NO_DOWNGRADE = (1 << 3), }; typedef struct ide_pci_device_s { @@ -1263,6 +1273,7 @@ typedef struct ide_pci_device_s { unsigned int extra; struct ide_pci_device_s *next; u8 host_flags; + u8 pio_mask; u8 udma_mask; } ide_pci_device_t; @@ -1275,13 +1286,14 @@ void ide_init_sg_cmd(ide_drive_t *, struct request *); #define BAD_DMA_DRIVE 0 #define GOOD_DMA_DRIVE 1 -#ifdef CONFIG_BLK_DEV_IDEDMA struct drive_list_entry { const char *id_model; const char *id_firmware; }; int ide_in_drive_list(struct hd_driveid *, const struct drive_list_entry *); + +#ifdef CONFIG_BLK_DEV_IDEDMA int __ide_dma_bad_drive(ide_drive_t *); int __ide_dma_good_drive(ide_drive_t *); u8 ide_max_dma_mode(ide_drive_t *); @@ -1302,7 +1314,6 @@ void ide_dma_host_off(ide_drive_t *); void ide_dma_off_quietly(ide_drive_t *); void ide_dma_host_on(ide_drive_t *); extern int __ide_dma_on(ide_drive_t *); -extern int __ide_dma_check(ide_drive_t *); extern int ide_dma_setup(ide_drive_t *); extern void ide_dma_start(ide_drive_t *); extern int __ide_dma_end(ide_drive_t *); @@ -1368,6 +1379,19 @@ static inline int ide_dev_has_iordy(struct hd_driveid *id) return ((id->field_valid & 2) && (id->capability & 8)) ? 1 : 0; } +static inline int ide_dev_is_sata(struct hd_driveid *id) +{ + /* + * See if word 93 is 0 AND drive is at least ATA-5 compatible + * verifying that word 80 by casting it to a signed type -- + * this trick allows us to filter out the reserved values of + * 0x0000 and 0xffff along with the earlier ATA revisions... + */ + if (id->hw_config == 0 && (short)id->major_rev_num >= 0x0020) + return 1; + return 0; +} + u8 ide_dump_status(ide_drive_t *, const char *, u8); typedef struct ide_pio_timings_s {