Message ID | 20210211121239.728-9-zajec5@gmail.com |
---|---|
State | New |
Headers | show |
Series | [net-next,5.12,1/8] dt-bindings: net: rename BCM4908 Ethernet binding | expand |
On 2/11/21 4:12 AM, Rafał Miłecki wrote: > From: Rafał Miłecki <rafal@milecki.pl> > > Use le32_to_cpu() for reading __le32 struct field filled by hw. > > Signed-off-by: Rafał Miłecki <rafal@milecki.pl> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
diff --git a/drivers/net/ethernet/broadcom/bcm4908_enet.c b/drivers/net/ethernet/broadcom/bcm4908_enet.c index 2e825db3b2f1..0da8c8c73ba7 100644 --- a/drivers/net/ethernet/broadcom/bcm4908_enet.c +++ b/drivers/net/ethernet/broadcom/bcm4908_enet.c @@ -476,7 +476,7 @@ static int bcm4908_enet_start_xmit(struct sk_buff *skb, struct net_device *netde /* Free transmitted skbs */ while (ring->read_idx != ring->write_idx) { buf_desc = &ring->buf_desc[ring->read_idx]; - if (buf_desc->ctl & DMA_CTL_STATUS_OWN) + if (le32_to_cpu(buf_desc->ctl) & DMA_CTL_STATUS_OWN) break; slot = &ring->slots[ring->read_idx];