[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Y39Rg+zgpUh0AIwB@electric-eye.fr.zoreil.com>
Date: Thu, 24 Nov 2022 12:12:03 +0100
From: Francois Romieu <romieu@...zoreil.com>
To: Ioannis Barkas <jnyb.de@...il.com>
Cc: netdev@...r.kernel.org, Michael Chan <michael.chan@...adcom.com>
Subject: Re: BCM4401 LAN
(MAINTAINERS file suggests to Cc: Michael Chan Cced as b44 maintainer)
Ioannis Barkas <jnyb.de@...il.com> :
[...]
> I resurrected some old PCs at job and found one with BCM4401 LAN. This
> LAN had some issues as I read in various OSes so I gave it a try using
> live Ubuntu 22.10. It worked fine though I got this when I plugged in
> the Ethernet cable:
> [ 517.928052] b44 ssb0:0 eth0: Link is up at 100 Mbps, full duplex
> [ 517.928066] b44 ssb0:0 eth0: Flow control is off for TX and off for RX
> [ 517.928246] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
> [ 520.697405] ------------[ cut here ]------------
> [ 520.697417] b44 0000:0a:0b.0: DMA addr 0x00000000766d9402+42
> overflow (mask 3fffffff, bus limit 0).
> [ 520.697438] WARNING: CPU: 1 PID: 1187 at kernel/dma/direct.h:97
> dma_direct_map_page+0x1f1/0x200
> [ 520.697456] Modules linked in: ntfs3 snd_seq_dummy snd_hrtimer
> binfmt_misc zfs(PO) zunicode(PO) zzstd(O) zlua(O) zavl(PO) icp(PO)
> zcommon(PO) znvpair(PO) spl(O) snd_intel8x0 snd_ac97_codec ac97_bus
[...]
> This is the LAN device:
> 0a:0b.0 Ethernet controller [0200]: Broadcom Inc. and subsidiaries
> BCM4401-B0 100Base-TX [14e4:170c] (rev 02)
> Subsystem: Lenovo BCM4401-B0 100Base-TX [17aa:1004]
> Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop-
> ParErr- Stepping- SERR+ FastB2B- DisINTx-
> Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort-
> <TAbort- <MAbort- >SERR- <PERR- INTx-
> Latency: 32
> Interrupt: pin A routed to IRQ 23
> Region 0: Memory at d0000000 (32-bit, non-prefetchable) [size=8K]
> Capabilities: [40] Power Management version 2
> Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA
> PME(D0+,D1+,D2+,D3hot+,D3cold+)
> Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=2 PME-
> Kernel driver in use: b44
> Kernel modules: b44
[...]
> Does anything look awfully wrong in the trace?
See kernel/dma/direct.c::dma_direct_map_resource for a WARN_ON_ONCE
message related to the comment below in drivers/net/ethernet/broadcom/b44.c
static netdev_tx_t b44_start_xmit(struct sk_buff *skb, struct net_device *dev)
[...]
mapping = dma_map_single(bp->sdev->dma_dev, skb->data, len, DMA_TO_DEVICE);
if (dma_mapping_error(bp->sdev->dma_dev, mapping) || mapping + len > DMA_BIT_MASK(30)) {
struct sk_buff *bounce_skb;
/* Chip can't handle DMA to/from >1GB, use bounce buffer */
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
if (!dma_mapping_error(bp->sdev->dma_dev, mapping))
dma_unmap_single(bp->sdev->dma_dev, mapping, len,
DMA_TO_DEVICE);
It's a bit less than optimal performance-wise but it is expected to work.
This one was rather trivial but please avoid requests related to giant
out-of-tree (zfs) module tainted kernel in the future.
--
Ueimor
Powered by blists - more mailing lists