diff --git a/bsp/nxp/imx/imx6ull-smart/README.md b/bsp/nxp/imx/imx6ull-smart/README.md index cd2e34abef..1fd7308a0d 100644 --- a/bsp/nxp/imx/imx6ull-smart/README.md +++ b/bsp/nxp/imx/imx6ull-smart/README.md @@ -35,7 +35,6 @@ ART-pi smart采用了米尔科技的imx6ull核心板,硬件由韦东山团队 > > ### 待完善、修复 -> * [ ] 网络 以太网网络问题修复 > * [ ] 信号 信号处理问题修复 diff --git a/bsp/nxp/imx/imx6ull-smart/drivers/drv_eth.c b/bsp/nxp/imx/imx6ull-smart/drivers/drv_eth.c index ccfc66c4ec..1d830d1d1b 100644 --- a/bsp/nxp/imx/imx6ull-smart/drivers/drv_eth.c +++ b/bsp/nxp/imx/imx6ull-smart/drivers/drv_eth.c @@ -171,13 +171,13 @@ rt_err_t enet_buffer_init(enet_buffer_config_t *buffConfig) ((SYS_PAGE_SIZE<txBufferTotalSize)) { LOG_E("ERROR: alloc mem not enough for enet driver"); - return RT_ERROR; + return -RT_ERROR; } rx_buff_addr = rt_pages_alloc(RX_BUFFER_INDEX_NUM); if(!rx_buff_addr) { LOG_E("ERROR: rx buff page alloc failed"); - return RT_ERROR; + return -RT_ERROR; } buffConfig->rxBufferAlign = (void *)rt_ioremap_nocache(virtual_to_physical(rx_buff_addr), (SYS_PAGE_SIZE<rxPhyBufferAlign = (void *)virtual_to_physical(rx_buff_addr); @@ -186,7 +186,7 @@ rt_err_t enet_buffer_init(enet_buffer_config_t *buffConfig) if(!tx_buff_addr) { LOG_E("ERROR: tx buff page alloc failed"); - return RT_ERROR; + return -RT_ERROR; } buffConfig->txBufferAlign = (void *)rt_ioremap_nocache(virtual_to_physical(tx_buff_addr), (SYS_PAGE_SIZE<txPhyBufferAlign = (void *)virtual_to_physical(tx_buff_addr); @@ -195,7 +195,7 @@ rt_err_t enet_buffer_init(enet_buffer_config_t *buffConfig) if(!rx_bd_addr) { LOG_E("ERROR: rx bd page alloc failed"); - return RT_ERROR; + return -RT_ERROR; } buffConfig->rxBdStartAddrAlign = (void *)rt_ioremap_nocache(virtual_to_physical(rx_bd_addr), (SYS_PAGE_SIZE<rxPhyBdStartAddrAlign = virtual_to_physical(rx_bd_addr); @@ -204,7 +204,7 @@ rt_err_t enet_buffer_init(enet_buffer_config_t *buffConfig) if(!tx_bd_addr) { LOG_E("ERROR: tx bd page alloc failed"); - return RT_ERROR; + return -RT_ERROR; } buffConfig->txBdStartAddrAlign = (void *)rt_ioremap_nocache(virtual_to_physical(tx_bd_addr), (SYS_PAGE_SIZE<txPhyBdStartAddrAlign = virtual_to_physical(tx_bd_addr); @@ -387,10 +387,11 @@ rt_err_t rt_imx6ul_eth_tx(rt_device_t dev, struct pbuf *p) offset = offset + q->len; if(status == kStatus_Success) { + ret = RT_EOK; } else { - return RT_ERROR; + ret = -RT_ERROR; } } if(offset > ENET_FRAME_MAX_FRAMELEN)