Commit 03c96bc
net: ethernet: ti: am65-cpsw: avoid devm_alloc_etherdev, fix module removal
Usage of devm_alloc_etherdev_mqs() conflicts with
am65_cpsw_nuss_cleanup_ndev() as the same struct net_device instances
get unregistered twice. Switch to alloc_etherdev_mqs() and make sure
am65_cpsw_nuss_cleanup_ndev() unregisters and frees those net_device
instances properly.
With this, it is finally possible to rmmod the driver without oopsing
the kernel.
Fixes: 93a7653 ("net: ethernet: ti: introduce am65x/j721e gigabit eth subsystem driver")
Signed-off-by: Nicolas Pitre <[email protected]>
Reviewed-by: Roger Quadros <[email protected]>
Signed-off-by: Paolo Abeni <[email protected]>1 parent 47f9605 commit 03c96bc
1 file changed
+12
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2744 | 2744 | | |
2745 | 2745 | | |
2746 | 2746 | | |
2747 | | - | |
2748 | | - | |
2749 | | - | |
2750 | | - | |
| 2747 | + | |
| 2748 | + | |
| 2749 | + | |
2751 | 2750 | | |
2752 | 2751 | | |
2753 | 2752 | | |
| |||
2868 | 2867 | | |
2869 | 2868 | | |
2870 | 2869 | | |
2871 | | - | |
| 2870 | + | |
| 2871 | + | |
| 2872 | + | |
2872 | 2873 | | |
| 2874 | + | |
| 2875 | + | |
2873 | 2876 | | |
2874 | 2877 | | |
2875 | 2878 | | |
| |||
3613 | 3616 | | |
3614 | 3617 | | |
3615 | 3618 | | |
3616 | | - | |
| 3619 | + | |
3617 | 3620 | | |
3618 | 3621 | | |
3619 | 3622 | | |
3620 | | - | |
| 3623 | + | |
3621 | 3624 | | |
3622 | 3625 | | |
3623 | 3626 | | |
3624 | 3627 | | |
3625 | | - | |
| 3628 | + | |
| 3629 | + | |
3626 | 3630 | | |
3627 | 3631 | | |
3628 | 3632 | | |
| |||
0 commit comments