aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-10 17:50:16 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-10 17:50:16 -0400
commit64b853aa328f34dd58e4e617cded91e2ddbcac13 (patch)
tree34b201d952bc93ead6ca91ed18dab5fb87dacf03 /include/linux
parent0f166396e7e8931bb4acfd1a6ea1bd4f0b43f1dd (diff)
parentc1e4fe711a410a139095e6b3e3ce3f07f466063c (diff)
Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev
* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev: (32 commits) [libata] sata_mv: print out additional chip info during probe [libata] Use ATA_UDMAx standard masks when filling driver's udma_mask info [libata] AHCI: Add support for Marvell AHCI-like chips (initially 6145) [libata] Clean up driver udma_mask initializers libata: Support chips with 64K PRD quirk Add a PCI ID for santa rosa's PATA controller. sata_sil24: sil24_interrupt() micro-optimisation Add irq_flags to struct pata_platform_info sata_promise: cleanups [libata] pata_ixp4xx: kill unused var ata_piix: fix pio/mwdma programming [libata] ahci: minor internal cleanups [ATA] Add named constant for ATAPI command DEVICE RESET [libata] sata_sx4, sata_via: minor documentation updates [libata] ahci: minor internal cleanups [libata] ahci: Factor out SATA port init into a separate function [libata] pata_sil680: minor cleanups from benh [libata] sata_sx4: named constant cleanup [libata] pata_ixp4xx: convert to new EH [libata] pdc_adma: Reorder initializers with a couple structs ...
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/ata.h1
-rw-r--r--include/linux/libata.h30
-rw-r--r--include/linux/pata_platform.h5
3 files changed, 32 insertions, 4 deletions
diff --git a/include/linux/ata.h b/include/linux/ata.h
index 703febb2df31..407dc7e098bc 100644
--- a/include/linux/ata.h
+++ b/include/linux/ata.h
@@ -126,6 +126,7 @@ enum {
126 ATA_REG_IRQ = ATA_REG_NSECT, 126 ATA_REG_IRQ = ATA_REG_NSECT,
127 127
128 /* ATA device commands */ 128 /* ATA device commands */
129 ATA_CMD_DEV_RESET = 0x08, /* ATAPI device reset */
129 ATA_CMD_CHK_POWER = 0xE5, /* check power mode */ 130 ATA_CMD_CHK_POWER = 0xE5, /* check power mode */
130 ATA_CMD_STANDBY = 0xE2, /* place in standby power mode */ 131 ATA_CMD_STANDBY = 0xE2, /* place in standby power mode */
131 ATA_CMD_IDLE = 0xE3, /* place in idle power mode */ 132 ATA_CMD_IDLE = 0xE3, /* place in idle power mode */
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 620da7be07b7..a3df64677ac3 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -116,6 +116,7 @@ static inline struct device *pci_dev_to_dev(struct pci_dev *pdev)
116enum { 116enum {
117 /* various global constants */ 117 /* various global constants */
118 LIBATA_MAX_PRD = ATA_MAX_PRD / 2, 118 LIBATA_MAX_PRD = ATA_MAX_PRD / 2,
119 LIBATA_DUMB_MAX_PRD = ATA_MAX_PRD / 4, /* Worst case */
119 ATA_MAX_PORTS = 8, 120 ATA_MAX_PORTS = 8,
120 ATA_DEF_QUEUE = 1, 121 ATA_DEF_QUEUE = 1,
121 /* tag ATA_MAX_QUEUE - 1 is reserved for internal commands */ 122 /* tag ATA_MAX_QUEUE - 1 is reserved for internal commands */
@@ -136,6 +137,8 @@ enum {
136 ATA_DFLAG_CDB_INTR = (1 << 2), /* device asserts INTRQ when ready for CDB */ 137 ATA_DFLAG_CDB_INTR = (1 << 2), /* device asserts INTRQ when ready for CDB */
137 ATA_DFLAG_NCQ = (1 << 3), /* device supports NCQ */ 138 ATA_DFLAG_NCQ = (1 << 3), /* device supports NCQ */
138 ATA_DFLAG_FLUSH_EXT = (1 << 4), /* do FLUSH_EXT instead of FLUSH */ 139 ATA_DFLAG_FLUSH_EXT = (1 << 4), /* do FLUSH_EXT instead of FLUSH */
140 ATA_DFLAG_ACPI_PENDING = (1 << 5), /* ACPI resume action pending */
141 ATA_DFLAG_ACPI_FAILED = (1 << 6), /* ACPI on devcfg has failed */
139 ATA_DFLAG_CFG_MASK = (1 << 8) - 1, 142 ATA_DFLAG_CFG_MASK = (1 << 8) - 1,
140 143
141 ATA_DFLAG_PIO = (1 << 8), /* device limited to PIO mode */ 144 ATA_DFLAG_PIO = (1 << 8), /* device limited to PIO mode */
@@ -196,6 +199,7 @@ enum {
196 ATA_PFLAG_FLUSH_PORT_TASK = (1 << 16), /* flush port task */ 199 ATA_PFLAG_FLUSH_PORT_TASK = (1 << 16), /* flush port task */
197 ATA_PFLAG_SUSPENDED = (1 << 17), /* port is suspended (power) */ 200 ATA_PFLAG_SUSPENDED = (1 << 17), /* port is suspended (power) */
198 ATA_PFLAG_PM_PENDING = (1 << 18), /* PM operation pending */ 201 ATA_PFLAG_PM_PENDING = (1 << 18), /* PM operation pending */
202 ATA_PFLAG_GTM_VALID = (1 << 19), /* acpi_gtm data valid */
199 203
200 /* struct ata_queued_cmd flags */ 204 /* struct ata_queued_cmd flags */
201 ATA_QCFLAG_ACTIVE = (1 << 0), /* cmd not yet ack'd to scsi lyer */ 205 ATA_QCFLAG_ACTIVE = (1 << 0), /* cmd not yet ack'd to scsi lyer */
@@ -363,6 +367,9 @@ struct ata_host {
363 void *private_data; 367 void *private_data;
364 const struct ata_port_operations *ops; 368 const struct ata_port_operations *ops;
365 unsigned long flags; 369 unsigned long flags;
370#ifdef CONFIG_ATA_ACPI
371 acpi_handle acpi_handle;
372#endif
366 struct ata_port *simplex_claimed; /* channel owning the DMA */ 373 struct ata_port *simplex_claimed; /* channel owning the DMA */
367 struct ata_port *ports[0]; 374 struct ata_port *ports[0];
368}; 375};
@@ -429,6 +436,9 @@ struct ata_device {
429 unsigned int devno; /* 0 or 1 */ 436 unsigned int devno; /* 0 or 1 */
430 unsigned long flags; /* ATA_DFLAG_xxx */ 437 unsigned long flags; /* ATA_DFLAG_xxx */
431 struct scsi_device *sdev; /* attached SCSI device */ 438 struct scsi_device *sdev; /* attached SCSI device */
439#ifdef CONFIG_ATA_ACPI
440 acpi_handle acpi_handle;
441#endif
432 /* n_sector is used as CLEAR_OFFSET, read comment above CLEAR_OFFSET */ 442 /* n_sector is used as CLEAR_OFFSET, read comment above CLEAR_OFFSET */
433 u64 n_sectors; /* size of device, if ATA */ 443 u64 n_sectors; /* size of device, if ATA */
434 unsigned int class; /* ATA_DEV_xxx */ 444 unsigned int class; /* ATA_DEV_xxx */
@@ -457,10 +467,6 @@ struct ata_device {
457 struct ata_ering ering; 467 struct ata_ering ering;
458 int spdn_cnt; 468 int spdn_cnt;
459 unsigned int horkage; /* List of broken features */ 469 unsigned int horkage; /* List of broken features */
460#ifdef CONFIG_ATA_ACPI
461 /* ACPI objects info */
462 acpi_handle obj_handle;
463#endif
464}; 470};
465 471
466/* Offset into struct ata_device. Fields above it are maintained 472/* Offset into struct ata_device. Fields above it are maintained
@@ -489,6 +495,17 @@ struct ata_eh_context {
489 unsigned int did_probe_mask; 495 unsigned int did_probe_mask;
490}; 496};
491 497
498struct ata_acpi_drive
499{
500 u32 pio;
501 u32 dma;
502} __packed;
503
504struct ata_acpi_gtm {
505 struct ata_acpi_drive drive[2];
506 u32 flags;
507} __packed;
508
492struct ata_port { 509struct ata_port {
493 struct Scsi_Host *scsi_host; /* our co-allocated scsi host */ 510 struct Scsi_Host *scsi_host; /* our co-allocated scsi host */
494 const struct ata_port_operations *ops; 511 const struct ata_port_operations *ops;
@@ -549,6 +566,10 @@ struct ata_port {
549 566
550 void *private_data; 567 void *private_data;
551 568
569#ifdef CONFIG_ATA_ACPI
570 acpi_handle acpi_handle;
571 struct ata_acpi_gtm acpi_gtm;
572#endif
552 u8 sector_buf[ATA_SECT_SIZE]; /* owned by EH */ 573 u8 sector_buf[ATA_SECT_SIZE]; /* owned by EH */
553}; 574};
554 575
@@ -758,6 +779,7 @@ extern void ata_data_xfer(struct ata_device *adev, unsigned char *buf,
758 unsigned int buflen, int write_data); 779 unsigned int buflen, int write_data);
759extern void ata_data_xfer_noirq(struct ata_device *adev, unsigned char *buf, 780extern void ata_data_xfer_noirq(struct ata_device *adev, unsigned char *buf,
760 unsigned int buflen, int write_data); 781 unsigned int buflen, int write_data);
782extern void ata_dumb_qc_prep(struct ata_queued_cmd *qc);
761extern void ata_qc_prep(struct ata_queued_cmd *qc); 783extern void ata_qc_prep(struct ata_queued_cmd *qc);
762extern void ata_noop_qc_prep(struct ata_queued_cmd *qc); 784extern void ata_noop_qc_prep(struct ata_queued_cmd *qc);
763extern unsigned int ata_qc_issue_prot(struct ata_queued_cmd *qc); 785extern unsigned int ata_qc_issue_prot(struct ata_queued_cmd *qc);
diff --git a/include/linux/pata_platform.h b/include/linux/pata_platform.h
index 2d5fd647e0e9..5799e8d50623 100644
--- a/include/linux/pata_platform.h
+++ b/include/linux/pata_platform.h
@@ -8,6 +8,11 @@ struct pata_platform_info {
8 * spacing used by ata_std_ports(). 8 * spacing used by ata_std_ports().
9 */ 9 */
10 unsigned int ioport_shift; 10 unsigned int ioport_shift;
11 /*
12 * Indicate platform specific irq types and initial
13 * IRQ flags when call request_irq()
14 */
15 unsigned int irq_flags;
11}; 16};
12 17
13#endif /* __LINUX_PATA_PLATFORM_H */ 18#endif /* __LINUX_PATA_PLATFORM_H */