Subject: [RFC][PATCH 05/11] stmmac: fix several stray endianness bugs
Subsystems (4)
A few places got missed by "net: ethernet: stmmac: change dma descriptors to __le32" (having been introduced just before the merge of that patch, AFAICS). Fix them up...
Signed-off-by Al Viro <[email protected]>
--- drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c +5 -4
@@ -241,12 +241,13 @@ static int dwmac4_rx_check_timestamp(void *desc)u32 own, ctxt;int ret =1 ; - own = p->des3 &RDES3_OWN ; - ctxt = ((p->des3 &RDES3_CONTEXT_DESCRIPTOR ) + own =le32_to_cpu (p->des3) &RDES3_OWN ; + ctxt = ((le32_to_cpu (p->des3) &RDES3_CONTEXT_DESCRIPTOR ) >>RDES3_CONTEXT_DESCRIPTOR_SHIFT );if (likely (!own && ctxt)) { -if ((p->des0 ==0xffffffff ) && (p->des1 ==0xffffffff )) +if ((p->des0 ==cpu_to_le32 (0xffffffff )) && + (p->des1 ==cpu_to_le32 (0xffffffff )))/* Corrupted value */ ret = -EINVAL ;else
@@ -265,7 +266,7 @@ static int dwmac4_wrback_get_rx_timestamp_status(void *desc, void *next_desc,int ret = -EINVAL ;/* Get the status from normal w/b descriptor */ -if (likely (p->des3 &TDES3_RS1V )) { +if (likely (p->des3 &cpu_to_le32 (TDES3_RS1V ))) {if (likely (le32_to_cpu (p->des1) &RDES1_TIMESTAMP_AVAILABLE )) {int i =0 ;
Signature · 1 line
2.11.0
Quoted 4 lines · Al Viro
A few places got missed by "net: ethernet: stmmac: change dma descriptors to
__le32" (having been introduced just before the merge of that patch, AFAICS). Fix them up...
I could not spot the commit id associated with that change, which one is it?
Signature · 1 line
Florian