[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210211121239.728-9-zajec5@gmail.com>
Date: Thu, 11 Feb 2021 13:12:39 +0100
From: Rafał Miłecki <zajec5@...il.com>
To: "David S . Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Rob Herring <robh+dt@...nel.org>
Cc: Florian Fainelli <f.fainelli@...il.com>,
Randy Dunlap <rdunlap@...radead.org>,
Masahiro Yamada <masahiroy@...nel.org>, netdev@...r.kernel.org,
devicetree@...r.kernel.org, bcm-kernel-feedback-list@...adcom.com,
Andrew Lunn <andrew@...n.ch>,
Rafał Miłecki <rafal@...ecki.pl>
Subject: [PATCH net-next 5.12 8/8] net: broadcom: bcm4908_enet: fix endianness in xmit code
From: Rafał Miłecki <rafal@...ecki.pl>
Use le32_to_cpu() for reading __le32 struct field filled by hw.
Signed-off-by: Rafał Miłecki <rafal@...ecki.pl>
---
drivers/net/ethernet/broadcom/bcm4908_enet.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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];
--
2.26.2
Powered by blists - more mailing lists