mirror of
https://github.com/Stichting-MINIX-Research-Foundation/u-boot.git
synced 2025-09-11 05:02:26 -04:00
Fix dm9000 receive status and len little endian issue
The received status and len was in little endian format and caused the ethernet unable to proceed further. Add __le16_to_cpu() in dm9000_rx_status_8/16/32bit(). Signed-off-by: TsiChung Liew <Tsi-Chung.Liew@freescale.com> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
This commit is contained in:
parent
fcd69a1a57
commit
943b825bf1
@ -214,24 +214,28 @@ static void dm9000_rx_status_32bit(u16 *RxStatus, u16 *RxLen)
|
|||||||
DM9000_outb(DM9000_MRCMD, DM9000_IO);
|
DM9000_outb(DM9000_MRCMD, DM9000_IO);
|
||||||
|
|
||||||
tmpdata = DM9000_inl(DM9000_DATA);
|
tmpdata = DM9000_inl(DM9000_DATA);
|
||||||
*RxStatus = tmpdata;
|
*RxStatus = __le16_to_cpu(tmpdata);
|
||||||
*RxLen = tmpdata >> 16;
|
*RxLen = __le16_to_cpu(tmpdata >> 16);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void dm9000_rx_status_16bit(u16 *RxStatus, u16 *RxLen)
|
static void dm9000_rx_status_16bit(u16 *RxStatus, u16 *RxLen)
|
||||||
{
|
{
|
||||||
DM9000_outb(DM9000_MRCMD, DM9000_IO);
|
DM9000_outb(DM9000_MRCMD, DM9000_IO);
|
||||||
|
|
||||||
*RxStatus = DM9000_inw(DM9000_DATA);
|
*RxStatus = __le16_to_cpu(DM9000_inw(DM9000_DATA));
|
||||||
*RxLen = DM9000_inw(DM9000_DATA);
|
*RxLen = __le16_to_cpu(DM9000_inw(DM9000_DATA));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void dm9000_rx_status_8bit(u16 *RxStatus, u16 *RxLen)
|
static void dm9000_rx_status_8bit(u16 *RxStatus, u16 *RxLen)
|
||||||
{
|
{
|
||||||
DM9000_outb(DM9000_MRCMD, DM9000_IO);
|
DM9000_outb(DM9000_MRCMD, DM9000_IO);
|
||||||
|
|
||||||
*RxStatus = DM9000_inb(DM9000_DATA) + (DM9000_inb(DM9000_DATA) << 8);
|
*RxStatus =
|
||||||
*RxLen = DM9000_inb(DM9000_DATA) + (DM9000_inb(DM9000_DATA) << 8);
|
__le16_to_cpu(DM9000_inb(DM9000_DATA) +
|
||||||
|
(DM9000_inb(DM9000_DATA) << 8));
|
||||||
|
*RxLen =
|
||||||
|
__le16_to_cpu(DM9000_inb(DM9000_DATA) +
|
||||||
|
(DM9000_inb(DM9000_DATA) << 8));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user