lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <063D6719AE5E284EB5DD2968C1650D6D5F4A7ECF@AcuExch.aculab.com>
Date:	Fri, 22 Apr 2016 11:32:00 +0000
From:	David Laight <David.Laight@...LAB.COM>
To:	'Andy Shevchenko' <andriy.shevchenko@...ux.intel.com>,
	Tejun Heo <tj@...nel.org>,
	"linux-ide@...r.kernel.org" <linux-ide@...r.kernel.org>,
	"Rob Herring" <robh+dt@...nel.org>,
	"linuxppc-dev@...ts.ozlabs.org" <linuxppc-dev@...ts.ozlabs.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Christian Lamparter <chunkeey@...glemail.com>,
	Måns Rullgård <mans@...sr.com>,
	Julian Margetson <runaway@...dw.ms>
Subject: RE: [PATCH v1 08/23] ata: sata_dwc_460ex: don't call
 ata_sff_qc_issue() on DMA commands

From: Andy Shevchenko
> Sent: 21 April 2016 19:15
> ata_sff_qc_issue() can't handle DMA commands and thus we have to avoid it for
> them. Do call ata_bmdma_qc_issue() instead for this case.
> 
> Suggested-by: Christian Lamparter <chunkeey@...glemail.com>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
> ---
>  drivers/ata/sata_dwc_460ex.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/ata/sata_dwc_460ex.c b/drivers/ata/sata_dwc_460ex.c
> index 038e5fb..845c35d 100644
> --- a/drivers/ata/sata_dwc_460ex.c
> +++ b/drivers/ata/sata_dwc_460ex.c
> @@ -1061,10 +1061,12 @@ static unsigned int sata_dwc_qc_issue(struct ata_queued_cmd *qc)
>  			__func__, tag, qc->ap->link.sactive, sactive);
> 
>  		ap->ops->sff_tf_load(ap, &qc->tf);
> -		sata_dwc_exec_command_by_tag(ap, &qc->tf, qc->tag,
> +		sata_dwc_exec_command_by_tag(ap, &qc->tf, tag,
>  					     SATA_DWC_CMD_ISSUED_PEND);
> +	} else if (ata_is_dma(qc->tf.protocol)) {
> +		return ata_bmdma_qc_issue(qc);
>  	} else {
> -		ata_sff_qc_issue(qc);
> +		return ata_sff_qc_issue(qc);
>  	}
>  	return 0;
>  }

I'd nuke those 'else if', they make it very hard to read.
I Think the code is:

		sata_dwc_exec_command_by_tag(...);
		return 0;
	}

	if (ata_is_dma(qc->tf.protocol))
		return ata_bmdma_qc_issue(qc);

	return ata_sff_qc_issue(qc);
}

	David

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ