|
@@ -1950,7 +1950,8 @@ static void __nicvf_set_rx_mode_task(u8 mode, struct xcast_addr_list *mc_addrs,
|
|
|
|
|
|
|
|
/* flush DMAC filters and reset RX mode */
|
|
/* flush DMAC filters and reset RX mode */
|
|
|
mbx.xcast.msg = NIC_MBOX_MSG_RESET_XCAST;
|
|
mbx.xcast.msg = NIC_MBOX_MSG_RESET_XCAST;
|
|
|
- nicvf_send_msg_to_pf(nic, &mbx);
|
|
|
|
|
|
|
+ if (nicvf_send_msg_to_pf(nic, &mbx) < 0)
|
|
|
|
|
+ goto free_mc;
|
|
|
|
|
|
|
|
if (mode & BGX_XCAST_MCAST_FILTER) {
|
|
if (mode & BGX_XCAST_MCAST_FILTER) {
|
|
|
/* once enabling filtering, we need to signal to PF to add
|
|
/* once enabling filtering, we need to signal to PF to add
|
|
@@ -1958,7 +1959,8 @@ static void __nicvf_set_rx_mode_task(u8 mode, struct xcast_addr_list *mc_addrs,
|
|
|
*/
|
|
*/
|
|
|
mbx.xcast.msg = NIC_MBOX_MSG_ADD_MCAST;
|
|
mbx.xcast.msg = NIC_MBOX_MSG_ADD_MCAST;
|
|
|
mbx.xcast.data.mac = 0;
|
|
mbx.xcast.data.mac = 0;
|
|
|
- nicvf_send_msg_to_pf(nic, &mbx);
|
|
|
|
|
|
|
+ if (nicvf_send_msg_to_pf(nic, &mbx) < 0)
|
|
|
|
|
+ goto free_mc;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/* check if we have any specific MACs to be added to PF DMAC filter */
|
|
/* check if we have any specific MACs to be added to PF DMAC filter */
|
|
@@ -1967,9 +1969,9 @@ static void __nicvf_set_rx_mode_task(u8 mode, struct xcast_addr_list *mc_addrs,
|
|
|
for (idx = 0; idx < mc_addrs->count; idx++) {
|
|
for (idx = 0; idx < mc_addrs->count; idx++) {
|
|
|
mbx.xcast.msg = NIC_MBOX_MSG_ADD_MCAST;
|
|
mbx.xcast.msg = NIC_MBOX_MSG_ADD_MCAST;
|
|
|
mbx.xcast.data.mac = mc_addrs->mc[idx];
|
|
mbx.xcast.data.mac = mc_addrs->mc[idx];
|
|
|
- nicvf_send_msg_to_pf(nic, &mbx);
|
|
|
|
|
|
|
+ if (nicvf_send_msg_to_pf(nic, &mbx) < 0)
|
|
|
|
|
+ goto free_mc;
|
|
|
}
|
|
}
|
|
|
- kfree(mc_addrs);
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/* and finally set rx mode for PF accordingly */
|
|
/* and finally set rx mode for PF accordingly */
|
|
@@ -1977,6 +1979,8 @@ static void __nicvf_set_rx_mode_task(u8 mode, struct xcast_addr_list *mc_addrs,
|
|
|
mbx.xcast.data.mode = mode;
|
|
mbx.xcast.data.mode = mode;
|
|
|
|
|
|
|
|
nicvf_send_msg_to_pf(nic, &mbx);
|
|
nicvf_send_msg_to_pf(nic, &mbx);
|
|
|
|
|
+free_mc:
|
|
|
|
|
+ kfree(mc_addrs);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
static void nicvf_set_rx_mode_task(struct work_struct *work_arg)
|
|
static void nicvf_set_rx_mode_task(struct work_struct *work_arg)
|