Commit 9446af6
committed
e1000e: Remove duplicated writel() in e1000_configure_tx/rx()
Author: Takamitsu Iwai <takamitz@amazon.co.jp>
Duplicated register initialization codes exist in e1000_configure_tx()
and e1000_configure_rx().
For example, writel(0, tx_ring->head) writes 0 to tx_ring->head, which
is adapter->hw.hw_addr + E1000_TDH(0).
This initialization is already done in ew32(TDH(0), 0).
ew32(TDH(0), 0) is equivalent to __ew32(hw, E1000_TDH(0), 0). It
executes writel(0, hw->hw_addr + E1000_TDH(0)). Since variable hw is
set to &adapter->hw, it is equal to writel(0, tx_ring->head).
We can remove similar four writel() in e1000_configure_tx() and
e1000_configure_rx().
commit 0845d45 ("e1000e: Modify Tx/Rx configurations to avoid
null pointer dereferences in e1000_open") has introduced these
writel(). This commit moved register writing to
e1000_configure_tx/rx(), and as result, it caused duplication in
e1000_configure_tx/rx().
This patch modifies the sequence of register writing, but removing
these writes is safe because the same writes were already there before
the commit.
I also have checked the datasheets [0] [1] and have not found any
description that we need to write RDH, RDT, TDH and TDT registers
twice at initialization. Furthermore, we have tested this patch on an
I219-V device physically.
Link: https://www.intel.com/content/dam/www/public/us/en/documents/datasheets/82577-gbe-phy-datasheet.pdf [0]
Link: https://www.intel.com/content/www/us/en/content-details/613460/intel-82583v-gbe-controller-datasheet.html [1]
Tested-by: Kohei Enju <enjuk@amazon.com>
Signed-off-by: Takamitsu Iwai <takamitz@amazon.co.jp>
Tested-by: Mor Bar-Gabay <morx.bar.gabay@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
(cherry picked from commit 0cab3b0)
JIRA: https://issues.redhat.com/browse/RHEL-99400
Signed-off-by: Corinna Vinschen <vinschen@redhat.com>1 parent 56d6c93 commit 9446af6
1 file changed
+0
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2928 | 2928 | | |
2929 | 2929 | | |
2930 | 2930 | | |
2931 | | - | |
2932 | 2931 | | |
2933 | 2932 | | |
2934 | | - | |
2935 | | - | |
2936 | 2933 | | |
2937 | 2934 | | |
2938 | 2935 | | |
| |||
3253 | 3250 | | |
3254 | 3251 | | |
3255 | 3252 | | |
3256 | | - | |
3257 | 3253 | | |
3258 | 3254 | | |
3259 | | - | |
3260 | | - | |
3261 | 3255 | | |
3262 | 3256 | | |
3263 | 3257 | | |
| |||
0 commit comments