Skip to content
Snippets Groups Projects
Commit c2f896b8 authored by Shinya Kuribayashi's avatar Shinya Kuribayashi Committed by Ben Warren
Browse files

drivers/net/rtl8139.c: rx_status should be le32_to_cpu(rx_status).


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: default avatarShinya Kuribayashi <shinya.kuribayashi@necel.com>
Cc: Masami Komiya <mkomiya@sonare.it>
Cc: Lucas Jin <lucasjin@gmail.com>
Signed-off-by: default avatarBen Warren <biggerbadderben@gmail.com>
parent 96a23674
Branches
Tags
No related merge requests found
...@@ -489,7 +489,7 @@ static int rtl_poll(struct eth_device *dev) ...@@ -489,7 +489,7 @@ static int rtl_poll(struct eth_device *dev)
ring_offs = cur_rx % RX_BUF_LEN; ring_offs = cur_rx % RX_BUF_LEN;
/* ring_offs is guaranteed being 4-byte aligned */ /* 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_size = rx_status >> 16;
rx_status &= 0xffff; rx_status &= 0xffff;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment