aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ide.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/ide.h')
-rw-r--r--include/linux/ide.h37
1 files changed, 21 insertions, 16 deletions
diff --git a/include/linux/ide.h b/include/linux/ide.h
index 010fb26a157..e99c56de7f5 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 *);
172enum { ide_unknown, ide_generic, ide_pci, 170enum { 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
914typedef struct ide_driver_s ide_driver_t; 908typedef struct ide_driver_s ide_driver_t;
@@ -1122,6 +1116,14 @@ enum {
1122 IDE_PM_COMPLETED, 1116 IDE_PM_COMPLETED,
1123}; 1117};
1124 1118
1119int generic_ide_suspend(struct device *, pm_message_t);
1120int generic_ide_resume(struct device *);
1121
1122void ide_complete_power_step(ide_drive_t *, struct request *);
1123ide_startstop_t ide_start_power_step(ide_drive_t *, struct request *);
1124void ide_complete_pm_request(ide_drive_t *, struct request *);
1125void ide_check_pm_state(ide_drive_t *, struct request *);
1126
1125/* 1127/*
1126 * Subdrivers support. 1128 * Subdrivers support.
1127 * 1129 *
@@ -1376,8 +1378,8 @@ enum {
1376 IDE_HFLAG_LEGACY_IRQS = (1 << 21), 1378 IDE_HFLAG_LEGACY_IRQS = (1 << 21),
1377 /* force use of legacy IRQs */ 1379 /* force use of legacy IRQs */
1378 IDE_HFLAG_FORCE_LEGACY_IRQS = (1 << 22), 1380 IDE_HFLAG_FORCE_LEGACY_IRQS = (1 << 22),
1379 /* limit LBA48 requests to 256 sectors */ 1381 /* host is TRM290 */
1380 IDE_HFLAG_RQSIZE_256 = (1 << 23), 1382 IDE_HFLAG_TRM290 = (1 << 23),
1381 /* use 32-bit I/O ops */ 1383 /* use 32-bit I/O ops */
1382 IDE_HFLAG_IO_32BIT = (1 << 24), 1384 IDE_HFLAG_IO_32BIT = (1 << 24),
1383 /* unmask IRQs */ 1385 /* unmask IRQs */
@@ -1415,6 +1417,9 @@ struct ide_port_info {
1415 1417
1416 ide_pci_enablebit_t enablebits[2]; 1418 ide_pci_enablebit_t enablebits[2];
1417 hwif_chipset_t chipset; 1419 hwif_chipset_t chipset;
1420
1421 u16 max_sectors; /* if < than the default one */
1422
1418 u32 host_flags; 1423 u32 host_flags;
1419 u8 pio_mask; 1424 u8 pio_mask;
1420 u8 swdma_mask; 1425 u8 swdma_mask;
@@ -1610,13 +1615,13 @@ extern struct mutex ide_cfg_mtx;
1610/* 1615/*
1611 * Structure locking: 1616 * Structure locking:
1612 * 1617 *
1613 * ide_cfg_mtx and ide_lock together protect changes to 1618 * ide_cfg_mtx and hwgroup->lock together protect changes to
1614 * ide_hwif_t->{next,hwgroup} 1619 * ide_hwif_t->next
1615 * ide_drive_t->next 1620 * ide_drive_t->next
1616 * 1621 *
1617 * ide_hwgroup_t->busy: ide_lock 1622 * ide_hwgroup_t->busy: hwgroup->lock
1618 * ide_hwgroup_t->hwif: ide_lock 1623 * ide_hwgroup_t->hwif: hwgroup->lock
1619 * ide_hwif_t->mate: constant, no locking 1624 * ide_hwif_t->{hwgroup,mate}: constant, no locking
1620 * ide_drive_t->hwif: constant, no locking 1625 * ide_drive_t->hwif: constant, no locking
1621 */ 1626 */
1622 1627