Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 179b310a authored by Hannes Reinecke's avatar Hannes Reinecke Committed by Tejun Heo
Browse files

libata: use ata_is_ncq() accessors



Use accessor functions instead of the raw value.

Signed-off-by: default avatarHannes Reinecke <hare@suse.com>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
parent b1c04e80
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -1975,7 +1975,7 @@ unsigned int ahci_qc_issue(struct ata_queued_cmd *qc)
	 */
	 */
	pp->active_link = qc->dev->link;
	pp->active_link = qc->dev->link;


	if (qc->tf.protocol == ATA_PROT_NCQ)
	if (ata_is_ncq(qc->tf.protocol))
		writel(1 << qc->tag, port_mmio + PORT_SCR_ACT);
		writel(1 << qc->tag, port_mmio + PORT_SCR_ACT);


	if (pp->fbs_enabled && pp->fbs_last_dev != qc->dev->link->pmp) {
	if (pp->fbs_enabled && pp->fbs_last_dev != qc->dev->link->pmp) {
+2 −2
Original line number Original line Diff line number Diff line
@@ -4842,7 +4842,7 @@ int ata_std_qc_defer(struct ata_queued_cmd *qc)
{
{
	struct ata_link *link = qc->dev->link;
	struct ata_link *link = qc->dev->link;


	if (qc->tf.protocol == ATA_PROT_NCQ) {
	if (ata_is_ncq(qc->tf.protocol)) {
		if (!ata_tag_valid(link->active_tag))
		if (!ata_tag_valid(link->active_tag))
			return 0;
			return 0;
	} else {
	} else {
@@ -5007,7 +5007,7 @@ void __ata_qc_complete(struct ata_queued_cmd *qc)
		ata_sg_clean(qc);
		ata_sg_clean(qc);


	/* command should be marked inactive atomically with qc completion */
	/* command should be marked inactive atomically with qc completion */
	if (qc->tf.protocol == ATA_PROT_NCQ) {
	if (ata_is_ncq(qc->tf.protocol)) {
		link->sactive &= ~(1 << qc->tag);
		link->sactive &= ~(1 << qc->tag);
		if (!link->sactive)
		if (!link->sactive)
			ap->nr_active_links--;
			ap->nr_active_links--;
+2 −2
Original line number Original line Diff line number Diff line
@@ -3130,8 +3130,8 @@ static unsigned int ata_scsi_pass_thru(struct ata_queued_cmd *qc)
		tf->command = cdb[9];
		tf->command = cdb[9];
	}
	}


	/* For NCQ commands with FPDMA protocol, copy the tag value */
	/* For NCQ commands copy the tag value */
	if (tf->protocol == ATA_PROT_NCQ)
	if (ata_is_ncq(tf->protocol))
		tf->nsect = qc->tag << 3;
		tf->nsect = qc->tag << 3;


	/* enforce correct master/slave bit */
	/* enforce correct master/slave bit */