diff options
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/igb/igb_main.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c index be426a4a7240..c9aac7f15cd2 100644 --- a/drivers/net/igb/igb_main.c +++ b/drivers/net/igb/igb_main.c | |||
@@ -5105,7 +5105,14 @@ static void igb_rcv_msg_from_vf(struct igb_adapter *adapter, u32 vf) | |||
5105 | 5105 | ||
5106 | switch ((msgbuf[0] & 0xFFFF)) { | 5106 | switch ((msgbuf[0] & 0xFFFF)) { |
5107 | case E1000_VF_SET_MAC_ADDR: | 5107 | case E1000_VF_SET_MAC_ADDR: |
5108 | retval = igb_set_vf_mac_addr(adapter, msgbuf, vf); | 5108 | retval = -EINVAL; |
5109 | if (!(vf_data->flags & IGB_VF_FLAG_PF_SET_MAC)) | ||
5110 | retval = igb_set_vf_mac_addr(adapter, msgbuf, vf); | ||
5111 | else | ||
5112 | dev_warn(&pdev->dev, | ||
5113 | "VF %d attempted to override administratively " | ||
5114 | "set MAC address\nReload the VF driver to " | ||
5115 | "resume operations\n", vf); | ||
5109 | break; | 5116 | break; |
5110 | case E1000_VF_SET_PROMISC: | 5117 | case E1000_VF_SET_PROMISC: |
5111 | retval = igb_set_vf_promisc(adapter, msgbuf, vf); | 5118 | retval = igb_set_vf_promisc(adapter, msgbuf, vf); |
@@ -5117,8 +5124,12 @@ static void igb_rcv_msg_from_vf(struct igb_adapter *adapter, u32 vf) | |||
5117 | retval = igb_set_vf_rlpml(adapter, msgbuf[1], vf); | 5124 | retval = igb_set_vf_rlpml(adapter, msgbuf[1], vf); |
5118 | break; | 5125 | break; |
5119 | case E1000_VF_SET_VLAN: | 5126 | case E1000_VF_SET_VLAN: |
5120 | if (adapter->vf_data[vf].pf_vlan) | 5127 | retval = -1; |
5121 | retval = -1; | 5128 | if (vf_data->pf_vlan) |
5129 | dev_warn(&pdev->dev, | ||
5130 | "VF %d attempted to override administratively " | ||
5131 | "set VLAN tag\nReload the VF driver to " | ||
5132 | "resume operations\n", vf); | ||
5122 | else | 5133 | else |
5123 | retval = igb_set_vf_vlan(adapter, msgbuf, vf); | 5134 | retval = igb_set_vf_vlan(adapter, msgbuf, vf); |
5124 | break; | 5135 | break; |