aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/scsi/libata-core.c23
-rw-r--r--drivers/scsi/libata.h1
-rw-r--r--include/linux/libata.h20
3 files changed, 21 insertions, 23 deletions
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c
index 38e72c1dd689..fffbaa9dae76 100644
--- a/drivers/scsi/libata-core.c
+++ b/drivers/scsi/libata-core.c
@@ -3621,7 +3621,7 @@ void ata_qc_free(struct ata_queued_cmd *qc)
3621 } 3621 }
3622} 3622}
3623 3623
3624inline void __ata_qc_complete(struct ata_queued_cmd *qc) 3624void __ata_qc_complete(struct ata_queued_cmd *qc)
3625{ 3625{
3626 assert(qc != NULL); /* ata_qc_from_tag _might_ return NULL */ 3626 assert(qc != NULL); /* ata_qc_from_tag _might_ return NULL */
3627 assert(qc->flags & ATA_QCFLAG_ACTIVE); 3627 assert(qc->flags & ATA_QCFLAG_ACTIVE);
@@ -3639,25 +3639,6 @@ inline void __ata_qc_complete(struct ata_queued_cmd *qc)
3639 qc->complete_fn(qc); 3639 qc->complete_fn(qc);
3640} 3640}
3641 3641
3642/**
3643 * ata_qc_complete - Complete an active ATA command
3644 * @qc: Command to complete
3645 * @err_mask: ATA Status register contents
3646 *
3647 * Indicate to the mid and upper layers that an ATA
3648 * command has completed, with either an ok or not-ok status.
3649 *
3650 * LOCKING:
3651 * spin_lock_irqsave(host_set lock)
3652 */
3653void ata_qc_complete(struct ata_queued_cmd *qc)
3654{
3655 if (unlikely(qc->flags & ATA_QCFLAG_EH_SCHEDULED))
3656 return;
3657
3658 __ata_qc_complete(qc);
3659}
3660
3661static inline int ata_should_dma_map(struct ata_queued_cmd *qc) 3642static inline int ata_should_dma_map(struct ata_queued_cmd *qc)
3662{ 3643{
3663 struct ata_port *ap = qc->ap; 3644 struct ata_port *ap = qc->ap;
@@ -4877,7 +4858,7 @@ EXPORT_SYMBOL_GPL(ata_device_add);
4877EXPORT_SYMBOL_GPL(ata_host_set_remove); 4858EXPORT_SYMBOL_GPL(ata_host_set_remove);
4878EXPORT_SYMBOL_GPL(ata_sg_init); 4859EXPORT_SYMBOL_GPL(ata_sg_init);
4879EXPORT_SYMBOL_GPL(ata_sg_init_one); 4860EXPORT_SYMBOL_GPL(ata_sg_init_one);
4880EXPORT_SYMBOL_GPL(ata_qc_complete); 4861EXPORT_SYMBOL_GPL(__ata_qc_complete);
4881EXPORT_SYMBOL_GPL(ata_qc_issue_prot); 4862EXPORT_SYMBOL_GPL(ata_qc_issue_prot);
4882EXPORT_SYMBOL_GPL(ata_eng_timeout); 4863EXPORT_SYMBOL_GPL(ata_eng_timeout);
4883EXPORT_SYMBOL_GPL(ata_tf_load); 4864EXPORT_SYMBOL_GPL(ata_tf_load);
diff --git a/drivers/scsi/libata.h b/drivers/scsi/libata.h
index 1cd071a32e93..9d76923a2253 100644
--- a/drivers/scsi/libata.h
+++ b/drivers/scsi/libata.h
@@ -46,7 +46,6 @@ extern struct ata_queued_cmd *ata_qc_new_init(struct ata_port *ap,
46extern int ata_rwcmd_protocol(struct ata_queued_cmd *qc); 46extern int ata_rwcmd_protocol(struct ata_queued_cmd *qc);
47extern void ata_qc_free(struct ata_queued_cmd *qc); 47extern void ata_qc_free(struct ata_queued_cmd *qc);
48extern unsigned int ata_qc_issue(struct ata_queued_cmd *qc); 48extern unsigned int ata_qc_issue(struct ata_queued_cmd *qc);
49extern void __ata_qc_complete(struct ata_queued_cmd *qc);
50extern int ata_check_atapi_dma(struct ata_queued_cmd *qc); 49extern int ata_check_atapi_dma(struct ata_queued_cmd *qc);
51extern void ata_dev_select(struct ata_port *ap, unsigned int device, 50extern void ata_dev_select(struct ata_port *ap, unsigned int device,
52 unsigned int wait, unsigned int can_sleep); 51 unsigned int wait, unsigned int can_sleep);
diff --git a/include/linux/libata.h b/include/linux/libata.h
index c1e198655bb1..695d9ae6ec03 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -556,7 +556,7 @@ extern void ata_bmdma_start (struct ata_queued_cmd *qc);
556extern void ata_bmdma_stop(struct ata_queued_cmd *qc); 556extern void ata_bmdma_stop(struct ata_queued_cmd *qc);
557extern u8 ata_bmdma_status(struct ata_port *ap); 557extern u8 ata_bmdma_status(struct ata_port *ap);
558extern void ata_bmdma_irq_clear(struct ata_port *ap); 558extern void ata_bmdma_irq_clear(struct ata_port *ap);
559extern void ata_qc_complete(struct ata_queued_cmd *qc); 559extern void __ata_qc_complete(struct ata_queued_cmd *qc);
560extern void ata_eng_timeout(struct ata_port *ap); 560extern void ata_eng_timeout(struct ata_port *ap);
561extern void ata_scsi_simulate(struct ata_port *ap, struct ata_device *dev, 561extern void ata_scsi_simulate(struct ata_port *ap, struct ata_device *dev,
562 struct scsi_cmnd *cmd, 562 struct scsi_cmnd *cmd,
@@ -756,6 +756,24 @@ static inline void ata_qc_reinit(struct ata_queued_cmd *qc)
756 ata_tf_init(qc->ap, &qc->tf, qc->dev->devno); 756 ata_tf_init(qc->ap, &qc->tf, qc->dev->devno);
757} 757}
758 758
759/**
760 * ata_qc_complete - Complete an active ATA command
761 * @qc: Command to complete
762 * @err_mask: ATA Status register contents
763 *
764 * Indicate to the mid and upper layers that an ATA
765 * command has completed, with either an ok or not-ok status.
766 *
767 * LOCKING:
768 * spin_lock_irqsave(host_set lock)
769 */
770static inline void ata_qc_complete(struct ata_queued_cmd *qc)
771{
772 if (unlikely(qc->flags & ATA_QCFLAG_EH_SCHEDULED))
773 return;
774
775 __ata_qc_complete(qc);
776}
759 777
760/** 778/**
761 * ata_irq_on - Enable interrupts on a port. 779 * ata_irq_on - Enable interrupts on a port.