mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 08:36:24 +08:00
arch/mips/src/pic32mx/pic32mx_ethernet.c: Fix syslog formats
This commit is contained in:
committed by
Xiang Xiao
parent
7b66e23a6a
commit
326b217ef4
@@ -42,6 +42,7 @@
|
||||
#include <nuttx/config.h>
|
||||
#if defined(CONFIG_NET) && defined(CONFIG_PIC32MX_ETHERNET)
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <time.h>
|
||||
@@ -1418,7 +1419,7 @@ static void pic32mx_rxdone(struct pic32mx_driver_s *priv)
|
||||
|
||||
if ((rxdesc->rsv2 & RXDESC_RSV2_OK) == 0)
|
||||
{
|
||||
nerr("ERROR. rsv1: %08x rsv2: %08x\n",
|
||||
nerr("ERROR. rsv1: %08" PRIx32 " rsv2: %08" PRIx32 "\n",
|
||||
rxdesc->rsv1, rxdesc->rsv2);
|
||||
NETDEV_RXERRORS(&priv->pd_dev);
|
||||
pic32mx_rxreturn(rxdesc);
|
||||
@@ -1432,7 +1433,7 @@ static void pic32mx_rxdone(struct pic32mx_driver_s *priv)
|
||||
|
||||
else if (priv->pd_dev.d_len > CONFIG_NET_ETH_PKTSIZE)
|
||||
{
|
||||
nerr("ERROR: Too big. packet length: %d rxdesc: %08x\n",
|
||||
nerr("ERROR: Too big. packet length: %d rxdesc: %08" PRIx32 "\n",
|
||||
priv->pd_dev.d_len, rxdesc->status);
|
||||
NETDEV_RXERRORS(&priv->pd_dev);
|
||||
pic32mx_rxreturn(rxdesc);
|
||||
@@ -1445,7 +1446,7 @@ static void pic32mx_rxdone(struct pic32mx_driver_s *priv)
|
||||
else if ((rxdesc->status & (RXDESC_STATUS_EOP | RXDESC_STATUS_SOP)) !=
|
||||
(RXDESC_STATUS_EOP | RXDESC_STATUS_SOP))
|
||||
{
|
||||
nerr("ERROR: Fragment. packet length: %d rxdesc: %08x\n",
|
||||
nerr("ERROR: Fragment. packet length: %d rxdesc: %08" PRIx32 "\n",
|
||||
priv->pd_dev.d_len, rxdesc->status);
|
||||
NETDEV_RXFRAGMENTS(&priv->pd_dev);
|
||||
pic32mx_rxreturn(rxdesc);
|
||||
@@ -1753,7 +1754,7 @@ static void pic32mx_interrupt_work(void *arg)
|
||||
|
||||
if ((status & ETH_INT_RXOVFLW) != 0)
|
||||
{
|
||||
nerr("ERROR: RX Overrun. status: %08x\n", status);
|
||||
nerr("ERROR: RX Overrun. status: %08" PRIx32 "\n", status);
|
||||
NETDEV_RXERRORS(&priv->pd_dev);
|
||||
}
|
||||
|
||||
@@ -1764,7 +1765,8 @@ static void pic32mx_interrupt_work(void *arg)
|
||||
|
||||
if ((status & ETH_INT_RXBUFNA) != 0)
|
||||
{
|
||||
nerr("ERROR: RX buffer descriptor overrun. status: %08x\n",
|
||||
nerr("ERROR: RX buffer descriptor overrun. "
|
||||
"status: %08" PRIx32 "\n",
|
||||
status);
|
||||
NETDEV_RXERRORS(&priv->pd_dev);
|
||||
}
|
||||
@@ -1776,7 +1778,7 @@ static void pic32mx_interrupt_work(void *arg)
|
||||
|
||||
if ((status & ETH_INT_RXBUSE) != 0)
|
||||
{
|
||||
nerr("ERROR: RX BVCI bus error. status: %08x\n", status);
|
||||
nerr("ERROR: RX BVCI bus error. status: %08" PRIx32 "\n", status);
|
||||
NETDEV_RXERRORS(&priv->pd_dev);
|
||||
}
|
||||
|
||||
@@ -1821,7 +1823,7 @@ static void pic32mx_interrupt_work(void *arg)
|
||||
|
||||
if ((status & ETH_INT_TXABORT) != 0)
|
||||
{
|
||||
nerr("ERROR: TX abort. status: %08x\n", status);
|
||||
nerr("ERROR: TX abort. status: %08" PRIx32 "\n", status);
|
||||
NETDEV_TXERRORS(&priv->pd_dev);
|
||||
}
|
||||
|
||||
@@ -1832,7 +1834,7 @@ static void pic32mx_interrupt_work(void *arg)
|
||||
|
||||
if ((status & ETH_INT_TXBUSE) != 0)
|
||||
{
|
||||
nerr("ERROR: TX BVCI bus error. status: %08x\n", status);
|
||||
nerr("ERROR: TX BVCI bus error. status: %08" PRIx32 "\n", status);
|
||||
NETDEV_TXERRORS(&priv->pd_dev);
|
||||
}
|
||||
|
||||
@@ -2123,8 +2125,10 @@ static int pic32mx_ifup(struct net_driver_s *dev)
|
||||
int ret;
|
||||
|
||||
ninfo("Bringing up: %d.%d.%d.%d\n",
|
||||
dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff,
|
||||
(dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24);
|
||||
(int)(dev->d_ipaddr & 0xff),
|
||||
(int)((dev->d_ipaddr >> 8) & 0xff),
|
||||
(int)((dev->d_ipaddr >> 16) & 0xff),
|
||||
(int)(dev->d_ipaddr >> 24));
|
||||
|
||||
/* Reset the Ethernet controller (again) */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user