From: Andre Guedes <andre.guedes@intel.com>
To: intel-wired-lan@osuosl.org
Subject: [Intel-wired-lan] [PATCH 1/4] igc: Rename IGC_VLAPQF macro
Date: Fri, 3 Apr 2020 11:17:40 -0700 [thread overview]
Message-ID: <20200403181743.23447-2-andre.guedes@intel.com> (raw)
In-Reply-To: <20200403181743.23447-1-andre.guedes@intel.com>
This patch renames the IGC_VLAPQF macro to IGC_VLANPQF as well as
related macros so they match the register name and fields described in
the datasheet.
Signed-off-by: Andre Guedes <andre.guedes@intel.com>
---
drivers/net/ethernet/intel/igc/igc_defines.h | 6 +++---
drivers/net/ethernet/intel/igc/igc_ethtool.c | 21 ++++++++++----------
drivers/net/ethernet/intel/igc/igc_regs.h | 2 +-
3 files changed, 14 insertions(+), 15 deletions(-)
diff --git a/drivers/net/ethernet/intel/igc/igc_defines.h b/drivers/net/ethernet/intel/igc/igc_defines.h
index 63d3d34763da..a4edf344bd63 100644
--- a/drivers/net/ethernet/intel/igc/igc_defines.h
+++ b/drivers/net/ethernet/intel/igc/igc_defines.h
@@ -514,9 +514,9 @@
#define IGC_MAX_MAC_HDR_LEN 127
#define IGC_MAX_NETWORK_HDR_LEN 511
-#define IGC_VLAPQF_QUEUE_SEL(_n, q_idx) ((q_idx) << ((_n) * 4))
-#define IGC_VLAPQF_P_VALID(_n) (0x1 << (3 + (_n) * 4))
-#define IGC_VLAPQF_QUEUE_MASK 0x03
+#define IGC_VLANPQF_QSEL(_n, q_idx) ((q_idx) << ((_n) * 4))
+#define IGC_VLANPQF_VALID(_n) (0x1 << (3 + (_n) * 4))
+#define IGC_VLANPQF_QUEUE_MASK 0x03
#define IGC_ADVTXD_MACLEN_SHIFT 9 /* Adv ctxt desc mac len shift */
#define IGC_ADVTXD_TUCMD_L4T_UDP 0x00000000 /* L4 Packet TYPE of UDP */
diff --git a/drivers/net/ethernet/intel/igc/igc_ethtool.c b/drivers/net/ethernet/intel/igc/igc_ethtool.c
index 47115d73ea61..9811b26f3c59 100644
--- a/drivers/net/ethernet/intel/igc/igc_ethtool.c
+++ b/drivers/net/ethernet/intel/igc/igc_ethtool.c
@@ -1229,23 +1229,23 @@ static int igc_rxnfc_write_vlan_prio_filter(struct igc_adapter *adapter,
u16 queue_index;
u32 vlapqf;
- vlapqf = rd32(IGC_VLAPQF);
+ vlapqf = rd32(IGC_VLANPQF);
vlan_priority = (ntohs(input->filter.vlan_tci) & VLAN_PRIO_MASK)
>> VLAN_PRIO_SHIFT;
- queue_index = (vlapqf >> (vlan_priority * 4)) & IGC_VLAPQF_QUEUE_MASK;
+ queue_index = (vlapqf >> (vlan_priority * 4)) & IGC_VLANPQF_QUEUE_MASK;
/* check whether this vlan prio is already set */
- if (vlapqf & IGC_VLAPQF_P_VALID(vlan_priority) &&
+ if (vlapqf & IGC_VLANPQF_VALID(vlan_priority) &&
queue_index != input->action) {
netdev_err(adapter->netdev,
"ethtool rxnfc set vlan prio filter failed");
return -EEXIST;
}
- vlapqf |= IGC_VLAPQF_P_VALID(vlan_priority);
- vlapqf |= IGC_VLAPQF_QUEUE_SEL(vlan_priority, input->action);
+ vlapqf |= IGC_VLANPQF_VALID(vlan_priority);
+ vlapqf |= IGC_VLANPQF_QSEL(vlan_priority, input->action);
- wr32(IGC_VLAPQF, vlapqf);
+ wr32(IGC_VLANPQF, vlapqf);
return 0;
}
@@ -1313,12 +1313,11 @@ static void igc_clear_vlan_prio_filter(struct igc_adapter *adapter,
vlan_priority = (vlan_tci & VLAN_PRIO_MASK) >> VLAN_PRIO_SHIFT;
- vlapqf = rd32(IGC_VLAPQF);
- vlapqf &= ~IGC_VLAPQF_P_VALID(vlan_priority);
- vlapqf &= ~IGC_VLAPQF_QUEUE_SEL(vlan_priority,
- IGC_VLAPQF_QUEUE_MASK);
+ vlapqf = rd32(IGC_VLANPQF);
+ vlapqf &= ~IGC_VLANPQF_VALID(vlan_priority);
+ vlapqf &= ~IGC_VLANPQF_QSEL(vlan_priority, IGC_VLANPQF_QUEUE_MASK);
- wr32(IGC_VLAPQF, vlapqf);
+ wr32(IGC_VLANPQF, vlapqf);
}
int igc_erase_filter(struct igc_adapter *adapter, struct igc_nfc_filter *input)
diff --git a/drivers/net/ethernet/intel/igc/igc_regs.h b/drivers/net/ethernet/intel/igc/igc_regs.h
index 7bfba20bf207..ab8ac46d381a 100644
--- a/drivers/net/ethernet/intel/igc/igc_regs.h
+++ b/drivers/net/ethernet/intel/igc/igc_regs.h
@@ -123,7 +123,7 @@
#define IGC_UTA 0x0A000 /* Unicast Table Array - RW */
#define IGC_RAL(_n) (0x05400 + ((_n) * 0x08))
#define IGC_RAH(_n) (0x05404 + ((_n) * 0x08))
-#define IGC_VLAPQF 0x055B0 /* VLAN Priority Queue Filter VLAPQF */
+#define IGC_VLANPQF 0x055B0 /* VLAN Priority Queue Filter - RW */
/* Transmit Register Descriptions */
#define IGC_TCTL 0x00400 /* Tx Control - RW */
--
2.26.0
next prev parent reply other threads:[~2020-04-03 18:17 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-03 18:17 [Intel-wired-lan] [PATCH 0/4] igc: Fixes for VLAN priority filtering code Andre Guedes
2020-04-03 18:17 ` Andre Guedes [this message]
2020-04-21 18:29 ` [Intel-wired-lan] [PATCH 1/4] igc: Rename IGC_VLAPQF macro Brown, Aaron F
2020-04-03 18:17 ` [Intel-wired-lan] [PATCH 2/4] igc: Dump VLANPQF register Andre Guedes
2020-04-21 23:40 ` Brown, Aaron F
2020-04-03 18:17 ` [Intel-wired-lan] [PATCH 3/4] igc: Return -EOPNOTSUPP when VLAN mask doesn't match Andre Guedes
2020-04-21 23:44 ` Brown, Aaron F
2020-04-03 18:17 ` [Intel-wired-lan] [PATCH 4/4] igc: Refactor VLAN priority filtering code Andre Guedes
2020-04-04 1:55 ` Vinicius Costa Gomes
2020-04-04 3:00 ` Andre Guedes
2020-04-21 23:48 ` Brown, Aaron F
2020-04-24 1:11 ` [Intel-wired-lan] [PATCH v2 " Andre Guedes
2020-05-01 21:47 ` Brown, Aaron F
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=20200403181743.23447-2-andre.guedes@intel.com \
--to=andre.guedes@intel.com \
--cc=intel-wired-lan@osuosl.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox