Message ID | 20210420133151.28472-1-vadym.kochan@plvision.eu (mailing list archive) |
---|---|
State | Accepted |
Commit | 333980481b99edb24ebd5d1a53af70a15d9146de |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [net] net: marvell: prestera: fix port event handling on init | expand |
Context | Check | Description |
---|---|---|
netdev/cover_letter | success | Link |
netdev/fixes_present | success | Link |
netdev/patch_count | success | Link |
netdev/tree_selection | success | Clearly marked for net |
netdev/subject_prefix | success | Link |
netdev/cc_maintainers | fail | 3 blamed authors not CCed: oleksandr.mazur@plvision.eu serhiy.boiko@plvision.eu serhiy.pshyk@plvision.eu; 3 maintainers not CCed: oleksandr.mazur@plvision.eu serhiy.boiko@plvision.eu serhiy.pshyk@plvision.eu |
netdev/source_inline | success | Was 0 now: 0 |
netdev/verify_signedoff | success | Link |
netdev/module_param | success | Was 0 now: 0 |
netdev/build_32bit | success | Errors and warnings before: 0 this patch: 0 |
netdev/kdoc | success | Errors and warnings before: 0 this patch: 0 |
netdev/verify_fixes | success | Link |
netdev/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 9 lines checked |
netdev/build_allmodconfig_warn | success | Errors and warnings before: 0 this patch: 0 |
netdev/header_inline | success | Link |
Hello: This patch was applied to netdev/net.git (refs/heads/master): On Tue, 20 Apr 2021 16:31:51 +0300 you wrote: > From: Vadym Kochan <vkochan@marvell.com> > > For some reason there might be a crash during ports creation if port > events are handling at the same time because fw may send initial > port event with down state. > > The crash points to cancel_delayed_work() which is called when port went > is down. Currently I did not find out the real cause of the issue, so > fixed it by cancel port stats work only if previous port's state was up > & runnig. > > [...] Here is the summary with links: - [net] net: marvell: prestera: fix port event handling on init https://git.kernel.org/netdev/net/c/333980481b99 You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html
diff --git a/drivers/net/ethernet/marvell/prestera/prestera_main.c b/drivers/net/ethernet/marvell/prestera/prestera_main.c index 25dd903a3e92..d849b0f65de2 100644 --- a/drivers/net/ethernet/marvell/prestera/prestera_main.c +++ b/drivers/net/ethernet/marvell/prestera/prestera_main.c @@ -431,7 +431,8 @@ static void prestera_port_handle_event(struct prestera_switch *sw, netif_carrier_on(port->dev); if (!delayed_work_pending(caching_dw)) queue_delayed_work(prestera_wq, caching_dw, 0); - } else { + } else if (netif_running(port->dev) && + netif_carrier_ok(port->dev)) { netif_carrier_off(port->dev); if (delayed_work_pending(caching_dw)) cancel_delayed_work(caching_dw);