declance: Improve DMA error reporting
Subsystems (3)
Maciej W. Rozycki
maintainerv2 cover declance: Improve DMA error reporting
Hi,
D'oh, this v2 fixes a silly thinko in the commit description of 2/2.
Inspired by a recent discussion[1] I have come up with this pair of
small improvements to DMA error reporting with declance. Please apply.
References:
[1] Sebastian Andrzej Siewior, "declance: Remove IRQF_ONESHOT",
<https://lore.kernel.org/r/[email protected]/>
Maciej
Maciej W. Rozycki
maintainerPATCH v2 1/2 declance: Rate-limit DMA errors
Prevent the system from becoming unusable due to a flood of DMA error messages.
---
No change from v1.
--- drivers/net/ethernet/amd/declance.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
linux-declance-ratelimit.diff
drivers/net/ethernet/amd/declance.c +1 -1
@@ -727,7 +727,7 @@ static irqreturn_t lance_dma_merr_int(in {struct net_device *dev = dev_id; -printk (KERN_ERR "%s: DMA error\n" , dev->name); +pr_err_ratelimited ("%s: DMA error\n" , dev->name);return IRQ_HANDLED ; }
Maciej W. Rozycki
maintainerPATCH v2 2/2 declance: Include the offending address with DMA errors
In reply to Maciej W. RozyckiThe address latched in the I/O ASIC LANCE DMA Pointer Register uses the TURBOchannel bus address encoding and therefore bits 33:29 of location referred occupy bits 4:0, bits 28:2 are left-shifted by 3, and bits 1:0 are hardwired to zero. In reality no TURBOchannel system exceeds 1GiB of RAM though, so the address reported will always fit in 8 hex digits.
---
Changes from v1:
- s/16/8/ in the change description for the printed address width.
--- drivers/net/ethernet/amd/declance.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
linux-declance-dma-merr-addr.diff
drivers/net/ethernet/amd/declance.c +3 -1
@@ -726,8 +726,10 @@ static void lance_tx(struct net_device *static irqreturn_t lance_dma_merr_int (int irq,void *dev_id) {struct net_device *dev = dev_id; +u64 ldp =ioasic_read (IO_REG_LANCE_DMA_P ); -pr_err_ratelimited ("%s: DMA error\n" , dev->name); +pr_err_ratelimited ("%s: DMA error at %#010llx\n" , dev->name, + (ldp &0x1f ) <<29 | (ldp &0xffffffe0 ) >>3 );return IRQ_HANDLED ; }
This series was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This series was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Quoted 8 lines · On Sun, 29 Mar 2026 19:07:18 +0100 (BST) you wrote:
Hi,
D'oh, this v2 fixes a silly thinko in the commit description of 2/2.
Inspired by a recent discussion[1] I have come up with this pair of
small improvements to DMA error reporting with declance. Please apply.[...]
Here is the summary with links:
- [net-next,v2,1/2] declance: Rate-limit DMA errors
https://git.kernel.org/netdev/net-next/c/ee769323b1bf
- [net-next,v2,2/2] declance: Include the offending address with DMA errors
https://git.kernel.org/netdev/net-next/c/aae5efaeb8aa
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html