From: Andre Guedes <andre.guedes@intel.com>
To: intel-wired-lan@osuosl.org
Subject: [Intel-wired-lan] [PATCH 3/3] igc: Fix SRRCTL register setup
Date: Mon, 10 Aug 2020 14:08:32 -0700 [thread overview]
Message-ID: <20200810210832.34699-3-andre.guedes@intel.com> (raw)
In-Reply-To: <20200810210832.34699-1-andre.guedes@intel.com>
SRRCTL register is set with 'one buffer descriptor' option (see DESCTYPE
setting a few lines below) so setting BSIZEHEADER bits is pointless.
They should be zero. Also, since there is no header buffer we should set
the header buffer address field from the receive descriptor to zero for
the sake of consistency.
Signed-off-by: Andre Guedes <andre.guedes@intel.com>
---
drivers/net/ethernet/intel/igc/igc_main.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c
index 0c481dc906ad..a5d825d44002 100644
--- a/drivers/net/ethernet/intel/igc/igc_main.c
+++ b/drivers/net/ethernet/intel/igc/igc_main.c
@@ -531,14 +531,11 @@ static void igc_configure_rx_ring(struct igc_adapter *adapter,
ring->next_to_clean = 0;
ring->next_to_use = 0;
- /* set descriptor configuration */
- srrctl = IGC_RX_HDR_LEN << IGC_SRRCTL_BSIZEHDRSIZE_SHIFT;
if (ring_uses_large_buffer(ring))
srrctl |= IGC_RXBUFFER_3072 >> IGC_SRRCTL_BSIZEPKT_SHIFT;
else
srrctl |= IGC_RXBUFFER_2048 >> IGC_SRRCTL_BSIZEPKT_SHIFT;
srrctl |= IGC_SRRCTL_DESCTYPE_ADV_ONEBUF;
-
wr32(IGC_SRRCTL(reg_idx), srrctl);
rxdctl |= IGC_RX_PTHRESH;
@@ -1869,6 +1866,7 @@ static void igc_alloc_rx_buffers(struct igc_ring *rx_ring, u16 cleaned_count)
* because each write-back erases this info.
*/
rx_desc->read.pkt_addr = cpu_to_le64(bi->dma + bi->page_offset);
+ rx_desc->read.hdr_addr = 0;
rx_desc++;
bi++;
--
2.26.2
next prev parent reply other threads:[~2020-08-10 21:08 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-10 21:08 [Intel-wired-lan] [PATCH 1/3] igc: Clean RX descriptor error flags Andre Guedes
2020-08-10 21:08 ` [Intel-wired-lan] [PATCH 2/3] igc: Check descriptor's DD bit in igc_clean_rx_irq() Andre Guedes
2020-08-11 1:25 ` Alexander Duyck
2020-08-11 16:59 ` Andre Guedes
2020-08-11 18:02 ` Alexander Duyck
2020-08-10 21:08 ` Andre Guedes [this message]
2020-08-10 22:56 ` [Intel-wired-lan] [PATCH 3/3] igc: Fix SRRCTL register setup Alexander Duyck
2020-08-11 0:42 ` Andre Guedes
2020-08-11 1:41 ` Alexander Duyck
2020-08-11 17:00 ` Andre Guedes
2020-08-11 18:04 ` Alexander Duyck
2020-08-11 18:38 ` Andre Guedes
2020-08-11 20:14 ` Nguyen, Anthony L
2020-08-14 2:03 ` [Intel-wired-lan] [PATCH 1/3] igc: Clean RX descriptor error flags 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=20200810210832.34699-3-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