* [PATCH 0/4 v2 net-next] net: phy: aquantia: number of improvements
From: Heiner Kallweit @ 2019-02-03 20:15 UTC (permalink / raw)
To: Andrew Lunn, Florian Fainelli, David Miller; +Cc: netdev@vger.kernel.org
This patch series is based on work from Andrew. I adjusted and added
certain parts. The series improves few aspects of driver, no functional
change intended.
v2:
- add my SoB to patch 1
- leave kernel.h in in patch 2
Andrew Lunn (1):
net: phy: aquantia: Shorten name space prefix to aqr_
Heiner Kallweit (3):
net: phy: aquantia: remove unneeded includes
net: phy: aquantia: use macro PHY_ID_MATCH_MODEL
net: phy: aquantia: replace magic numbers with constants
drivers/net/phy/aquantia.c | 177 +++++++++++++++++++++++--------------
1 file changed, 110 insertions(+), 67 deletions(-)
--
2.20.1
^ permalink raw reply
* Re: [v2, 0/9] Add ENETC PTP clock driver
From: David Miller @ 2019-02-03 20:11 UTC (permalink / raw)
To: yangbo.lu; +Cc: netdev, devicetree, richardcochran, robh+dt, claudiu.manoil
In-Reply-To: <20190203.113921.1847323007238920901.davem@davemloft.net>
From: David Miller <davem@davemloft.net>
Date: Sun, 03 Feb 2019 11:39:21 -0800 (PST)
> From: Yangbo Lu <yangbo.lu@nxp.com>
> Date: Sat, 2 Feb 2019 10:56:58 +0800
>
>> There is same QorIQ 1588 timer IP block on the new ENETC Ethernet
>> controller with eTSEC/DPAA Ethernet controllers. However it's
>> different endianness (little-endian) and using PCI driver.
>>
>> To support ENETC PTP driver, ptp_qoriq driver needed to be
>> reworked to make functions global for reusing, to add little-
>> endian support, to add ENETC memory map support, and to add
>> ENETC dependency for ptp_qoriq driver.
>>
>> In addition, although ENETC PTP driver is a PCI driver, the dts
>> node still could be used. Currently the ls1028a dtsi which is
>> the only platform by now using ENETC is not complete, so there
>> is still dependency for ENETC PTP node upstreaming. This will
>> be done in the near future. The hardware timestamping support
>> for ENETC is done but needs to be reworked with new method in
>> internal git tree, and will be sent out soon.
>
> Series applied.
Once AGAIN, I had to revert:
[davem@localhost net-next]$ make -s -j8
ERROR: "ptp_qoriq_remove_debugfs" [drivers/net/ethernet/freescale/enetc/fsl-enetc-ptp.ko] undefined!
make[1]: *** [scripts/Makefile.modpost:92: __modpost] Error 1
make: *** [Makefile:1262: modules] Error 2
Please do an allmodconfig build and don't resubmit this until it all
passes.
Thank you.
^ permalink raw reply
* Re: [PATCH 2/4 net-next] net: phy: aquantia: remove unneeded includes
From: Heiner Kallweit @ 2019-02-03 20:08 UTC (permalink / raw)
To: Andrew Lunn; +Cc: Florian Fainelli, David Miller, netdev@vger.kernel.org
In-Reply-To: <20190203195418.GE27045@lunn.ch>
On 03.02.2019 20:54, Andrew Lunn wrote:
> On Sun, Feb 03, 2019 at 08:33:54PM +0100, Heiner Kallweit wrote:
>> Remove unneeded header includes.
>>
>> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
>
>
>> ---
>> drivers/net/phy/aquantia.c | 4 ----
>> 1 file changed, 4 deletions(-)
>>
>> diff --git a/drivers/net/phy/aquantia.c b/drivers/net/phy/aquantia.c
>> index 880ec4bba..8a51589a3 100644
>> --- a/drivers/net/phy/aquantia.c
>> +++ b/drivers/net/phy/aquantia.c
>> @@ -7,13 +7,9 @@
>> * Copyright 2015 Freescale Semiconductor, Inc.
>> */
>>
>> -#include <linux/kernel.h>
>
> We probably need this one. e.g. __maybe_unused comes from
> linux/compiler.h which you traditionally get via linux/kernel.h.
>
Strange, for whatever reason I thought that kernel.h is automatically
included for each kernel source file.
> Andrew
>
Heiner
^ permalink raw reply
* Re: [PATCH 4/4 net-next] net: phy: aquantia: replace magic numbers with constants
From: Andrew Lunn @ 2019-02-03 19:56 UTC (permalink / raw)
To: Heiner Kallweit; +Cc: Florian Fainelli, David Miller, netdev@vger.kernel.org
In-Reply-To: <12255e2f-24ca-6e94-f7d0-25ba4dfa216f@gmail.com>
On Sun, Feb 03, 2019 at 08:35:54PM +0100, Heiner Kallweit wrote:
> Replace magic numbers with proper constants. The original patch is
> from Andrew, I extended / adjusted certain parts:
> - Use decimal bit numbers. The datasheet uses hex bit numbers 0 .. F.
> - Order defines from highest to lowest bit numbers
> - correct some typos
> - add constant MDIO_AN_TX_VEND_INT_MASK2_LINK
> - Remove few functional improvements from the patch, they will come as
> a separate patch.
>
> Signed-off-by: Andrew Lunn <andrew@lunn.ch>
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
^ permalink raw reply
* Re: [PATCH 3/4 net-next] net: phy: aquantia: use macro PHY_ID_MATCH_MODEL
From: Andrew Lunn @ 2019-02-03 19:54 UTC (permalink / raw)
To: Heiner Kallweit; +Cc: Florian Fainelli, David Miller, netdev@vger.kernel.org
In-Reply-To: <e16cbe96-0f3b-c612-5806-285bcba4d075@gmail.com>
On Sun, Feb 03, 2019 at 08:34:37PM +0100, Heiner Kallweit wrote:
> Make use of macro PHY_ID_MATCH_MODEL to simplify the code.
>
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
^ permalink raw reply
* Re: [PATCH 2/4 net-next] net: phy: aquantia: remove unneeded includes
From: Andrew Lunn @ 2019-02-03 19:54 UTC (permalink / raw)
To: Heiner Kallweit; +Cc: Florian Fainelli, David Miller, netdev@vger.kernel.org
In-Reply-To: <c313cf37-3886-a449-e1c4-9482eea5c385@gmail.com>
On Sun, Feb 03, 2019 at 08:33:54PM +0100, Heiner Kallweit wrote:
> Remove unneeded header includes.
>
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
> ---
> drivers/net/phy/aquantia.c | 4 ----
> 1 file changed, 4 deletions(-)
>
> diff --git a/drivers/net/phy/aquantia.c b/drivers/net/phy/aquantia.c
> index 880ec4bba..8a51589a3 100644
> --- a/drivers/net/phy/aquantia.c
> +++ b/drivers/net/phy/aquantia.c
> @@ -7,13 +7,9 @@
> * Copyright 2015 Freescale Semiconductor, Inc.
> */
>
> -#include <linux/kernel.h>
We probably need this one. e.g. __maybe_unused comes from
linux/compiler.h which you traditionally get via linux/kernel.h.
Andrew
^ permalink raw reply
* Re: [PATCH 1/4 net-next] net: phy: aquantia: shorten name space prefix to aqr_
From: Heiner Kallweit @ 2019-02-03 19:42 UTC (permalink / raw)
To: Andrew Lunn; +Cc: Florian Fainelli, David Miller, netdev@vger.kernel.org
In-Reply-To: <20190203193847.GD27045@lunn.ch>
On 03.02.2019 20:38, Andrew Lunn wrote:
> On Sun, Feb 03, 2019 at 08:33:13PM +0100, Heiner Kallweit wrote:
>> From: Andrew Lunn <andrew@lunn.ch>
>> aquantia_ as a name space prefix is rather long, resulting in lots of
>> lines needing wrapping, reducing readability. Use the prefix aqr_
>> instead, which fits with the vendor naming there devices aqr107, for
>> example.
>>
>> Signed-off-by: Andrew Lunn <andrew@lunn.ch>
>
> Hi Heiner
>
> You need to add your signed-off-by here. Anybody who handles the patch
> on its way into the kernel needs to add a SOB.
>
> Andrew
>
Each day you learn something new .. I was under the impression that I have
to do this in case of changes only. And this patch I forwarded as is.
Let me know whether you have other review comments. Then I bundle the
changes in a v2.
Heiner
^ permalink raw reply
* Re: [PATCH net-next] net: Fix ip_mc_{dec,inc}_group allocation context
From: David Miller @ 2019-02-03 19:40 UTC (permalink / raw)
To: f.fainelli
Cc: netdev, linus.luessing, andrew, roopa, nikolay, kuznet, yoshfuji,
sbrivio, liuhangbin, linux-kernel, bridge
In-Reply-To: <20190202042055.27202-1-f.fainelli@gmail.com>
From: Florian Fainelli <f.fainelli@gmail.com>
Date: Fri, 1 Feb 2019 20:20:52 -0800
> After 4effd28c1245 ("bridge: join all-snoopers multicast address"), I
> started seeing the following sleep in atomic warnings:
...
> while toggling the bridge's multicast_snooping attribute dynamically.
>
> Pass a gfp_t down to igmpv3_add_delrec(), introduce
> __igmp_group_dropped() and introduce __ip_mc_dec_group() to take a gfp_t
> argument.
>
> Similarly introduce ____ip_mc_inc_group() and __ip_mc_inc_group() to
> allow caller to specify gfp_t.
>
> IPv6 part of the patch appears fine.
>
> Fixes: 4effd28c1245 ("bridge: join all-snoopers multicast address")
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Applied.
Maybe you could submit a quick test case since you had a reproducer?
^ permalink raw reply
* Re: [v2, 0/9] Add ENETC PTP clock driver
From: David Miller @ 2019-02-03 19:39 UTC (permalink / raw)
To: yangbo.lu; +Cc: netdev, devicetree, richardcochran, robh+dt, claudiu.manoil
In-Reply-To: <20190202025707.10794-1-yangbo.lu@nxp.com>
From: Yangbo Lu <yangbo.lu@nxp.com>
Date: Sat, 2 Feb 2019 10:56:58 +0800
> There is same QorIQ 1588 timer IP block on the new ENETC Ethernet
> controller with eTSEC/DPAA Ethernet controllers. However it's
> different endianness (little-endian) and using PCI driver.
>
> To support ENETC PTP driver, ptp_qoriq driver needed to be
> reworked to make functions global for reusing, to add little-
> endian support, to add ENETC memory map support, and to add
> ENETC dependency for ptp_qoriq driver.
>
> In addition, although ENETC PTP driver is a PCI driver, the dts
> node still could be used. Currently the ls1028a dtsi which is
> the only platform by now using ENETC is not complete, so there
> is still dependency for ENETC PTP node upstreaming. This will
> be done in the near future. The hardware timestamping support
> for ENETC is done but needs to be reworked with new method in
> internal git tree, and will be sent out soon.
Series applied.
^ permalink raw reply
* Re: [PATCH 1/4 net-next] net: phy: aquantia: shorten name space prefix to aqr_
From: Andrew Lunn @ 2019-02-03 19:38 UTC (permalink / raw)
To: Heiner Kallweit; +Cc: Florian Fainelli, David Miller, netdev@vger.kernel.org
In-Reply-To: <fdcc2599-b321-e113-d119-7865d8bf6414@gmail.com>
On Sun, Feb 03, 2019 at 08:33:13PM +0100, Heiner Kallweit wrote:
> From: Andrew Lunn <andrew@lunn.ch>
> aquantia_ as a name space prefix is rather long, resulting in lots of
> lines needing wrapping, reducing readability. Use the prefix aqr_
> instead, which fits with the vendor naming there devices aqr107, for
> example.
>
> Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Hi Heiner
You need to add your signed-off-by here. Anybody who handles the patch
on its way into the kernel needs to add a SOB.
Andrew
^ permalink raw reply
* [PATCH 4/4 net-next] net: phy: aquantia: replace magic numbers with constants
From: Heiner Kallweit @ 2019-02-03 19:35 UTC (permalink / raw)
To: Andrew Lunn, Florian Fainelli, David Miller; +Cc: netdev@vger.kernel.org
In-Reply-To: <08812313-471b-79c2-f667-bace78acf0fe@gmail.com>
Replace magic numbers with proper constants. The original patch is
from Andrew, I extended / adjusted certain parts:
- Use decimal bit numbers. The datasheet uses hex bit numbers 0 .. F.
- Order defines from highest to lowest bit numbers
- correct some typos
- add constant MDIO_AN_TX_VEND_INT_MASK2_LINK
- Remove few functional improvements from the patch, they will come as
a separate patch.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
drivers/net/phy/aquantia.c | 80 +++++++++++++++++++++++++++++++-------
1 file changed, 66 insertions(+), 14 deletions(-)
diff --git a/drivers/net/phy/aquantia.c b/drivers/net/phy/aquantia.c
index 12874cce4..2bd452542 100644
--- a/drivers/net/phy/aquantia.c
+++ b/drivers/net/phy/aquantia.c
@@ -18,6 +18,48 @@
#define PHY_ID_AQR107 0x03a1b4e0
#define PHY_ID_AQR405 0x03a1b4b0
+#define MDIO_AN_TX_VEND_STATUS1 0xc800
+#define MDIO_AN_TX_VEND_STATUS1_10BASET (0x0 << 1)
+#define MDIO_AN_TX_VEND_STATUS1_100BASETX (0x1 << 1)
+#define MDIO_AN_TX_VEND_STATUS1_1000BASET (0x2 << 1)
+#define MDIO_AN_TX_VEND_STATUS1_10GBASET (0x3 << 1)
+#define MDIO_AN_TX_VEND_STATUS1_2500BASET (0x4 << 1)
+#define MDIO_AN_TX_VEND_STATUS1_5000BASET (0x5 << 1)
+#define MDIO_AN_TX_VEND_STATUS1_RATE_MASK (0x7 << 1)
+#define MDIO_AN_TX_VEND_STATUS1_FULL_DUPLEX BIT(0)
+
+#define MDIO_AN_TX_VEND_INT_STATUS2 0xcc01
+
+#define MDIO_AN_TX_VEND_INT_MASK2 0xd401
+#define MDIO_AN_TX_VEND_INT_MASK2_LINK BIT(0)
+
+/* Vendor specific 1, MDIO_MMD_VEND1 */
+#define VEND1_GLOBAL_INT_STD_STATUS 0xfc00
+#define VEND1_GLOBAL_INT_VEND_STATUS 0xfc01
+
+#define VEND1_GLOBAL_INT_STD_MASK 0xff00
+#define VEND1_GLOBAL_INT_STD_MASK_PMA1 BIT(15)
+#define VEND1_GLOBAL_INT_STD_MASK_PMA2 BIT(14)
+#define VEND1_GLOBAL_INT_STD_MASK_PCS1 BIT(13)
+#define VEND1_GLOBAL_INT_STD_MASK_PCS2 BIT(12)
+#define VEND1_GLOBAL_INT_STD_MASK_PCS3 BIT(11)
+#define VEND1_GLOBAL_INT_STD_MASK_PHY_XS1 BIT(10)
+#define VEND1_GLOBAL_INT_STD_MASK_PHY_XS2 BIT(9)
+#define VEND1_GLOBAL_INT_STD_MASK_AN1 BIT(8)
+#define VEND1_GLOBAL_INT_STD_MASK_AN2 BIT(7)
+#define VEND1_GLOBAL_INT_STD_MASK_GBE BIT(6)
+#define VEND1_GLOBAL_INT_STD_MASK_ALL BIT(0)
+
+#define VEND1_GLOBAL_INT_VEND_MASK 0xff01
+#define VEND1_GLOBAL_INT_VEND_MASK_PMA BIT(15)
+#define VEND1_GLOBAL_INT_VEND_MASK_PCS BIT(14)
+#define VEND1_GLOBAL_INT_VEND_MASK_PHY_XS BIT(13)
+#define VEND1_GLOBAL_INT_VEND_MASK_AN BIT(12)
+#define VEND1_GLOBAL_INT_VEND_MASK_GBE BIT(11)
+#define VEND1_GLOBAL_INT_VEND_MASK_GLOBAL1 BIT(2)
+#define VEND1_GLOBAL_INT_VEND_MASK_GLOBAL2 BIT(1)
+#define VEND1_GLOBAL_INT_VEND_MASK_GLOBAL3 BIT(0)
+
static int aqr_config_aneg(struct phy_device *phydev)
{
linkmode_copy(phydev->supported, phy_10gbit_features);
@@ -31,25 +73,35 @@ static int aqr_config_intr(struct phy_device *phydev)
int err;
if (phydev->interrupts == PHY_INTERRUPT_ENABLED) {
- err = phy_write_mmd(phydev, MDIO_MMD_AN, 0xd401, 1);
+ err = phy_write_mmd(phydev, MDIO_MMD_AN,
+ MDIO_AN_TX_VEND_INT_MASK2,
+ MDIO_AN_TX_VEND_INT_MASK2_LINK);
if (err < 0)
return err;
- err = phy_write_mmd(phydev, MDIO_MMD_VEND1, 0xff00, 1);
+ err = phy_write_mmd(phydev, MDIO_MMD_VEND1,
+ VEND1_GLOBAL_INT_STD_MASK,
+ VEND1_GLOBAL_INT_STD_MASK_ALL);
if (err < 0)
return err;
- err = phy_write_mmd(phydev, MDIO_MMD_VEND1, 0xff01, 0x1001);
+ err = phy_write_mmd(phydev, MDIO_MMD_VEND1,
+ VEND1_GLOBAL_INT_VEND_MASK,
+ VEND1_GLOBAL_INT_VEND_MASK_GLOBAL3 |
+ VEND1_GLOBAL_INT_VEND_MASK_AN);
} else {
- err = phy_write_mmd(phydev, MDIO_MMD_AN, 0xd401, 0);
+ err = phy_write_mmd(phydev, MDIO_MMD_AN,
+ MDIO_AN_TX_VEND_INT_MASK2, 0);
if (err < 0)
return err;
- err = phy_write_mmd(phydev, MDIO_MMD_VEND1, 0xff00, 0);
+ err = phy_write_mmd(phydev, MDIO_MMD_VEND1,
+ VEND1_GLOBAL_INT_STD_MASK, 0);
if (err < 0)
return err;
- err = phy_write_mmd(phydev, MDIO_MMD_VEND1, 0xff01, 0);
+ err = phy_write_mmd(phydev, MDIO_MMD_VEND1,
+ VEND1_GLOBAL_INT_VEND_MASK, 0);
}
return err;
@@ -59,7 +111,8 @@ static int aqr_ack_interrupt(struct phy_device *phydev)
{
int reg;
- reg = phy_read_mmd(phydev, MDIO_MMD_AN, 0xcc01);
+ reg = phy_read_mmd(phydev, MDIO_MMD_AN,
+ MDIO_AN_TX_VEND_INT_STATUS2);
return (reg < 0) ? reg : 0;
}
@@ -74,21 +127,20 @@ static int aqr_read_status(struct phy_device *phydev)
else
phydev->link = 0;
- reg = phy_read_mmd(phydev, MDIO_MMD_AN, 0xc800);
+ reg = phy_read_mmd(phydev, MDIO_MMD_AN, MDIO_AN_TX_VEND_STATUS1);
mdelay(10);
- reg = phy_read_mmd(phydev, MDIO_MMD_AN, 0xc800);
+ reg = phy_read_mmd(phydev, MDIO_MMD_AN, MDIO_AN_TX_VEND_STATUS1);
- switch (reg) {
- case 0x9:
+ switch (reg & MDIO_AN_TX_VEND_STATUS1_RATE_MASK) {
+ case MDIO_AN_TX_VEND_STATUS1_2500BASET:
phydev->speed = SPEED_2500;
break;
- case 0x5:
+ case MDIO_AN_TX_VEND_STATUS1_1000BASET:
phydev->speed = SPEED_1000;
break;
- case 0x3:
+ case MDIO_AN_TX_VEND_STATUS1_100BASETX:
phydev->speed = SPEED_100;
break;
- case 0x7:
default:
phydev->speed = SPEED_10000;
break;
--
2.20.1
^ permalink raw reply related
* [PATCH 2/4 net-next] net: phy: aquantia: remove unneeded includes
From: Heiner Kallweit @ 2019-02-03 19:33 UTC (permalink / raw)
To: Andrew Lunn, Florian Fainelli, David Miller; +Cc: netdev@vger.kernel.org
In-Reply-To: <08812313-471b-79c2-f667-bace78acf0fe@gmail.com>
Remove unneeded header includes.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
drivers/net/phy/aquantia.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/net/phy/aquantia.c b/drivers/net/phy/aquantia.c
index 880ec4bba..8a51589a3 100644
--- a/drivers/net/phy/aquantia.c
+++ b/drivers/net/phy/aquantia.c
@@ -7,13 +7,9 @@
* Copyright 2015 Freescale Semiconductor, Inc.
*/
-#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/delay.h>
-#include <linux/mii.h>
-#include <linux/ethtool.h>
#include <linux/phy.h>
-#include <linux/mdio.h>
#define PHY_ID_AQ1202 0x03a1b445
#define PHY_ID_AQ2104 0x03a1b460
--
2.20.1
^ permalink raw reply related
* [PATCH 3/4 net-next] net: phy: aquantia: use macro PHY_ID_MATCH_MODEL
From: Heiner Kallweit @ 2019-02-03 19:34 UTC (permalink / raw)
To: Andrew Lunn, Florian Fainelli, David Miller; +Cc: netdev@vger.kernel.org
In-Reply-To: <08812313-471b-79c2-f667-bace78acf0fe@gmail.com>
Make use of macro PHY_ID_MATCH_MODEL to simplify the code.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
drivers/net/phy/aquantia.c | 30 ++++++++++++------------------
1 file changed, 12 insertions(+), 18 deletions(-)
diff --git a/drivers/net/phy/aquantia.c b/drivers/net/phy/aquantia.c
index 8a51589a3..12874cce4 100644
--- a/drivers/net/phy/aquantia.c
+++ b/drivers/net/phy/aquantia.c
@@ -100,8 +100,7 @@ static int aqr_read_status(struct phy_device *phydev)
static struct phy_driver aqr_driver[] = {
{
- .phy_id = PHY_ID_AQ1202,
- .phy_id_mask = 0xfffffff0,
+ PHY_ID_MATCH_MODEL(PHY_ID_AQ1202),
.name = "Aquantia AQ1202",
.features = PHY_10GBIT_FULL_FEATURES,
.aneg_done = genphy_c45_aneg_done,
@@ -111,8 +110,7 @@ static struct phy_driver aqr_driver[] = {
.read_status = aqr_read_status,
},
{
- .phy_id = PHY_ID_AQ2104,
- .phy_id_mask = 0xfffffff0,
+ PHY_ID_MATCH_MODEL(PHY_ID_AQ2104),
.name = "Aquantia AQ2104",
.features = PHY_10GBIT_FULL_FEATURES,
.aneg_done = genphy_c45_aneg_done,
@@ -122,8 +120,7 @@ static struct phy_driver aqr_driver[] = {
.read_status = aqr_read_status,
},
{
- .phy_id = PHY_ID_AQR105,
- .phy_id_mask = 0xfffffff0,
+ PHY_ID_MATCH_MODEL(PHY_ID_AQR105),
.name = "Aquantia AQR105",
.features = PHY_10GBIT_FULL_FEATURES,
.aneg_done = genphy_c45_aneg_done,
@@ -133,8 +130,7 @@ static struct phy_driver aqr_driver[] = {
.read_status = aqr_read_status,
},
{
- .phy_id = PHY_ID_AQR106,
- .phy_id_mask = 0xfffffff0,
+ PHY_ID_MATCH_MODEL(PHY_ID_AQR106),
.name = "Aquantia AQR106",
.features = PHY_10GBIT_FULL_FEATURES,
.aneg_done = genphy_c45_aneg_done,
@@ -144,8 +140,7 @@ static struct phy_driver aqr_driver[] = {
.read_status = aqr_read_status,
},
{
- .phy_id = PHY_ID_AQR107,
- .phy_id_mask = 0xfffffff0,
+ PHY_ID_MATCH_MODEL(PHY_ID_AQR107),
.name = "Aquantia AQR107",
.features = PHY_10GBIT_FULL_FEATURES,
.aneg_done = genphy_c45_aneg_done,
@@ -155,8 +150,7 @@ static struct phy_driver aqr_driver[] = {
.read_status = aqr_read_status,
},
{
- .phy_id = PHY_ID_AQR405,
- .phy_id_mask = 0xfffffff0,
+ PHY_ID_MATCH_MODEL(PHY_ID_AQR405),
.name = "Aquantia AQR405",
.features = PHY_10GBIT_FULL_FEATURES,
.aneg_done = genphy_c45_aneg_done,
@@ -170,12 +164,12 @@ static struct phy_driver aqr_driver[] = {
module_phy_driver(aqr_driver);
static struct mdio_device_id __maybe_unused aqr_tbl[] = {
- { PHY_ID_AQ1202, 0xfffffff0 },
- { PHY_ID_AQ2104, 0xfffffff0 },
- { PHY_ID_AQR105, 0xfffffff0 },
- { PHY_ID_AQR106, 0xfffffff0 },
- { PHY_ID_AQR107, 0xfffffff0 },
- { PHY_ID_AQR405, 0xfffffff0 },
+ { PHY_ID_MATCH_MODEL(PHY_ID_AQ1202) },
+ { PHY_ID_MATCH_MODEL(PHY_ID_AQ2104) },
+ { PHY_ID_MATCH_MODEL(PHY_ID_AQR105) },
+ { PHY_ID_MATCH_MODEL(PHY_ID_AQR106) },
+ { PHY_ID_MATCH_MODEL(PHY_ID_AQR107) },
+ { PHY_ID_MATCH_MODEL(PHY_ID_AQR405) },
{ }
};
--
2.20.1
^ permalink raw reply related
* [PATCH 1/4 net-next] net: phy: aquantia: shorten name space prefix to aqr_
From: Heiner Kallweit @ 2019-02-03 19:33 UTC (permalink / raw)
To: Andrew Lunn, Florian Fainelli, David Miller; +Cc: netdev@vger.kernel.org
In-Reply-To: <08812313-471b-79c2-f667-bace78acf0fe@gmail.com>
From: Andrew Lunn <andrew@lunn.ch>
aquantia_ as a name space prefix is rather long, resulting in lots of
lines needing wrapping, reducing readability. Use the prefix aqr_
instead, which fits with the vendor naming there devices aqr107, for
example.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
drivers/net/phy/aquantia.c | 64 +++++++++++++++++++-------------------
1 file changed, 32 insertions(+), 32 deletions(-)
diff --git a/drivers/net/phy/aquantia.c b/drivers/net/phy/aquantia.c
index 0578fe75d..880ec4bba 100644
--- a/drivers/net/phy/aquantia.c
+++ b/drivers/net/phy/aquantia.c
@@ -22,7 +22,7 @@
#define PHY_ID_AQR107 0x03a1b4e0
#define PHY_ID_AQR405 0x03a1b4b0
-static int aquantia_config_aneg(struct phy_device *phydev)
+static int aqr_config_aneg(struct phy_device *phydev)
{
linkmode_copy(phydev->supported, phy_10gbit_features);
linkmode_copy(phydev->advertising, phydev->supported);
@@ -30,7 +30,7 @@ static int aquantia_config_aneg(struct phy_device *phydev)
return 0;
}
-static int aquantia_config_intr(struct phy_device *phydev)
+static int aqr_config_intr(struct phy_device *phydev)
{
int err;
@@ -59,7 +59,7 @@ static int aquantia_config_intr(struct phy_device *phydev)
return err;
}
-static int aquantia_ack_interrupt(struct phy_device *phydev)
+static int aqr_ack_interrupt(struct phy_device *phydev)
{
int reg;
@@ -67,7 +67,7 @@ static int aquantia_ack_interrupt(struct phy_device *phydev)
return (reg < 0) ? reg : 0;
}
-static int aquantia_read_status(struct phy_device *phydev)
+static int aqr_read_status(struct phy_device *phydev)
{
int reg;
@@ -102,17 +102,17 @@ static int aquantia_read_status(struct phy_device *phydev)
return 0;
}
-static struct phy_driver aquantia_driver[] = {
+static struct phy_driver aqr_driver[] = {
{
.phy_id = PHY_ID_AQ1202,
.phy_id_mask = 0xfffffff0,
.name = "Aquantia AQ1202",
.features = PHY_10GBIT_FULL_FEATURES,
.aneg_done = genphy_c45_aneg_done,
- .config_aneg = aquantia_config_aneg,
- .config_intr = aquantia_config_intr,
- .ack_interrupt = aquantia_ack_interrupt,
- .read_status = aquantia_read_status,
+ .config_aneg = aqr_config_aneg,
+ .config_intr = aqr_config_intr,
+ .ack_interrupt = aqr_ack_interrupt,
+ .read_status = aqr_read_status,
},
{
.phy_id = PHY_ID_AQ2104,
@@ -120,10 +120,10 @@ static struct phy_driver aquantia_driver[] = {
.name = "Aquantia AQ2104",
.features = PHY_10GBIT_FULL_FEATURES,
.aneg_done = genphy_c45_aneg_done,
- .config_aneg = aquantia_config_aneg,
- .config_intr = aquantia_config_intr,
- .ack_interrupt = aquantia_ack_interrupt,
- .read_status = aquantia_read_status,
+ .config_aneg = aqr_config_aneg,
+ .config_intr = aqr_config_intr,
+ .ack_interrupt = aqr_ack_interrupt,
+ .read_status = aqr_read_status,
},
{
.phy_id = PHY_ID_AQR105,
@@ -131,10 +131,10 @@ static struct phy_driver aquantia_driver[] = {
.name = "Aquantia AQR105",
.features = PHY_10GBIT_FULL_FEATURES,
.aneg_done = genphy_c45_aneg_done,
- .config_aneg = aquantia_config_aneg,
- .config_intr = aquantia_config_intr,
- .ack_interrupt = aquantia_ack_interrupt,
- .read_status = aquantia_read_status,
+ .config_aneg = aqr_config_aneg,
+ .config_intr = aqr_config_intr,
+ .ack_interrupt = aqr_ack_interrupt,
+ .read_status = aqr_read_status,
},
{
.phy_id = PHY_ID_AQR106,
@@ -142,10 +142,10 @@ static struct phy_driver aquantia_driver[] = {
.name = "Aquantia AQR106",
.features = PHY_10GBIT_FULL_FEATURES,
.aneg_done = genphy_c45_aneg_done,
- .config_aneg = aquantia_config_aneg,
- .config_intr = aquantia_config_intr,
- .ack_interrupt = aquantia_ack_interrupt,
- .read_status = aquantia_read_status,
+ .config_aneg = aqr_config_aneg,
+ .config_intr = aqr_config_intr,
+ .ack_interrupt = aqr_ack_interrupt,
+ .read_status = aqr_read_status,
},
{
.phy_id = PHY_ID_AQR107,
@@ -153,10 +153,10 @@ static struct phy_driver aquantia_driver[] = {
.name = "Aquantia AQR107",
.features = PHY_10GBIT_FULL_FEATURES,
.aneg_done = genphy_c45_aneg_done,
- .config_aneg = aquantia_config_aneg,
- .config_intr = aquantia_config_intr,
- .ack_interrupt = aquantia_ack_interrupt,
- .read_status = aquantia_read_status,
+ .config_aneg = aqr_config_aneg,
+ .config_intr = aqr_config_intr,
+ .ack_interrupt = aqr_ack_interrupt,
+ .read_status = aqr_read_status,
},
{
.phy_id = PHY_ID_AQR405,
@@ -164,16 +164,16 @@ static struct phy_driver aquantia_driver[] = {
.name = "Aquantia AQR405",
.features = PHY_10GBIT_FULL_FEATURES,
.aneg_done = genphy_c45_aneg_done,
- .config_aneg = aquantia_config_aneg,
- .config_intr = aquantia_config_intr,
- .ack_interrupt = aquantia_ack_interrupt,
- .read_status = aquantia_read_status,
+ .config_aneg = aqr_config_aneg,
+ .config_intr = aqr_config_intr,
+ .ack_interrupt = aqr_ack_interrupt,
+ .read_status = aqr_read_status,
},
};
-module_phy_driver(aquantia_driver);
+module_phy_driver(aqr_driver);
-static struct mdio_device_id __maybe_unused aquantia_tbl[] = {
+static struct mdio_device_id __maybe_unused aqr_tbl[] = {
{ PHY_ID_AQ1202, 0xfffffff0 },
{ PHY_ID_AQ2104, 0xfffffff0 },
{ PHY_ID_AQR105, 0xfffffff0 },
@@ -183,7 +183,7 @@ static struct mdio_device_id __maybe_unused aquantia_tbl[] = {
{ }
};
-MODULE_DEVICE_TABLE(mdio, aquantia_tbl);
+MODULE_DEVICE_TABLE(mdio, aqr_tbl);
MODULE_DESCRIPTION("Aquantia PHY driver");
MODULE_AUTHOR("Shaohui Xie <Shaohui.Xie@freescale.com>");
--
2.20.1
^ permalink raw reply related
* Re: [Patch net-next] net_sched: add performance counters for basic filter
From: Cong Wang @ 2019-02-03 19:35 UTC (permalink / raw)
To: Eric Dumazet
Cc: Linux Kernel Network Developers, Jamal Hadi Salim, Jiri Pirko
In-Reply-To: <ea0ef016-8d87-f358-0c80-a3d42da7fae4@gmail.com>
On Sun, Feb 3, 2019 at 10:35 AM Eric Dumazet <eric.dumazet@gmail.com> wrote:
> > + for_each_possible_cpu(cpu) {
> > + struct tc_basic_pcnt *pf = per_cpu_ptr(f->pf, cpu);
> > +
> > + gpf.rcnt += pf->rcnt;
> > + gpf.rhit += pf->rhit;
> > + }
> >
> This looks missing some synchronization of some sort for 32bit kernels ?
I don't know, u32 filter has literally same code:
for_each_possible_cpu(cpu) {
int i;
struct tc_u32_pcnt *pf = per_cpu_ptr(n->pf, cpu);
gpf->rcnt += pf->rcnt;
gpf->rhit += pf->rhit;
for (i = 0; i < n->sel.nkeys; i++)
gpf->kcnts[i] += pf->kcnts[i];
}
which has been there for years...
^ permalink raw reply
* [PATCH 0/4 net-next] net: phy: aquantia: number of improvements
From: Heiner Kallweit @ 2019-02-03 19:32 UTC (permalink / raw)
To: Andrew Lunn, Florian Fainelli, David Miller; +Cc: netdev@vger.kernel.org
This patch series is based on work from Andrew. I adjusted and added
certain parts. The series improves few aspects of driver, no functional
change intended.
Andrew Lunn (1):
net: phy: aquantia: shorten name space prefix to aqr_
Heiner Kallweit (3):
net: phy: aquantia: remove unneeded includes
net: phy: aquantia: use macro PHY_ID_MATCH_MODEL
net: phy: aquantia: replace magic numbers with constants
drivers/net/phy/aquantia.c | 178 +++++++++++++++++++++++--------------
1 file changed, 110 insertions(+), 68 deletions(-)
--
2.20.1
^ permalink raw reply
* Re: [PATCHv2 net] sctp: check and update stream->out_curr when allocating stream_out
From: Xin Long @ 2019-02-03 19:28 UTC (permalink / raw)
To: David Miller
Cc: Neil Horman, Marcelo Ricardo Leitner, network dev, linux-sctp
In-Reply-To: <20190201.103812.1527503455899125278.davem@davemloft.net>
On Sat, Feb 2, 2019 at 2:38 AM David Miller <davem@davemloft.net> wrote:
>
> From: Neil Horman <nhorman@tuxdriver.com>
> Date: Fri, 1 Feb 2019 07:31:18 -0500
>
> > On Thu, Jan 31, 2019 at 10:39:41PM -0200, Marcelo Ricardo Leitner wrote:
> >> On Tue, Jan 29, 2019 at 07:58:07PM +0100, Tuxdriver wrote:
> >> > I was initially under the impression that with Kent's repost, the radixtree
> >> > (which is what I think you meant by rhashtables) updates would be merged
> >>
> >> Oops! Yep.. I had meant flex_arrays actually.
> >>
> >> > imminently, but that doesn't seem to be the case. I'd really like to know
> >> > what the hold up there is, as that patch seems to have been stalled for
> >> > months. I hate the notion of breaking the radixtree patch, but if it's
> >> > status is indeterminate, then, yes, we probably need to go with xins patch
> >> > for the short term, and let Kent fix it up in due course.
> >>
> >> Dave, can you please consider applying this patch? The conflict
> >> resolution will be easy: just ignore the changes introduced by this
> >> patch.
> >>
> > Dave I concur with Marcelo here. Kent was very active in getting sctp fixed up
> > to use radixtrees, but now he seems to have gone to ground, and for whatever
> > reason, no one seems interested in incorporating his patch. Its been languising
> > for months, so I think we need to take action to secure sctp now until such time
> > as his genradix changes finally move forward.
>
> I agree, please let's get this sctp patch resubmitted and back into
> patchwork and I will apply it.
reposted.
^ permalink raw reply
* [PATCHv3 net] sctp: check and update stream->out_curr when allocating stream_out
From: Xin Long @ 2019-02-03 19:27 UTC (permalink / raw)
To: linux-kernel, network dev, linux-sctp
Cc: davem, Marcelo Ricardo Leitner, Neil Horman
Now when using stream reconfig to add out streams, stream->out
will get re-allocated, and all old streams' information will
be copied to the new ones and the old ones will be freed.
So without stream->out_curr updated, next time when trying to
send from stream->out_curr stream, a panic would be caused.
This patch is to check and update stream->out_curr when
allocating stream_out.
v1->v2:
- define fa_index() to get elem index from stream->out_curr.
v2->v3:
- repost with no change.
Fixes: 5bbbbe32a431 ("sctp: introduce stream scheduler foundations")
Reported-by: Ying Xu <yinxu@redhat.com>
Reported-by: syzbot+e33a3a138267ca119c7d@syzkaller.appspotmail.com
Signed-off-by: Xin Long <lucien.xin@gmail.com>
---
net/sctp/stream.c | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/net/sctp/stream.c b/net/sctp/stream.c
index 80e0ae5..f246331 100644
--- a/net/sctp/stream.c
+++ b/net/sctp/stream.c
@@ -84,6 +84,19 @@ static void fa_zero(struct flex_array *fa, size_t index, size_t count)
}
}
+static size_t fa_index(struct flex_array *fa, void *elem, size_t count)
+{
+ size_t index = 0;
+
+ while (count--) {
+ if (elem == flex_array_get(fa, index))
+ break;
+ index++;
+ }
+
+ return index;
+}
+
/* Migrates chunks from stream queues to new stream queues if needed,
* but not across associations. Also, removes those chunks to streams
* higher than the new max.
@@ -147,6 +160,13 @@ static int sctp_stream_alloc_out(struct sctp_stream *stream, __u16 outcnt,
if (stream->out) {
fa_copy(out, stream->out, 0, min(outcnt, stream->outcnt));
+ if (stream->out_curr) {
+ size_t index = fa_index(stream->out, stream->out_curr,
+ stream->outcnt);
+
+ BUG_ON(index == stream->outcnt);
+ stream->out_curr = flex_array_get(out, index);
+ }
fa_free(stream->out);
}
--
2.1.0
^ permalink raw reply related
* Re: [PATCH net-next] net: devlink: report cell size of shared buffers
From: David Miller @ 2019-02-03 19:27 UTC (permalink / raw)
To: jakub.kicinski; +Cc: jiri, idosch, netdev, oss-drivers
In-Reply-To: <20190202015628.30877-1-jakub.kicinski@netronome.com>
From: Jakub Kicinski <jakub.kicinski@netronome.com>
Date: Fri, 1 Feb 2019 17:56:28 -0800
> Shared buffer allocation is usually done in cell increments.
> Drivers will either round up the allocation or refuse the
> configuration if it's not an exact multiple of cell size.
> Drivers know exactly the cell size of shared buffer, so help
> out users by providing this information in dumps.
>
> Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
> Reviewed-by: Dirk van der Merwe <dirk.vandermerwe@netronome.com>
Applied, thanks.
^ permalink raw reply
* Re: [PATCH net] net: systemport: Fix WoL with password after deep sleep
From: David Miller @ 2019-02-03 19:24 UTC (permalink / raw)
To: f.fainelli; +Cc: netdev
In-Reply-To: <20190201212338.4449-1-f.fainelli@gmail.com>
From: Florian Fainelli <f.fainelli@gmail.com>
Date: Fri, 1 Feb 2019 13:23:38 -0800
> Broadcom STB chips support a deep sleep mode where all register
> contents are lost. Because we were stashing the MagicPacket password
> into some of these registers a suspend into that deep sleep then a
> resumption would not lead to being able to wake-up from MagicPacket with
> password again.
>
> Fix this by keeping a software copy of the password and program it
> during suspend.
>
> Fixes: 83e82f4c706b ("net: systemport: add Wake-on-LAN support")
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Applied and queued up for -stable, thanks.
^ permalink raw reply
* Re: [PATCH net-next] bonding: check slave set command firstly
From: David Miller @ 2019-02-03 19:20 UTC (permalink / raw)
To: xiangxia.m.yue; +Cc: netdev
In-Reply-To: <1549030035-22082-1-git-send-email-xiangxia.m.yue@gmail.com>
From: xiangxia.m.yue@gmail.com
Date: Fri, 1 Feb 2019 06:07:15 -0800
> From: Tonghao Zhang <xiangxia.m.yue@gmail.com>
>
> This patch is a little improvement. If user use the
> command shown as below, we should print the info [1]
> instead of [2]. The eth0 exists actually, and it may
> confuse user.
>
> $ echo "eth0" > /sys/class/net/bond4/bonding/slaves
>
> [1] "bond4: no command found in slaves file - use +ifname or -ifname"
> [2] "write error: No such device"
>
> Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
Please fix the compiler warning reported to you.
^ permalink raw reply
* Re: [PATCH net-next v3] cxgb4/cxgb4vf: Program hash region for {t4/t4vf}_change_mac()
From: David Miller @ 2019-02-03 19:10 UTC (permalink / raw)
To: arjun; +Cc: netdev, nirranjan, indranil, dt
In-Reply-To: <20190201113704.18117-1-arjun@chelsio.com>
From: Arjun Vynipadath <arjun@chelsio.com>
Date: Fri, 1 Feb 2019 17:07:04 +0530
> {t4/t4_vf}_change_mac() API's were only doing additions to MPS_TCAM.
> This will fail, when the number of tcam entries is limited particularly
> in vf's.
> This fix programs hash region with the mac address, when TCAM
> addtion fails for {t4/t4vf}_change_mac(). Since the locally maintained
> driver list for hash entries is shared across mac_{sync/unsync}(),
> added an extra parameter if_mac to track the address added thorugh
> {t4/t4vf}_change_mac()
>
> Signed-off-by: Arjun Vynipadath <arjun@chelsio.com>
Applied.
^ permalink raw reply
* Re: [PATCH v3 0/2] vsock/virtio: fix issues on device hot-unplug
From: David Miller @ 2019-02-03 19:06 UTC (permalink / raw)
To: sgarzare; +Cc: stefanha, virtualization, kvm, netdev, linux-kernel
In-Reply-To: <20190201114207.97217-1-sgarzare@redhat.com>
From: Stefano Garzarella <sgarzare@redhat.com>
Date: Fri, 1 Feb 2019 12:42:05 +0100
> These patches try to handle the hot-unplug of vsock virtio transport device in
> a proper way.
>
> Maybe move the vsock_core_init()/vsock_core_exit() functions in the module_init
> and module_exit of vsock_virtio_transport module can't be the best way, but the
> architecture of vsock_core forces us to this approach for now.
>
> The vsock_core proto_ops expect a valid pointer to the transport device, so we
> can't call vsock_core_exit() until there are open sockets.
>
> v2 -> v3:
> - Rebased on master
>
> v1 -> v2:
> - Fixed commit message of patch 1.
> - Added Reviewed-by, Acked-by tags by Stefan
Series applied.
^ permalink raw reply
* Re: [Patch net-next] net_sched: add performance counters for basic filter
From: Eric Dumazet @ 2019-02-03 18:35 UTC (permalink / raw)
To: Cong Wang, netdev; +Cc: Jamal Hadi Salim, Jiri Pirko
In-Reply-To: <20190118011401.28220-1-xiyou.wangcong@gmail.com>
On 01/17/2019 05:14 PM, Cong Wang wrote:
> Similar to u32 filter, it is useful to know how many times
> we reach each basic filter and how many times we pass the
> ematch attached to it.
>
> Sample output:
>
> filter protocol arp pref 49152 basic chain 0
> filter protocol arp pref 49152 basic chain 0 handle 0x1 (rule hit 3 success 3)
> action order 1: gact action pass
> random type none pass val 0
> index 1 ref 1 bind 1 installed 81 sec used 4 sec
> Action statistics:
> Sent 126 bytes 3 pkt (dropped 0, overlimits 0 requeues 0)
> backlog 0b 0p requeues 0
...
> + for_each_possible_cpu(cpu) {
> + struct tc_basic_pcnt *pf = per_cpu_ptr(f->pf, cpu);
> +
> + gpf.rcnt += pf->rcnt;
> + gpf.rhit += pf->rhit;
> + }
>
This looks missing some synchronization of some sort for 32bit kernels ?
^ permalink raw reply
* Re: [PATCH net] add snmp counter document
From: David Miller @ 2019-02-03 18:10 UTC (permalink / raw)
To: yupeng0921; +Cc: netdev, xiyou.wangcong, rdunlap
In-Reply-To: <20190201054559.8082-1-yupeng0921@gmail.com>
From: yupeng <yupeng0921@gmail.com>
Date: Thu, 31 Jan 2019 21:45:59 -0800
> add document for tcp retransmission, tcp fast open, syn cookies,
> challenge ack, prune and several general counters
>
> Signed-off-by: yupeng <yupeng0921@gmail.com>
Please respin this against net-next, thank you.
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox