All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Rafał Miłecki" <zajec5@gmail.com>
To: "David S . Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	Rob Herring <robh+dt@kernel.org>
Cc: "Florian Fainelli" <f.fainelli@gmail.com>,
	"Randy Dunlap" <rdunlap@infradead.org>,
	"Masahiro Yamada" <masahiroy@kernel.org>,
	netdev@vger.kernel.org, devicetree@vger.kernel.org,
	bcm-kernel-feedback-list@broadcom.com,
	"Andrew Lunn" <andrew@lunn.ch>,
	"Rafał Miłecki" <rafal@milecki.pl>
Subject: [PATCH net-next 5.12 8/8] net: broadcom: bcm4908_enet: fix endianness in xmit code
Date: Thu, 11 Feb 2021 13:12:39 +0100	[thread overview]
Message-ID: <20210211121239.728-9-zajec5@gmail.com> (raw)
In-Reply-To: <20210211121239.728-1-zajec5@gmail.com>

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>
---
 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


  parent reply	other threads:[~2021-02-11 12:21 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-05 21:44 [PATCH net-next 1/2] dt-bindings: net: document BCM4908 Ethernet controller Rafał Miłecki
2021-02-05 21:44 ` [PATCH net-next 2/2] net: broadcom: bcm4908enet: add BCM4908 controller driver Rafał Miłecki
2021-02-05 23:47   ` kernel test robot
2021-02-05 23:47     ` kernel test robot
2021-02-07 22:26 ` [PATCH V2 net-next 1/2] dt-bindings: net: document BCM4908 Ethernet controller Rafał Miłecki
2021-02-07 22:26   ` [PATCH V2 net-next 2/2] net: broadcom: bcm4908enet: add BCM4908 controller driver Rafał Miłecki
2021-02-09 23:01     ` [PATCH V3 net-next 1/2] dt-bindings: net: document BCM4908 Ethernet controller Rafał Miłecki
2021-02-09 23:01       ` [PATCH V3 net-next 2/2] net: broadcom: bcm4908_enet: add BCM4908 controller driver Rafał Miłecki
2021-02-10  2:39         ` Andrew Lunn
2021-02-10  7:57           ` Rafał Miłecki
2021-02-10  9:47         ` [PATCH V4 net-next 1/2] dt-bindings: net: document BCM4908 Ethernet controller Rafał Miłecki
2021-02-10  9:47           ` [PATCH V4 net-next 2/2] net: broadcom: bcm4908_enet: add BCM4908 controller driver Rafał Miłecki
2021-02-11  0:44             ` Andrew Lunn
2021-02-11 12:12         ` [PATCH net-next 5.12 0/8] bcm4908_enet: post-review fixes Rafał Miłecki
2021-02-11 12:12           ` [PATCH net-next 5.12 1/8] dt-bindings: net: rename BCM4908 Ethernet binding Rafał Miłecki
2021-02-11 17:44             ` Florian Fainelli
2021-02-11 12:12           ` [PATCH net-next 5.12 2/8] dt-bindings: net: bcm4908-enet: include ethernet-controller.yaml Rafał Miłecki
2021-02-11 17:44             ` Florian Fainelli
2021-02-11 12:12           ` [PATCH net-next 5.12 3/8] net: broadcom: rename BCM4908 driver & update DT binding Rafał Miłecki
2021-02-11 17:44             ` Florian Fainelli
2021-02-11 12:12           ` [PATCH net-next 5.12 4/8] net: broadcom: bcm4908_enet: drop unneeded memset() Rafał Miłecki
2021-02-11 17:45             ` Florian Fainelli
2021-02-11 12:12           ` [PATCH net-next 5.12 5/8] net: broadcom: bcm4908_enet: drop "inline" from C functions Rafał Miłecki
2021-02-11 17:45             ` Florian Fainelli
2021-02-11 12:12           ` [PATCH net-next 5.12 6/8] net: broadcom: bcm4908_enet: fix minor typos Rafał Miłecki
2021-02-11 17:46             ` Florian Fainelli
2021-02-11 12:12           ` [PATCH net-next 5.12 7/8] net: broadcom: bcm4908_enet: fix received skb length Rafał Miłecki
2021-02-11 17:46             ` Florian Fainelli
2021-02-11 12:12           ` Rafał Miłecki [this message]
2021-02-11 17:46             ` [PATCH net-next 5.12 8/8] net: broadcom: bcm4908_enet: fix endianness in xmit code Florian Fainelli
2021-02-11 23:10           ` [PATCH net-next 5.12 0/8] bcm4908_enet: post-review fixes patchwork-bot+netdevbpf
2021-02-09 21:43   ` [PATCH V2 net-next 1/2] dt-bindings: net: document BCM4908 Ethernet controller Rob Herring
2021-02-09 22:07     ` Rafał Miłecki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210211121239.728-9-zajec5@gmail.com \
    --to=zajec5@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=f.fainelli@gmail.com \
    --cc=kuba@kernel.org \
    --cc=masahiroy@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=rafal@milecki.pl \
    --cc=rdunlap@infradead.org \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.