diff options
Diffstat (limited to 'include/linux/libata.h')
-rw-r--r-- | include/linux/libata.h | 36 |
1 files changed, 25 insertions, 11 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h index 3449de597eff..5d87bc09a1f5 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -187,6 +187,8 @@ enum { | |||
187 | ATA_FLAG_PIO_POLLING = (1 << 9), /* use polling PIO if LLD | 187 | ATA_FLAG_PIO_POLLING = (1 << 9), /* use polling PIO if LLD |
188 | * doesn't handle PIO interrupts */ | 188 | * doesn't handle PIO interrupts */ |
189 | ATA_FLAG_NCQ = (1 << 10), /* host supports NCQ */ | 189 | ATA_FLAG_NCQ = (1 << 10), /* host supports NCQ */ |
190 | ATA_FLAG_NO_POWEROFF_SPINDOWN = (1 << 11), /* don't spindown before poweroff */ | ||
191 | ATA_FLAG_NO_HIBERNATE_SPINDOWN = (1 << 12), /* don't spindown before hibernation */ | ||
190 | ATA_FLAG_DEBUGMSG = (1 << 13), | 192 | ATA_FLAG_DEBUGMSG = (1 << 13), |
191 | ATA_FLAG_IGN_SIMPLEX = (1 << 15), /* ignore SIMPLEX */ | 193 | ATA_FLAG_IGN_SIMPLEX = (1 << 15), /* ignore SIMPLEX */ |
192 | ATA_FLAG_NO_IORDY = (1 << 16), /* controller lacks iordy */ | 194 | ATA_FLAG_NO_IORDY = (1 << 16), /* controller lacks iordy */ |
@@ -239,6 +241,7 @@ enum { | |||
239 | /* host set flags */ | 241 | /* host set flags */ |
240 | ATA_HOST_SIMPLEX = (1 << 0), /* Host is simplex, one DMA channel per host only */ | 242 | ATA_HOST_SIMPLEX = (1 << 0), /* Host is simplex, one DMA channel per host only */ |
241 | ATA_HOST_STARTED = (1 << 1), /* Host started */ | 243 | ATA_HOST_STARTED = (1 << 1), /* Host started */ |
244 | ATA_HOST_PARALLEL_SCAN = (1 << 2), /* Ports on this host can be scanned in parallel */ | ||
242 | 245 | ||
243 | /* bits 24:31 of host->flags are reserved for LLD specific flags */ | 246 | /* bits 24:31 of host->flags are reserved for LLD specific flags */ |
244 | 247 | ||
@@ -377,6 +380,7 @@ enum { | |||
377 | ATA_HORKAGE_ATAPI_MOD16_DMA = (1 << 11), /* use ATAPI DMA for commands | 380 | ATA_HORKAGE_ATAPI_MOD16_DMA = (1 << 11), /* use ATAPI DMA for commands |
378 | not multiple of 16 bytes */ | 381 | not multiple of 16 bytes */ |
379 | ATA_HORKAGE_FIRMWARE_WARN = (1 << 12), /* firwmare update warning */ | 382 | ATA_HORKAGE_FIRMWARE_WARN = (1 << 12), /* firwmare update warning */ |
383 | ATA_HORKAGE_1_5_GBPS = (1 << 13), /* force 1.5 Gbps */ | ||
380 | 384 | ||
381 | /* DMA mask for user DMA control: User visible values; DO NOT | 385 | /* DMA mask for user DMA control: User visible values; DO NOT |
382 | renumber */ | 386 | renumber */ |
@@ -400,12 +404,14 @@ enum { | |||
400 | ATA_TIMING_CYC8B, | 404 | ATA_TIMING_CYC8B, |
401 | ATA_TIMING_ACTIVE = (1 << 4), | 405 | ATA_TIMING_ACTIVE = (1 << 4), |
402 | ATA_TIMING_RECOVER = (1 << 5), | 406 | ATA_TIMING_RECOVER = (1 << 5), |
403 | ATA_TIMING_CYCLE = (1 << 6), | 407 | ATA_TIMING_DMACK_HOLD = (1 << 6), |
404 | ATA_TIMING_UDMA = (1 << 7), | 408 | ATA_TIMING_CYCLE = (1 << 7), |
409 | ATA_TIMING_UDMA = (1 << 8), | ||
405 | ATA_TIMING_ALL = ATA_TIMING_SETUP | ATA_TIMING_ACT8B | | 410 | ATA_TIMING_ALL = ATA_TIMING_SETUP | ATA_TIMING_ACT8B | |
406 | ATA_TIMING_REC8B | ATA_TIMING_CYC8B | | 411 | ATA_TIMING_REC8B | ATA_TIMING_CYC8B | |
407 | ATA_TIMING_ACTIVE | ATA_TIMING_RECOVER | | 412 | ATA_TIMING_ACTIVE | ATA_TIMING_RECOVER | |
408 | ATA_TIMING_CYCLE | ATA_TIMING_UDMA, | 413 | ATA_TIMING_DMACK_HOLD | ATA_TIMING_CYCLE | |
414 | ATA_TIMING_UDMA, | ||
409 | }; | 415 | }; |
410 | 416 | ||
411 | enum ata_xfer_mask { | 417 | enum ata_xfer_mask { |
@@ -575,7 +581,7 @@ struct ata_device { | |||
575 | acpi_handle acpi_handle; | 581 | acpi_handle acpi_handle; |
576 | union acpi_object *gtf_cache; | 582 | union acpi_object *gtf_cache; |
577 | #endif | 583 | #endif |
578 | /* n_sector is used as CLEAR_OFFSET, read comment above CLEAR_OFFSET */ | 584 | /* n_sector is CLEAR_BEGIN, read comment above CLEAR_BEGIN */ |
579 | u64 n_sectors; /* size of device, if ATA */ | 585 | u64 n_sectors; /* size of device, if ATA */ |
580 | unsigned int class; /* ATA_DEV_xxx */ | 586 | unsigned int class; /* ATA_DEV_xxx */ |
581 | unsigned long unpark_deadline; | 587 | unsigned long unpark_deadline; |
@@ -600,20 +606,22 @@ struct ata_device { | |||
600 | u16 heads; /* Number of heads */ | 606 | u16 heads; /* Number of heads */ |
601 | u16 sectors; /* Number of sectors per track */ | 607 | u16 sectors; /* Number of sectors per track */ |
602 | 608 | ||
603 | /* error history */ | ||
604 | int spdn_cnt; | ||
605 | struct ata_ering ering; | ||
606 | |||
607 | union { | 609 | union { |
608 | u16 id[ATA_ID_WORDS]; /* IDENTIFY xxx DEVICE data */ | 610 | u16 id[ATA_ID_WORDS]; /* IDENTIFY xxx DEVICE data */ |
609 | u32 gscr[SATA_PMP_GSCR_DWORDS]; /* PMP GSCR block */ | 611 | u32 gscr[SATA_PMP_GSCR_DWORDS]; /* PMP GSCR block */ |
610 | }; | 612 | }; |
613 | |||
614 | /* error history */ | ||
615 | int spdn_cnt; | ||
616 | /* ering is CLEAR_END, read comment above CLEAR_END */ | ||
617 | struct ata_ering ering; | ||
611 | }; | 618 | }; |
612 | 619 | ||
613 | /* Offset into struct ata_device. Fields above it are maintained | 620 | /* Fields between ATA_DEVICE_CLEAR_BEGIN and ATA_DEVICE_CLEAR_END are |
614 | * acress device init. Fields below are zeroed. | 621 | * cleared to zero on ata_dev_init(). |
615 | */ | 622 | */ |
616 | #define ATA_DEVICE_CLEAR_OFFSET offsetof(struct ata_device, n_sectors) | 623 | #define ATA_DEVICE_CLEAR_BEGIN offsetof(struct ata_device, n_sectors) |
624 | #define ATA_DEVICE_CLEAR_END offsetof(struct ata_device, ering) | ||
617 | 625 | ||
618 | struct ata_eh_info { | 626 | struct ata_eh_info { |
619 | struct ata_device *dev; /* offending device */ | 627 | struct ata_device *dev; /* offending device */ |
@@ -865,6 +873,7 @@ struct ata_timing { | |||
865 | unsigned short cyc8b; /* t0 for 8-bit I/O */ | 873 | unsigned short cyc8b; /* t0 for 8-bit I/O */ |
866 | unsigned short active; /* t2 or tD */ | 874 | unsigned short active; /* t2 or tD */ |
867 | unsigned short recover; /* t2i or tK */ | 875 | unsigned short recover; /* t2i or tK */ |
876 | unsigned short dmack_hold; /* tj */ | ||
868 | unsigned short cycle; /* t0 */ | 877 | unsigned short cycle; /* t0 */ |
869 | unsigned short udma; /* t2CYCTYP/2 */ | 878 | unsigned short udma; /* t2CYCTYP/2 */ |
870 | }; | 879 | }; |
@@ -926,6 +935,8 @@ extern void ata_host_init(struct ata_host *, struct device *, | |||
926 | extern int ata_scsi_detect(struct scsi_host_template *sht); | 935 | extern int ata_scsi_detect(struct scsi_host_template *sht); |
927 | extern int ata_scsi_ioctl(struct scsi_device *dev, int cmd, void __user *arg); | 936 | extern int ata_scsi_ioctl(struct scsi_device *dev, int cmd, void __user *arg); |
928 | extern int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)); | 937 | extern int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)); |
938 | extern int ata_sas_scsi_ioctl(struct ata_port *ap, struct scsi_device *dev, | ||
939 | int cmd, void __user *arg); | ||
929 | extern void ata_sas_port_destroy(struct ata_port *); | 940 | extern void ata_sas_port_destroy(struct ata_port *); |
930 | extern struct ata_port *ata_sas_port_alloc(struct ata_host *, | 941 | extern struct ata_port *ata_sas_port_alloc(struct ata_host *, |
931 | struct ata_port_info *, struct Scsi_Host *); | 942 | struct ata_port_info *, struct Scsi_Host *); |
@@ -1518,6 +1529,7 @@ extern void sata_pmp_error_handler(struct ata_port *ap); | |||
1518 | 1529 | ||
1519 | extern const struct ata_port_operations ata_sff_port_ops; | 1530 | extern const struct ata_port_operations ata_sff_port_ops; |
1520 | extern const struct ata_port_operations ata_bmdma_port_ops; | 1531 | extern const struct ata_port_operations ata_bmdma_port_ops; |
1532 | extern const struct ata_port_operations ata_bmdma32_port_ops; | ||
1521 | 1533 | ||
1522 | /* PIO only, sg_tablesize and dma_boundary limits can be removed */ | 1534 | /* PIO only, sg_tablesize and dma_boundary limits can be removed */ |
1523 | #define ATA_PIO_SHT(drv_name) \ | 1535 | #define ATA_PIO_SHT(drv_name) \ |
@@ -1545,6 +1557,8 @@ extern void ata_sff_exec_command(struct ata_port *ap, | |||
1545 | const struct ata_taskfile *tf); | 1557 | const struct ata_taskfile *tf); |
1546 | extern unsigned int ata_sff_data_xfer(struct ata_device *dev, | 1558 | extern unsigned int ata_sff_data_xfer(struct ata_device *dev, |
1547 | unsigned char *buf, unsigned int buflen, int rw); | 1559 | unsigned char *buf, unsigned int buflen, int rw); |
1560 | extern unsigned int ata_sff_data_xfer32(struct ata_device *dev, | ||
1561 | unsigned char *buf, unsigned int buflen, int rw); | ||
1548 | extern unsigned int ata_sff_data_xfer_noirq(struct ata_device *dev, | 1562 | extern unsigned int ata_sff_data_xfer_noirq(struct ata_device *dev, |
1549 | unsigned char *buf, unsigned int buflen, int rw); | 1563 | unsigned char *buf, unsigned int buflen, int rw); |
1550 | extern u8 ata_sff_irq_on(struct ata_port *ap); | 1564 | extern u8 ata_sff_irq_on(struct ata_port *ap); |