x-cube-azrtos-f4 icon indicating copy to clipboard operation
x-cube-azrtos-f4 copied to clipboard

NetX status request for ethernet driver failure

Open ucayalifish opened this issue 3 years ago • 1 comments

_nx_driver_get_status in common/drivers/ethernet/nx_stm32_eth_driver.c does not set value pointed by driver_req_ptr -> nx_ip_driver_return_ptr thus caller consider request failed.

ucayalifish avatar Dec 02 '21 11:12 ucayalifish

This patch actually fixes the issue for me: Middlewares/ST/netxduo/common/drivers/ethernet/nx_stm32_eth_driver.c `static VOID _nx_driver_get_status(NX_IP_DRIVER *driver_req_ptr) {

UINT status;

/* Call hardware specific get status function. */ status = _nx_driver_hardware_get_status(driver_req_ptr);

/* Determine if there was an error. */ if (status != NX_SUCCESS) {

/* Indicate an unsuccessful request.  */
driver_req_ptr -> nx_ip_driver_status =  NX_DRIVER_ERROR;
*driver_req_ptr -> nx_ip_driver_return_ptr = NX_FALSE; // <<- added
}

else {

/* Indicate the request was successful.   */
driver_req_ptr -> nx_ip_driver_status =  NX_SUCCESS;
*driver_req_ptr -> nx_ip_driver_return_ptr = NX_TRUE; // <<- added

} } `

ucayalifish avatar Dec 02 '21 11:12 ucayalifish