]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx4_core: Return -EPROBE_DEFER when a VF is probed before PF is sufficiently...
authorJack Morgenstein <jackm@dev.mellanox.co.il>
Tue, 4 Jun 2013 05:13:27 +0000 (05:13 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 4 Jun 2013 19:58:24 +0000 (12:58 -0700)
commit356e5c635fce1b755c7e12b268b0dd2de135ab4f
treeedca2ce4a95dedb53d9ee6a9457f54b15f7da47c
parentdf094a1db53e0bdc5d9fa9ba6f3bafe38947f20c
net/mlx4_core: Return -EPROBE_DEFER when a VF is probed before PF is sufficiently initialized

In the PF initialization, SRIOV is enabled before the PF is fully initialized.
This allows the kernel to probe the newly-exposed VFs before the PF is ready
to handle them (nested probes).

Have the probe method return the -EPROBE_DEFER value in this situation (instead
of the VF probe method retrying its initialization in a loop, and returning -EIO
on failure). When -EPROBE_DEFER is returned by the VF probe method, the kernel
itself will retry the probe after a suitable delay.

Based upon a suggestion by Ben Hutchings <bhutchings@solarflare.com>

Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx4/cmd.c
drivers/net/ethernet/mellanox/mlx4/main.c