forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-10 9999e48639b3cecb08ffb37358bcba3b48161b29
kernel/drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c
....@@ -172,8 +172,6 @@
172172 /* Trigger the PF FW */
173173 writeb_relaxed(1, &zone_data->trigger.vf_pf_channel.addr_valid);
174174
175
- mmiowb();
176
-
177175 /* Wait for PF to complete */
178176 while ((tout >= 0) && (!*done)) {
179177 msleep(interval);
....@@ -957,7 +955,7 @@
957955 bnx2x_sample_bulletin(bp);
958956
959957 if (bp->shadow_bulletin.content.valid_bitmap & 1 << VLAN_VALID) {
960
- BNX2X_ERR("Hypervisor will dicline the request, avoiding\n");
958
+ BNX2X_ERR("Hypervisor will decline the request, avoiding\n");
961959 rc = -EINVAL;
962960 goto out;
963961 }
....@@ -1179,7 +1177,6 @@
11791177
11801178 /* ack the FW */
11811179 storm_memset_vf_mbx_ack(bp, vf->abs_vfid);
1182
- mmiowb();
11831180
11841181 /* copy the response header including status-done field,
11851182 * must be last dmae, must be after FW is acked
....@@ -1654,13 +1651,9 @@
16541651 {
16551652 int i, j;
16561653 struct bnx2x_vf_mac_vlan_filters *fl = NULL;
1657
- size_t fsz;
16581654
1659
- fsz = tlv->n_mac_vlan_filters *
1660
- sizeof(struct bnx2x_vf_mac_vlan_filter) +
1661
- sizeof(struct bnx2x_vf_mac_vlan_filters);
1662
-
1663
- fl = kzalloc(fsz, GFP_KERNEL);
1655
+ fl = kzalloc(struct_size(fl, filters, tlv->n_mac_vlan_filters),
1656
+ GFP_KERNEL);
16641657 if (!fl)
16651658 return -ENOMEM;
16661659
....@@ -2190,7 +2183,6 @@
21902183 */
21912184 storm_memset_vf_mbx_ack(bp, vf->abs_vfid);
21922185 /* Firmware ack should be written before unlocking channel */
2193
- mmiowb();
21942186 bnx2x_unlock_vf_pf_channel(bp, vf, mbx->first_tlv.tl.type);
21952187 }
21962188 }