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]
Date:   Tue, 5 Dec 2023 14:36:33 +0100
From:   "Linux regression tracking (Thorsten Leemhuis)" 
        <regressions@...mhuis.info>
To:     linux@...ler.io, Benjamin Bigler <benjamin@...ler.one>
Cc:     broonie@...nel.org, francesco@...cini.it,
        linux-kernel@...r.kernel.org, linux-spi@...r.kernel.org,
        regressions@...ts.linux.dev, stefan.moring@...hnolution.nl
Subject: Re: spi: imx: Increase imx51 ecspi burst length fails on imx6dl and
 imx8mm

On 27.11.23 10:09, linux@...ler.io wrote:
> 
> Thank you Benjamin for the patch.
> I have tested the patch and is works fine.

That's great.

Benjamin, what's the status of the fix for this regression? I tried to
find a proper submission for review, but didn't find one. Am I missing
something or did that fall through the cracks?

Ciao, Thorsten (wearing his 'the Linux kernel's regression tracker' hat)
--
Everything you wanna know about Linux kernel regression tracking:
https://linux-regtracking.leemhuis.info/about/#tldr
If I did something stupid, please tell me, as explained on that page.

#regzbot poke

> Am 2023-11-26T14:19:56.000+01:00 hat Benjamin Bigler <benjamin@...ler.one> geschrieben:
>>  Hi
>>
>> I did some debugging and I think the problem is that in this case bits_per_word is 8. So in
>> spi_imx_dma_configure the buswidth is set to DMA_SLAVE_BUSWIDTH_1_BYTE. But in
>> mx51_ecspi_prepare_transfer the BURST_LENGTH is now set to (spi_imx->count * spi_imx->bits_per_word
>> - 1)
>> before 15a6af94a2779d5dfb42ee4bfac858ea8e964a3f it was (spi_imx->bits_per_word - 1). Now the spi
>> transmits 4 byte per byte except for the first word. I added the following patch and it worked again
>>
>> diff --git a/drivers/spi/spi-imx.c b/drivers/spi/spi-imx.c
>> index 498e35c8db2c..f514966e2ada 100644
>> --- a/drivers/spi/spi-imx.c
>> +++ b/drivers/spi/spi-imx.c
>> @@ -659,11 +659,22 @@ static int mx51_ecspi_prepare_transfer(struct spi_imx_data *spi_imx,
>>  		ctrl |= (spi_imx->target_burst * 8 - 1)
>>  			<< MX51_ECSPI_CTRL_BL_OFFSET;
>>  	else {
>> -		if (spi_imx->count &gt;= 512)
>> -			ctrl |= 0xFFF << MX51_ECSPI_CTRL_BL_OFFSET;
>> -		else
>> -			ctrl |= (spi_imx->count * spi_imx->bits_per_word - 1)
>> +		if (spi_imx->usedma)
>> +			ctrl |= (spi_imx->bits_per_word *
>> +					 spi_imx_bytes_per_word(
>> +						 spi_imx->bits_per_word) -
>> +				 1)
>>  				<< MX51_ECSPI_CTRL_BL_OFFSET;
>> +		else {
>> +			if (spi_imx->count &gt;= MX51_ECSPI_CTRL_MAX_BURST)
>> +				ctrl |= (MX51_ECSPI_CTRL_MAX_BURST - 1)
>> +					<< MX51_ECSPI_CTRL_BL_OFFSET;
>> +			else
>> +				ctrl |= (spi_imx->count *
>> +						 spi_imx->bits_per_word -
>> +					 1)
>> +					<< MX51_ECSPI_CTRL_BL_OFFSET;
>> +		}
>>  	}
>>  
>>  	/* set clock speed */
>>
>> Best regards,
> Benjamin Bigler
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ