Re: [PATCH 1/1] net: axienet: Move reset before DMA detection

From: Maxim Kochetkov
Date: Wed Jun 21 2023 - 09:10:26 EST




On 21.06.2023 15:23, Pandey, Radhey Shyam wrote:
-----Original Message-----
From: Maxim Kochetkov <fido_max@xxxxxxxx>
Sent: Wednesday, June 21, 2023 4:57 PM
To: netdev@xxxxxxxxxxxxxxx
Cc: Maxim Kochetkov <fido_max@xxxxxxxx>; Pandey, Radhey Shyam
<radhey.shyam.pandey@xxxxxxx>; David S. Miller
<davem@xxxxxxxxxxxxx>; Eric Dumazet <edumazet@xxxxxxxxxx>; Jakub
Kicinski <kuba@xxxxxxxxxx>; Paolo Abeni <pabeni@xxxxxxxxxx>; Simek,
Michal <michal.simek@xxxxxxx>; linux-arm-kernel@xxxxxxxxxxxxxxxxxxx;
linux-kernel@xxxxxxxxxxxxxxx
Subject: [PATCH 1/1] net: axienet: Move reset before DMA detection

DMA detection will fail if axinet was started before (by boot loader, boot
ROM, etc). In this state axinet will not start properly.
So move axinet reset before DMA detection.

Please provide more detail on the failing testcase. In which scenario we are
seeing DMA detection failure? What is error log . Is it random?


XAXIDMA_TX_CDESC_OFFSET + 4 register (MM2S_CURDESC_MSB) is used to detect 64 DMA capability here. But datasheet says: When DMACR.RS is 1 (axinet is in enabled state), CURDESC_PTR becomes Read Only (RO) and is used to fetch the first
descriptor. So iowrite32()/ioread32() trick to this register is failed.