diff options
Diffstat (limited to 'include/linux/libata.h')
-rw-r--r-- | include/linux/libata.h | 38 |
1 files changed, 25 insertions, 13 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h index b6b8a7f3ec66..dc18b87ed722 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 */ |
@@ -273,7 +275,7 @@ enum { | |||
273 | * advised to wait only for the following duration before | 275 | * advised to wait only for the following duration before |
274 | * doing SRST. | 276 | * doing SRST. |
275 | */ | 277 | */ |
276 | ATA_TMOUT_PMP_SRST_WAIT = 1000, | 278 | ATA_TMOUT_PMP_SRST_WAIT = 5000, |
277 | 279 | ||
278 | /* ATA bus states */ | 280 | /* ATA bus states */ |
279 | BUS_UNKNOWN = 0, | 281 | BUS_UNKNOWN = 0, |
@@ -378,6 +380,7 @@ enum { | |||
378 | 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 |
379 | not multiple of 16 bytes */ | 381 | not multiple of 16 bytes */ |
380 | 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 */ | ||
381 | 384 | ||
382 | /* DMA mask for user DMA control: User visible values; DO NOT | 385 | /* DMA mask for user DMA control: User visible values; DO NOT |
383 | renumber */ | 386 | renumber */ |
@@ -401,12 +404,14 @@ enum { | |||
401 | ATA_TIMING_CYC8B, | 404 | ATA_TIMING_CYC8B, |
402 | ATA_TIMING_ACTIVE = (1 << 4), | 405 | ATA_TIMING_ACTIVE = (1 << 4), |
403 | ATA_TIMING_RECOVER = (1 << 5), | 406 | ATA_TIMING_RECOVER = (1 << 5), |
404 | ATA_TIMING_CYCLE = (1 << 6), | 407 | ATA_TIMING_DMACK_HOLD = (1 << 6), |
405 | ATA_TIMING_UDMA = (1 << 7), | 408 | ATA_TIMING_CYCLE = (1 << 7), |
409 | ATA_TIMING_UDMA = (1 << 8), | ||
406 | ATA_TIMING_ALL = ATA_TIMING_SETUP | ATA_TIMING_ACT8B | | 410 | ATA_TIMING_ALL = ATA_TIMING_SETUP | ATA_TIMING_ACT8B | |
407 | ATA_TIMING_REC8B | ATA_TIMING_CYC8B | | 411 | ATA_TIMING_REC8B | ATA_TIMING_CYC8B | |
408 | ATA_TIMING_ACTIVE | ATA_TIMING_RECOVER | | 412 | ATA_TIMING_ACTIVE | ATA_TIMING_RECOVER | |
409 | ATA_TIMING_CYCLE | ATA_TIMING_UDMA, | 413 | ATA_TIMING_DMACK_HOLD | ATA_TIMING_CYCLE | |
414 | ATA_TIMING_UDMA, | ||
410 | }; | 415 | }; |
411 | 416 | ||
412 | enum ata_xfer_mask { | 417 | enum ata_xfer_mask { |
@@ -525,6 +530,7 @@ struct ata_queued_cmd { | |||
525 | unsigned long flags; /* ATA_QCFLAG_xxx */ | 530 | unsigned long flags; /* ATA_QCFLAG_xxx */ |
526 | unsigned int tag; | 531 | unsigned int tag; |
527 | unsigned int n_elem; | 532 | unsigned int n_elem; |
533 | unsigned int orig_n_elem; | ||
528 | 534 | ||
529 | int dma_dir; | 535 | int dma_dir; |
530 | 536 | ||
@@ -576,7 +582,7 @@ struct ata_device { | |||
576 | acpi_handle acpi_handle; | 582 | acpi_handle acpi_handle; |
577 | union acpi_object *gtf_cache; | 583 | union acpi_object *gtf_cache; |
578 | #endif | 584 | #endif |
579 | /* n_sector is used as CLEAR_OFFSET, read comment above CLEAR_OFFSET */ | 585 | /* n_sector is CLEAR_BEGIN, read comment above CLEAR_BEGIN */ |
580 | u64 n_sectors; /* size of device, if ATA */ | 586 | u64 n_sectors; /* size of device, if ATA */ |
581 | unsigned int class; /* ATA_DEV_xxx */ | 587 | unsigned int class; /* ATA_DEV_xxx */ |
582 | unsigned long unpark_deadline; | 588 | unsigned long unpark_deadline; |
@@ -601,20 +607,22 @@ struct ata_device { | |||
601 | u16 heads; /* Number of heads */ | 607 | u16 heads; /* Number of heads */ |
602 | u16 sectors; /* Number of sectors per track */ | 608 | u16 sectors; /* Number of sectors per track */ |
603 | 609 | ||
604 | /* error history */ | ||
605 | int spdn_cnt; | ||
606 | struct ata_ering ering; | ||
607 | |||
608 | union { | 610 | union { |
609 | u16 id[ATA_ID_WORDS]; /* IDENTIFY xxx DEVICE data */ | 611 | u16 id[ATA_ID_WORDS]; /* IDENTIFY xxx DEVICE data */ |
610 | u32 gscr[SATA_PMP_GSCR_DWORDS]; /* PMP GSCR block */ | 612 | u32 gscr[SATA_PMP_GSCR_DWORDS]; /* PMP GSCR block */ |
611 | }; | 613 | }; |
614 | |||
615 | /* error history */ | ||
616 | int spdn_cnt; | ||
617 | /* ering is CLEAR_END, read comment above CLEAR_END */ | ||
618 | struct ata_ering ering; | ||
612 | }; | 619 | }; |
613 | 620 | ||
614 | /* Offset into struct ata_device. Fields above it are maintained | 621 | /* Fields between ATA_DEVICE_CLEAR_BEGIN and ATA_DEVICE_CLEAR_END are |
615 | * acress device init. Fields below are zeroed. | 622 | * cleared to zero on ata_dev_init(). |
616 | */ | 623 | */ |
617 | #define ATA_DEVICE_CLEAR_OFFSET offsetof(struct ata_device, n_sectors) | 624 | #define ATA_DEVICE_CLEAR_BEGIN offsetof(struct ata_device, n_sectors) |
625 | #define ATA_DEVICE_CLEAR_END offsetof(struct ata_device, ering) | ||
618 | 626 | ||
619 | struct ata_eh_info { | 627 | struct ata_eh_info { |
620 | struct ata_device *dev; /* offending device */ | 628 | struct ata_device *dev; /* offending device */ |
@@ -743,7 +751,8 @@ struct ata_port { | |||
743 | acpi_handle acpi_handle; | 751 | acpi_handle acpi_handle; |
744 | struct ata_acpi_gtm __acpi_init_gtm; /* use ata_acpi_init_gtm() */ | 752 | struct ata_acpi_gtm __acpi_init_gtm; /* use ata_acpi_init_gtm() */ |
745 | #endif | 753 | #endif |
746 | u8 sector_buf[ATA_SECT_SIZE]; /* owned by EH */ | 754 | /* owned by EH */ |
755 | u8 sector_buf[ATA_SECT_SIZE] ____cacheline_aligned; | ||
747 | }; | 756 | }; |
748 | 757 | ||
749 | /* The following initializer overrides a method to NULL whether one of | 758 | /* The following initializer overrides a method to NULL whether one of |
@@ -866,6 +875,7 @@ struct ata_timing { | |||
866 | unsigned short cyc8b; /* t0 for 8-bit I/O */ | 875 | unsigned short cyc8b; /* t0 for 8-bit I/O */ |
867 | unsigned short active; /* t2 or tD */ | 876 | unsigned short active; /* t2 or tD */ |
868 | unsigned short recover; /* t2i or tK */ | 877 | unsigned short recover; /* t2i or tK */ |
878 | unsigned short dmack_hold; /* tj */ | ||
869 | unsigned short cycle; /* t0 */ | 879 | unsigned short cycle; /* t0 */ |
870 | unsigned short udma; /* t2CYCTYP/2 */ | 880 | unsigned short udma; /* t2CYCTYP/2 */ |
871 | }; | 881 | }; |
@@ -927,6 +937,8 @@ extern void ata_host_init(struct ata_host *, struct device *, | |||
927 | extern int ata_scsi_detect(struct scsi_host_template *sht); | 937 | extern int ata_scsi_detect(struct scsi_host_template *sht); |
928 | extern int ata_scsi_ioctl(struct scsi_device *dev, int cmd, void __user *arg); | 938 | extern int ata_scsi_ioctl(struct scsi_device *dev, int cmd, void __user *arg); |
929 | extern int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)); | 939 | extern int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)); |
940 | extern int ata_sas_scsi_ioctl(struct ata_port *ap, struct scsi_device *dev, | ||
941 | int cmd, void __user *arg); | ||
930 | extern void ata_sas_port_destroy(struct ata_port *); | 942 | extern void ata_sas_port_destroy(struct ata_port *); |
931 | extern struct ata_port *ata_sas_port_alloc(struct ata_host *, | 943 | extern struct ata_port *ata_sas_port_alloc(struct ata_host *, |
932 | struct ata_port_info *, struct Scsi_Host *); | 944 | struct ata_port_info *, struct Scsi_Host *); |