git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
crypto/dpaa_sec: support authonly and chain with raw API
[dpdk.git]
/
drivers
/
net
/
bnx2x
/
ecore_sp.c
diff --git
a/drivers/net/bnx2x/ecore_sp.c
b/drivers/net/bnx2x/ecore_sp.c
index
b9bca91
..
0075422
100644
(file)
--- a/
drivers/net/bnx2x/ecore_sp.c
+++ b/
drivers/net/bnx2x/ecore_sp.c
@@
-161,7
+161,7
@@
static inline void ecore_exe_queue_reset_pending(struct bnx2x_softc *sc,
*/
static int ecore_exe_queue_step(struct bnx2x_softc *sc,
struct ecore_exe_queue_obj *o,
*/
static int ecore_exe_queue_step(struct bnx2x_softc *sc,
struct ecore_exe_queue_obj *o,
- u
nsigned long
*ramrod_flags)
+ u
int32_t
*ramrod_flags)
{
struct ecore_exeq_elem *elem, spacer;
int cur_len = 0, rc;
{
struct ecore_exeq_elem *elem, spacer;
int cur_len = 0, rc;
@@
-245,7
+245,7
@@
static struct ecore_exeq_elem *ecore_exe_queue_alloc_elem(struct
}
/************************ raw_obj functions ***********************************/
}
/************************ raw_obj functions ***********************************/
-static
int
ecore_raw_check_pending(struct ecore_raw_obj *o)
+static
bool
ecore_raw_check_pending(struct ecore_raw_obj *o)
{
/*
* !! converts the value returned by ECORE_TEST_BIT such that it
{
/*
* !! converts the value returned by ECORE_TEST_BIT such that it
@@
-282,7
+282,7
@@
static void ecore_raw_set_pending(struct ecore_raw_obj *o)
*
*/
static int ecore_state_wait(struct bnx2x_softc *sc, int state,
*
*/
static int ecore_state_wait(struct bnx2x_softc *sc, int state,
- u
nsigned long
*pstate)
+ u
int32_t
*pstate)
{
/* can take a while if any port is running */
int cnt = 5000;
{
/* can take a while if any port is running */
int cnt = 5000;
@@
-328,7
+328,7
@@
static int ecore_raw_wait(struct bnx2x_softc *sc, struct ecore_raw_obj *raw)
/***************** Classification verbs: Set/Del MAC/VLAN/VLAN-MAC ************/
/* credit handling callbacks */
/***************** Classification verbs: Set/Del MAC/VLAN/VLAN-MAC ************/
/* credit handling callbacks */
-static
int
ecore_get_cam_offset_mac(struct ecore_vlan_mac_obj *o, int *offset)
+static
bool
ecore_get_cam_offset_mac(struct ecore_vlan_mac_obj *o, int *offset)
{
struct ecore_credit_pool_obj *mp = o->macs_pool;
{
struct ecore_credit_pool_obj *mp = o->macs_pool;
@@
-337,7
+337,7
@@
static int ecore_get_cam_offset_mac(struct ecore_vlan_mac_obj *o, int *offset)
return mp->get_entry(mp, offset);
}
return mp->get_entry(mp, offset);
}
-static
int
ecore_get_credit_mac(struct ecore_vlan_mac_obj *o)
+static
bool
ecore_get_credit_mac(struct ecore_vlan_mac_obj *o)
{
struct ecore_credit_pool_obj *mp = o->macs_pool;
{
struct ecore_credit_pool_obj *mp = o->macs_pool;
@@
-346,14
+346,14
@@
static int ecore_get_credit_mac(struct ecore_vlan_mac_obj *o)
return mp->get(mp, 1);
}
return mp->get(mp, 1);
}
-static
int
ecore_put_cam_offset_mac(struct ecore_vlan_mac_obj *o, int offset)
+static
bool
ecore_put_cam_offset_mac(struct ecore_vlan_mac_obj *o, int offset)
{
struct ecore_credit_pool_obj *mp = o->macs_pool;
return mp->put_entry(mp, offset);
}
{
struct ecore_credit_pool_obj *mp = o->macs_pool;
return mp->put_entry(mp, offset);
}
-static
int
ecore_put_credit_mac(struct ecore_vlan_mac_obj *o)
+static
bool
ecore_put_credit_mac(struct ecore_vlan_mac_obj *o)
{
struct ecore_credit_pool_obj *mp = o->macs_pool;
{
struct ecore_credit_pool_obj *mp = o->macs_pool;
@@
-396,9
+396,9
@@
static void __ecore_vlan_mac_h_exec_pending(struct bnx2x_softc *sc,
struct ecore_vlan_mac_obj *o)
{
int rc;
struct ecore_vlan_mac_obj *o)
{
int rc;
- u
nsigned long
ramrod_flags = o->saved_ramrod_flags;
+ u
int32_t
ramrod_flags = o->saved_ramrod_flags;
- ECORE_MSG(sc, "vlan_mac_lock execute pending command with ramrod flags %
l
u",
+ ECORE_MSG(sc, "vlan_mac_lock execute pending command with ramrod flags %u",
ramrod_flags);
o->head_exe_request = FALSE;
o->saved_ramrod_flags = 0;
ramrod_flags);
o->head_exe_request = FALSE;
o->saved_ramrod_flags = 0;
@@
-425,11
+425,11
@@
static void __ecore_vlan_mac_h_exec_pending(struct bnx2x_softc *sc,
*/
static void __ecore_vlan_mac_h_pend(struct bnx2x_softc *sc __rte_unused,
struct ecore_vlan_mac_obj *o,
*/
static void __ecore_vlan_mac_h_pend(struct bnx2x_softc *sc __rte_unused,
struct ecore_vlan_mac_obj *o,
- u
nsigned long
ramrod_flags)
+ u
int32_t
ramrod_flags)
{
o->head_exe_request = TRUE;
o->saved_ramrod_flags = ramrod_flags;
{
o->head_exe_request = TRUE;
o->saved_ramrod_flags = ramrod_flags;
- ECORE_MSG(sc, "Placing pending execution with ramrod flags %
l
u",
+ ECORE_MSG(sc, "Placing pending execution with ramrod flags %u",
ramrod_flags);
}
ramrod_flags);
}
@@
-618,7
+618,7
@@
static int ecore_check_mac_add(struct bnx2x_softc *sc __rte_unused,
{
struct ecore_vlan_mac_registry_elem *pos;
{
struct ecore_vlan_mac_registry_elem *pos;
- ECORE_MSG(sc, "Checking MAC
%02x:%02x:%02x:%02x:%02x:%02x
for ADD command",
+ ECORE_MSG(sc, "Checking MAC
" RTE_ETHER_ADDR_PRT_FMT "
for ADD command",
data->mac.mac[0], data->mac.mac[1], data->mac.mac[2],
data->mac.mac[3], data->mac.mac[4], data->mac.mac[5]);
data->mac.mac[0], data->mac.mac[1], data->mac.mac[2],
data->mac.mac[3], data->mac.mac[4], data->mac.mac[5]);
@@
-647,7
+647,7
@@
static struct ecore_vlan_mac_registry_elem *ecore_check_mac_del(struct bnx2x_sof
{
struct ecore_vlan_mac_registry_elem *pos;
{
struct ecore_vlan_mac_registry_elem *pos;
- ECORE_MSG(sc, "Checking MAC
%02x:%02x:%02x:%02x:%02x:%02x
for DEL command",
+ ECORE_MSG(sc, "Checking MAC
" RTE_ETHER_ADDR_PRT_FMT "
for DEL command",
data->mac.mac[0], data->mac.mac[1], data->mac.mac[2],
data->mac.mac[3], data->mac.mac[4], data->mac.mac[5]);
data->mac.mac[0], data->mac.mac[1], data->mac.mac[2],
data->mac.mac[3], data->mac.mac[4], data->mac.mac[5]);
@@
-661,7
+661,7
@@
static struct ecore_vlan_mac_registry_elem *ecore_check_mac_del(struct bnx2x_sof
}
/* check_move() callback */
}
/* check_move() callback */
-static
int
ecore_check_move(struct bnx2x_softc *sc,
+static
bool
ecore_check_move(struct bnx2x_softc *sc,
struct ecore_vlan_mac_obj *src_o,
struct ecore_vlan_mac_obj *dst_o,
union ecore_classification_ramrod_data *data)
struct ecore_vlan_mac_obj *src_o,
struct ecore_vlan_mac_obj *dst_o,
union ecore_classification_ramrod_data *data)
@@
-686,7
+686,7
@@
static int ecore_check_move(struct bnx2x_softc *sc,
return TRUE;
}
return TRUE;
}
-static
int
ecore_check_move_always_err(__rte_unused struct bnx2x_softc *sc,
+static
bool
ecore_check_move_always_err(__rte_unused struct bnx2x_softc *sc,
__rte_unused struct ecore_vlan_mac_obj
*src_o, __rte_unused struct ecore_vlan_mac_obj
*dst_o, __rte_unused union
__rte_unused struct ecore_vlan_mac_obj
*src_o, __rte_unused struct ecore_vlan_mac_obj
*dst_o, __rte_unused union
@@
-713,7
+713,7
@@
static uint8_t ecore_vlan_mac_get_rx_tx_flag(struct ecore_vlan_mac_obj
}
void ecore_set_mac_in_nig(struct bnx2x_softc *sc,
}
void ecore_set_mac_in_nig(struct bnx2x_softc *sc,
-
int
add, unsigned char *dev_addr, int index)
+
bool
add, unsigned char *dev_addr, int index)
{
uint32_t wb_data[2];
uint32_t reg_offset = ECORE_PORT_ID(sc) ? NIG_REG_LLH1_FUNC_MEM :
{
uint32_t wb_data[2];
uint32_t reg_offset = ECORE_PORT_ID(sc) ? NIG_REG_LLH1_FUNC_MEM :
@@
-754,7
+754,7
@@
void ecore_set_mac_in_nig(struct bnx2x_softc *sc,
*
*/
static void ecore_vlan_mac_set_cmd_hdr_e2(struct ecore_vlan_mac_obj *o,
*
*/
static void ecore_vlan_mac_set_cmd_hdr_e2(struct ecore_vlan_mac_obj *o,
-
int
add, int opcode,
+
bool
add, int opcode,
struct eth_classify_cmd_header
*hdr)
{
struct eth_classify_cmd_header
*hdr)
{
@@
-803,8
+803,8
@@
static void ecore_set_one_mac_e2(struct bnx2x_softc *sc,
(struct eth_classify_rules_ramrod_data *)(raw->rdata);
int rule_cnt = rule_idx + 1, cmd = elem->cmd_data.vlan_mac.cmd;
union eth_classify_rule_cmd *rule_entry = &data->rules[rule_idx];
(struct eth_classify_rules_ramrod_data *)(raw->rdata);
int rule_cnt = rule_idx + 1, cmd = elem->cmd_data.vlan_mac.cmd;
union eth_classify_rule_cmd *rule_entry = &data->rules[rule_idx];
-
int
add = (cmd == ECORE_VLAN_MAC_ADD) ? TRUE : FALSE;
- u
nsigned long
*vlan_mac_flags = &elem->cmd_data.vlan_mac.vlan_mac_flags;
+
bool
add = (cmd == ECORE_VLAN_MAC_ADD) ? TRUE : FALSE;
+ u
int32_t
*vlan_mac_flags = &elem->cmd_data.vlan_mac.vlan_mac_flags;
uint8_t *mac = elem->cmd_data.vlan_mac.u.mac.mac;
/* Set LLH CAM entry: currently only iSCSI and ETH macs are
uint8_t *mac = elem->cmd_data.vlan_mac.u.mac.mac;
/* Set LLH CAM entry: currently only iSCSI and ETH macs are
@@
-841,7
+841,7
@@
static void ecore_set_one_mac_e2(struct bnx2x_softc *sc,
ecore_vlan_mac_set_cmd_hdr_e2(o, add, CLASSIFY_RULE_OPCODE_MAC,
&rule_entry->mac.header);
ecore_vlan_mac_set_cmd_hdr_e2(o, add, CLASSIFY_RULE_OPCODE_MAC,
&rule_entry->mac.header);
- ECORE_MSG(sc, "About to %s MAC
%02x:%02x:%02x:%02x:%02x:%02x
for Queue %d",
+ ECORE_MSG(sc, "About to %s MAC
" RTE_ETHER_ADDR_PRT_FMT "
for Queue %d",
(add ? "add" : "delete"), mac[0], mac[1], mac[2], mac[3],
mac[4], mac[5], raw->cl_id);
(add ? "add" : "delete"), mac[0], mac[1], mac[2], mac[3],
mac[4], mac[5], raw->cl_id);
@@
-946,7
+946,7
@@
static void ecore_vlan_mac_set_rdata_e1x(struct bnx2x_softc *sc
ecore_vlan_mac_set_cfg_entry_e1x(o, add, opcode, mac, vlan_id,
cfg_entry);
ecore_vlan_mac_set_cfg_entry_e1x(o, add, opcode, mac, vlan_id,
cfg_entry);
- ECORE_MSG(sc, "%s
MAC %02x:%02x:%02x:%02x:%02x:%02x
CLID %d CAM offset %d",
+ ECORE_MSG(sc, "%s
MAC " RTE_ETHER_ADDR_PRT_FMT "
CLID %d CAM offset %d",
(add ? "setting" : "clearing"),
mac[0], mac[1], mac[2], mac[3], mac[4], mac[5],
o->raw.cl_id, cam_offset);
(add ? "setting" : "clearing"),
mac[0], mac[1], mac[2], mac[3], mac[4], mac[5],
o->raw.cl_id, cam_offset);
@@
-1326,7
+1326,7
@@
static int ecore_wait_vlan_mac(struct bnx2x_softc *sc,
static int __ecore_vlan_mac_execute_step(struct bnx2x_softc *sc,
struct ecore_vlan_mac_obj *o,
static int __ecore_vlan_mac_execute_step(struct bnx2x_softc *sc,
struct ecore_vlan_mac_obj *o,
- u
nsigned long
*ramrod_flags)
+ u
int32_t
*ramrod_flags)
{
int rc = ECORE_SUCCESS;
{
int rc = ECORE_SUCCESS;
@@
-1362,7
+1362,7
@@
static int __ecore_vlan_mac_execute_step(struct bnx2x_softc *sc,
static int ecore_complete_vlan_mac(struct bnx2x_softc *sc,
struct ecore_vlan_mac_obj *o,
union event_ring_elem *cqe,
static int ecore_complete_vlan_mac(struct bnx2x_softc *sc,
struct ecore_vlan_mac_obj *o,
union event_ring_elem *cqe,
- u
nsigned long
*ramrod_flags)
+ u
int32_t
*ramrod_flags)
{
struct ecore_raw_obj *r = &o->raw;
int rc;
{
struct ecore_raw_obj *r = &o->raw;
int rc;
@@
-1518,7
+1518,7
@@
static int ecore_vlan_mac_get_registry_elem(struct bnx2x_softc *sc,
static int ecore_execute_vlan_mac(struct bnx2x_softc *sc,
union ecore_qable_obj *qo,
ecore_list_t * exe_chunk,
static int ecore_execute_vlan_mac(struct bnx2x_softc *sc,
union ecore_qable_obj *qo,
ecore_list_t * exe_chunk,
- u
nsigned long
*ramrod_flags)
+ u
int32_t
*ramrod_flags)
{
struct ecore_exeq_elem *elem;
struct ecore_vlan_mac_obj *o = &qo->vlan_mac, *cam_obj;
{
struct ecore_exeq_elem *elem;
struct ecore_vlan_mac_obj *o = &qo->vlan_mac, *cam_obj;
@@
-1678,7
+1678,7
@@
int ecore_config_vlan_mac(struct bnx2x_softc *sc,
{
int rc = ECORE_SUCCESS;
struct ecore_vlan_mac_obj *o = p->vlan_mac_obj;
{
int rc = ECORE_SUCCESS;
struct ecore_vlan_mac_obj *o = p->vlan_mac_obj;
- u
nsigned long
*ramrod_flags = &p->ramrod_flags;
+ u
int32_t
*ramrod_flags = &p->ramrod_flags;
int cont = ECORE_TEST_BIT(RAMROD_CONT, ramrod_flags);
struct ecore_raw_obj *raw = &o->raw;
int cont = ECORE_TEST_BIT(RAMROD_CONT, ramrod_flags);
struct ecore_raw_obj *raw = &o->raw;
@@
-1758,8
+1758,8
@@
int ecore_config_vlan_mac(struct bnx2x_softc *sc,
*/
static int ecore_vlan_mac_del_all(struct bnx2x_softc *sc,
struct ecore_vlan_mac_obj *o,
*/
static int ecore_vlan_mac_del_all(struct bnx2x_softc *sc,
struct ecore_vlan_mac_obj *o,
- u
nsigned long
*vlan_mac_flags,
- u
nsigned long
*ramrod_flags)
+ u
int32_t
*vlan_mac_flags,
+ u
int32_t
*ramrod_flags)
{
struct ecore_vlan_mac_registry_elem *pos = NULL;
int rc = 0, read_lock;
{
struct ecore_vlan_mac_registry_elem *pos = NULL;
int rc = 0, read_lock;
@@
-1836,7
+1836,7
@@
static void ecore_init_raw_obj(struct ecore_raw_obj *raw, uint8_t cl_id,
uint32_t cid, uint8_t func_id,
void *rdata,
ecore_dma_addr_t rdata_mapping, int state,
uint32_t cid, uint8_t func_id,
void *rdata,
ecore_dma_addr_t rdata_mapping, int state,
- u
nsigned long
*pstate, ecore_obj_type type)
+ u
int32_t
*pstate, ecore_obj_type type)
{
raw->func_id = func_id;
raw->cid = cid;
{
raw->func_id = func_id;
raw->cid = cid;
@@
-1856,7
+1856,7
@@
static void ecore_init_vlan_mac_common(struct ecore_vlan_mac_obj *o,
uint8_t cl_id, uint32_t cid,
uint8_t func_id, void *rdata,
ecore_dma_addr_t rdata_mapping,
uint8_t cl_id, uint32_t cid,
uint8_t func_id, void *rdata,
ecore_dma_addr_t rdata_mapping,
- int state, u
nsigned long
*pstate,
+ int state, u
int32_t
*pstate,
ecore_obj_type type,
struct ecore_credit_pool_obj
*macs_pool, struct ecore_credit_pool_obj
ecore_obj_type type,
struct ecore_credit_pool_obj
*macs_pool, struct ecore_credit_pool_obj
@@
-1883,7
+1883,7
@@
void ecore_init_mac_obj(struct bnx2x_softc *sc,
struct ecore_vlan_mac_obj *mac_obj,
uint8_t cl_id, uint32_t cid, uint8_t func_id,
void *rdata, ecore_dma_addr_t rdata_mapping, int state,
struct ecore_vlan_mac_obj *mac_obj,
uint8_t cl_id, uint32_t cid, uint8_t func_id,
void *rdata, ecore_dma_addr_t rdata_mapping, int state,
- u
nsigned long
*pstate, ecore_obj_type type,
+ u
int32_t
*pstate, ecore_obj_type type,
struct ecore_credit_pool_obj *macs_pool)
{
union ecore_qable_obj *qable_obj = (union ecore_qable_obj *)mac_obj;
struct ecore_credit_pool_obj *macs_pool)
{
union ecore_qable_obj *qable_obj = (union ecore_qable_obj *)mac_obj;
@@
-2034,8
+2034,8
@@
static void ecore_rx_mode_set_rdata_hdr_e2(uint32_t cid, struct eth_classify_hea
hdr->rule_cnt = rule_cnt;
}
hdr->rule_cnt = rule_cnt;
}
-static void ecore_rx_mode_set_cmd_state_e2(u
nsigned long *accept_flags, struct eth_filter_rules_cmd
-
*cmd, int clear_accept_all)
+static void ecore_rx_mode_set_cmd_state_e2(u
int32_t *accept_flags,
+
struct eth_filter_rules_cmd
*cmd, int clear_accept_all)
{
uint16_t state;
{
uint16_t state;
@@
-2157,7
+2157,7
@@
static int ecore_set_rx_mode_e2(struct bnx2x_softc *sc,
ecore_rx_mode_set_rdata_hdr_e2(p->cid, &data->header, rule_idx);
ECORE_MSG
ecore_rx_mode_set_rdata_hdr_e2(p->cid, &data->header, rule_idx);
ECORE_MSG
- (sc, "About to configure %d rules, rx_accept_flags 0x%
lx, tx_accept_flags 0x%l
x",
+ (sc, "About to configure %d rules, rx_accept_flags 0x%
x, tx_accept_flags 0x%
x",
data->header.rule_cnt, p->rx_accept_flags, p->tx_accept_flags);
/* No need for an explicit memory barrier here as long we would
data->header.rule_cnt, p->rx_accept_flags, p->tx_accept_flags);
/* No need for an explicit memory barrier here as long we would
@@
-2511,7
+2511,7
@@
static void ecore_mcast_hdl_pending_add_e2(struct bnx2x_softc *sc,
cnt++;
ECORE_MSG
cnt++;
ECORE_MSG
- (sc, "About to configure
%02x:%02x:%02x:%02x:%02x:%02x
mcast MAC",
+ (sc, "About to configure
" RTE_ETHER_ADDR_PRT_FMT "
mcast MAC",
pmac_pos->mac[0], pmac_pos->mac[1], pmac_pos->mac[2],
pmac_pos->mac[3], pmac_pos->mac[4], pmac_pos->mac[5]);
pmac_pos->mac[0], pmac_pos->mac[1], pmac_pos->mac[2],
pmac_pos->mac[3], pmac_pos->mac[4], pmac_pos->mac[5]);
@@
-2644,7
+2644,7
@@
static void ecore_mcast_hdl_add(struct bnx2x_softc *sc,
cnt++;
ECORE_MSG
cnt++;
ECORE_MSG
- (sc, "About to configure
%02x:%02x:%02x:%02x:%02x:%02x
mcast MAC",
+ (sc, "About to configure
" RTE_ETHER_ADDR_PRT_FMT "
mcast MAC",
mlist_pos->mac[0], mlist_pos->mac[1], mlist_pos->mac[2],
mlist_pos->mac[3], mlist_pos->mac[4], mlist_pos->mac[5]);
}
mlist_pos->mac[0], mlist_pos->mac[1], mlist_pos->mac[2],
mlist_pos->mac[3], mlist_pos->mac[4], mlist_pos->mac[5]);
}
@@
-2944,7
+2944,7
@@
static void ecore_mcast_hdl_add_e1h(struct bnx2x_softc *sc __rte_unused,
ECORE_57711_SET_MC_FILTER(mc_filter, bit);
ECORE_MSG
ECORE_57711_SET_MC_FILTER(mc_filter, bit);
ECORE_MSG
- (sc, "About to configure
%02x:%02x:%02x:%02x:%02x:%02x
mcast MAC, bin %d",
+ (sc, "About to configure
" RTE_ETHER_ADDR_PRT_FMT "
mcast MAC, bin %d",
mlist_pos->mac[0], mlist_pos->mac[1], mlist_pos->mac[2],
mlist_pos->mac[3], mlist_pos->mac[4], mlist_pos->mac[5],
bit);
mlist_pos->mac[0], mlist_pos->mac[1], mlist_pos->mac[2],
mlist_pos->mac[3], mlist_pos->mac[4], mlist_pos->mac[5],
bit);
@@
-3117,12
+3117,12
@@
static void ecore_mcast_set_sched(struct ecore_mcast_obj *o)
ECORE_SMP_MB_AFTER_CLEAR_BIT();
}
ECORE_SMP_MB_AFTER_CLEAR_BIT();
}
-static
int
ecore_mcast_check_sched(struct ecore_mcast_obj *o)
+static
bool
ecore_mcast_check_sched(struct ecore_mcast_obj *o)
{
return ! !ECORE_TEST_BIT(o->sched_state, o->raw.pstate);
}
{
return ! !ECORE_TEST_BIT(o->sched_state, o->raw.pstate);
}
-static
int
ecore_mcast_check_pending(struct ecore_mcast_obj *o)
+static
bool
ecore_mcast_check_pending(struct ecore_mcast_obj *o)
{
return o->raw.check_pending(&o->raw) || o->check_sched(o);
}
{
return o->raw.check_pending(&o->raw) || o->check_sched(o);
}
@@
-3132,7
+3132,7
@@
void ecore_init_mcast_obj(struct bnx2x_softc *sc,
uint8_t mcast_cl_id, uint32_t mcast_cid,
uint8_t func_id, uint8_t engine_id, void *rdata,
ecore_dma_addr_t rdata_mapping, int state,
uint8_t mcast_cl_id, uint32_t mcast_cid,
uint8_t func_id, uint8_t engine_id, void *rdata,
ecore_dma_addr_t rdata_mapping, int state,
- u
nsigned long
*pstate, ecore_obj_type type)
+ u
int32_t
*pstate, ecore_obj_type type)
{
ECORE_MEMSET(mcast_obj, 0, sizeof(*mcast_obj));
{
ECORE_MEMSET(mcast_obj, 0, sizeof(*mcast_obj));
@@
-3195,7
+3195,7
@@
void ecore_init_mcast_obj(struct bnx2x_softc *sc,
* returns TRUE if (v + a) was less than u, and FALSE otherwise.
*
*/
* returns TRUE if (v + a) was less than u, and FALSE otherwise.
*
*/
-static
int __atomic_add_ifless(ecore_atomic_t *
v, int a, int u)
+static
bool __atomic_add_ifless(ecore_atomic_t *
v, int a, int u)
{
int c, old;
{
int c, old;
@@
-3223,7
+3223,7
@@
static int __atomic_add_ifless(ecore_atomic_t * v, int a, int u)
* returns TRUE if (v - a) was more or equal than u, and FALSE
* otherwise.
*/
* returns TRUE if (v - a) was more or equal than u, and FALSE
* otherwise.
*/
-static
int __atomic_dec_ifmoe(ecore_atomic_t *
v, int a, int u)
+static
bool __atomic_dec_ifmoe(ecore_atomic_t *
v, int a, int u)
{
int c, old;
{
int c, old;
@@
-3241,9
+3241,9
@@
static int __atomic_dec_ifmoe(ecore_atomic_t * v, int a, int u)
return TRUE;
}
return TRUE;
}
-static
int
ecore_credit_pool_get(struct ecore_credit_pool_obj *o, int cnt)
+static
bool
ecore_credit_pool_get(struct ecore_credit_pool_obj *o, int cnt)
{
{
-
int
rc;
+
bool
rc;
ECORE_SMP_MB();
rc = __atomic_dec_ifmoe(&o->credit, cnt, 0);
ECORE_SMP_MB();
rc = __atomic_dec_ifmoe(&o->credit, cnt, 0);
@@
-3252,9
+3252,9
@@
static int ecore_credit_pool_get(struct ecore_credit_pool_obj *o, int cnt)
return rc;
}
return rc;
}
-static
int
ecore_credit_pool_put(struct ecore_credit_pool_obj *o, int cnt)
+static
bool
ecore_credit_pool_put(struct ecore_credit_pool_obj *o, int cnt)
{
{
-
int
rc;
+
bool
rc;
ECORE_SMP_MB();
ECORE_SMP_MB();
@@
-3276,14
+3276,14
@@
static int ecore_credit_pool_check(struct ecore_credit_pool_obj *o)
return cur_credit;
}
return cur_credit;
}
-static
int
ecore_credit_pool_always_TRUE(__rte_unused struct
+static
bool
ecore_credit_pool_always_TRUE(__rte_unused struct
ecore_credit_pool_obj *o,
__rte_unused int cnt)
{
return TRUE;
}
ecore_credit_pool_obj *o,
__rte_unused int cnt)
{
return TRUE;
}
-static
int
ecore_credit_pool_get_entry(struct ecore_credit_pool_obj *o,
+static
bool
ecore_credit_pool_get_entry(struct ecore_credit_pool_obj *o,
int *offset)
{
int idx, vec, i;
int *offset)
{
int idx, vec, i;
@@
-3312,7
+3312,7
@@
static int ecore_credit_pool_get_entry(struct ecore_credit_pool_obj *o,
return FALSE;
}
return FALSE;
}
-static
int
ecore_credit_pool_put_entry(struct ecore_credit_pool_obj *o,
+static
bool
ecore_credit_pool_put_entry(struct ecore_credit_pool_obj *o,
int offset)
{
if (offset < o->base_pool_offset)
int offset)
{
if (offset < o->base_pool_offset)
@@
-3329,14
+3329,14
@@
static int ecore_credit_pool_put_entry(struct ecore_credit_pool_obj *o,
return TRUE;
}
return TRUE;
}
-static
int
ecore_credit_pool_put_entry_always_TRUE(__rte_unused struct
+static
bool
ecore_credit_pool_put_entry_always_TRUE(__rte_unused struct
ecore_credit_pool_obj *o,
__rte_unused int offset)
{
return TRUE;
}
ecore_credit_pool_obj *o,
__rte_unused int offset)
{
return TRUE;
}
-static
int
ecore_credit_pool_get_entry_always_TRUE(__rte_unused struct
+static
bool
ecore_credit_pool_get_entry_always_TRUE(__rte_unused struct
ecore_credit_pool_obj *o,
__rte_unused int *offset)
{
ecore_credit_pool_obj *o,
__rte_unused int *offset)
{
@@
-3598,7
+3598,7
@@
void ecore_init_rss_config_obj(struct bnx2x_softc *sc __rte_unused,
uint8_t cl_id, uint32_t cid, uint8_t func_id,
uint8_t engine_id,
void *rdata, ecore_dma_addr_t rdata_mapping,
uint8_t cl_id, uint32_t cid, uint8_t func_id,
uint8_t engine_id,
void *rdata, ecore_dma_addr_t rdata_mapping,
- int state, u
nsigned long
*pstate,
+ int state, u
int32_t
*pstate,
ecore_obj_type type)
{
ecore_init_raw_obj(&rss_obj->raw, cl_id, cid, func_id, rdata,
ecore_obj_type type)
{
ecore_init_raw_obj(&rss_obj->raw, cl_id, cid, func_id, rdata,
@@
-3627,7
+3627,7
@@
int ecore_queue_state_change(struct bnx2x_softc *sc,
{
struct ecore_queue_sp_obj *o = params->q_obj;
int rc, pending_bit;
{
struct ecore_queue_sp_obj *o = params->q_obj;
int rc, pending_bit;
- u
nsigned long
*pending = &o->pending;
+ u
int32_t
*pending = &o->pending;
/* Check that the requested transition is legal */
rc = o->check_transition(sc, o, params);
/* Check that the requested transition is legal */
rc = o->check_transition(sc, o, params);
@@
-3638,9
+3638,9
@@
int ecore_queue_state_change(struct bnx2x_softc *sc,
}
/* Set "pending" bit */
}
/* Set "pending" bit */
- ECORE_MSG(sc, "pending bit was=%
l
x", o->pending);
+ ECORE_MSG(sc, "pending bit was=%x", o->pending);
pending_bit = o->set_pending(o, params);
pending_bit = o->set_pending(o, params);
- ECORE_MSG(sc, "pending bit now=%
l
x", o->pending);
+ ECORE_MSG(sc, "pending bit now=%x", o->pending);
/* Don't send a command if only driver cleanup was requested */
if (ECORE_TEST_BIT(RAMROD_DRV_CLR_ONLY, ¶ms->ramrod_flags))
/* Don't send a command if only driver cleanup was requested */
if (ECORE_TEST_BIT(RAMROD_DRV_CLR_ONLY, ¶ms->ramrod_flags))
@@
-3704,11
+3704,11
@@
static int ecore_queue_comp_cmd(struct bnx2x_softc *sc __rte_unused,
struct ecore_queue_sp_obj *o,
enum ecore_queue_cmd cmd)
{
struct ecore_queue_sp_obj *o,
enum ecore_queue_cmd cmd)
{
- u
nsigned long
cur_pending = o->pending;
+ u
int32_t
cur_pending = o->pending;
if (!ECORE_TEST_AND_CLEAR_BIT(cmd, &cur_pending)) {
PMD_DRV_LOG(ERR, sc,
if (!ECORE_TEST_AND_CLEAR_BIT(cmd, &cur_pending)) {
PMD_DRV_LOG(ERR, sc,
- "Bad MC reply %d for queue %d in state %d pending 0x%
l
x, next_state %d",
+ "Bad MC reply %d for queue %d in state %d pending 0x%x, next_state %d",
cmd, o->cids[ECORE_PRIMARY_CID_INDEX], o->state,
cur_pending, o->next_state);
return ECORE_INVAL;
cmd, o->cids[ECORE_PRIMARY_CID_INDEX], o->state,
cur_pending, o->next_state);
return ECORE_INVAL;
@@
-3762,7
+3762,7
@@
static void ecore_q_fill_init_general_data(struct bnx2x_softc *sc __rte_unused,
struct ecore_queue_sp_obj *o,
struct ecore_general_setup_params
*params, struct client_init_general_data
struct ecore_queue_sp_obj *o,
struct ecore_general_setup_params
*params, struct client_init_general_data
- *gen_data, u
nsigned long
*flags)
+ *gen_data, u
int32_t
*flags)
{
gen_data->client_id = o->cl_id;
{
gen_data->client_id = o->cl_id;
@@
-3794,7
+3794,7
@@
static void ecore_q_fill_init_general_data(struct bnx2x_softc *sc __rte_unused,
static void ecore_q_fill_init_tx_data(struct ecore_txq_setup_params *params,
struct client_init_tx_data *tx_data,
static void ecore_q_fill_init_tx_data(struct ecore_txq_setup_params *params,
struct client_init_tx_data *tx_data,
- u
nsigned long
*flags)
+ u
int32_t
*flags)
{
tx_data->enforce_security_flg =
ECORE_TEST_BIT(ECORE_Q_FLG_TX_SEC, flags);
{
tx_data->enforce_security_flg =
ECORE_TEST_BIT(ECORE_Q_FLG_TX_SEC, flags);
@@
-3840,7
+3840,7
@@
static void ecore_q_fill_init_pause_data(struct rxq_pause_params *params,
static void ecore_q_fill_init_rx_data(struct ecore_rxq_setup_params *params,
struct client_init_rx_data *rx_data,
static void ecore_q_fill_init_rx_data(struct ecore_rxq_setup_params *params,
struct client_init_rx_data *rx_data,
- u
nsigned long
*flags)
+ u
int32_t
*flags)
{
rx_data->tpa_en = ECORE_TEST_BIT(ECORE_Q_FLG_TPA, flags) *
CLIENT_INIT_RX_DATA_TPA_EN_IPV4;
{
rx_data->tpa_en = ECORE_TEST_BIT(ECORE_Q_FLG_TPA, flags) *
CLIENT_INIT_RX_DATA_TPA_EN_IPV4;
@@
-4421,7
+4421,7
@@
static int ecore_queue_chk_transition(struct bnx2x_softc *sc __rte_unused,
* the previous one.
*/
if (o->pending) {
* the previous one.
*/
if (o->pending) {
- PMD_DRV_LOG(ERR, sc, "Blocking transition since pending was %
l
x",
+ PMD_DRV_LOG(ERR, sc, "Blocking transition since pending was %x",
o->pending);
return ECORE_BUSY;
}
o->pending);
return ECORE_BUSY;
}
@@
-4630,7
+4630,7
@@
void ecore_init_queue_obj(struct bnx2x_softc *sc,
struct ecore_queue_sp_obj *obj,
uint8_t cl_id, uint32_t * cids, uint8_t cid_cnt,
uint8_t func_id, void *rdata,
struct ecore_queue_sp_obj *obj,
uint8_t cl_id, uint32_t * cids, uint8_t cid_cnt,
uint8_t func_id, void *rdata,
- ecore_dma_addr_t rdata_mapping, u
nsigned long
type)
+ ecore_dma_addr_t rdata_mapping, u
int32_t
type)
{
ECORE_MEMSET(obj, 0, sizeof(*obj));
{
ECORE_MEMSET(obj, 0, sizeof(*obj));
@@
-4699,11
+4699,11
@@
ecore_func_state_change_comp(struct bnx2x_softc *sc __rte_unused,
struct ecore_func_sp_obj *o,
enum ecore_func_cmd cmd)
{
struct ecore_func_sp_obj *o,
enum ecore_func_cmd cmd)
{
- u
nsigned long
cur_pending = o->pending;
+ u
int32_t
cur_pending = o->pending;
if (!ECORE_TEST_AND_CLEAR_BIT(cmd, &cur_pending)) {
PMD_DRV_LOG(ERR, sc,
if (!ECORE_TEST_AND_CLEAR_BIT(cmd, &cur_pending)) {
PMD_DRV_LOG(ERR, sc,
- "Bad MC reply %d for func %d in state %d pending 0x%
l
x, next_state %d",
+ "Bad MC reply %d for func %d in state %d pending 0x%x, next_state %d",
cmd, ECORE_FUNC_ID(sc), o->state, cur_pending,
o->next_state);
return ECORE_INVAL;
cmd, ECORE_FUNC_ID(sc), o->state, cur_pending,
o->next_state);
return ECORE_INVAL;
@@
-5311,7
+5311,7
@@
int ecore_func_state_change(struct bnx2x_softc *sc,
struct ecore_func_sp_obj *o = params->f_obj;
int rc, cnt = 300;
enum ecore_func_cmd cmd = params->cmd;
struct ecore_func_sp_obj *o = params->f_obj;
int rc, cnt = 300;
enum ecore_func_cmd cmd = params->cmd;
- u
nsigned long
*pending = &o->pending;
+ u
int32_t
*pending = &o->pending;
ECORE_MUTEX_LOCK(&o->one_pending_mutex);
ECORE_MUTEX_LOCK(&o->one_pending_mutex);