Commit 19162fd
hv_netvsc: Fix hibernation for mlx5 VF driver
mlx5_suspend()/resume() keep the network interface, so during hibernation
netvsc_unregister_vf() and netvsc_register_vf() are not called, and hence
netvsc_resume() should call netvsc_vf_changed() to switch the data path
back to the VF after hibernation. Note: after we close and re-open the
vmbus channel of the netvsc NIC in netvsc_suspend() and netvsc_resume(),
the data path is implicitly switched to the netvsc NIC. Similarly,
netvsc_suspend() should not call netvsc_unregister_vf(), otherwise the VF
can no longer be used after hibernation.
For mlx4, since the VF network interafce is explicitly destroyed and
re-created during hibernation (see mlx4_suspend()/resume()), hv_netvsc
already explicitly switches the data path from and to the VF automatically
via netvsc_register_vf() and netvsc_unregister_vf(), so mlx4 doesn't need
this fix. Note: mlx4 can still work with the fix because in
netvsc_suspend()/resume() ndev_ctx->vf_netdev is NULL for mlx4.
Fixes: 0efeea5 ("hv_netvsc: Add the support of hibernation")
Signed-off-by: Dexuan Cui <[email protected]>
Signed-off-by: Jakub Kicinski <[email protected]>1 parent e1f469c commit 19162fd
1 file changed
+11
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2587 | 2587 | | |
2588 | 2588 | | |
2589 | 2589 | | |
2590 | | - | |
2591 | 2590 | | |
| 2591 | + | |
2592 | 2592 | | |
2593 | 2593 | | |
2594 | 2594 | | |
| |||
2604 | 2604 | | |
2605 | 2605 | | |
2606 | 2606 | | |
2607 | | - | |
2608 | | - | |
2609 | | - | |
2610 | | - | |
2611 | 2607 | | |
2612 | 2608 | | |
2613 | 2609 | | |
| |||
2623 | 2619 | | |
2624 | 2620 | | |
2625 | 2621 | | |
| 2622 | + | |
2626 | 2623 | | |
2627 | 2624 | | |
2628 | 2625 | | |
| |||
2635 | 2632 | | |
2636 | 2633 | | |
2637 | 2634 | | |
| 2635 | + | |
| 2636 | + | |
| 2637 | + | |
| 2638 | + | |
| 2639 | + | |
| 2640 | + | |
| 2641 | + | |
| 2642 | + | |
| 2643 | + | |
2638 | 2644 | | |
2639 | 2645 | | |
2640 | 2646 | | |
| |||
0 commit comments