Age | Commit message (Collapse) | Author |
|
With lockdep enabled, we will get following warning:
ar9331_switch ethernet.1:10 lan0 (uninitialized): PHY [!ahb!ethernet@1a000000!mdio!switch@10:00] driver [Qualcomm Atheros AR9331 built-in PHY] (irq=13)
BUG: sleeping function called from invalid context at kernel/locking/mutex.c:935
in_atomic(): 1, irqs_disabled(): 1, non_block: 0, pid: 18, name: kworker/0:1
INFO: lockdep is turned off.
irq event stamp: 602
hardirqs last enabled at (601): [<8073fde0>] _raw_spin_unlock_irq+0x3c/0x80
hardirqs last disabled at (602): [<8073a4f4>] __schedule+0x184/0x800
softirqs last enabled at (0): [<80080f60>] copy_process+0x578/0x14c8
softirqs last disabled at (0): [<00000000>] 0x0
CPU: 0 PID: 18 Comm: kworker/0:1 Not tainted 5.10.0-rc3-ar9331-00734-g7d644991df0c #31
Workqueue: events deferred_probe_work_func
Stack : 80980000 80980000 8089ef70 80890000 804b5414 80980000 00000002 80b53728
00000000 800d1268 804b5414 ffffffde 00000017 800afe08 81943860 0f5bfc32
00000000 00000000 8089ef70 819436c0 ffffffea 00000000 00000000 00000000
8194390c 808e353c 0000000f 66657272 80980000 00000000 00000000 80890000
804b5414 80980000 00000002 80b53728 00000000 00000000 00000000 80d40000
...
Call Trace:
[<80069ce0>] show_stack+0x9c/0x140
[<800afe08>] ___might_sleep+0x220/0x244
[<8073bfb0>] __mutex_lock+0x70/0x374
[<8073c2e0>] mutex_lock_nested+0x2c/0x38
[<804b5414>] regmap_update_bits_base+0x38/0x8c
[<804ee584>] regmap_update_bits+0x1c/0x28
[<804ee714>] ar9331_sw_unmask_irq+0x34/0x60
[<800d91f0>] unmask_irq+0x48/0x70
[<800d93d4>] irq_startup+0x114/0x11c
[<800d65b4>] __setup_irq+0x4f4/0x6d0
[<800d68a0>] request_threaded_irq+0x110/0x190
[<804e3ef0>] phy_request_interrupt+0x4c/0xe4
[<804df508>] phylink_bringup_phy+0x2c0/0x37c
[<804df7bc>] phylink_of_phy_connect+0x118/0x130
[<806c1a64>] dsa_slave_create+0x3d0/0x578
[<806bc4ec>] dsa_register_switch+0x934/0xa20
[<804eef98>] ar9331_sw_probe+0x34c/0x364
[<804eb48c>] mdio_probe+0x44/0x70
[<8049e3b4>] really_probe+0x30c/0x4f4
[<8049ea10>] driver_probe_device+0x264/0x26c
[<8049bc10>] bus_for_each_drv+0xb4/0xd8
[<8049e684>] __device_attach+0xe8/0x18c
[<8049ce58>] bus_probe_device+0x48/0xc4
[<8049db70>] deferred_probe_work_func+0xdc/0xf8
[<8009ff64>] process_one_work+0x2e4/0x4a0
[<800a0770>] worker_thread+0x2a8/0x354
[<800a774c>] kthread+0x16c/0x174
[<8006306c>] ret_from_kernel_thread+0x14/0x1c
ar9331_switch ethernet.1:10 lan1 (uninitialized): PHY [!ahb!ethernet@1a000000!mdio!switch@10:02] driver [Qualcomm Atheros AR9331 built-in PHY] (irq=13)
DSA: tree 0 setup
To fix it, it is better to move access to MDIO register to the .irq_bus_sync_unlock
call back.
Fixes: ec6698c272de ("net: dsa: add support for Atheros AR9331 built-in switch")
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
Link: https://lore.kernel.org/r/20201211110317.17061-1-o.rempel@pengutronix.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|
Convert the ar9331 DSA driver to use the finalised link parameters in
mac_link_up() rather than the parameters in mac_config().
Tested-by: Oleksij Rempel <o.rempel@pengutronix.de>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
Since commit 84af7a6194e4 ("checkpatch: kconfig: prefer 'help' over
'---help---'"), the number of '---help---' has been gradually
decreasing, but there are still more than 2400 instances.
This commit finishes the conversion. While I touched the lines,
I also fixed the indentation.
There are a variety of indentation styles found.
a) 4 spaces + '---help---'
b) 7 spaces + '---help---'
c) 8 spaces + '---help---'
d) 1 space + 1 tab + '---help---'
e) 1 tab + '---help---' (correct indentation)
f) 1 tab + 1 space + '---help---'
g) 1 tab + 2 spaces + '---help---'
In order to convert all of them to 1 tab + 'help', I ran the
following commend:
$ find . -name 'Kconfig*' | xargs sed -i 's/^[[:space:]]*---help---/\thelp/'
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
|
|
Propagate the resolved link configuration down via DSA's
phylink_mac_link_up() operation to allow split PCS/MAC to work.
Tested-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
It is possible to stack multiple DSA switches in a way that they are not
part of the tree (disjoint) but the DSA master of a switch is a DSA
slave of another. When that happens switch drivers may have to know this
is the case so as to determine whether their tagging protocol has a
remove chance of working.
This is useful for specific switch drivers such as b53 where devices
have been known to be stacked in the wild without the Broadcom tag
protocol supporting that feature. This allows b53 to continue supporting
those devices by forcing the disabling of Broadcom tags on the outermost
switches if necessary.
The get_tag_protocol() function is therefore updated to gain an
additional enum dsa_tag_protocol argument which denotes the current
tagging protocol used by the DSA master we are attached to, else
DSA_TAG_PROTO_NONE for the top of the dsa_switch_tree.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
There is no need to set variable 'mbus' static
since new value always be assigned before use it.
Signed-off-by: Mao Wenan <maowenan@huawei.com>
Reviewed-by: Oleksij Rempel <o.rempel@pengutronix.de>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
Provide basic support for Atheros AR9331 built-in switch. So far it
works as port multiplexer without any hardware offloading support.
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Vivien Didelot <vivien.didelot@gmail.com>
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
|