r8169: improve CPlusCmd handling
authorHeiner Kallweit <hkallweit1@gmail.com>
Sat, 28 Apr 2018 20:19:26 +0000 (22:19 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 30 Apr 2018 13:38:19 +0000 (09:38 -0400)
commit0ae0974eb3d08e2166dd83aa669b63cb84a5ced3
treeffb7ff2aced21b9f434631edf4eeaf6d3c07edd3
parent9a3c81fa616ba5dc10eec59017ab1f7f0cc35ee9
r8169: improve CPlusCmd handling

tp->cp_cmd is supposed to reflect the current value of the CplusCmd
register. Several (quite old) changes however directly change this
register w/o updating tp->cp_cmd. Also we have places in the code
reading this register where we could use the cached value.

In addition:
- Properly initialize tp->cmd with the register value.
- In rtl_hw_start_8169 remove one setting of PCIMulRW because it's
  set unconditionally anyway a few lines later.
- In rtl_hw_start_8168 properly mask out the INTT bits before
  setting INTT_1. So far we rely on both bits being zero.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/realtek/r8169.c