Repository navigation
Commit cf66966
net: macb: Probe MDIO bus before registering netdev
The current sequence makes us register for a network device prior to
registering and probing the MDIO bus which could lead to some unwanted
consequences, like a thread of execution calling into ndo_open before
register_netdev() returns, while the MDIO bus is not ready yet.
Rework the sequence to register for the MDIO bus, and therefore attach
to a PHY prior to calling register_netdev(), which implies reworking the
error path a bit.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>1 parent b365d95 commit cf66966
1 file changed
Lines changed: 19 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
441 | 441 | | |
442 | 442 | | |
443 | 443 | | |
444 | | - | |
| 444 | + | |
445 | 445 | | |
446 | 446 | | |
447 | 447 | | |
| |||
3020 | 3020 | | |
3021 | 3021 | | |
3022 | 3022 | | |
| 3023 | + | |
| 3024 | + | |
| 3025 | + | |
| 3026 | + | |
| 3027 | + | |
| 3028 | + | |
| 3029 | + | |
| 3030 | + | |
3023 | 3031 | | |
3024 | 3032 | | |
3025 | 3033 | | |
3026 | | - | |
| 3034 | + | |
3027 | 3035 | | |
3028 | 3036 | | |
3029 | | - | |
3030 | | - | |
3031 | | - | |
3032 | | - | |
3033 | | - | |
| 3037 | + | |
3034 | 3038 | | |
3035 | 3039 | | |
3036 | 3040 | | |
3037 | 3041 | | |
3038 | 3042 | | |
3039 | | - | |
3040 | | - | |
3041 | | - | |
3042 | 3043 | | |
3043 | 3044 | | |
3044 | | - | |
3045 | | - | |
| 3045 | + | |
| 3046 | + | |
| 3047 | + | |
| 3048 | + | |
| 3049 | + | |
| 3050 | + | |
| 3051 | + | |
| 3052 | + | |
3046 | 3053 | | |
3047 | 3054 | | |
3048 | 3055 | | |
| |||
0 commit comments