| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * QLogic qlcnic NIC Driver |
|---|
| 3 | 4 | * Copyright (c) 2009-2013 QLogic Corporation |
|---|
| 4 | | - * |
|---|
| 5 | | - * See LICENSE.qlcnic for copyright and licensing details. |
|---|
| 6 | 5 | */ |
|---|
| 7 | 6 | |
|---|
| 8 | 7 | #include <linux/types.h> |
|---|
| .. | .. |
|---|
| 222 | 221 | return 0; |
|---|
| 223 | 222 | |
|---|
| 224 | 223 | qlcnic_destroy_async_wq: |
|---|
| 224 | + while (i--) |
|---|
| 225 | + kfree(sriov->vf_info[i].vp); |
|---|
| 225 | 226 | destroy_workqueue(bc->bc_async_wq); |
|---|
| 226 | 227 | |
|---|
| 227 | 228 | qlcnic_destroy_trans_wq: |
|---|
| .. | .. |
|---|
| 906 | 907 | u32 *hdr, u32 *pay, u32 size) |
|---|
| 907 | 908 | { |
|---|
| 908 | 909 | struct qlcnic_hardware_context *ahw = adapter->ahw; |
|---|
| 909 | | - u32 fw_mbx; |
|---|
| 910 | 910 | u8 i, max = 2, hdr_size, j; |
|---|
| 911 | 911 | |
|---|
| 912 | 912 | hdr_size = (sizeof(struct qlcnic_bc_hdr) / sizeof(u32)); |
|---|
| 913 | 913 | max = (size / sizeof(u32)) + hdr_size; |
|---|
| 914 | 914 | |
|---|
| 915 | | - fw_mbx = readl(QLCNIC_MBX_FW(ahw, 0)); |
|---|
| 916 | 915 | for (i = 2, j = 0; j < hdr_size; i++, j++) |
|---|
| 917 | 916 | *(hdr++) = readl(QLCNIC_MBX_FW(ahw, i)); |
|---|
| 918 | 917 | for (; j < max; i++, j++) |
|---|
| .. | .. |
|---|
| 938 | 937 | static int qlcnic_sriov_issue_bc_post(struct qlcnic_bc_trans *trans, u8 type) |
|---|
| 939 | 938 | { |
|---|
| 940 | 939 | struct qlcnic_vf_info *vf = trans->vf; |
|---|
| 941 | | - u32 pay_size, hdr_size; |
|---|
| 940 | + u32 pay_size; |
|---|
| 942 | 941 | u32 *hdr, *pay; |
|---|
| 943 | 942 | int ret; |
|---|
| 944 | 943 | u8 pci_func = trans->func_id; |
|---|
| .. | .. |
|---|
| 949 | 948 | if (type == QLC_BC_COMMAND) { |
|---|
| 950 | 949 | hdr = (u32 *)(trans->req_hdr + trans->curr_req_frag); |
|---|
| 951 | 950 | pay = (u32 *)(trans->req_pay + trans->curr_req_frag); |
|---|
| 952 | | - hdr_size = (sizeof(struct qlcnic_bc_hdr) / sizeof(u32)); |
|---|
| 953 | 951 | pay_size = qlcnic_sriov_get_bc_paysize(trans->req_pay_size, |
|---|
| 954 | 952 | trans->curr_req_frag); |
|---|
| 955 | 953 | pay_size = (pay_size / sizeof(u32)); |
|---|
| 956 | 954 | } else { |
|---|
| 957 | 955 | hdr = (u32 *)(trans->rsp_hdr + trans->curr_rsp_frag); |
|---|
| 958 | 956 | pay = (u32 *)(trans->rsp_pay + trans->curr_rsp_frag); |
|---|
| 959 | | - hdr_size = (sizeof(struct qlcnic_bc_hdr) / sizeof(u32)); |
|---|
| 960 | 957 | pay_size = qlcnic_sriov_get_bc_paysize(trans->rsp_pay_size, |
|---|
| 961 | 958 | trans->curr_rsp_frag); |
|---|
| 962 | 959 | pay_size = (pay_size / sizeof(u32)); |
|---|
| .. | .. |
|---|
| 1588 | 1585 | if (mode == VPORT_MISS_MODE_ACCEPT_ALL && |
|---|
| 1589 | 1586 | !adapter->fdb_mac_learn) { |
|---|
| 1590 | 1587 | qlcnic_alloc_lb_filters_mem(adapter); |
|---|
| 1591 | | - adapter->drv_mac_learn = 1; |
|---|
| 1588 | + adapter->drv_mac_learn = true; |
|---|
| 1592 | 1589 | adapter->rx_mac_learn = true; |
|---|
| 1593 | 1590 | } else { |
|---|
| 1594 | | - adapter->drv_mac_learn = 0; |
|---|
| 1591 | + adapter->drv_mac_learn = false; |
|---|
| 1595 | 1592 | adapter->rx_mac_learn = false; |
|---|
| 1596 | 1593 | } |
|---|
| 1597 | 1594 | } |
|---|