[Letux-kernel] jz4730 Ethernet
H. Nikolaus Schaller
hns at goldelico.com
Thu Mar 11 15:45:48 CET 2021
> Am 11.03.2021 um 13:38 schrieb H. Nikolaus Schaller <hns at goldelico.com>:
>
> Hi Paul,
>
>> Am 09.03.2021 um 17:46 schrieb H. Nikolaus Schaller <hns at goldelico.com>:
>>
>> Still a lot of work until all gaps for the jz4730 are closed:
>>
>> * futex (or what ever the sysbench and X11 issue is)
>> * i2c
>> * sound
>> * dma
>
> just a small note: mii does NOT depend on generic DMA working (only MMC does so far):
>
> The Ethernet MAC controller uses a dedicated DMA controller to transfer data between the Ethernet MAC module and the host memory.
>
> It is very similar to the DMA descriptors of the LCDC.
> And the jz4730 ethernet driver has code to do the setup of the buffers.
>
>> * mii
>
> So I am working a little (while I should do other urgent things) on
> polishing the ethernet driver:
>
> 1. replace kernel threads by delayed_worker
> 2. replace printk/prerror() with dev_err()
seems to be doing something! At least cable plugin/out events are detected :)
root at letux:~# dmesg|fgrep jz4730-eth
[ 10.328628] jz4730-eth 13100000.ethernet: There is not MAC address, use default ..
[ 49.424383] jz4730-eth 13100000.ethernet: JZ On-Chip ethernet (MAC
[ 49.461143] jz4730-eth 13100000.ethernet: found PHY idx 0 at 16
[ 49.483565] jz4730-eth 13100000.ethernet: Found 1 PHY on JZ MAC
[ 49.490896] jz4730-eth 13100000.ethernet: BMCR ====> 0x1000
[ 49.497798] jz4730-eth 13100000.ethernet: BMSR ====> 0x7849
[ 49.504903] jz4730-eth 13100000.ethernet: ANAR ====> 0x01e1
[ 49.511978] jz4730-eth 13100000.ethernet: ANLPAR ====> 0x0000
[ 49.519215] jz4730-eth 13100000.ethernet: REG16 ====> 0x0004
[ 49.526208] jz4730-eth 13100000.ethernet: REG17 ====> 0x05c0
[ 49.533339] jz4730-eth 13100000.ethernet: ID2 ====> 0x0000
[ 49.540316] jz4730-eth 13100000.ethernet: ID3 ====> 0x8201
[ 55.650718] jz4730-eth 13100000.ethernet: Ethernet Module AutoNegotiation failed
[ 55.661636] jz4730-eth 13100000.ethernet: Provide Modes:
[ 55.684196] jz4730-eth 13100000.ethernet: Ethernet Link offline!
[ 55.690674] jz4730-eth 13100000.ethernet: ----------------------------
[ 55.697451] jz4730-eth 13100000.ethernet: This is multicast hash table high bits [40000000]
[ 55.706302] jz4730-eth 13100000.ethernet: This is multicast hash table low bits [0000]
[ 55.714819] jz4730-eth 13100000.ethernet: enter multicast mode!
[ 55.721756] jz4730-eth 13100000.ethernet: ----------------------------
[ 55.728757] jz4730-eth 13100000.ethernet: ----------------------------
[ 55.735525] jz4730-eth 13100000.ethernet: This is multicast hash table high bits [40000000]
[ 55.744366] jz4730-eth 13100000.ethernet: This is multicast hash table low bits [80000000]
[ 55.753232] jz4730-eth 13100000.ethernet: enter multicast mode!
root at letux:~# [ 329.351687] jz4730-eth 13100000.ethernet: Ethernet Link OK!
[ 329.358624] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[ 329.385095] jz4730-eth 13100000.ethernet: ----------------------------
[ 329.392101] jz4730-eth 13100000.ethernet: ----------------------------
[ 329.398870] jz4730-eth 13100000.ethernet: ----------------------------
[ 329.405820] jz4730-eth 13100000.ethernet: This is multicast hash table high bits [40000800]
[ 329.414694] jz4730-eth 13100000.ethernet: This is multicast hash table low bits [80000000]
[ 329.423567] jz4730-eth 13100000.ethernet: enter multicast mode!
[ 335.431367] jz4730-eth 13100000.ethernet: Ethernet Link offline!
[ 338.471390] jz4730-eth 13100000.ethernet: Ethernet Link OK!
[ 345.509298] ------------[ cut here ]------------
[ 345.514165] WARNING: CPU: 0 PID: 0 at net/sched/sch_generic.c:443 dev_watchdog+0x1ac/0x1f8
[ 345.522797] NETDEV WATCHDOG: eth0 (jz4730-eth): transmit queue 0 timed out
[ 345.529888] Modules linked in: g_ether usb_f_rndis u_ether libcomposite configfs ipv6 panel_simple drm snd_soc_simple_card snd_soc_simple_card_utils eth_jz4730 drm_panel_orientation_quirks gpio_keys pwm_bl mii
[ 345.549475] CPU: 0 PID: 0 Comm: swapper Not tainted 5.12.0-rc2-letux-l400+ #5288
[ 345.557193] Stack : 00200000 80169754 00000000 00000004 00000000 50bc01c2 83833d84 80b90000
[ 345.566163] 80b8e3b0 80b90000 80b8df53 80b8e3b0 80acb110 10000500 83833d30 50bc01c2
[ 345.575138] 00000000 00000000 80acb110 83833bf8 00000001 83833c0c 00000000 00001576
[ 345.584103] bff4ffd7 809031c0 0000000f 78757465 80b90000 00000000 807d7edc 80b28b00
[ 345.593227] 00000009 000001bb 83946238 00000122 00000000 805781d4 0012c3df 0012c49f
[ 345.602222] ...
[ 345.604902] Call Trace:
[ 345.607521] [<80109408>] show_stack+0x6c/0x12c
[ 345.612236] [<80124938>] __warn+0xdc/0x110
[ 345.616578] [<801249f4>] warn_slowpath_fmt+0x88/0xc4
[ 345.621797] [<807d7edc>] dev_watchdog+0x1ac/0x1f8
[ 345.626752] [<801878b0>] call_timer_fn+0x7c/0x138
[ 345.631713] [<80187ec4>] __run_timers.part.31+0x26c/0x304
[ 345.637372] [<801882b8>] run_timer_softirq+0x38/0x74
[ 345.642591] [<808d61e8>] __do_softirq+0x170/0x354
[ 345.647560] [<80129470>] __irq_exit_rcu+0x90/0x100
[ 345.652614] [<801295bc>] irq_exit+0x10/0x1c
[ 345.657047] [<8055de60>] plat_irq_dispatch+0xa0/0xd0
[ 345.662284] [<80103104>] handle_int+0x144/0x150
[ 345.667057] [<80102f80>] __r4k_wait+0x20/0x40
[ 345.671655] [<808d531c>] default_idle_call+0x48/0x7c
[ 345.676881] [<80154e94>] do_idle+0xd0/0x13c
[ 345.681325] [<801551d4>] cpu_startup_entry+0x18/0x24
[ 345.686554] [<80c4f2e8>] start_kernel+0x918/0x960
[ 345.691521]
[ 345.693190] ---[ end trace 10d6f203e390cf00 ]---
[ 345.698028] jz4730-eth 13100000.ethernet: JZ On-Chip ethernet (MAC
[ 345.704508] 00:
[ 345.704556] ef:
[ 345.706470] a3:
[ 345.708393] c1:
[ 345.710315] 00:
[ 345.712238] 03, IRQ 0)
[ 345.733604] jz4730-eth 13100000.ethernet: found PHY idx 0 at 16
[ 345.755706] jz4730-eth 13100000.ethernet: Found 1 PHY on JZ MAC
[ 345.762847] jz4730-eth 13100000.ethernet: BMCR ====> 0x1000
[ 345.769726] jz4730-eth 13100000.ethernet: BMSR ====> 0x7849
[ 345.776605] jz4730-eth 13100000.ethernet: ANAR ====> 0x01e1
[ 345.783483] jz4730-eth 13100000.ethernet: ANLPAR ====> 0x0000
[ 345.790535] jz4730-eth 13100000.ethernet: REG16 ====> 0x0000
[ 345.797501] jz4730-eth 13100000.ethernet: REG17 ====> 0x05c0
[ 345.804467] jz4730-eth 13100000.ethernet: ID2 ====> 0x0000
[ 345.811258] jz4730-eth 13100000.ethernet: ID3 ====> 0x8201
[ 351.798269] jz4730-eth 13100000.ethernet: Ethernet Module AutoNegotiation failed
[ 351.808997] jz4730-eth 13100000.ethernet: Provide Modes:
[ 351.814601] (1)10BaseT-HD
[ 351.814652] (2)10BaseT-FD
[ 351.817530] (3)100baseTx-HD
[ 351.820416] (4)100baseTx-FD
[ 351.823478]
[ 351.841455] jz4730-eth 13100000.ethernet: Ethernet Link offline!
> 3. fix whitespace and coding style
> 4. (try to) register access without strange macros with BASE
>
>> * dma based mmc
>
> BR,
> Nikolaus
>
More information about the Letux-kernel
mailing list