diff options
author | Pierre Ossman <drzeus@drzeus.cx> | 2008-12-31 13:56:05 -0500 |
---|---|---|
committer | Pierre Ossman <drzeus@drzeus.cx> | 2008-12-31 13:56:05 -0500 |
commit | 418f19ea17a99421b22a64e101e14b6a16bed66d (patch) | |
tree | 7c21fcc368c63f1f9907deac6d16b30bd371792d /include/linux/ide.h | |
parent | 98444d3dd975653a4a970ecc0dfc30918da92f60 (diff) | |
parent | f6e10b865c3ea56bdaa8c6ecfee313b997900dbb (diff) |
Merge branch 'master' of ../mmc
Diffstat (limited to 'include/linux/ide.h')
-rw-r--r-- | include/linux/ide.h | 45 |
1 files changed, 29 insertions, 16 deletions
diff --git a/include/linux/ide.h b/include/linux/ide.h index 54525be4b5f8..e99c56de7f56 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -122,8 +122,6 @@ struct ide_io_ports { | |||
122 | #define MAX_DRIVES 2 /* per interface; 2 assumed by lots of code */ | 122 | #define MAX_DRIVES 2 /* per interface; 2 assumed by lots of code */ |
123 | #define SECTOR_SIZE 512 | 123 | #define SECTOR_SIZE 512 |
124 | 124 | ||
125 | #define IDE_LARGE_SEEK(b1,b2,t) (((b1) > (b2) + (t)) || ((b2) > (b1) + (t))) | ||
126 | |||
127 | /* | 125 | /* |
128 | * Timeouts for various operations: | 126 | * Timeouts for various operations: |
129 | */ | 127 | */ |
@@ -172,9 +170,7 @@ typedef int (ide_ack_intr_t)(struct hwif_s *); | |||
172 | enum { ide_unknown, ide_generic, ide_pci, | 170 | enum { ide_unknown, ide_generic, ide_pci, |
173 | ide_cmd640, ide_dtc2278, ide_ali14xx, | 171 | ide_cmd640, ide_dtc2278, ide_ali14xx, |
174 | ide_qd65xx, ide_umc8672, ide_ht6560b, | 172 | ide_qd65xx, ide_umc8672, ide_ht6560b, |
175 | ide_rz1000, ide_trm290, | 173 | ide_4drives, ide_pmac, ide_acorn, |
176 | ide_cmd646, ide_cy82c693, ide_4drives, | ||
177 | ide_pmac, ide_acorn, | ||
178 | ide_au1xxx, ide_palm3710 | 174 | ide_au1xxx, ide_palm3710 |
179 | }; | 175 | }; |
180 | 176 | ||
@@ -496,8 +492,6 @@ enum { | |||
496 | * when more than one interrupt is needed. | 492 | * when more than one interrupt is needed. |
497 | */ | 493 | */ |
498 | IDE_AFLAG_LIMIT_NFRAMES = (1 << 7), | 494 | IDE_AFLAG_LIMIT_NFRAMES = (1 << 7), |
499 | /* Seeking in progress. */ | ||
500 | IDE_AFLAG_SEEKING = (1 << 8), | ||
501 | /* Saved TOC information is current. */ | 495 | /* Saved TOC information is current. */ |
502 | IDE_AFLAG_TOC_VALID = (1 << 9), | 496 | IDE_AFLAG_TOC_VALID = (1 << 9), |
503 | /* We think that the drive door is locked. */ | 497 | /* We think that the drive door is locked. */ |
@@ -845,8 +839,6 @@ typedef struct hwif_s { | |||
845 | unsigned extra_ports; /* number of extra dma ports */ | 839 | unsigned extra_ports; /* number of extra dma ports */ |
846 | 840 | ||
847 | unsigned present : 1; /* this interface exists */ | 841 | unsigned present : 1; /* this interface exists */ |
848 | unsigned serialized : 1; /* serialized all channel operation */ | ||
849 | unsigned sharing_irq: 1; /* 1 = sharing irq with another hwif */ | ||
850 | unsigned sg_mapped : 1; /* sg_table and sg_nents are ready */ | 842 | unsigned sg_mapped : 1; /* sg_table and sg_nents are ready */ |
851 | 843 | ||
852 | struct device gendev; | 844 | struct device gendev; |
@@ -909,6 +901,8 @@ typedef struct hwgroup_s { | |||
909 | 901 | ||
910 | int req_gen; | 902 | int req_gen; |
911 | int req_gen_timer; | 903 | int req_gen_timer; |
904 | |||
905 | spinlock_t lock; | ||
912 | } ide_hwgroup_t; | 906 | } ide_hwgroup_t; |
913 | 907 | ||
914 | typedef struct ide_driver_s ide_driver_t; | 908 | typedef struct ide_driver_s ide_driver_t; |
@@ -1122,6 +1116,14 @@ enum { | |||
1122 | IDE_PM_COMPLETED, | 1116 | IDE_PM_COMPLETED, |
1123 | }; | 1117 | }; |
1124 | 1118 | ||
1119 | int generic_ide_suspend(struct device *, pm_message_t); | ||
1120 | int generic_ide_resume(struct device *); | ||
1121 | |||
1122 | void ide_complete_power_step(ide_drive_t *, struct request *); | ||
1123 | ide_startstop_t ide_start_power_step(ide_drive_t *, struct request *); | ||
1124 | void ide_complete_pm_request(ide_drive_t *, struct request *); | ||
1125 | void ide_check_pm_state(ide_drive_t *, struct request *); | ||
1126 | |||
1125 | /* | 1127 | /* |
1126 | * Subdrivers support. | 1128 | * Subdrivers support. |
1127 | * | 1129 | * |
@@ -1296,6 +1298,13 @@ extern int __ide_pci_register_driver(struct pci_driver *driver, struct module *o | |||
1296 | #define ide_pci_register_driver(d) pci_register_driver(d) | 1298 | #define ide_pci_register_driver(d) pci_register_driver(d) |
1297 | #endif | 1299 | #endif |
1298 | 1300 | ||
1301 | static inline int ide_pci_is_in_compatibility_mode(struct pci_dev *dev) | ||
1302 | { | ||
1303 | if ((dev->class >> 8) == PCI_CLASS_STORAGE_IDE && (dev->class & 5) != 5) | ||
1304 | return 1; | ||
1305 | return 0; | ||
1306 | } | ||
1307 | |||
1299 | void ide_pci_setup_ports(struct pci_dev *, const struct ide_port_info *, int, | 1308 | void ide_pci_setup_ports(struct pci_dev *, const struct ide_port_info *, int, |
1300 | hw_regs_t *, hw_regs_t **); | 1309 | hw_regs_t *, hw_regs_t **); |
1301 | void ide_setup_pci_noise(struct pci_dev *, const struct ide_port_info *); | 1310 | void ide_setup_pci_noise(struct pci_dev *, const struct ide_port_info *); |
@@ -1369,12 +1378,13 @@ enum { | |||
1369 | IDE_HFLAG_LEGACY_IRQS = (1 << 21), | 1378 | IDE_HFLAG_LEGACY_IRQS = (1 << 21), |
1370 | /* force use of legacy IRQs */ | 1379 | /* force use of legacy IRQs */ |
1371 | IDE_HFLAG_FORCE_LEGACY_IRQS = (1 << 22), | 1380 | IDE_HFLAG_FORCE_LEGACY_IRQS = (1 << 22), |
1372 | /* limit LBA48 requests to 256 sectors */ | 1381 | /* host is TRM290 */ |
1373 | IDE_HFLAG_RQSIZE_256 = (1 << 23), | 1382 | IDE_HFLAG_TRM290 = (1 << 23), |
1374 | /* use 32-bit I/O ops */ | 1383 | /* use 32-bit I/O ops */ |
1375 | IDE_HFLAG_IO_32BIT = (1 << 24), | 1384 | IDE_HFLAG_IO_32BIT = (1 << 24), |
1376 | /* unmask IRQs */ | 1385 | /* unmask IRQs */ |
1377 | IDE_HFLAG_UNMASK_IRQS = (1 << 25), | 1386 | IDE_HFLAG_UNMASK_IRQS = (1 << 25), |
1387 | IDE_HFLAG_BROKEN_ALTSTATUS = (1 << 26), | ||
1378 | /* serialize ports if DMA is possible (for sl82c105) */ | 1388 | /* serialize ports if DMA is possible (for sl82c105) */ |
1379 | IDE_HFLAG_SERIALIZE_DMA = (1 << 27), | 1389 | IDE_HFLAG_SERIALIZE_DMA = (1 << 27), |
1380 | /* force host out of "simplex" mode */ | 1390 | /* force host out of "simplex" mode */ |
@@ -1407,6 +1417,9 @@ struct ide_port_info { | |||
1407 | 1417 | ||
1408 | ide_pci_enablebit_t enablebits[2]; | 1418 | ide_pci_enablebit_t enablebits[2]; |
1409 | hwif_chipset_t chipset; | 1419 | hwif_chipset_t chipset; |
1420 | |||
1421 | u16 max_sectors; /* if < than the default one */ | ||
1422 | |||
1410 | u32 host_flags; | 1423 | u32 host_flags; |
1411 | u8 pio_mask; | 1424 | u8 pio_mask; |
1412 | u8 swdma_mask; | 1425 | u8 swdma_mask; |
@@ -1602,13 +1615,13 @@ extern struct mutex ide_cfg_mtx; | |||
1602 | /* | 1615 | /* |
1603 | * Structure locking: | 1616 | * Structure locking: |
1604 | * | 1617 | * |
1605 | * ide_cfg_mtx and ide_lock together protect changes to | 1618 | * ide_cfg_mtx and hwgroup->lock together protect changes to |
1606 | * ide_hwif_t->{next,hwgroup} | 1619 | * ide_hwif_t->next |
1607 | * ide_drive_t->next | 1620 | * ide_drive_t->next |
1608 | * | 1621 | * |
1609 | * ide_hwgroup_t->busy: ide_lock | 1622 | * ide_hwgroup_t->busy: hwgroup->lock |
1610 | * ide_hwgroup_t->hwif: ide_lock | 1623 | * ide_hwgroup_t->hwif: hwgroup->lock |
1611 | * ide_hwif_t->mate: constant, no locking | 1624 | * ide_hwif_t->{hwgroup,mate}: constant, no locking |
1612 | * ide_drive_t->hwif: constant, no locking | 1625 | * ide_drive_t->hwif: constant, no locking |
1613 | */ | 1626 | */ |
1614 | 1627 | ||