diff options
Diffstat (limited to 'include/linux/libata.h')
-rw-r--r-- | include/linux/libata.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h index d1dfe872ee30..0f17643e0a6e 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -1039,6 +1039,7 @@ extern void ata_eh_thaw_port(struct ata_port *ap); | |||
1039 | 1039 | ||
1040 | extern void ata_eh_qc_complete(struct ata_queued_cmd *qc); | 1040 | extern void ata_eh_qc_complete(struct ata_queued_cmd *qc); |
1041 | extern void ata_eh_qc_retry(struct ata_queued_cmd *qc); | 1041 | extern void ata_eh_qc_retry(struct ata_queued_cmd *qc); |
1042 | extern void ata_eh_analyze_ncq_error(struct ata_link *link); | ||
1042 | 1043 | ||
1043 | extern void ata_do_eh(struct ata_port *ap, ata_prereset_fn_t prereset, | 1044 | extern void ata_do_eh(struct ata_port *ap, ata_prereset_fn_t prereset, |
1044 | ata_reset_fn_t softreset, ata_reset_fn_t hardreset, | 1045 | ata_reset_fn_t softreset, ata_reset_fn_t hardreset, |
@@ -1381,6 +1382,18 @@ static inline struct ata_port *ata_shost_to_port(struct Scsi_Host *host) | |||
1381 | return *(struct ata_port **)&host->hostdata[0]; | 1382 | return *(struct ata_port **)&host->hostdata[0]; |
1382 | } | 1383 | } |
1383 | 1384 | ||
1385 | static inline int ata_check_ready(u8 status) | ||
1386 | { | ||
1387 | if (!(status & ATA_BUSY)) | ||
1388 | return 1; | ||
1389 | |||
1390 | /* 0xff indicates either no device or device not ready */ | ||
1391 | if (status == 0xff) | ||
1392 | return -ENODEV; | ||
1393 | |||
1394 | return 0; | ||
1395 | } | ||
1396 | |||
1384 | 1397 | ||
1385 | /************************************************************************** | 1398 | /************************************************************************** |
1386 | * PMP - drivers/ata/libata-pmp.c | 1399 | * PMP - drivers/ata/libata-pmp.c |