diff options
Diffstat (limited to 'include/linux/libata.h')
-rw-r--r-- | include/linux/libata.h | 25 |
1 files changed, 4 insertions, 21 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h index 0f17643e0a6e..e57e5d08312d 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -111,13 +111,10 @@ enum { | |||
111 | /* various global constants */ | 111 | /* various global constants */ |
112 | LIBATA_MAX_PRD = ATA_MAX_PRD / 2, | 112 | LIBATA_MAX_PRD = ATA_MAX_PRD / 2, |
113 | LIBATA_DUMB_MAX_PRD = ATA_MAX_PRD / 4, /* Worst case */ | 113 | LIBATA_DUMB_MAX_PRD = ATA_MAX_PRD / 4, /* Worst case */ |
114 | ATA_MAX_PORTS = 8, | ||
115 | ATA_DEF_QUEUE = 1, | 114 | ATA_DEF_QUEUE = 1, |
116 | /* tag ATA_MAX_QUEUE - 1 is reserved for internal commands */ | 115 | /* tag ATA_MAX_QUEUE - 1 is reserved for internal commands */ |
117 | ATA_MAX_QUEUE = 32, | 116 | ATA_MAX_QUEUE = 32, |
118 | ATA_TAG_INTERNAL = ATA_MAX_QUEUE - 1, | 117 | ATA_TAG_INTERNAL = ATA_MAX_QUEUE - 1, |
119 | ATA_MAX_BUS = 2, | ||
120 | ATA_DEF_BUSY_WAIT = 10000, | ||
121 | ATA_SHORT_PAUSE = (HZ >> 6) + 1, | 118 | ATA_SHORT_PAUSE = (HZ >> 6) + 1, |
122 | 119 | ||
123 | ATAPI_MAX_DRAIN = 16 << 10, | 120 | ATAPI_MAX_DRAIN = 16 << 10, |
@@ -341,7 +338,7 @@ enum { | |||
341 | ATA_EH_PMP_TRIES = 5, | 338 | ATA_EH_PMP_TRIES = 5, |
342 | ATA_EH_PMP_LINK_TRIES = 3, | 339 | ATA_EH_PMP_LINK_TRIES = 3, |
343 | 340 | ||
344 | SATA_PMP_SCR_TIMEOUT = 250, | 341 | SATA_PMP_RW_TIMEOUT = 3000, /* PMP read/write timeout */ |
345 | 342 | ||
346 | /* Horkage types. May be set by libata or controller on drives | 343 | /* Horkage types. May be set by libata or controller on drives |
347 | (some horkage may be drive/controller pair dependant */ | 344 | (some horkage may be drive/controller pair dependant */ |
@@ -351,7 +348,7 @@ enum { | |||
351 | ATA_HORKAGE_NONCQ = (1 << 2), /* Don't use NCQ */ | 348 | ATA_HORKAGE_NONCQ = (1 << 2), /* Don't use NCQ */ |
352 | ATA_HORKAGE_MAX_SEC_128 = (1 << 3), /* Limit max sects to 128 */ | 349 | ATA_HORKAGE_MAX_SEC_128 = (1 << 3), /* Limit max sects to 128 */ |
353 | ATA_HORKAGE_BROKEN_HPA = (1 << 4), /* Broken HPA */ | 350 | ATA_HORKAGE_BROKEN_HPA = (1 << 4), /* Broken HPA */ |
354 | ATA_HORKAGE_SKIP_PM = (1 << 5), /* Skip PM operations */ | 351 | ATA_HORKAGE_DISABLE = (1 << 5), /* Disable it */ |
355 | ATA_HORKAGE_HPA_SIZE = (1 << 6), /* native size off by one */ | 352 | ATA_HORKAGE_HPA_SIZE = (1 << 6), /* native size off by one */ |
356 | ATA_HORKAGE_IPM = (1 << 7), /* Link PM problems */ | 353 | ATA_HORKAGE_IPM = (1 << 7), /* Link PM problems */ |
357 | ATA_HORKAGE_IVB = (1 << 8), /* cbl det validity bit bugs */ | 354 | ATA_HORKAGE_IVB = (1 << 8), /* cbl det validity bit bugs */ |
@@ -821,8 +818,6 @@ struct ata_timing { | |||
821 | unsigned short udma; /* t2CYCTYP/2 */ | 818 | unsigned short udma; /* t2CYCTYP/2 */ |
822 | }; | 819 | }; |
823 | 820 | ||
824 | #define FIT(v, vmin, vmax) max_t(short, min_t(short, v, vmax), vmin) | ||
825 | |||
826 | /* | 821 | /* |
827 | * Core layer - drivers/ata/libata-core.c | 822 | * Core layer - drivers/ata/libata-core.c |
828 | */ | 823 | */ |
@@ -1437,7 +1432,8 @@ extern void ata_sff_qc_prep(struct ata_queued_cmd *qc); | |||
1437 | extern void ata_sff_dumb_qc_prep(struct ata_queued_cmd *qc); | 1432 | extern void ata_sff_dumb_qc_prep(struct ata_queued_cmd *qc); |
1438 | extern void ata_sff_dev_select(struct ata_port *ap, unsigned int device); | 1433 | extern void ata_sff_dev_select(struct ata_port *ap, unsigned int device); |
1439 | extern u8 ata_sff_check_status(struct ata_port *ap); | 1434 | extern u8 ata_sff_check_status(struct ata_port *ap); |
1440 | extern u8 ata_sff_altstatus(struct ata_port *ap); | 1435 | extern void ata_sff_pause(struct ata_port *ap); |
1436 | extern void ata_sff_dma_pause(struct ata_port *ap); | ||
1441 | extern int ata_sff_busy_sleep(struct ata_port *ap, | 1437 | extern int ata_sff_busy_sleep(struct ata_port *ap, |
1442 | unsigned long timeout_pat, unsigned long timeout); | 1438 | unsigned long timeout_pat, unsigned long timeout); |
1443 | extern int ata_sff_wait_ready(struct ata_link *link, unsigned long deadline); | 1439 | extern int ata_sff_wait_ready(struct ata_link *link, unsigned long deadline); |
@@ -1498,19 +1494,6 @@ extern int ata_pci_sff_init_one(struct pci_dev *pdev, | |||
1498 | #endif /* CONFIG_PCI */ | 1494 | #endif /* CONFIG_PCI */ |
1499 | 1495 | ||
1500 | /** | 1496 | /** |
1501 | * ata_sff_pause - Flush writes and pause 400 nanoseconds. | ||
1502 | * @ap: Port to wait for. | ||
1503 | * | ||
1504 | * LOCKING: | ||
1505 | * Inherited from caller. | ||
1506 | */ | ||
1507 | static inline void ata_sff_pause(struct ata_port *ap) | ||
1508 | { | ||
1509 | ata_sff_altstatus(ap); | ||
1510 | ndelay(400); | ||
1511 | } | ||
1512 | |||
1513 | /** | ||
1514 | * ata_sff_busy_wait - Wait for a port status register | 1497 | * ata_sff_busy_wait - Wait for a port status register |
1515 | * @ap: Port to wait for. | 1498 | * @ap: Port to wait for. |
1516 | * @bits: bits that must be clear | 1499 | * @bits: bits that must be clear |