drivers: net: lan865x: Fix initialization of semaphores
This change fixes semaphores' definition. To be more specific - the limit was wrongly set to UINT_MAX. With those changes - the 'tx_rx_sem' now assures that only one execution path (i.e. receiving or sending data) is executed at a time. Moreover, the change in 'int_sem' now assures that this semaphore limit, when reached, is saturated. Signed-off-by: Lukasz Majewski <lukma@denx.de>
This commit is contained in:
parent
ecfe5f1167
commit
8df4482f4c
|
@ -577,8 +577,8 @@ static const struct ethernet_api lan865x_api_func = {
|
|||
static struct lan865x_data lan865x_data_##inst = { \
|
||||
.mac_address = DT_INST_PROP(inst, local_mac_address), \
|
||||
.tx_rx_sem = \
|
||||
Z_SEM_INITIALIZER((lan865x_data_##inst).tx_rx_sem, 1, UINT_MAX), \
|
||||
.int_sem = Z_SEM_INITIALIZER((lan865x_data_##inst).int_sem, 0, UINT_MAX), \
|
||||
Z_SEM_INITIALIZER((lan865x_data_##inst).tx_rx_sem, 1, 1), \
|
||||
.int_sem = Z_SEM_INITIALIZER((lan865x_data_##inst).int_sem, 0, 1), \
|
||||
.tc6 = &oa_tc6_##inst \
|
||||
}; \
|
||||
\
|
||||
|
|
Loading…
Reference in a new issue