Commit 03d28ffe authored by Kalesh AP's avatar Kalesh AP Committed by David S. Miller

be2net: add blank line after declarations

This patch fixes checkpatch warnings in be2net by adding a blank line
between declaration and code blocks.
Signed-off-by: default avatarKalesh AP <kalesh.purayil@emulex.com>
Signed-off-by: default avatarSathya Perla <sathya.perla@emulex.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 627cd5f8
...@@ -593,6 +593,7 @@ static int lancer_wait_ready(struct be_adapter *adapter) ...@@ -593,6 +593,7 @@ static int lancer_wait_ready(struct be_adapter *adapter)
static bool lancer_provisioning_error(struct be_adapter *adapter) static bool lancer_provisioning_error(struct be_adapter *adapter)
{ {
u32 sliport_status = 0, sliport_err1 = 0, sliport_err2 = 0; u32 sliport_status = 0, sliport_err1 = 0, sliport_err2 = 0;
sliport_status = ioread32(adapter->db + SLIPORT_STATUS_OFFSET); sliport_status = ioread32(adapter->db + SLIPORT_STATUS_OFFSET);
if (sliport_status & SLIPORT_STATUS_ERR_MASK) { if (sliport_status & SLIPORT_STATUS_ERR_MASK) {
sliport_err1 = ioread32(adapter->db + SLIPORT_ERROR1_OFFSET); sliport_err1 = ioread32(adapter->db + SLIPORT_ERROR1_OFFSET);
...@@ -922,6 +923,7 @@ int be_cmd_eq_create(struct be_adapter *adapter, struct be_eq_obj *eqo) ...@@ -922,6 +923,7 @@ int be_cmd_eq_create(struct be_adapter *adapter, struct be_eq_obj *eqo)
status = be_mbox_notify_wait(adapter); status = be_mbox_notify_wait(adapter);
if (!status) { if (!status) {
struct be_cmd_resp_eq_create *resp = embedded_payload(wrb); struct be_cmd_resp_eq_create *resp = embedded_payload(wrb);
eqo->q.id = le16_to_cpu(resp->eq_id); eqo->q.id = le16_to_cpu(resp->eq_id);
eqo->msix_idx = eqo->msix_idx =
(ver == 2) ? le16_to_cpu(resp->msix_idx) : eqo->idx; (ver == 2) ? le16_to_cpu(resp->msix_idx) : eqo->idx;
...@@ -964,6 +966,7 @@ int be_cmd_mac_addr_query(struct be_adapter *adapter, u8 *mac_addr, ...@@ -964,6 +966,7 @@ int be_cmd_mac_addr_query(struct be_adapter *adapter, u8 *mac_addr,
status = be_mcc_notify_wait(adapter); status = be_mcc_notify_wait(adapter);
if (!status) { if (!status) {
struct be_cmd_resp_mac_query *resp = embedded_payload(wrb); struct be_cmd_resp_mac_query *resp = embedded_payload(wrb);
memcpy(mac_addr, resp->mac.addr, ETH_ALEN); memcpy(mac_addr, resp->mac.addr, ETH_ALEN);
} }
...@@ -1000,6 +1003,7 @@ int be_cmd_pmac_add(struct be_adapter *adapter, u8 *mac_addr, ...@@ -1000,6 +1003,7 @@ int be_cmd_pmac_add(struct be_adapter *adapter, u8 *mac_addr,
status = be_mcc_notify_wait(adapter); status = be_mcc_notify_wait(adapter);
if (!status) { if (!status) {
struct be_cmd_resp_pmac_add *resp = embedded_payload(wrb); struct be_cmd_resp_pmac_add *resp = embedded_payload(wrb);
*pmac_id = le32_to_cpu(resp->pmac_id); *pmac_id = le32_to_cpu(resp->pmac_id);
} }
...@@ -1104,6 +1108,7 @@ int be_cmd_cq_create(struct be_adapter *adapter, struct be_queue_info *cq, ...@@ -1104,6 +1108,7 @@ int be_cmd_cq_create(struct be_adapter *adapter, struct be_queue_info *cq,
status = be_mbox_notify_wait(adapter); status = be_mbox_notify_wait(adapter);
if (!status) { if (!status) {
struct be_cmd_resp_cq_create *resp = embedded_payload(wrb); struct be_cmd_resp_cq_create *resp = embedded_payload(wrb);
cq->id = le16_to_cpu(resp->cq_id); cq->id = le16_to_cpu(resp->cq_id);
cq->created = true; cq->created = true;
} }
...@@ -1116,6 +1121,7 @@ int be_cmd_cq_create(struct be_adapter *adapter, struct be_queue_info *cq, ...@@ -1116,6 +1121,7 @@ int be_cmd_cq_create(struct be_adapter *adapter, struct be_queue_info *cq,
static u32 be_encoded_q_len(int q_len) static u32 be_encoded_q_len(int q_len)
{ {
u32 len_encoded = fls(q_len); /* log2(len) + 1 */ u32 len_encoded = fls(q_len); /* log2(len) + 1 */
if (len_encoded == 16) if (len_encoded == 16)
len_encoded = 0; len_encoded = 0;
return len_encoded; return len_encoded;
...@@ -1171,6 +1177,7 @@ static int be_cmd_mccq_ext_create(struct be_adapter *adapter, ...@@ -1171,6 +1177,7 @@ static int be_cmd_mccq_ext_create(struct be_adapter *adapter,
status = be_mbox_notify_wait(adapter); status = be_mbox_notify_wait(adapter);
if (!status) { if (!status) {
struct be_cmd_resp_mcc_create *resp = embedded_payload(wrb); struct be_cmd_resp_mcc_create *resp = embedded_payload(wrb);
mccq->id = le16_to_cpu(resp->id); mccq->id = le16_to_cpu(resp->id);
mccq->created = true; mccq->created = true;
} }
...@@ -1214,6 +1221,7 @@ static int be_cmd_mccq_org_create(struct be_adapter *adapter, ...@@ -1214,6 +1221,7 @@ static int be_cmd_mccq_org_create(struct be_adapter *adapter,
status = be_mbox_notify_wait(adapter); status = be_mbox_notify_wait(adapter);
if (!status) { if (!status) {
struct be_cmd_resp_mcc_create *resp = embedded_payload(wrb); struct be_cmd_resp_mcc_create *resp = embedded_payload(wrb);
mccq->id = le16_to_cpu(resp->id); mccq->id = le16_to_cpu(resp->id);
mccq->created = true; mccq->created = true;
} }
...@@ -1272,6 +1280,7 @@ int be_cmd_txq_create(struct be_adapter *adapter, struct be_tx_obj *txo) ...@@ -1272,6 +1280,7 @@ int be_cmd_txq_create(struct be_adapter *adapter, struct be_tx_obj *txo)
status = be_cmd_notify_wait(adapter, &wrb); status = be_cmd_notify_wait(adapter, &wrb);
if (!status) { if (!status) {
struct be_cmd_resp_eth_tx_create *resp = embedded_payload(&wrb); struct be_cmd_resp_eth_tx_create *resp = embedded_payload(&wrb);
txq->id = le16_to_cpu(resp->cid); txq->id = le16_to_cpu(resp->cid);
if (ver == 2) if (ver == 2)
txo->db_offset = le32_to_cpu(resp->db_offset); txo->db_offset = le32_to_cpu(resp->db_offset);
...@@ -1316,6 +1325,7 @@ int be_cmd_rxq_create(struct be_adapter *adapter, ...@@ -1316,6 +1325,7 @@ int be_cmd_rxq_create(struct be_adapter *adapter,
status = be_mcc_notify_wait(adapter); status = be_mcc_notify_wait(adapter);
if (!status) { if (!status) {
struct be_cmd_resp_eth_rx_create *resp = embedded_payload(wrb); struct be_cmd_resp_eth_rx_create *resp = embedded_payload(wrb);
rxq->id = le16_to_cpu(resp->id); rxq->id = le16_to_cpu(resp->id);
rxq->created = true; rxq->created = true;
*rss_id = resp->rss_id; *rss_id = resp->rss_id;
...@@ -1429,6 +1439,7 @@ int be_cmd_if_create(struct be_adapter *adapter, u32 cap_flags, u32 en_flags, ...@@ -1429,6 +1439,7 @@ int be_cmd_if_create(struct be_adapter *adapter, u32 cap_flags, u32 en_flags,
status = be_cmd_notify_wait(adapter, &wrb); status = be_cmd_notify_wait(adapter, &wrb);
if (!status) { if (!status) {
struct be_cmd_resp_if_create *resp = embedded_payload(&wrb); struct be_cmd_resp_if_create *resp = embedded_payload(&wrb);
*if_handle = le32_to_cpu(resp->interface_id); *if_handle = le32_to_cpu(resp->interface_id);
/* Hack to retrieve VF's pmac-id on BE3 */ /* Hack to retrieve VF's pmac-id on BE3 */
...@@ -1603,6 +1614,7 @@ int be_cmd_link_status_query(struct be_adapter *adapter, u16 *link_speed, ...@@ -1603,6 +1614,7 @@ int be_cmd_link_status_query(struct be_adapter *adapter, u16 *link_speed,
status = be_mcc_notify_wait(adapter); status = be_mcc_notify_wait(adapter);
if (!status) { if (!status) {
struct be_cmd_resp_link_status *resp = embedded_payload(wrb); struct be_cmd_resp_link_status *resp = embedded_payload(wrb);
if (link_speed) { if (link_speed) {
*link_speed = resp->link_speed ? *link_speed = resp->link_speed ?
le16_to_cpu(resp->link_speed) * 10 : le16_to_cpu(resp->link_speed) * 10 :
...@@ -1670,6 +1682,7 @@ int be_cmd_get_reg_len(struct be_adapter *adapter, u32 *log_size) ...@@ -1670,6 +1682,7 @@ int be_cmd_get_reg_len(struct be_adapter *adapter, u32 *log_size)
status = be_mcc_notify_wait(adapter); status = be_mcc_notify_wait(adapter);
if (!status) { if (!status) {
struct be_cmd_resp_get_fat *resp = embedded_payload(wrb); struct be_cmd_resp_get_fat *resp = embedded_payload(wrb);
if (log_size && resp->log_size) if (log_size && resp->log_size)
*log_size = le32_to_cpu(resp->log_size) - *log_size = le32_to_cpu(resp->log_size) -
sizeof(u32); sizeof(u32);
...@@ -1729,6 +1742,7 @@ int be_cmd_get_regs(struct be_adapter *adapter, u32 buf_len, void *buf) ...@@ -1729,6 +1742,7 @@ int be_cmd_get_regs(struct be_adapter *adapter, u32 buf_len, void *buf)
status = be_mcc_notify_wait(adapter); status = be_mcc_notify_wait(adapter);
if (!status) { if (!status) {
struct be_cmd_resp_get_fat *resp = get_fat_cmd.va; struct be_cmd_resp_get_fat *resp = get_fat_cmd.va;
memcpy(buf + offset, memcpy(buf + offset,
resp->data_buffer, resp->data_buffer,
le32_to_cpu(resp->read_log_length)); le32_to_cpu(resp->read_log_length));
...@@ -2010,6 +2024,7 @@ int be_cmd_get_flow_control(struct be_adapter *adapter, u32 *tx_fc, u32 *rx_fc) ...@@ -2010,6 +2024,7 @@ int be_cmd_get_flow_control(struct be_adapter *adapter, u32 *tx_fc, u32 *rx_fc)
if (!status) { if (!status) {
struct be_cmd_resp_get_flow_control *resp = struct be_cmd_resp_get_flow_control *resp =
embedded_payload(wrb); embedded_payload(wrb);
*tx_fc = le16_to_cpu(resp->tx_flow_control); *tx_fc = le16_to_cpu(resp->tx_flow_control);
*rx_fc = le16_to_cpu(resp->rx_flow_control); *rx_fc = le16_to_cpu(resp->rx_flow_control);
} }
...@@ -2039,6 +2054,7 @@ int be_cmd_query_fw_cfg(struct be_adapter *adapter) ...@@ -2039,6 +2054,7 @@ int be_cmd_query_fw_cfg(struct be_adapter *adapter)
status = be_mbox_notify_wait(adapter); status = be_mbox_notify_wait(adapter);
if (!status) { if (!status) {
struct be_cmd_resp_query_fw_cfg *resp = embedded_payload(wrb); struct be_cmd_resp_query_fw_cfg *resp = embedded_payload(wrb);
adapter->port_num = le32_to_cpu(resp->phys_port); adapter->port_num = le32_to_cpu(resp->phys_port);
adapter->function_mode = le32_to_cpu(resp->function_mode); adapter->function_mode = le32_to_cpu(resp->function_mode);
adapter->function_caps = le32_to_cpu(resp->function_caps); adapter->function_caps = le32_to_cpu(resp->function_caps);
...@@ -2187,6 +2203,7 @@ int be_cmd_get_beacon_state(struct be_adapter *adapter, u8 port_num, u32 *state) ...@@ -2187,6 +2203,7 @@ int be_cmd_get_beacon_state(struct be_adapter *adapter, u8 port_num, u32 *state)
if (!status) { if (!status) {
struct be_cmd_resp_get_beacon_state *resp = struct be_cmd_resp_get_beacon_state *resp =
embedded_payload(wrb); embedded_payload(wrb);
*state = resp->beacon_state; *state = resp->beacon_state;
} }
...@@ -2628,6 +2645,7 @@ int be_cmd_ddr_dma_test(struct be_adapter *adapter, u64 pattern, ...@@ -2628,6 +2645,7 @@ int be_cmd_ddr_dma_test(struct be_adapter *adapter, u64 pattern,
if (!status) { if (!status) {
struct be_cmd_resp_ddrdma_test *resp; struct be_cmd_resp_ddrdma_test *resp;
resp = cmd->va; resp = cmd->va;
if ((memcmp(resp->rcv_buff, req->snd_buff, byte_cnt) != 0) || if ((memcmp(resp->rcv_buff, req->snd_buff, byte_cnt) != 0) ||
resp->snd_err) { resp->snd_err) {
...@@ -2703,6 +2721,7 @@ int be_cmd_get_phy_info(struct be_adapter *adapter) ...@@ -2703,6 +2721,7 @@ int be_cmd_get_phy_info(struct be_adapter *adapter)
if (!status) { if (!status) {
struct be_phy_info *resp_phy_info = struct be_phy_info *resp_phy_info =
cmd.va + sizeof(struct be_cmd_req_hdr); cmd.va + sizeof(struct be_cmd_req_hdr);
adapter->phy.phy_type = le16_to_cpu(resp_phy_info->phy_type); adapter->phy.phy_type = le16_to_cpu(resp_phy_info->phy_type);
adapter->phy.interface_type = adapter->phy.interface_type =
le16_to_cpu(resp_phy_info->interface_type); le16_to_cpu(resp_phy_info->interface_type);
...@@ -2832,6 +2851,7 @@ int be_cmd_req_native_mode(struct be_adapter *adapter) ...@@ -2832,6 +2851,7 @@ int be_cmd_req_native_mode(struct be_adapter *adapter)
status = be_mbox_notify_wait(adapter); status = be_mbox_notify_wait(adapter);
if (!status) { if (!status) {
struct be_cmd_resp_set_func_cap *resp = embedded_payload(wrb); struct be_cmd_resp_set_func_cap *resp = embedded_payload(wrb);
adapter->be3_native = le32_to_cpu(resp->cap_flags) & adapter->be3_native = le32_to_cpu(resp->cap_flags) &
CAPABILITY_BE3_NATIVE_ERX_API; CAPABILITY_BE3_NATIVE_ERX_API;
if (!adapter->be3_native) if (!adapter->be3_native)
...@@ -2871,6 +2891,7 @@ int be_cmd_get_fn_privileges(struct be_adapter *adapter, u32 *privilege, ...@@ -2871,6 +2891,7 @@ int be_cmd_get_fn_privileges(struct be_adapter *adapter, u32 *privilege,
if (!status) { if (!status) {
struct be_cmd_resp_get_fn_privileges *resp = struct be_cmd_resp_get_fn_privileges *resp =
embedded_payload(wrb); embedded_payload(wrb);
*privilege = le32_to_cpu(resp->privilege_mask); *privilege = le32_to_cpu(resp->privilege_mask);
/* In UMC mode FW does not return right privileges. /* In UMC mode FW does not return right privileges.
...@@ -3202,6 +3223,7 @@ int be_cmd_get_hsw_config(struct be_adapter *adapter, u16 *pvid, ...@@ -3202,6 +3223,7 @@ int be_cmd_get_hsw_config(struct be_adapter *adapter, u16 *pvid,
if (!status) { if (!status) {
struct be_cmd_resp_get_hsw_config *resp = struct be_cmd_resp_get_hsw_config *resp =
embedded_payload(wrb); embedded_payload(wrb);
be_dws_le_to_cpu(&resp->context, sizeof(resp->context)); be_dws_le_to_cpu(&resp->context, sizeof(resp->context));
vid = AMAP_GET_BITS(struct amap_get_hsw_resp_context, vid = AMAP_GET_BITS(struct amap_get_hsw_resp_context,
pvid, &resp->context); pvid, &resp->context);
...@@ -3261,6 +3283,7 @@ int be_cmd_get_acpi_wol_cap(struct be_adapter *adapter) ...@@ -3261,6 +3283,7 @@ int be_cmd_get_acpi_wol_cap(struct be_adapter *adapter)
status = be_mbox_notify_wait(adapter); status = be_mbox_notify_wait(adapter);
if (!status) { if (!status) {
struct be_cmd_resp_acpi_wol_magic_config_v1 *resp; struct be_cmd_resp_acpi_wol_magic_config_v1 *resp;
resp = (struct be_cmd_resp_acpi_wol_magic_config_v1 *) cmd.va; resp = (struct be_cmd_resp_acpi_wol_magic_config_v1 *) cmd.va;
adapter->wol_cap = resp->wol_settings; adapter->wol_cap = resp->wol_settings;
...@@ -3297,6 +3320,7 @@ int be_cmd_set_fw_log_level(struct be_adapter *adapter, u32 level) ...@@ -3297,6 +3320,7 @@ int be_cmd_set_fw_log_level(struct be_adapter *adapter, u32 level)
(extfat_cmd.va + sizeof(struct be_cmd_resp_hdr)); (extfat_cmd.va + sizeof(struct be_cmd_resp_hdr));
for (i = 0; i < le32_to_cpu(cfgs->num_modules); i++) { for (i = 0; i < le32_to_cpu(cfgs->num_modules); i++) {
u32 num_modes = le32_to_cpu(cfgs->module[i].num_modes); u32 num_modes = le32_to_cpu(cfgs->module[i].num_modes);
for (j = 0; j < num_modes; j++) { for (j = 0; j < num_modes; j++) {
if (cfgs->module[i].trace_lvl[j].mode == MODE_UART) if (cfgs->module[i].trace_lvl[j].mode == MODE_UART)
cfgs->module[i].trace_lvl[j].dbg_lvl = cfgs->module[i].trace_lvl[j].dbg_lvl =
...@@ -3333,6 +3357,7 @@ int be_cmd_get_fw_log_level(struct be_adapter *adapter) ...@@ -3333,6 +3357,7 @@ int be_cmd_get_fw_log_level(struct be_adapter *adapter)
if (!status) { if (!status) {
cfgs = (struct be_fat_conf_params *)(extfat_cmd.va + cfgs = (struct be_fat_conf_params *)(extfat_cmd.va +
sizeof(struct be_cmd_resp_hdr)); sizeof(struct be_cmd_resp_hdr));
for (j = 0; j < le32_to_cpu(cfgs->module[0].num_modes); j++) { for (j = 0; j < le32_to_cpu(cfgs->module[0].num_modes); j++) {
if (cfgs->module[0].trace_lvl[j].mode == MODE_UART) if (cfgs->module[0].trace_lvl[j].mode == MODE_UART)
level = cfgs->module[0].trace_lvl[j].dbg_lvl; level = cfgs->module[0].trace_lvl[j].dbg_lvl;
...@@ -3429,6 +3454,7 @@ int be_cmd_query_port_name(struct be_adapter *adapter, u8 *port_name) ...@@ -3429,6 +3454,7 @@ int be_cmd_query_port_name(struct be_adapter *adapter, u8 *port_name)
status = be_mcc_notify_wait(adapter); status = be_mcc_notify_wait(adapter);
if (!status) { if (!status) {
struct be_cmd_resp_get_port_name *resp = embedded_payload(wrb); struct be_cmd_resp_get_port_name *resp = embedded_payload(wrb);
*port_name = resp->port_name[adapter->hba_port_num]; *port_name = resp->port_name[adapter->hba_port_num];
} else { } else {
*port_name = adapter->hba_port_num + '0'; *port_name = adapter->hba_port_num + '0';
...@@ -4052,6 +4078,7 @@ int be_cmd_get_active_profile(struct be_adapter *adapter, u16 *profile_id) ...@@ -4052,6 +4078,7 @@ int be_cmd_get_active_profile(struct be_adapter *adapter, u16 *profile_id)
if (!status) { if (!status) {
struct be_cmd_resp_get_active_profile *resp = struct be_cmd_resp_get_active_profile *resp =
embedded_payload(wrb); embedded_payload(wrb);
*profile_id = le16_to_cpu(resp->active_profile_id); *profile_id = le16_to_cpu(resp->active_profile_id);
} }
......
...@@ -1193,6 +1193,7 @@ static int be_set_rxfh(struct net_device *netdev, const u32 *indir, ...@@ -1193,6 +1193,7 @@ static int be_set_rxfh(struct net_device *netdev, const u32 *indir,
if (indir) { if (indir) {
struct be_rx_obj *rxo; struct be_rx_obj *rxo;
for (i = 0; i < RSS_INDIR_TABLE_LEN; i++) { for (i = 0; i < RSS_INDIR_TABLE_LEN; i++) {
j = indir[i]; j = indir[i];
rxo = &adapter->rx_obj[j]; rxo = &adapter->rx_obj[j];
......
...@@ -126,6 +126,7 @@ static const char * const ue_status_hi_desc[] = { ...@@ -126,6 +126,7 @@ static const char * const ue_status_hi_desc[] = {
static void be_queue_free(struct be_adapter *adapter, struct be_queue_info *q) static void be_queue_free(struct be_adapter *adapter, struct be_queue_info *q)
{ {
struct be_dma_mem *mem = &q->dma_mem; struct be_dma_mem *mem = &q->dma_mem;
if (mem->va) { if (mem->va) {
dma_free_coherent(&adapter->pdev->dev, mem->size, mem->va, dma_free_coherent(&adapter->pdev->dev, mem->size, mem->va,
mem->dma); mem->dma);
...@@ -187,6 +188,7 @@ static void be_intr_set(struct be_adapter *adapter, bool enable) ...@@ -187,6 +188,7 @@ static void be_intr_set(struct be_adapter *adapter, bool enable)
static void be_rxq_notify(struct be_adapter *adapter, u16 qid, u16 posted) static void be_rxq_notify(struct be_adapter *adapter, u16 qid, u16 posted)
{ {
u32 val = 0; u32 val = 0;
val |= qid & DB_RQ_RING_ID_MASK; val |= qid & DB_RQ_RING_ID_MASK;
val |= posted << DB_RQ_NUM_POSTED_SHIFT; val |= posted << DB_RQ_NUM_POSTED_SHIFT;
...@@ -198,6 +200,7 @@ static void be_txq_notify(struct be_adapter *adapter, struct be_tx_obj *txo, ...@@ -198,6 +200,7 @@ static void be_txq_notify(struct be_adapter *adapter, struct be_tx_obj *txo,
u16 posted) u16 posted)
{ {
u32 val = 0; u32 val = 0;
val |= txo->q.id & DB_TXULP_RING_ID_MASK; val |= txo->q.id & DB_TXULP_RING_ID_MASK;
val |= (posted & DB_TXULP_NUM_POSTED_MASK) << DB_TXULP_NUM_POSTED_SHIFT; val |= (posted & DB_TXULP_NUM_POSTED_MASK) << DB_TXULP_NUM_POSTED_SHIFT;
...@@ -209,6 +212,7 @@ static void be_eq_notify(struct be_adapter *adapter, u16 qid, ...@@ -209,6 +212,7 @@ static void be_eq_notify(struct be_adapter *adapter, u16 qid,
bool arm, bool clear_int, u16 num_popped) bool arm, bool clear_int, u16 num_popped)
{ {
u32 val = 0; u32 val = 0;
val |= qid & DB_EQ_RING_ID_MASK; val |= qid & DB_EQ_RING_ID_MASK;
val |= ((qid & DB_EQ_RING_ID_EXT_MASK) << DB_EQ_RING_ID_EXT_MASK_SHIFT); val |= ((qid & DB_EQ_RING_ID_EXT_MASK) << DB_EQ_RING_ID_EXT_MASK_SHIFT);
...@@ -227,6 +231,7 @@ static void be_eq_notify(struct be_adapter *adapter, u16 qid, ...@@ -227,6 +231,7 @@ static void be_eq_notify(struct be_adapter *adapter, u16 qid,
void be_cq_notify(struct be_adapter *adapter, u16 qid, bool arm, u16 num_popped) void be_cq_notify(struct be_adapter *adapter, u16 qid, bool arm, u16 num_popped)
{ {
u32 val = 0; u32 val = 0;
val |= qid & DB_CQ_RING_ID_MASK; val |= qid & DB_CQ_RING_ID_MASK;
val |= ((qid & DB_CQ_RING_ID_EXT_MASK) << val |= ((qid & DB_CQ_RING_ID_EXT_MASK) <<
DB_CQ_RING_ID_EXT_MASK_SHIFT); DB_CQ_RING_ID_EXT_MASK_SHIFT);
...@@ -588,6 +593,7 @@ static struct rtnl_link_stats64 *be_get_stats64(struct net_device *netdev, ...@@ -588,6 +593,7 @@ static struct rtnl_link_stats64 *be_get_stats64(struct net_device *netdev,
for_all_rx_queues(adapter, rxo, i) { for_all_rx_queues(adapter, rxo, i) {
const struct be_rx_stats *rx_stats = rx_stats(rxo); const struct be_rx_stats *rx_stats = rx_stats(rxo);
do { do {
start = u64_stats_fetch_begin_irq(&rx_stats->sync); start = u64_stats_fetch_begin_irq(&rx_stats->sync);
pkts = rx_stats(rxo)->rx_pkts; pkts = rx_stats(rxo)->rx_pkts;
...@@ -602,6 +608,7 @@ static struct rtnl_link_stats64 *be_get_stats64(struct net_device *netdev, ...@@ -602,6 +608,7 @@ static struct rtnl_link_stats64 *be_get_stats64(struct net_device *netdev,
for_all_tx_queues(adapter, txo, i) { for_all_tx_queues(adapter, txo, i) {
const struct be_tx_stats *tx_stats = tx_stats(txo); const struct be_tx_stats *tx_stats = tx_stats(txo);
do { do {
start = u64_stats_fetch_begin_irq(&tx_stats->sync); start = u64_stats_fetch_begin_irq(&tx_stats->sync);
pkts = tx_stats(txo)->tx_pkts; pkts = tx_stats(txo)->tx_pkts;
...@@ -807,6 +814,7 @@ static int make_tx_wrbs(struct be_adapter *adapter, struct be_queue_info *txq, ...@@ -807,6 +814,7 @@ static int make_tx_wrbs(struct be_adapter *adapter, struct be_queue_info *txq,
if (skb->len > skb->data_len) { if (skb->len > skb->data_len) {
int len = skb_headlen(skb); int len = skb_headlen(skb);
busaddr = dma_map_single(dev, skb->data, len, DMA_TO_DEVICE); busaddr = dma_map_single(dev, skb->data, len, DMA_TO_DEVICE);
if (dma_mapping_error(dev, busaddr)) if (dma_mapping_error(dev, busaddr))
goto dma_err; goto dma_err;
...@@ -820,6 +828,7 @@ static int make_tx_wrbs(struct be_adapter *adapter, struct be_queue_info *txq, ...@@ -820,6 +828,7 @@ static int make_tx_wrbs(struct be_adapter *adapter, struct be_queue_info *txq,
for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) { for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) {
const struct skb_frag_struct *frag = &skb_shinfo(skb)->frags[i]; const struct skb_frag_struct *frag = &skb_shinfo(skb)->frags[i];
busaddr = skb_frag_dma_map(dev, frag, 0, busaddr = skb_frag_dma_map(dev, frag, 0,
skb_frag_size(frag), DMA_TO_DEVICE); skb_frag_size(frag), DMA_TO_DEVICE);
if (dma_mapping_error(dev, busaddr)) if (dma_mapping_error(dev, busaddr))
......
...@@ -174,6 +174,7 @@ int be_roce_register_driver(struct ocrdma_driver *drv) ...@@ -174,6 +174,7 @@ int be_roce_register_driver(struct ocrdma_driver *drv)
ocrdma_drv = drv; ocrdma_drv = drv;
list_for_each_entry(dev, &be_adapter_list, entry) { list_for_each_entry(dev, &be_adapter_list, entry) {
struct net_device *netdev; struct net_device *netdev;
_be_roce_dev_add(dev); _be_roce_dev_add(dev);
netdev = dev->netdev; netdev = dev->netdev;
if (netif_running(netdev) && netif_oper_up(netdev)) if (netif_running(netdev) && netif_oper_up(netdev))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment