From mboxrd@z Thu Jan 1 00:00:00 1970 From: Shinya Kuribayashi Date: Wed, 16 Jan 2008 16:13:31 +0900 Subject: [U-Boot-Users] [PATCH 3/3] drivers/net/rtl8139.c: rx_status should be le32_to_cpu(rx_status). In-Reply-To: <478DAD84.6030503@necel.com> References: <478DAD84.6030503@necel.com> Message-ID: <478DAE9B.1040403@necel.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de rx_status on the memory is basically in LE, but needs to be handled in CPU endian. le32_to_cpu() takes up this mission. Even if on the sane hardware, it'll work fine. Signed-off-by: Shinya Kuribayashi Cc: Masami Komiya Cc: Lucas Jin --- drivers/net/rtl8139.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/net/rtl8139.c b/drivers/net/rtl8139.c index 014f3b4..097f684 100644 --- a/drivers/net/rtl8139.c +++ b/drivers/net/rtl8139.c @@ -489,7 +489,7 @@ static int rtl_poll(struct eth_device *dev) ring_offs = cur_rx % RX_BUF_LEN; /* ring_offs is guaranteed being 4-byte aligned */ - rx_status = *(unsigned int *)(rx_ring + ring_offs); + rx_status = le32_to_cpu(*(unsigned int *)(rx_ring + ring_offs)); rx_size = rx_status >> 16; rx_status &= 0xffff;