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: <04d68be4-e053-4fea-d50a-217d423bd0e0@quicinc.com>
Date: Wed, 21 Feb 2024 16:06:28 +0530
From: Md Sadre Alam <quic_mdalam@...cinc.com>
To: Mark Brown <broonie@...nel.org>
CC: <andersson@...nel.org>, <konrad.dybcio@...aro.org>, <robh@...nel.org>,
        <krzysztof.kozlowski+dt@...aro.org>, <conor+dt@...nel.org>,
        <miquel.raynal@...tlin.com>, <richard@....at>, <vigneshr@...com>,
        <manivannan.sadhasivam@...aro.org>, <linux-arm-msm@...r.kernel.org>,
        <linux-spi@...r.kernel.org>, <devicetree@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>, <linux-mtd@...ts.infradead.org>,
        <quic_srichara@...cinc.com>, <quic_varada@...cinc.com>
Subject: Re: [PATCH 3/5] spi: spi-qpic: Add qpic spi nand driver support



On 2/20/2024 9:34 PM, Mark Brown wrote:
> On Tue, Feb 20, 2024 at 05:24:43PM +0530, Md Sadre Alam wrote:
>> On 2/15/2024 7:44 PM, Mark Brown wrote:
>>> On Thu, Feb 15, 2024 at 07:18:54PM +0530, Md Sadre Alam wrote:
> 
>>>> +	if (op->cmd.opcode == SPINAND_READID) {
>>>> +		snandc->buf_count = 4;
>>>> +		read_reg_dma(snandc, NAND_READ_ID, 1, NAND_BAM_NEXT_SGL);
>>>> +
>>>> +		ret = submit_descs(snandc);
>>>> +		if (ret)
>>>> +			dev_err(snandc->dev, "failure in submitting descriptor for readid\n");
>>>> +
>>>> +		nandc_read_buffer_sync(snandc, true);
>>>> +		memcpy(op->data.buf.in, snandc->reg_read_buf, snandc->buf_count);
> 
>>> These memcpy()s don't seem great, why aren't we just reading directly
>>> into the output buffer?
> 
>>    This reg_read_buf is being used in common API so that it will be used by both
>>    serial nand as well raw nand, so I can't directly use the output buffer since
>>    internally CW mechanism I have to maintain in common API.
> 
> We have control over all the source code in the kernel so if there's
> problems with the internal interfaces we can improve them.

Ok , will try to maintain CW mechanism uniform and remove from common API
and move to corresponding driver. Will try to fix in next patch.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ