diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-18 19:00:02 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-18 19:00:02 -0400 |
commit | a9e82d3a02247af6b729be0a963862d70cb25bf9 (patch) | |
tree | 8f1f02bf0f1371391f2077a270bc32c0beddcc6a /include | |
parent | 58f9b52ee8712283f7ffedb661df678c61e88a91 (diff) | |
parent | 85ad93ad56f4baf52e7c40f2e01c4df8e14d4c9c (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6: (37 commits)
ide: set drive->autotune in ide_pci_setup_ports()
triflex: always tune PIO
opti621: always tune PIO
cy82c693: always tune PIO
cs5520: always tune PIO
alim15x3: always tune PIO
ide: add IDE_HFLAG_LEGACY_IRQS host flag
ide: add IDE_HFLAG_SERIALIZE host flag
ide: add IDE_HFLAG_ERROR_STOPS_FIFO host flag
piix: add DECLARE_ICH_DEV() macro
pdc202xx_old: add DECLARE_PDC2026X_DEV() macro
pdc202xx_new: add DECLARE_PDCNEW_DEV() macro
aec62xx: no need to disable UDMA in ->init_hwif method for ATP850UF
ide: remove .init_setup from ide_pci_device_t
serverworks: remove ->init_setup
scc_pata: remove ->init_setup
pdc202xx_old: remove ->init_setup
pdc202xx_new: remove ->init_setup
hpt366: remove ->init_setup
cmd64x: remove ->init_setup
...
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/ide.h | 58 |
1 files changed, 36 insertions, 22 deletions
diff --git a/include/linux/ide.h b/include/linux/ide.h index e39ee2fa2607..19db0a4ae447 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -685,7 +685,6 @@ typedef struct hwif_s { | |||
685 | 685 | ||
686 | u8 pio_mask; | 686 | u8 pio_mask; |
687 | 687 | ||
688 | u8 atapi_dma; /* host supports atapi_dma */ | ||
689 | u8 ultra_mask; | 688 | u8 ultra_mask; |
690 | u8 mwdma_mask; | 689 | u8 mwdma_mask; |
691 | u8 swdma_mask; | 690 | u8 swdma_mask; |
@@ -797,12 +796,9 @@ typedef struct hwif_s { | |||
797 | unsigned serialized : 1; /* serialized all channel operation */ | 796 | unsigned serialized : 1; /* serialized all channel operation */ |
798 | unsigned sharing_irq: 1; /* 1 = sharing irq with another hwif */ | 797 | unsigned sharing_irq: 1; /* 1 = sharing irq with another hwif */ |
799 | unsigned reset : 1; /* reset after probe */ | 798 | unsigned reset : 1; /* reset after probe */ |
800 | unsigned no_lba48 : 1; /* 1 = cannot do LBA48 */ | ||
801 | unsigned no_lba48_dma : 1; /* 1 = cannot do LBA48 DMA */ | ||
802 | unsigned auto_poll : 1; /* supports nop auto-poll */ | 799 | unsigned auto_poll : 1; /* supports nop auto-poll */ |
803 | unsigned sg_mapped : 1; /* sg_table and sg_nents are ready */ | 800 | unsigned sg_mapped : 1; /* sg_table and sg_nents are ready */ |
804 | unsigned no_io_32bit : 1; /* 1 = can not do 32-bit IO ops */ | 801 | unsigned no_io_32bit : 1; /* 1 = can not do 32-bit IO ops */ |
805 | unsigned err_stops_fifo : 1; /* 1=data FIFO is cleared by an error */ | ||
806 | unsigned mmio : 1; /* host uses MMIO */ | 802 | unsigned mmio : 1; /* host uses MMIO */ |
807 | 803 | ||
808 | struct device gendev; | 804 | struct device gendev; |
@@ -1211,19 +1207,6 @@ extern void default_hwif_iops(ide_hwif_t *); | |||
1211 | extern void default_hwif_mmiops(ide_hwif_t *); | 1207 | extern void default_hwif_mmiops(ide_hwif_t *); |
1212 | extern void default_hwif_transport(ide_hwif_t *); | 1208 | extern void default_hwif_transport(ide_hwif_t *); |
1213 | 1209 | ||
1214 | #define ON_BOARD 1 | ||
1215 | #define NEVER_BOARD 0 | ||
1216 | |||
1217 | #ifdef CONFIG_BLK_DEV_OFFBOARD | ||
1218 | # define OFF_BOARD ON_BOARD | ||
1219 | #else /* CONFIG_BLK_DEV_OFFBOARD */ | ||
1220 | # define OFF_BOARD NEVER_BOARD | ||
1221 | #endif /* CONFIG_BLK_DEV_OFFBOARD */ | ||
1222 | |||
1223 | #define NODMA 0 | ||
1224 | #define NOAUTODMA 1 | ||
1225 | #define AUTODMA 2 | ||
1226 | |||
1227 | typedef struct ide_pci_enablebit_s { | 1210 | typedef struct ide_pci_enablebit_s { |
1228 | u8 reg; /* byte pci reg holding the enable-bit */ | 1211 | u8 reg; /* byte pci reg holding the enable-bit */ |
1229 | u8 mask; /* mask to isolate the enable-bit */ | 1212 | u8 mask; /* mask to isolate the enable-bit */ |
@@ -1258,24 +1241,48 @@ enum { | |||
1258 | IDE_HFLAG_TRUST_BIOS_FOR_DMA = (1 << 10), | 1241 | IDE_HFLAG_TRUST_BIOS_FOR_DMA = (1 << 10), |
1259 | /* host uses VDMA */ | 1242 | /* host uses VDMA */ |
1260 | IDE_HFLAG_VDMA = (1 << 11), | 1243 | IDE_HFLAG_VDMA = (1 << 11), |
1244 | /* ATAPI DMA is unsupported */ | ||
1245 | IDE_HFLAG_NO_ATAPI_DMA = (1 << 12), | ||
1246 | /* set if host is a "bootable" controller */ | ||
1247 | IDE_HFLAG_BOOTABLE = (1 << 13), | ||
1248 | /* host doesn't support DMA */ | ||
1249 | IDE_HFLAG_NO_DMA = (1 << 14), | ||
1250 | /* check if host is PCI IDE device before allowing DMA */ | ||
1251 | IDE_HFLAG_NO_AUTODMA = (1 << 15), | ||
1252 | /* host is CS5510/CS5520 */ | ||
1253 | IDE_HFLAG_CS5520 = (1 << 16), | ||
1254 | /* no LBA48 */ | ||
1255 | IDE_HFLAG_NO_LBA48 = (1 << 17), | ||
1256 | /* no LBA48 DMA */ | ||
1257 | IDE_HFLAG_NO_LBA48_DMA = (1 << 18), | ||
1258 | /* data FIFO is cleared by an error */ | ||
1259 | IDE_HFLAG_ERROR_STOPS_FIFO = (1 << 19), | ||
1260 | /* serialize ports */ | ||
1261 | IDE_HFLAG_SERIALIZE = (1 << 20), | ||
1262 | /* use legacy IRQs */ | ||
1263 | IDE_HFLAG_LEGACY_IRQS = (1 << 21), | ||
1261 | }; | 1264 | }; |
1262 | 1265 | ||
1266 | #ifdef CONFIG_BLK_DEV_OFFBOARD | ||
1267 | # define IDE_HFLAG_OFF_BOARD IDE_HFLAG_BOOTABLE | ||
1268 | #else | ||
1269 | # define IDE_HFLAG_OFF_BOARD 0 | ||
1270 | #endif | ||
1271 | |||
1263 | typedef struct ide_pci_device_s { | 1272 | typedef struct ide_pci_device_s { |
1264 | char *name; | 1273 | char *name; |
1265 | int (*init_setup)(struct pci_dev *, struct ide_pci_device_s *); | ||
1266 | void (*init_setup_dma)(struct pci_dev *, struct ide_pci_device_s *, ide_hwif_t *); | ||
1267 | unsigned int (*init_chipset)(struct pci_dev *, const char *); | 1274 | unsigned int (*init_chipset)(struct pci_dev *, const char *); |
1268 | void (*init_iops)(ide_hwif_t *); | 1275 | void (*init_iops)(ide_hwif_t *); |
1269 | void (*init_hwif)(ide_hwif_t *); | 1276 | void (*init_hwif)(ide_hwif_t *); |
1270 | void (*init_dma)(ide_hwif_t *, unsigned long); | 1277 | void (*init_dma)(ide_hwif_t *, unsigned long); |
1271 | void (*fixup)(ide_hwif_t *); | 1278 | void (*fixup)(ide_hwif_t *); |
1272 | u8 autodma; | ||
1273 | ide_pci_enablebit_t enablebits[2]; | 1279 | ide_pci_enablebit_t enablebits[2]; |
1274 | u8 bootable; | ||
1275 | unsigned int extra; | 1280 | unsigned int extra; |
1276 | struct ide_pci_device_s *next; | 1281 | struct ide_pci_device_s *next; |
1277 | u16 host_flags; | 1282 | u32 host_flags; |
1278 | u8 pio_mask; | 1283 | u8 pio_mask; |
1284 | u8 swdma_mask; | ||
1285 | u8 mwdma_mask; | ||
1279 | u8 udma_mask; | 1286 | u8 udma_mask; |
1280 | } ide_pci_device_t; | 1287 | } ide_pci_device_t; |
1281 | 1288 | ||
@@ -1454,4 +1461,11 @@ static inline int hwif_to_node(ide_hwif_t *hwif) | |||
1454 | return dev ? pcibus_to_node(dev->bus) : -1; | 1461 | return dev ? pcibus_to_node(dev->bus) : -1; |
1455 | } | 1462 | } |
1456 | 1463 | ||
1464 | static inline ide_drive_t *ide_get_paired_drive(ide_drive_t *drive) | ||
1465 | { | ||
1466 | ide_hwif_t *hwif = HWIF(drive); | ||
1467 | |||
1468 | return &hwif->drives[(drive->dn ^ 1) & 1]; | ||
1469 | } | ||
1470 | |||
1457 | #endif /* _IDE_H */ | 1471 | #endif /* _IDE_H */ |