I thought I'm more or less done with the basic refactoring. But again
I stumbled across things that can be improved / simplified.
Heiner Kallweit (10):
r8169: remove unneeded check in r8168_pll_power_down
r8169: remove 810x_phy_power_up/down
r8169: merge r810x_pll_power_down/up
r810x_pll_power_down/up and r8168_pll_power_down/up have a lot in common,
so we can simplify the code by merging the former into the latter.
Signed-off-by: Heiner Kallweit <hkallwe...@gmail.com>
---
drivers/net/ethernet/realtek/r8169.c | 61
1 file chang
Only two places are left where rtl_generic_op() is used, so we can
inline it and simplify the code a little.
This change also avoids the overhead of unlocking/locking in case
the respective operation isn't set.
Signed-off-by: Heiner Kallweit <hkallwe...@gmail.com>
---
drivers/net/et
Interpreting a member of an u16 array as u32 may result in a misaligned
access. Also it's not really intuitive to define a mac address variable
as array of three u16 words. Therefore use an array of six bytes that
is properly aligned for 32 bit access.
Signed-off-by: Heiner Kallweit <hkal
we may introduce a whitelist for chips
where ASPM is known to work, therefore let's keep this code.
Signed-off-by: Heiner Kallweit <hkallwe...@gmail.com>
---
drivers/net/ethernet/realtek/r8169.c | 132 ++-
1 file changed, 29 insertions(+), 103 deletions(-)
diff --git
After merging r810x_pll_power_down/up and r8168_pll_power_down/up we
don't need member pll_power_ops any longer and can drop it, thus
simplifying the code.
Signed-off-by: Heiner Kallweit <hkallwe...@gmail.com>
---
drivers/net/ethernet/realtek/r8169.c | 76
The functionality of 810x_phy_power_up/down is covered by the default
clause in 8168_phy_power_up/down. Therefore we don't need these
functions.
Signed-off-by: Heiner Kallweit <hkallwe...@gmail.com>
---
drivers/net/ethernet/realtek/r8169.c | 98
1 file chang
This patch is basically the same as 6e74d1749a33 ("r8152: replace
get_protocol with vlan_get_protocol"). Use vlan_get_protocol
instead of duplicating the functionality.
Signed-off-by: Heiner Kallweit <hkallwe...@gmail.com>
---
drivers/net/ethernet/realtek/r8169.c | 16 ++--
Several switch statements can be significantly simplified by using
case ranges.
Signed-off-by: Heiner Kallweit <hkallwe...@gmail.com>
---
drivers/net/ethernet/realtek/r8169.c | 193 +++
1 file changed, 19 insertions(+), 174 deletions(-)
diff --git a/drivers/net/et
RTL_GIGA_MAC_VER_23/24 are configured by rtl_hw_start_8168cp_2()
and rtl_hw_start_8168cp_3() respectively which both apply
CPCMD_QUIRK_MASK, thus clearing bit ASF.
Bit ASF isn't set at any other place in the driver, therefore this
check can be removed.
Signed-off-by: Heiner Kallweit <hkal
Some longer if statements can be simplified by using switch
statements instead.
Signed-off-by: Heiner Kallweit <hkallwe...@gmail.com>
---
drivers/net/ethernet/realtek/r8169.c | 54 +---
1 file changed, 16 insertions(+), 38 deletions(-)
diff --git a/drivers/net/et
This series aims at further improving and simplifying the code w/o
any intended functional changes.
Series was tested on: RTL8169sb, RTL8168d, RTL8168e-vl
Heiner Kallweit (8):
r8169: remove unneeded call to __rtl8169_set_features in rtl_open
r8169: improve rtl8169_set_features
r8169
ize 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
ned-off-by: Heiner Kallweit <hkallwe...@gmail.com>
---
drivers/net/ethernet/realtek/r8169.c | 74 +++-
1 file changed, 19 insertions(+), 55 deletions(-)
diff --git a/drivers/net/ethernet/realtek/r8169.c
b/drivers/net/ethernet/realtek/r8169.c
index c7b9301a..66f10d
Both quirk masks are the same, so we can merge them. The quirk mask
includes most bits so it's actually easier to define a mask with
the bits to keep.
Signed-off-by: Heiner Kallweit <hkallwe...@gmail.com>
---
drivers/net/ethernet/realtek/r8169.c | 35 ++--
1 file c
Use a proper constant for INTT bit mask.
Signed-off-by: Heiner Kallweit <hkallwe...@gmail.com>
---
drivers/net/ethernet/realtek/r8169.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/realtek/r8169.c
b/drivers/net/ethernet/realtek/r8169.c
__dev_open() calls the ndo_set_rx_mode callback anyway, so we don't
have to do it here too.
Signed-off-by: Heiner Kallweit <hkallwe...@gmail.com>
---
drivers/net/ethernet/realtek/r8169.c | 6 --
1 file changed, 6 deletions(-)
diff --git a/drivers/net/ethernet/realtek/r8169.c
b/drive
fit in it.
Signed-off-by: Heiner Kallweit <hkallwe...@gmail.com>
---
drivers/net/ethernet/realtek/r8169.c | 18 --
1 file changed, 4 insertions(+), 14 deletions(-)
diff --git a/drivers/net/ethernet/realtek/r8169.c
b/drivers/net/ethernet/realtek/r8169.c
index d2656224..411d12
off-by: Heiner Kallweit <hkallwe...@gmail.com>
---
drivers/net/ethernet/realtek/r8169.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/net/ethernet/realtek/r8169.c
b/drivers/net/ethernet/realtek/r8169.c
index a5d00ee9..d2656224 100644
--- a/drivers/net/ethernet/realtek/r8169.c
+++
-by: Heiner Kallweit <hkallwe...@gmail.com>
---
drivers/net/ethernet/realtek/r8169.c | 22 ++
1 file changed, 2 insertions(+), 20 deletions(-)
diff --git a/drivers/net/ethernet/realtek/r8169.c
b/drivers/net/ethernet/realtek/r8169.c
index cf7a7db5..8c816f6c 100644
--- a/drive
nly the values we're going to change. In addition remove the
misleading comment, job of this small function is just to adjust the
supported and advertised speeds.
Fixes: f3a6bd393c2c ("phylib: Add phy_set_max_speed helper")
Signed-off-by: Heiner Kallweit
---
drivers/net/phy/phy_device.c |
Am 04.01.2018 um 12:44 schrieb Russell King - ARM Linux:
> On Thu, Jan 04, 2018 at 08:00:53AM +0100, Heiner Kallweit wrote:
>> Parameter mask of phy_modify() holds the bits to be cleared.
>> In the mentioned commit parameter mask seems to be inverted in
>> few cases, what IMO
).
Heiner Kallweit (3):
r8169: remove unneeded rpm ops in rtl_shutdown
r8169: improve runtime pm in rtl8169_check_link_status
r8169: improve runtime pm in general and suspend unused ports
drivers/net/ethernet/realtek/r8169.c | 44 ++--
1 file changed, 17 insertions
This patch reverts commit 2a15cd2ff488 "r8169: runtime resume before
shutdown" from 2012. Few months after this change the underlying issue
was solved in the PCI core with commit 3ff2de9ba1a2 "PCI/PM: Resume
device before shutdown".
Signed-off-by: Heiner Kallweit &
any longer. On my system aneg takes almost 3s, to be on
the safe side let's increase the suspend delay to 10s.
Signed-off-by: Heiner Kallweit <hkallwe...@gmail.com>
---
drivers/net/ethernet/realtek/r8169.c | 21 ++---
1 file changed, 6 insertions(+), 15 deletions(-)
diff --g
rtl8169_runtime_suspend to power down the chip if the
interface is down.
Successfully tested on a RTL8168evl (mac version 34).
Signed-off-by: Heiner Kallweit <hkallwe...@gmail.com>
---
drivers/net/ethernet/realtek/r8169.c | 20
1 file changed, 12 insertions(+), 8 deletions(-)
diff
. phy_mac_interrupt is used in interrupt context and getting the link
state may sleep (at least when having to access the PHY registers
via MDIO bus).
So let's remove it.
Signed-off-by: Heiner Kallweit <hkallwe...@gmail.com>
---
drivers/net/phy/phy.c | 10 +++---
include/linux/phy.h | 2
Reflect a phylib API change and remove second parameter from call to
phy_mac_interrupt(). Keep the current logic and set phydev->link,
although this may not be needed. However I don't have the hardware
and can't test this.
Signed-off-by: Heiner Kallweit <hkallwe...@gmail.com>
---
dr
. phy_mac_interrupt is used in interrupt context and getting the link
state may sleep (at least when having to access the PHY registers
via MDIO bus).
bcmgenet driver so far is the only user, therefore changing the API
has minimal impact.
Heiner Kallweit (2):
net: phy: remove parameter new_link from
. phy_mac_interrupt is used in interrupt context and getting the link
state may sleep (at least when having to access the PHY registers
via MDIO bus).
So let's remove it.
Signed-off-by: Heiner Kallweit <hkallwe...@gmail.com>
---
v2:
- combine both patches to avoid a build failure
---
drive
Am 20.01.2018 um 20:19 schrieb Ido Schimmel:
> On Sat, Jan 20, 2018 at 10:49:03AM -0800, Eric Dumazet wrote:
>> On Sat, 2018-01-20 at 15:37 +0200, Ido Schimmel wrote:
>>> On Sat, Jan 20, 2018 at 12:57:01PM +0100, Heiner Kallweit wrote:
>>>> Since some tim
The multicast hash filter is a 64 bit value and the code can be
simplified by using a u64 variable.
Signed-off-by: Heiner Kallweit <hkallwe...@gmail.com>
---
drivers/net/ethernet/realtek/r8169.c | 24 ++--
1 file changed, 10 insertions(+), 14 deletions(-)
diff
Am 20.01.2018 um 20:19 schrieb Ido Schimmel:
> On Sat, Jan 20, 2018 at 10:49:03AM -0800, Eric Dumazet wrote:
>> On Sat, 2018-01-20 at 15:37 +0200, Ido Schimmel wrote:
>>> On Sat, Jan 20, 2018 at 12:57:01PM +0100, Heiner Kallweit wrote:
>>>> Since some tim
Am 23.01.2018 um 19:01 schrieb Ido Schimmel:
> On Sun, Jan 21, 2018 at 10:22:16PM +0100, Heiner Kallweit wrote:
>> So far everything looks good with Eric's patch. The warning didn't show up
>> again.
>
> Eric, can you please submit your patch?
> .
>
Soon the merge w
Make use of the new helpers for paged register access.
Signed-off-by: Heiner Kallweit <hkallwe...@gmail.com>
---
drivers/net/phy/realtek.c | 59 +++
1 file changed, 14 insertions(+), 45 deletions(-)
diff --git a/drivers/net/phy/realtek.c b/drive
Based on the recent introduction of phy_modify add helpers for setting
and clearing bits in PHY registers. First user is phylib.
Heiner Kallweit (2):
phy: add helpers for setting/clearing bits in PHY registers
phy: use new helpers phy_set_bits/phy_clear_bits in phylib
drivers/net/phy
Based on the recent introduction of phy_modify add helpers for setting
and clearing bits in PHY registers.
Signed-off-by: Heiner Kallweit <hkallwe...@gmail.com>
---
include/linux/phy.h | 49 +
1 file changed, 49 insertions(+)
diff --git a/i
Use new helpers phy_set_bits / phy_clear_bits in phylib.
Signed-off-by: Heiner Kallweit <hkallwe...@gmail.com>
---
drivers/net/phy/phy_device.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c
index 6bd
Am 12.01.2018 um 22:01 schrieb Andrew Lunn:
> On Fri, Jan 12, 2018 at 09:30:08PM +0100, Heiner Kallweit wrote:
>> Make use of the new helpers for paged register access.
>>
>> Signed-off-by: Heiner Kallweit <hkallwe...@gmail.com>
>> ---
&
Make use of the new helpers for paged register access.
Signed-off-by: Heiner Kallweit <hkallwe...@gmail.com>
---
v2:
- use accessor versions w/o locking in the read/write_page callbacks
---
drivers/net/phy/realtek.c | 59 +++
1 file chang
This commit forces callers of phy_resume() and phy_suspend() to hold
mutex phydev->lock. This was done for calls to phy_resume() and
phy_suspend() in phylib, however there are more callers in network
drivers. I'd assume that these other calls issue a warning now
because of the lock not being held.
Recently ethtool started to give incomplete values for supported and
advertised modes. There seems to be a regression in this commit:
The bit number parameter in the calls to bitmap_to_arr32() in
store_link_ksettings_for_user() should be __ETHTOOL_LINK_MODE_MASK_NBITS
instead of
Am 07.02.2018 um 20:34 schrieb Florian Fainelli:
>
>
> On 02/07/2018 11:26 AM, Heiner Kallweit wrote:
>> Am 07.02.2018 um 20:06 schrieb Florian Fainelli:
>>>
>>>
>>> On 02/07/2018 10:44 AM, Heiner Kallweit wrote:
>>>> This condition wa
This condition wasn't adjusted when PHY_IGNORE_INTERRUPT (-2) was added
long ago. In case of PHY_IGNORE_INTERRUPT the MAC interrupt indicates
also PHY state changes and we should do what the symbol says.
Signed-off-by: Heiner Kallweit <hkallwe...@gmail.com>
---
v2:
- use phy_interrupt_is
This condition wasn't adjusted when PHY_IGNORE_INTERRUPT (-2) was added
long ago. In case of PHY_IGNORE_INTERRUPT the MAC interrupt indicates
also PHY state changes and we should do what the symbol says.
Signed-off-by: Heiner Kallweit <hkallwe...@gmail.com>
---
drivers/net/phy/phy.c | 2
Am 07.02.2018 um 20:06 schrieb Florian Fainelli:
>
>
> On 02/07/2018 10:44 AM, Heiner Kallweit wrote:
>> This condition wasn't adjusted when PHY_IGNORE_INTERRUPT (-2) was added
>> long ago. In case of PHY_IGNORE_INTERRUPT the MAC interrupt indicates
>> also PHY sta
Signed-off-by: Heiner Kallweit <hkallwe...@gmail.com>
---
v2:
- use phy_interrupt_is_valid() instead of checking for irq > 0
v3:
- added "Fixes" tag
- fix is a candidate for stable, v4.9+
---
drivers/net/phy/phy.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dr
Am 04.02.2018 um 03:48 schrieb Florian Fainelli:
>
>
> On 02/03/2018 03:58 PM, Heiner Kallweit wrote:
>> Am 03.02.2018 um 21:17 schrieb Andrew Lunn:
>>> On Sat, Feb 03, 2018 at 05:41:54PM +0100, Heiner Kallweit wrote:
>>>> This commit forces callers of ph
Am 08.02.2018 um 00:00 schrieb Florian Fainelli:
> On 02/07/2018 11:44 AM, Heiner Kallweit wrote:
>> This condition wasn't adjusted when PHY_IGNORE_INTERRUPT (-2) was added
>> long ago. In case of PHY_IGNORE_INTERRUPT the MAC interrupt indicates
>> also PHY state changes
Am 03.02.2018 um 21:17 schrieb Andrew Lunn:
> On Sat, Feb 03, 2018 at 05:41:54PM +0100, Heiner Kallweit wrote:
>> This commit forces callers of phy_resume() and phy_suspend() to hold
>> mutex phydev->lock. This was done for calls to phy_resume() and
>> phy_susp
Am 04.02.2018 um 03:48 schrieb Florian Fainelli:
>
>
> On 02/03/2018 03:58 PM, Heiner Kallweit wrote:
>> Am 03.02.2018 um 21:17 schrieb Andrew Lunn:
>>> On Sat, Feb 03, 2018 at 05:41:54PM +0100, Heiner Kallweit wrote:
>>>> This commit forces callers of ph
Commit bde135a672bf "r8169: only enable PCI wakeups when WOL is active"
removed the only user of flag RTL_FEATURE_WOL. So let's remove some
now dead code.
Signed-off-by: Heiner Kallweit <hkallwe...@gmail.com>
---
drivers/net/ethernet/realtek/r8169.c | 39 ++-
rtl8169_init_phy() resets the PHY anyway after applying the chip-specific
PHY configuration. So we don't need to soft-reset the PHY as part of the
chip-specific configuration.
Signed-off-by: Heiner Kallweit <hkallwe...@gmail.com>
---
drivers/net/ethernet/realtek/r8169.c | 2 --
1 file chan
Am 21.02.2018 um 05:27 schrieb David Miller:
> From: Heiner Kallweit <hkallwe...@gmail.com>
> Date: Tue, 20 Feb 2018 07:30:16 +0100
>
>> rtl8169_init_phy() resets the PHY anyway after applying the chip-specific
>> PHY configuration. So we don't need to soft-reset the
doesn't use WOL even if the BIOS enables it in
the chip. And having WOL being active keeps the PHY(s) from powering
down if being idle.
If somebody needs WOL, he can enable it during boot, e.g. by
configuring systemd.link/WakeOnLan.
Therefore, to make WOL consistent again, disable it per default.
Signed-off
r8168_check_dash() returns false anyway for all chip versions not
supporting dash. So we can simplify the check conditions.
In addition change the check functions to return bool instead of int,
because they actually return a bool value.
Signed-off-by: Heiner Kallweit <hkallwe...@gmail.
, intentionally disabling (unreliable) MSI
being partially available on old PCI chips.
The patch works fine on a RTL8168evl (chip version 34) and on a
RTL8169SB (chip version 04).
Signed-off-by: Heiner Kallweit <hkallwe...@gmail.com>
---
v2:
- disable MSI on old PCI chips even if they partially s
Am 24.02.2018 um 02:35 schrieb Francois Romieu:
> Heiner Kallweit <hkallwe...@gmail.com> :
> [...]
>> Last but not least it enables a feature which was (I presume accidently)
>> disabled before. There are members of the RTL8169 family supporting MSI
>> (e.g. RTL
orting MSI isn't tested. The RTL8169SB
(chip version 04) I have at least still works in a PCI slot w/o MSI.
Signed-off-by: Heiner Kallweit <hkallwe...@gmail.com>
---
drivers/net/ethernet/realtek/r8169.c | 44
1 file changed, 20 insertions(+), 24 deletions
Am 22.12.2017 um 10:57 schrieb Andrew Lunn:
> On Thu, Dec 21, 2017 at 09:50:28PM +0100, Heiner Kallweit wrote:
>> Use genphy_soft_reset instead of open coding the soft reset.
>
> Hi Heiner
>
> At this point, you have swapped over the phylib. Does one of the
> drivers in
Am 21.12.2017 um 22:16 schrieb David Miller:
> From: Heiner Kallweit <hkallwe...@gmail.com>
> Date: Thu, 21 Dec 2017 21:38:11 +0100
>
>> This experimental series separates drivers for PCI / PCIE NIC's and
>> adds initial phylib support to the separated r8168 driv
Am 22.12.2017 um 11:00 schrieb Andrew Lunn:
>> static int rtl8168_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
>> {
>> -struct rtl8168_private *tp = netdev_priv(dev);
>> -struct mii_ioctl_data *data = if_mii(ifr);
>> +if (!netif_running(dev))
>> +return
Am 22.12.2017 um 11:14 schrieb Andrew Lunn:
> On Thu, Dec 21, 2017 at 09:50:39PM +0100, Heiner Kallweit wrote:
>> Dealing with link partner abilities is handled by phylib, so let's
>> just trigger autonegotiation here.
>>
>> Signed-off-by: Heiner Kallweit <hkallwe...
l identifies as RTL8211E and has
certain support already (w/o firmware).
Heiner Kallweit (18):
r8169: split driver to one for the non-PCIE cards (r8169) and one for the
PCIE cards (r8168)
r8168: remove code specific to MAC version 01 - 06
r8168: remove magic register handling used on MA
Remove code which is specific to MAC version 01 - 06.
Signed-off-by: Heiner Kallweit <hkallwe...@gmail.com>
---
drivers/net/ethernet/realtek/r8168.c | 302 +--
1 file changed, 5 insertions(+), 297 deletions(-)
diff --git a/drivers/net/ethernet/realtek/r816
All these PHY basics are handled by phylib, so let's remove this code.
Signed-off-by: Heiner Kallweit <hkallwe...@gmail.com>
---
drivers/net/ethernet/realtek/r8168.c | 92
1 file changed, 92 deletions(-)
diff --git a/drivers/net/ethernet/realtek/r816
Remove TBI mode support needed for MAC version 01 only.
Signed-off-by: Heiner Kallweit <hkallwe...@gmail.com>
---
drivers/net/ethernet/realtek/r8168.c | 123 ++-
1 file changed, 6 insertions(+), 117 deletions(-)
diff --git a/drivers/net/ethernet/realtek/r
Dealing with link partner abilities is handled by phylib, so let's
just trigger autonegotiation here.
Signed-off-by: Heiner Kallweit <hkallwe...@gmail.com>
---
drivers/net/ethernet/realtek/r8168.c | 26 +-
1 file changed, 1 insertion(+), 25 deletions(-)
diff
Switch to phy_ethtool_nway_reset.
Signed-off-by: Heiner Kallweit <hkallwe...@gmail.com>
---
drivers/net/ethernet/realtek/Kconfig | 1 -
drivers/net/ethernet/realtek/r8168.c | 9 +
2 files changed, 1 insertion(+), 9 deletions(-)
diff --git a/drivers/net/ethernet/realtek/Kcon
Use phy_mii_ioctl for handling the ioctl's.
Signed-off-by: Heiner Kallweit <hkallwe...@gmail.com>
---
drivers/net/ethernet/realtek/r8168.c | 25 +++--
1 file changed, 3 insertions(+), 22 deletions(-)
diff --git a/drivers/net/ethernet/realtek/r8168.c
b/drivers/net/et
Let's use the speed information as maintained by phylib instead of
reading it directly from a register.
Signed-off-by: Heiner Kallweit <hkallwe...@gmail.com>
---
drivers/net/ethernet/realtek/r8168.c | 20 +---
1 file changed, 5 insertions(+), 15 deletions(-)
diff --git a/d
Remove further code which is replaced by phylib.
Signed-off-by: Heiner Kallweit <hkallwe...@gmail.com>
---
drivers/net/ethernet/realtek/r8168.c | 60
1 file changed, 60 deletions(-)
diff --git a/drivers/net/ethernet/realtek/r8168.c
b/drivers/net/et
Instead of accessing mdio_ops directly use phy_read/write in these
helpers.
Signed-off-by: Heiner Kallweit <hkallwe...@gmail.com>
---
drivers/net/ethernet/realtek/r8168.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/realtek/r8168.c
b/drive
Use genphy_soft_reset instead of open coding the soft reset.
Signed-off-by: Heiner Kallweit <hkallwe...@gmail.com>
---
drivers/net/ethernet/realtek/r8168.c | 14 +-
1 file changed, 1 insertion(+), 13 deletions(-)
diff --git a/drivers/net/ethernet/realtek/r8168.c
b/drive
Remove magic register handling used on MAC version 05 and 06 only.
Signed-off-by: Heiner Kallweit <hkallwe...@gmail.com>
---
drivers/net/ethernet/realtek/r8168.c | 27 ---
1 file changed, 27 deletions(-)
diff --git a/drivers/net/ethernet/realtek/r8168.c
b/drive
Use phy_ethtool_get/set_link_ksettings instead of open coding these
ethtool ops.
Signed-off-by: Heiner Kallweit <hkallwe...@gmail.com>
---
drivers/net/ethernet/realtek/r8168.c | 50 +++-
1 file changed, 3 insertions(+), 47 deletions(-)
diff --git a/drive
After switching to phylib we don't need most elements of
struct mii_if_info any longer.
Signed-off-by: Heiner Kallweit <hkallwe...@gmail.com>
---
drivers/net/ethernet/realtek/r8168.c | 37 +++-
1 file changed, 7 insertions(+), 30 deletions(-)
diff --git a/d
Function rtl8169_rx_missed() does nothing on MAC versions > 06,
therefore remove it.
Signed-off-by: Heiner Kallweit <hkallwe...@gmail.com>
---
drivers/net/ethernet/realtek/r8168.c | 23 ---
1 file changed, 23 deletions(-)
diff --git a/drivers/net/ethernet/realtek/r
All supported chips provide a MII interface, therefore some callbacks
can be removed from struct rtl8169_private.
Signed-off-by: Heiner Kallweit <hkallwe...@gmail.com>
---
drivers/net/ethernet/realtek/r8168.c | 46 +---
1 file changed, 16 insertions(
All PHY's of the supported chips are MII-compatible, therefore let
phylib do the work.
Signed-off-by: Heiner Kallweit <hkallwe...@gmail.com>
---
drivers/net/ethernet/realtek/Kconfig | 1 +
drivers/net/ethernet/realtek/r8168.c | 152 +++
2 files change
After separation from the r8169 driver, replace 8169 with 8168 in all
relevant symbols.
Signed-off-by: Heiner Kallweit <hkallwe...@gmail.com>
---
drivers/net/ethernet/realtek/r8168.c | 1066 +-
1 file changed, 533 insertions(+), 533 deletions(-)
diff
Parameter mask of phy_modify() holds the bits to be cleared.
In the mentioned commit parameter mask seems to be inverted in
few cases, what IMO is wrong (see example).
Maybe I miss something, could you please check?
And somehow related:
When adding such helpers, wouldn't it make sense to add
Am 26.02.2018 um 19:56 schrieb David Miller:
> From: Heiner Kallweit <hkallwe...@gmail.com>
> Date: Sat, 24 Feb 2018 16:53:23 +0100
>
>> @@ -736,8 +736,7 @@ struct ring_info {
>> };
>>
>> enum features {
>> -RTL_FEATURE_MSI = (1 <
Am 03.02.2018 um 21:17 schrieb Andrew Lunn:
> On Sat, Feb 03, 2018 at 05:41:54PM +0100, Heiner Kallweit wrote:
>> This commit forces callers of phy_resume() and phy_suspend() to hold
>> mutex phydev->lock. This was done for calls to phy_resume() and
>> phy_susp
We don't have to configure the max jumbo frame size per chip
(sub-)version. It can be easily determined based on the chip family.
And new members of the RTL8168 family (if there are any) should be
automatically covered.
Signed-off-by: Heiner Kallweit
---
drivers/net/ethernet/realtek/r8169.c
Simplify the interrupt handler a little and make it better readable.
Signed-off-by: Heiner Kallweit
---
drivers/net/ethernet/realtek/r8169.c | 19 +++
1 file changed, 7 insertions(+), 12 deletions(-)
diff --git a/drivers/net/ethernet/realtek/r8169.c
b/drivers/net/ethernet
We don't have to configure the csum function per chip (sub-)version.
The distinction is simple, versions RTL8102e and from RTL8168c onwards
support csum_v2.
Signed-off-by: Heiner Kallweit
---
drivers/net/ethernet/realtek/r8169.c | 134 +--
1 file changed, 67 insertions
The asm headers shouldn't be included directly. asm/irq.h is
implicitly included by linux/interrupt.h, and instead of
asm/io.h include linux/io.h.
Signed-off-by: Heiner Kallweit
---
drivers/net/ethernet/realtek/r8169.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git
The version number hasn't changed for ages and in general I doubt it
provides any benefit. The message in rtl_init_one() may even be
misleading because it's printed also if something fails in probe.
Therefore let's remove the version information.
Signed-off-by: Heiner Kallweit
---
drivers/net
This series includes smaller improvements, no functional change
intended.
Heiner Kallweit (4):
r8169: don't include asm headers directly
r8169: simplify interrupt handler
r8169: don't configure csum function per chip version
r8169: don't configure max jumbo frame size per chip version
is to blame, let's disable MSI-X for this version.
Reported-by: Steve Dodd
Reported-by: Lou Reed
Tested-by: Steve Dodd
Tested-by: Lou Reed
Fixes: 6c6aa15fdea5 ("r8169: improve interrupt handling")
Signed-off-by: Heiner Kallweit
---
drivers/net/ethernet/realtek/r8169.c | 5 +++
On 16.08.2018 20:59, Heiner Kallweit wrote:
>> From: Jian-Hong Pan
>>
>> Found the ethernet network on ASUS X441UAR doesn't come back on resume
>> from suspend when using MSI-X. The chip is RTL8106e - version 39.
>>
> The patch itself looks good, just the commi
On 16.08.2018 21:21, Florian Fainelli wrote:
> On 08/16/2018 12:15 PM, Heiner Kallweit wrote:
>> When reading through the state machine code in phy.c I wondered whether
>> there is any PHY which reports the link as up during autonegotiation.
>> (It's about handling PHY_AN
> From: Jian-Hong Pan
>
> Found the ethernet network on ASUS X441UAR doesn't come back on resume
> from suspend when using MSI-X. The chip is RTL8106e - version 39.
>
The patch itself looks good, just the commit message is wrong in one
place and a little bit long.
> asus@endless:~$ dmesg |
When reading through the state machine code in phy.c I wondered whether
there is any PHY which reports the link as up during autonegotiation.
(It's about handling PHY_AN in the state machine, once we know the link
is up we still check whether aneg was completed. Is this needed?)
At least the
On 20.08.2018 21:44, Marc Dionne wrote:
> The r8169 adapter in one of my machines was not working after updating
> to a current kernel from the merge window, which was fixed by enabling
> CONFIG_REALTEK_PHY.
>
> So in addition to "select PHYLIB", should CONFIG_R8169 not also be
> doing "select
Now that we switched the r8169 driver to use phylib, there's a
dependency on the Realtek PHY drivers. This dependency was missing
in Kconfig.
Reported-by: Jouni Mettälä
Fixes: f1e911d5d0df ("r8169: add basic phylib support")
Signed-off-by: Heiner Kallweit
---
drivers/net/ethern
On 17.08.2018 19:39, Florian Fainelli wrote:
> +Heiner,
>
> On 08/17/2018 01:33 AM, Jouni Mettälä wrote:
>> There is network regression for me. 4.18 was good. 4.18+ is bad. There
>> was some phy changes in r8169 driver. Fortunately adding
>> CONFIG_REALTEK_PHY=m to kernel config fixed the
On 22.08.2018 06:24, David Miller wrote:
> From: Jian-Hong Pan
> Date: Wed, 22 Aug 2018 11:01:02 +0800
>
> ...
>> [ 56.462464] r8169 :02:00.0: MSI-X entry: context resume:
>>
> ...
>> uh! The MSI-X entry seems missed after resume on this laptop!
>
>
On 20.08.2018 05:47, Jian-Hong Pan wrote:
> 2018-08-20 4:34 GMT+08:00 Heiner Kallweit :
>> The three of you reported an MSI-X-related error when the system
>> resumes from suspend. This has been fixed for now by disabling MSI-X
>> on certain chip versions. However more ver
101 - 200 of 465 matches
Mail list logo