Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

declance: Include the offending address with DMA errors

The 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.

Signed-off-by: Maciej W. Rozycki <macro@orcam.me.uk>
Link: https://patch.msgid.link/alpine.DEB.2.21.2603291839220.60268@angie.orcam.me.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Maciej W. Rozycki and committed by
Jakub Kicinski
aae5efae ee769323

+3 -1
+3 -1
drivers/net/ethernet/amd/declance.c
··· 726 726 static irqreturn_t lance_dma_merr_int(int irq, void *dev_id) 727 727 { 728 728 struct net_device *dev = dev_id; 729 + u64 ldp = ioasic_read(IO_REG_LANCE_DMA_P); 729 730 730 - pr_err_ratelimited("%s: DMA error\n", dev->name); 731 + pr_err_ratelimited("%s: DMA error at %#010llx\n", dev->name, 732 + (ldp & 0x1f) << 29 | (ldp & 0xffffffe0) >> 3); 731 733 return IRQ_HANDLED; 732 734 } 733 735