You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
85 lines
2.9 KiB
85 lines
2.9 KiB
From 9a6e98753774849b077307443c22abb146451f85 Mon Sep 17 00:00:00 2001
|
|
From: Igor Russkikh <irusskik@redhat.com>
|
|
Date: Fri, 6 Nov 2020 18:36:48 -0500
|
|
Subject: [PATCH 031/139] [netdrv] net: aquantia: fix warnings on endianness
|
|
|
|
Message-id: <1604687916-15087-32-git-send-email-irusskik@redhat.com>
|
|
Patchwork-id: 338456
|
|
Patchwork-instance: patchwork
|
|
O-Subject: [RHEL8.4 BZ 1857861 031/139] net: aquantia: fix warnings on endianness
|
|
Bugzilla: 1857861
|
|
RH-Acked-by: David Arcari <darcari@redhat.com>
|
|
RH-Acked-by: John Linville <linville@redhat.com>
|
|
RH-Acked-by: Tony Camuso <tcamuso@redhat.com>
|
|
|
|
Bugzilla: http://bugzilla.redhat.com/1857861
|
|
|
|
commit 5eeb6c3cf26eac522df07bee1a58573804179126
|
|
Author: Igor Russkikh <Igor.Russkikh@aquantia.com>
|
|
Date: Sat Oct 26 11:05:33 2019 +0000
|
|
|
|
net: aquantia: fix warnings on endianness
|
|
|
|
fixes to remove sparse warnings:
|
|
sparse: sparse: cast to restricted __be64
|
|
|
|
Fixes: 04a1839950d9 ("net: aquantia: implement data PTP datapath")
|
|
Reported-by: kbuild test robot <lkp@intel.com>
|
|
Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com>
|
|
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
|
|
Signed-off-by: Igor Russkikh <irusskik@redhat.com>
|
|
|
|
Cc: David Arcari <darcari@redhat.com>
|
|
Cc: Igor Russkikh <irusskik@redhat.com>
|
|
Signed-off-by: Jan Stancek <jstancek@redhat.com>
|
|
---
|
|
drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c | 9 ++++-----
|
|
drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.h | 2 +-
|
|
2 files changed, 5 insertions(+), 6 deletions(-)
|
|
|
|
diff --git a/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c b/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c
|
|
index 51ecf87e0198..abee561ea54e 100644
|
|
--- a/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c
|
|
+++ b/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c
|
|
@@ -1236,9 +1236,9 @@ static u16 hw_atl_b0_rx_extract_ts(struct aq_hw_s *self, u8 *p,
|
|
{
|
|
unsigned int offset = 14;
|
|
struct ethhdr *eth;
|
|
- u64 sec;
|
|
+ __be64 sec;
|
|
+ __be32 ns;
|
|
u8 *ptr;
|
|
- u32 ns;
|
|
|
|
if (len <= offset || !timestamp)
|
|
return 0;
|
|
@@ -1256,9 +1256,8 @@ static u16 hw_atl_b0_rx_extract_ts(struct aq_hw_s *self, u8 *p,
|
|
ptr += sizeof(sec);
|
|
memcpy(&ns, ptr, sizeof(ns));
|
|
|
|
- sec = be64_to_cpu(sec) & 0xffffffffffffllu;
|
|
- ns = be32_to_cpu(ns);
|
|
- *timestamp = sec * NSEC_PER_SEC + ns + self->ptp_clk_offset;
|
|
+ *timestamp = (be64_to_cpu(sec) & 0xffffffffffffllu) * NSEC_PER_SEC +
|
|
+ be32_to_cpu(ns) + self->ptp_clk_offset;
|
|
|
|
eth = (struct ethhdr *)p;
|
|
|
|
diff --git a/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.h b/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.h
|
|
index 37e6b696009d..ee11b107f0a5 100644
|
|
--- a/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.h
|
|
+++ b/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.h
|
|
@@ -41,7 +41,7 @@ struct __packed hw_atl_rxd_wb_s {
|
|
u16 status;
|
|
u16 pkt_len;
|
|
u16 next_desc_ptr;
|
|
- u16 vlan;
|
|
+ __le16 vlan;
|
|
};
|
|
|
|
/* Hardware rx HW TIMESTAMP writeback */
|
|
--
|
|
2.13.6
|
|
|