As with ops->tf_read, ops->check_status() and ops->check_altstatus() don't make sense for controllers without single TF image. As ->check_status() and ->check_altstatus() are deeply integrated into libata core layer, implement ata_noop_check_status() as a temporary measure. This function always returns ATA_DRDY without doing anything. In the long term, these IO ops should be made optional and removed from top level ata_port_operations such that driver implementing high-level behavior don't have to bother with these. --- drivers/scsi/libata-core.c | 19 +++++++++++++++++++ include/linux/libata.h | 1 + 2 files changed, 20 insertions(+), 0 deletions(-) f404e622e1961647f77ef0d4bf7869e1e1dec70c diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c index 6d86479..2500854 100644 --- a/drivers/scsi/libata-core.c +++ b/drivers/scsi/libata-core.c @@ -702,6 +702,24 @@ static u64 ata_id_n_sectors(const u16 *i } /** + * ata_noop_check_status - Fake device status reg + * @ap: target port + * + * This function performs no actual function and always returns + * ATA_DRDY. + * + * May be used as the check_status/altstatus() entry in + * ata_port_operations. + * + * LOCKING: + * caller. + */ +u8 ata_noop_check_status(struct ata_port *ap) +{ + return ATA_DRDY; +} + +/** * ata_noop_dev_select - Select device 0/1 on ATA bus * @ap: ATA channel to manipulate * @device: ATA device (numbered from zero) to select @@ -5768,6 +5786,7 @@ EXPORT_SYMBOL_GPL(ata_qc_issue_prot); EXPORT_SYMBOL_GPL(ata_tf_load); EXPORT_SYMBOL_GPL(ata_tf_read); EXPORT_SYMBOL_GPL(ata_noop_dev_select); +EXPORT_SYMBOL_GPL(ata_noop_check_status); EXPORT_SYMBOL_GPL(ata_std_dev_select); EXPORT_SYMBOL_GPL(ata_tf_to_fis); EXPORT_SYMBOL_GPL(ata_tf_from_fis); diff --git a/include/linux/libata.h b/include/linux/libata.h index 5c843a8..ac8e58c 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h @@ -666,6 +666,7 @@ extern void ata_tf_load(struct ata_port extern void ata_tf_read(struct ata_port *ap, struct ata_taskfile *tf); extern void ata_tf_to_fis(const struct ata_taskfile *tf, u8 *fis, u8 pmp); extern void ata_tf_from_fis(const u8 *fis, struct ata_taskfile *tf); +extern u8 ata_noop_check_status(struct ata_port *ap); extern void ata_noop_dev_select (struct ata_port *ap, unsigned int device); extern void ata_std_dev_select (struct ata_port *ap, unsigned int device); extern u8 ata_check_status(struct ata_port *ap); -- 1.2.4 - : send the line "unsubscribe linux-ide" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html