mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-10-02 01:20:47 +09:00
arm: Kirkwood: Check the error summary bit for error detection
The Marvell documentation for the 88f6281 states that the error coding is only valid if the error summary and last frame bits in the transmit descriptor status field are set. This patch adds checks for these for transmit (I would get transmit errors on bootp with the current check, which I believe are spurious). Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
This commit is contained in:
parent
7b05f5e027
commit
16025ea455
@ -511,7 +511,9 @@ static int kwgbe_send(struct eth_device *dev, volatile void *dataptr,
|
|||||||
cmd_sts = readl(&p_txdesc->cmd_sts);
|
cmd_sts = readl(&p_txdesc->cmd_sts);
|
||||||
while (cmd_sts & KWGBE_BUFFER_OWNED_BY_DMA) {
|
while (cmd_sts & KWGBE_BUFFER_OWNED_BY_DMA) {
|
||||||
/* return fail if error is detected */
|
/* return fail if error is detected */
|
||||||
if (cmd_sts & (KWGBE_UR_ERROR | KWGBE_RL_ERROR)) {
|
if ((cmd_sts & (KWGBE_ERROR_SUMMARY | KWGBE_TX_LAST_FRAME)) ==
|
||||||
|
(KWGBE_ERROR_SUMMARY | KWGBE_TX_LAST_FRAME) &&
|
||||||
|
cmd_sts & (KWGBE_UR_ERROR | KWGBE_RL_ERROR)) {
|
||||||
printf("Err..(%s) in xmit packet\n", __FUNCTION__);
|
printf("Err..(%s) in xmit packet\n", __FUNCTION__);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
@ -256,6 +256,7 @@
|
|||||||
#define KWGBE_UR_ERROR (1 << 1)
|
#define KWGBE_UR_ERROR (1 << 1)
|
||||||
#define KWGBE_RL_ERROR (1 << 2)
|
#define KWGBE_RL_ERROR (1 << 2)
|
||||||
#define KWGBE_LLC_SNAP_FORMAT (1 << 9)
|
#define KWGBE_LLC_SNAP_FORMAT (1 << 9)
|
||||||
|
#define KWGBE_TX_LAST_FRAME (1 << 20)
|
||||||
|
|
||||||
/* Rx descriptors status */
|
/* Rx descriptors status */
|
||||||
#define KWGBE_CRC_ERROR 0
|
#define KWGBE_CRC_ERROR 0
|
||||||
|
Loading…
Reference in New Issue
Block a user