projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
78c3bcc
)
bnx2x: VF ndo sanity
author
Ariel Elior
<
[email protected]
>
Thu, 20 Jun 2013 14:39:09 +0000
(17:39 +0300)
committer
David S. Miller
<
[email protected]
>
Mon, 24 Jun 2013 06:54:15 +0000
(23:54 -0700)
If iproute2 VF callbacks are invoked before PF is loaded,
abort gracefully.
Signed-off-by: Ariel Elior <
[email protected]
>
Signed-off-by: Yuval Mintz <
[email protected]
>
Signed-off-by: Eilon Greenstein <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c
patch
|
blob
|
history
diff --git
a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c
b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c
index 2a8ad6d4b5406d19814c66e83df9f7330b90ae1e..f6177baf20b7cdddb112bf5541a94f7845a1fc1a 100644
(file)
--- a/
drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c
+++ b/
drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c
@@
-3083,6
+3083,11
@@
void bnx2x_disable_sriov(struct bnx2x *bp)
static int bnx2x_vf_ndo_sanity(struct bnx2x *bp, int vfidx,
struct bnx2x_virtf *vf)
{
+ if (bp->state != BNX2X_STATE_OPEN) {
+ BNX2X_ERR("vf ndo called though PF is down\n");
+ return -EINVAL;
+ }
+
if (!IS_SRIOV(bp)) {
BNX2X_ERR("vf ndo called though sriov is disabled\n");
return -EINVAL;