Re: [PATCH bpf-next 0/7] Add XDP_ATTACH bind() flag to AF_XDP sockets

2018-12-08 Thread Andrew Lunn
e how you do that. As a user, i want to attach the XDP program to a slave interface. So i assume you somehow redirect that to the master, with some extra meta data to allow XDP on the master to detect packets for a specific slave? Andrew

Re: [net-next, RFC, 4/8] net: core: add recycle capabilities on skbs via page_pool API

2018-12-08 Thread Andrew Lunn
he driver using more memory, see if disk performance is affected. Andrew

Re: [PATCH bpf-next 0/7] Add XDP_ATTACH bind() flag to AF_XDP sockets

2018-12-08 Thread Andrew Lunn
, and it is clear what interface the frame is actually for. Andrew

[PATCH net-next] net: dsa: Make dsa_master_set_mtu() static

2018-12-08 Thread Andrew Lunn
Add the missing static keyword. Signed-off-by: Andrew Lunn --- net/dsa/master.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/dsa/master.c b/net/dsa/master.c index a25242e71fb2..d7d5145aa235 100644 --- a/net/dsa/master.c +++ b/net/dsa/master.c @@ -158,7 +158,7

[PATCH net-next] net: dsa: Restore MTU on master device on unload

2018-12-08 Thread Andrew Lunn
A previous change tries to set the MTU on the master device to take into account the DSA overheads. This patch tries to reset the master device back to the default MTU. Signed-off-by: Andrew Lunn --- net/dsa/master.c | 13 + 1 file changed, 13 insertions(+) diff --git a/net/dsa

[PATCH v2 net-next 0/2] platform data controls for mdio-gpio

2018-12-08 Thread Andrew Lunn
a platform_data structure with these parameters. Andrew Lunn (2): net: phy: mdio-gpio: Add platform_data support for phy_mask net: phy: mdio-gpio: Add phy_ignore_ta_mask to platform data MAINTAINERS | 1 + drivers/net/phy/mdio-gpio.c | 7 +++ include/linux

[PATCH v2 net-next 2/2] net: phy: mdio-gpio: Add phy_ignore_ta_mask to platform data

2018-12-08 Thread Andrew Lunn
are known to get TA wrong. v2 -- int -> u32 in platform data structure Signed-off-by: Andrew Lunn --- drivers/net/phy/mdio-gpio.c | 4 +++- include/linux/platform_data/mdio-gpio.h | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/phy/mdio-gpio.

[PATCH v2 net-next 1/2] net: phy: mdio-gpio: Add platform_data support for phy_mask

2018-12-08 Thread Andrew Lunn
is not created, since the address is already busy. This can be avoided by setting the phy_mask of the mdio bus. This mask prevents addresses on the bus being scanned. v2 -- int -> u32 in platform data structure Signed-off-by: Andrew Lunn --- MAINTAINERS |

Re: [PATCH 5/5] net: dsa: ksz: Add Microchip KSZ8795 DSA driver

2018-12-08 Thread Andrew Lunn
ew all the functions. > +static const u8 stp_multicast_addr[] = { > + 0x01, 0x80, 0xC2, 0x00, 0x00, 0x00 > +}; include/linux/etherdevice.h defines eth_stp_addr. Andrew

Re: [PATCH 3/5] net: dsa: ksz: Factor out common tag code

2018-12-08 Thread Andrew Lunn
8 special_mult_addr[] = { > + 0x01, 0x80, 0xC2, 0x00, 0x00, 0x00 > +}; > + This is new functionality, not part of the refactoring the code. Please add that as a new patch. Also, you can probably make use of is_link_local_ether_addr(). Andrew

Re: [PATCH 1/5] net: dsa: ksz: Add MIB counter reading support

2018-12-08 Thread Andrew Lunn
addressed, we can merge that version? Thanks Andrew

Re: [PATCH V2] net: dsa: ksz: Add reset GPIO handling

2018-12-08 Thread Andrew Lunn
tchset, if there is a high purpose, eg. adding support for a new device on a new board. However, given the situation of two overlapping patchsets, it might be better to submit smaller patchsets. Andrew

Re: [PATCH] net: dsa: ksz: Fix port membership

2018-12-08 Thread Andrew Lunn
bmit them. Maybe as smaller sets, with the easy, non-overlapping bits first? Andrew

Re: [PATCH V2] net: dsa: ksz: Add reset GPIO handling

2018-12-07 Thread Andrew Lunn
s a patch series, not two individual patches. And as David has already said, include a cover letter. Otherwise, this looks O.K. Thanks Andrew

Re: [PATCH] net: dsa: ksz: Fix port membership

2018-12-07 Thread Andrew Lunn
s when the egress port is not known, so it floods. Without offload_fwd_mark set, the SW bridge will flood it back out the ports causing duplication. But that is not too bad. The Marvell driver did this for a while and nothing bad was reported. Andrew

Re: [PATCH] net: dsa: ksz: Add reset GPIO handling

2018-12-07 Thread Andrew Lunn
GPIOF_ACTIVE_LOW : 0; Can you use devm_gpiod_get_optional()? It makes this a lot simpler. Take a look at mv88e6xxx/chip.c which also uses a GPIO for reset. You also need to update the binding documentation for this new property. Andrew

Re: [PATCH] gianfar: Add gfar_change_carrier()

2018-12-07 Thread Andrew Lunn
nge the fixed_phy_status to indicate the PHY has lost link, and then let the usual mechanisms tell the MAC it is down and change the carrier status. Andrew

Re: [PATCH] gianfar: Add gfar_change_carrier()

2018-12-07 Thread Andrew Lunn
ate and mode relate to each other either. I don't actually know. I know some things are supposed to work while dormant. You should be able to perform 802.1x negotiation, etc. You might find the people on the wireless list know more. I think it is used by wpa_supplicant and hostapd during device authentication. Andrew

Re: [PATCH] dpaa_eth: Add dpaa_change_carrier()

2018-12-07 Thread Andrew Lunn
Which is basically the same. A better approach is being discussed. So for the moment, to stop DaveM from merging this not knowing it is related to that patch: NACK Andrew

Re: [PATCH] ucc_geth: Add ucc_geth_change_carrier()

2018-12-07 Thread Andrew Lunn
On Thu, Dec 06, 2018 at 04:33:25PM +0100, Joakim Tjernlund wrote: > This allows to control carrier from /sys/class/net/ethX/carrier > > Signed-off-by: Joakim Tjernlund See the discussion for [PATCH] gianfar: Add gfar_change_carrier(). For the moment: NACK Andrew

Re: [PATCH net-next 2/2] net: dsa: Set the master device's MTU to account for DSA overheads

2018-12-06 Thread Andrew Lunn
On Thu, Dec 06, 2018 at 12:21:31PM -0800, Florian Fainelli wrote: > On 12/6/18 2:36 AM, Andrew Lunn wrote: > > DSA tagging of frames sent over the master interface to the switch > > increases the size of the frame. Such frames can then be bigger than > > the normal MTU of

Re: [PATCH RFC 2/6] net: dsa: microchip: Add MIB counter reading support

2018-12-06 Thread Andrew Lunn
> I wonder what is the official way to clear the counters. I don't think there is one, other than unloading the driver and loading it again. Andrew

Re: [PATCH RFC 5/6] net: dsa: microchip: Update tag_ksz.c to access switch driver

2018-12-06 Thread Andrew Lunn
k you can do is in your tag rx function you can directly add the timestamp info to the skbuf. The dsa driver function .port_txtstamp can then always return false. Your tag function is going to need access to some driver state, but you should be able to get at that, following pointers, and placing some of the structures in global headers. Andrew

Re: [PATCH net-next 0/2] platform data controls for mdio-gpio

2018-12-06 Thread Andrew Lunn
On Thu, Dec 06, 2018 at 09:22:27AM -0800, Florian Fainelli wrote: > Hi Andrew, > > On 12/6/18 5:58 AM, Andrew Lunn wrote: > > Soon to be mainlined is an x86 platform with a Marvell switch, and a > > bit-banging MDIO bus. In order to make this work, the phy_mask of the > &g

Re: [PATCH] gianfar: Add gfar_change_carrier()

2018-12-06 Thread Andrew Lunn
write one > myself(using SIOCGIFFLAGS, SIOCSIFFLAGS)? ip link should be able to set it. Try ip link set mode dormant dev eth0 Andrew

Re: [PATCH] gianfar: Add gfar_change_carrier()

2018-12-06 Thread Andrew Lunn
IF_OPER_DORMANT (5): Interface is L1 up, but waiting for an external event, f.e. for a protocol to establish. (802.1X) The interface does have L1 to the switch, but you are waiting for the external interface to go up. You can set this from user space without needing any kernel changes. Andrew

Re: [PATCH] gianfar: Add gfar_change_carrier()

2018-12-06 Thread Andrew Lunn
nal port goes down, the Linux interface for that port would go down. There is no need to change the carrier on the master interface. Andrew

Re: [PATCH] gianfar: Add gfar_change_carrier()

2018-12-06 Thread Andrew Lunn
On Thu, Dec 06, 2018 at 04:31:25PM +0100, Joakim Tjernlund wrote: > This allows to control carrier from /sys/class/net/ethX/carrier Hi Joakim Please could you explain the use case for this. Andrew

[PATCH net-next 0/2] platform data controls for mdio-gpio

2018-12-06 Thread Andrew Lunn
a platform_data structure with these parameters. Andrew Lunn (2): net: phy: mdio-gpio: Add platform_data support for phy_mask net: phy: mdio-gpio: Add phy_ignore_ta_mask to platform data MAINTAINERS | 1 + drivers/net/phy/mdio-gpio.c | 7 +++ include/linux

[PATCH net-next 1/2] net: phy: mdio-gpio: Add platform_data support for phy_mask

2018-12-06 Thread Andrew Lunn
is not created, since the address is already busy. This can be avoided by setting the phy_mask of the mdio bus. This mask prevents addresses on the bus being scanned. Signed-off-by: Andrew Lunn --- MAINTAINERS | 1 + drivers/net/phy/mdio-gpio.c | 5

[PATCH net-next 2/2] net: phy: mdio-gpio: Add phy_ignore_ta_mask to platform data

2018-12-06 Thread Andrew Lunn
are known to get TA wrong. Signed-off-by: Andrew Lunn --- drivers/net/phy/mdio-gpio.c | 4 +++- include/linux/platform_data/mdio-gpio.h | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/phy/mdio-gpio.c b/drivers/net/phy/mdio-gpio.c index 1e296dd4067a

[PATCH net-next 1/2] net: dsa: Add overhead to tag protocol ops.

2018-12-06 Thread Andrew Lunn
take these overheads into account. Signed-off-by: Andrew Lunn --- include/net/dsa.h | 1 + net/dsa/tag_brcm.c| 2 ++ net/dsa/tag_dsa.c | 1 + net/dsa/tag_edsa.c| 1 + net/dsa/tag_gswip.c | 1 + net/dsa/tag_ksz.c | 1 + net/dsa/tag_lan9303.c | 1 + net/dsa/tag_mtk.c | 1

[PATCH net-next 0/2] Adjust MTU of DSA master interface

2018-12-06 Thread Andrew Lunn
are bigger than their MTU. Automate the increasing of the MTU on the master interface, by adding to each tagging driver how much overhead they need, and then calling dev_set_mtu() of the master interface to increase its MTU as needed. Andrew Lunn (2): net: dsa: Add overhead to tag protocol ops. net

[PATCH net-next 2/2] net: dsa: Set the master device's MTU to account for DSA overheads

2018-12-06 Thread Andrew Lunn
this overhead. Signed-off-by: Andrew Lunn --- net/dsa/master.c | 16 1 file changed, 16 insertions(+) diff --git a/net/dsa/master.c b/net/dsa/master.c index c90ee3227dea..42f525bc68e2 100644 --- a/net/dsa/master.c +++ b/net/dsa/master.c @@ -158,8 +158,24 @@ static void

[PATCH net-next 4/6] net: mii: Add mii_lpa_mod_linkmode_lpa_t

2018-12-05 Thread Andrew Lunn
Add a _mod_ variant of mii_lpa_to_linkmode_lpa_t. Use this to fix the genphy_read_status() where the 1G link partner features are getting lost. Fixes: c0ec3c273677 ("net: phy: Convert u32 phydev->lp_advertising to linkmode") Reported-by: Heiner Kallweit Signed-off-by: Andrew Lunn

[PATCH net-next 2/6] net: mii: Rename mii_stat1000_to_linkmode_lpa_t

2018-12-05 Thread Andrew Lunn
. Suggested-by: Heiner Kallweit Fixes: c0ec3c273677 ("net: phy: Convert u32 phydev->lp_advertising to linkmode") Signed-off-by: Andrew Lunn --- drivers/net/phy/marvell.c| 2 +- drivers/net/phy/marvell10g.c | 2 +- drivers/net/phy/phy_device.c | 4 ++-- include/linux/linkmo

[PATCH net-next 5/6] net: mii: mii_lpa_mod_linkmode_lpa_t: Make use of linkmode_mod_bit helper

2018-12-05 Thread Andrew Lunn
Replace the if else code structure with a call to the helper linkmode_mod_bit. Signed-off-by: Andrew Lunn --- include/linux/mii.h | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/include/linux/mii.h b/include/linux/mii.h index e72447778a08..6fee8b1a4400 100644

[PATCH net-next 6/6] net: phy: Fix ioctl handler when modifing MII_ADVERTISE

2018-12-05 Thread Andrew Lunn
advertising to linkmode") Reported-by: Heiner Kallweit Signed-off-by: Andrew Lunn --- drivers/net/phy/phy.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index e1a1e54baac2..e24708f1fc16 100644 --- a/drivers/net/phy/phy.c +++ b

[PATCH net-next 1/6] net: mii: Fix autoneg in mii_lpa_to_linkmode_lpa_t()

2018-12-05 Thread Andrew Lunn
hydev->lp_advertising to linkmode") Signed-off-by: Andrew Lunn --- include/linux/mii.h | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/include/linux/mii.h b/include/linux/mii.h index fb7ae4ae8ce3..57365224306c 100644 --- a/include/linux/mii.h +++ b/include/linux/mi

[PATCH net-next 3/6] phy: marvell: Rename mii_lpa_to_linkmode_lpa_t

2018-12-05 Thread Andrew Lunn
t u32 phydev->lp_advertising to linkmode") Signed-off-by: Andrew Lunn --- drivers/net/phy/marvell.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c index 03dafe0e68a2..a9c7c7f41b0c 100644 ---

[PATCH net-next 0/6] u32 to linkmode fixes

2018-12-05 Thread Andrew Lunn
the function modifies just the bits it needs to, or _to_ to clear all bits and just set bit that need to be set. Andrew Lunn (6): net: mii: Fix autoneg in mii_lpa_to_linkmode_lpa_t() net: mii: Rename mii_stat1000_to_linkmode_lpa_t phy: marvell: Rename mii_lpa_to_linkmode_lpa_t net: mii

Re: [PATCH RFC 5/6] net: dsa: microchip: Update tag_ksz.c to access switch driver

2018-12-05 Thread Andrew Lunn
On Wed, Dec 05, 2018 at 07:00:38PM +0100, Andrew Lunn wrote: > On Mon, Dec 03, 2018 at 03:34:56PM -0800, tristram...@microchip.com wrote: > > From: Tristram Ha > > > > Update tag_ksz.c to access switch driver's tail tagging operations. > > Hi Tristram >

Re: [PATCH RFC 5/6] net: dsa: microchip: Update tag_ksz.c to access switch driver

2018-12-05 Thread Andrew Lunn
previous patch, to see why it cannot be done here. Andrew

Re: [PATCH RFC 2/6] net: dsa: microchip: Add MIB counter reading support

2018-12-05 Thread Andrew Lunn
Hi Tristan > +static void ksz9477_r_mib_cnt(struct ksz_device *dev, int port, u16 addr, > + u64 *cnt) > +{ > + u32 data; > + int timeout; > + struct ksz_port *p = >ports[port]; > + > + /* retain the flush/freeze bit */ > + data = p->freeze ?

Re: [PATCH RFC 1/6] net: dsa: microchip: Prepare PHY for proper advertisement

2018-12-05 Thread Andrew Lunn
at it supports by calling phy_support_sym_pause() or phy_support_asym_pause(). Ah, is this because there is not a real PHY driver? Thanks Andrew

Re: [PATCH net-next v4 0/2] Add mii_bus to ixgbe driver for dsa devs

2018-12-04 Thread Andrew Lunn
> Yes the current solution whereby we need to get a hold on the network > device's struct device reference is not quite ideal, AFAIR, Andrew has > had the same problem. Yes, it is not nice, and there is a race with systemd renaming the interfaces using its naming rules. We need a way

Re: [PATCH net-next v3 2/2] ixgbe: use mii_bus to handle MII related ioctls

2018-12-03 Thread Andrew Lunn
s not protected by > the mii_bus lock. This isn't new behavior, but as Andrew Lunn pointed > out there are more addresses available for conflicts. > > Signed-off-by: Stephen Douthit Reviewed-by: Andrew Lunn Andrew

Re: [PATCH net-next v3 1/2] ixgbe: register a mdiobus

2018-12-03 Thread Andrew Lunn
re of the ixgbe device may > be polling some PHY addresses in the background. > > Signed-off-by: Stephen Douthit Reviewed-by: Andrew Lunn Andrew

Re: [PATCH net-next v2 1/2] ixgbe: register a mdiobus

2018-12-03 Thread Andrew Lunn
IO lines and do a bit-banging MDIO bus for the PHY, and let the switch have all the address of the hardware MDIO bus. This assumes you are using the kernel infrastructure, so you can connect the MAC to any arbitrary PHY. Andrew

Re: [PATCH net-next v2 1/2] ixgbe: register a mdiobus

2018-12-03 Thread Andrew Lunn
quested address is one that phy_mask > says mii_bus owns, otherwise we fall through to the old code. I'm not too bothered with the ioctl. It is there so you can shoot yourself in the foot. The hardware polling unit just adds more interesting weapons you can use to shoot yourself in the foot. Andrew

Re: [PATCH net-next v2 1/2] ixgbe: register a mdiobus

2018-12-03 Thread Andrew Lunn
On Mon, Dec 03, 2018 at 05:02:40PM +, Steve Douthit wrote: > On 12/3/18 11:54 AM, Andrew Lunn wrote: > >> +static s32 ixgbe_x550em_a_mii_bus_read(struct mii_bus *bus, int addr, > >> + int regnum) > >> +{ > >> +

Re: [PATCH net-next v2 1/2] ixgbe: register a mdiobus

2018-12-03 Thread Andrew Lunn
re you need that. The MDIO layer will perform locking, assuming everything goes through the MDIO layer. Andrew

Re: [PATCH net] net: phy: don't allow __set_phy_supported to add unsupported modes

2018-12-03 Thread Andrew Lunn
fixed didn't do anything wrong, it just copied > existing functionality to the helper which is being fixed now. > > Fixes: f3a6bd393c2c ("phylib: Add phy_set_max_speed helper") > Signed-off-by: Heiner Kallweit Reviewed-by: Andrew Lunn Andrew

Re: [PATCH net-next] net: phy: don't allow __set_phy_supported to add unsupported modes

2018-12-03 Thread Andrew Lunn
Heiner Kallweit Reviewed-by: Andrew Lunn Andrew

Re: [PATCH 3/3] dt-bindings: net: dsa: add new bindings MT7530

2018-12-03 Thread Andrew Lunn
ring is when you cannot actually get to the ID, e.g. you need to turn some clock on, or the ID is in a different place. Andrew

Re: [PATCH net-next v2] net: phy: Also request modules for C45 IDs

2018-12-02 Thread Andrew Lunn
st C22 modules if C45 are not present (Andrew) > > Signed-off-by: Jose Abreu > Cc: Andrew Lunn > Cc: Florian Fainelli > Cc: "David S. Miller" > Cc: Joao Pinto Reviewed-by: Andrew Lunn Andrew

Re: [PATCH net-next] net: phy: Also request modules for C45 IDs

2018-11-30 Thread Andrew Lunn
22. If you look at phy_bus_match(), it will perform a match on the c45_ids->device_ids[] if it is a c45 PHY, or the phy_id if it is c22. So i think we should also have this one or the other here, not both. Thanks Andrew > + if (c45_ids) { > + const int num_ids = ARRAY_

Re: [PATCH net-next 1/2] ixgbe: register a mdiobus

2018-11-30 Thread Andrew Lunn
> 'cards_found' doesn't exist for the ixgbe driver. Agh, sorry, i was looking at ixgb, not ixgbe. Andrew

Re: [PATCH net-next 1/2] ixgbe: register a mdiobus

2018-11-30 Thread Andrew Lunn
s_found' found variable. It is not perfect, in that it is not decremented in ixgb_remove(), and i wonder about race conditions since there does not appear to be any lock when it is incremented. But if cards_found == 0, register the MDIO bus. Andrew

Re: [PATCH 0/3]: net: dsa: mt7530: support MT7530 in the MT7621 SoC

2018-11-30 Thread Andrew Lunn
530 DSA driver. > > Hmm. How do I test this? If there are no IP checksums in the frame, the receiver will generally drop the packet. ethtool -k will show you what features the MAC has in terms of offloading. So if you see NETIF_F_IP_CSUM, you know the MAC should be doing it in hardware. Andrew

Re: [PATCH 0/3]: net: dsa: mt7530: support MT7530 in the MT7621 SoC

2018-11-30 Thread Andrew Lunn
of the VLAN header. Other vendors, there is no way i've found to get hadware offload of checksumming working. Andrew

Re: [PATCH 0/3]: net: dsa: mt7530: support MT7530 in the MT7621 SoC

2018-11-30 Thread Andrew Lunn
e frame. I have a patchset i will be posting soon to do this automatically. Andrew

Re: [PATCH net-next 1/2] ixgbe: register a mdiobus

2018-11-30 Thread Andrew Lunn
gssr |= IXGBE_GSSR_PHY1_SM; > + else > + gssr |= IXGBE_GSSR_PHY0_SM; > + } Could you explain this shared bus a bit more. If there is only one physical MDIO bus, you should only register one bus with Linux. So i would not normally expect to see ixgbe_is_shared_mii() sort of statements into the read/write functions. That tends to happen at the point you are registering the MDIO bus, and when looking for the MACs PHY on the bus. Andrew

Re: [PATCH] net: phy: sfp: correct location of SFP standards

2018-11-29 Thread Andrew Lunn
On Thu, Nov 29, 2018 at 12:00:05PM +0200, Baruch Siach wrote: > SFP standards are now available from the SNIA (Storage Networking > Industry Association) website. > > Cc: Andrew Lunn > Cc: Florian Fainelli > Signed-off-by: Baruch Siach Reviewed-by: Andrew Lunn Andrew

Re: [PATCH net-next] tun: implement carrier change

2018-11-29 Thread Andrew Lunn
On Thu, Nov 29, 2018 at 12:06:18PM +0100, Nicolas Dichtel wrote: > Le 28/11/2018 à 22:48, Andrew Lunn a écrit : > > On Wed, Nov 28, 2018 at 07:12:56PM +0100, Nicolas Dichtel wrote: > >> The userspace may need to control the carrier state. > > > > Hi Nicolas >

Re: [PATCH net-next] tun: implement carrier change

2018-11-28 Thread Andrew Lunn
nks Andrew

Re: [PATCH net] net: phy: add workaround for issue where PHY driver doesn't bind to the device

2018-11-26 Thread Andrew Lunn
ted users have a working network > again from 4.19.5 at least. Hi Heiner Lets go with this for the moment. That gives us time to try to figure out what is going on to cause the wrong driver to be used for the r8169. Reviewed-by: Andrew Lunn Andrew

Re: [PATCH net-next] net: phy: fix two issues with linkmode bitmaps

2018-11-25 Thread Andrew Lunn
kmode_yyy > case 2: mii_xxx_or_linkmode_yyy > case 3: mii_xxx_mod_linkmode_yyy Hi Heiner I started a patchset using this idea, and reworks your fix. Lets work on that, rather than merge this patch. Andrew

Re: [PATCH net-next] net: phy: fix two issues with linkmode bitmaps

2018-11-25 Thread Andrew Lunn
einer That is a good idea. We should probably do this first, it will help find the bugs. Andrew

Re: [PATCH net-next] net: phy: fix two issues with linkmode bitmaps

2018-11-25 Thread Andrew Lunn
advertising); + else + linkmode_clear_bit(ETHTOOL_LINK_MODE_10baseT_Half_BIT, + advertising); for all the bits mii_adv_to_linkmode_adv_t() looks at. So mii_adv_to_linkmode_adv_t() only modifies bits it is responsible for, and leaves the others alone. Andrew

Re: [PATCH] dt-bindings: dsa: Fix typo in "probed"

2018-11-23 Thread Andrew Lunn
On Fri, Nov 23, 2018 at 03:46:50PM -0200, Fabio Estevam wrote: > The correct form is "can be probed", so fix the typo. > > Signed-off-by: Fabio Estevam Reviewed-by: Andrew Lunn Andrew

Re: [PATCH v3 net-next 04/12] net: ethernet: Use phy_set_max_speed() to limit advertised speed

2018-11-22 Thread Andrew Lunn
On Thu, Nov 22, 2018 at 12:40:25PM +0200, Anssi Hannula wrote: > Hi, > > On 12.9.2018 2:53, Andrew Lunn wrote: > > Many Ethernet MAC drivers want to limit the PHY to only advertise a > > maximum speed of 100Mbs or 1Gbps. Rather than using a mask, make use >

Re: [PATCH net-next 4/4] octeontx2-af: Bringup CGX LMAC links by default

2018-11-22 Thread Andrew Lunn
omplex driver which i don't understand... By link up, do you mean the equivalent of 'ip link set up dev ethX'? Andrew

Re: [PATCH v1 net] lan743x: Enable driver to work with LAN7431

2018-11-22 Thread Andrew Lunn
ces > supported by this driver. > > fixes: driver won't load for LAN7431 Hi Bryan There is a well defined format for Fixes:. Fixes: 23f0703c125b ("lan743x: Add main source files for new lan743x driver") Andrew

Re: [PATCH net-next 2/2] net: bridge: add no_linklocal_learn bool option

2018-11-22 Thread Andrew Lunn
local_learn); I thought we where trying to move away from sysfs? Do we need to add new options here? It seems like forcing people to use iproute2 for newer options is a good way to get people to convert to iproute2. Andrew

Re: [PATCH v1 net] lan743x: fix return value for lan743x_tx_napi_poll

2018-11-20 Thread Andrew Lunn
> Andrew, > > Admittedly, my knowledge of what the kernel is doing behind the > scenes is limited. Me too. Lets see if anybody can make sense of the information you provided. Thanks Andrew

Re: [PATCH v1 net] lan743x: fix return value for lan743x_tx_napi_poll

2018-11-20 Thread Andrew Lunn
nic under heavy traffic load. > Signed-off-by: Bryan Whitehead Hi Bryan This sounds like a band aid over something which is broken, not a real fix. Can you show us the stack trace from the panic? Andrew

Re: [PATCH net-next v3 1/6] net: phy: mscc: migrate to phy_select/restore_page functions

2018-11-19 Thread Andrew Lunn
On Mon, Nov 19, 2018 at 05:14:38PM +0100, Andreas Schwab wrote: > On Nov 19 2018, Andrew Lunn wrote: > > > Could you turn on lockdep and see if it reports a deadlock. > > How do I "turn on lockdep"? make menuconfig Kernel hacking Lock Debugging (spinlocks, mute

Re: [PATCH net-next v3 1/6] net: phy: mscc: migrate to phy_select/restore_page functions

2018-11-19 Thread Andrew Lunn
't investigate but maybe this can help :) > > The phy probing of macb is very unreliable, perhaps it needs to be > rewritten. Hi Andreas I still don't see why that would cause a hang. Could you turn on lockdep and see if it reports a deadlock. Thanks Andrew

Re: [PATCH net-next v3 1/6] net: phy: mscc: migrate to phy_select/restore_page functions

2018-11-19 Thread Andrew Lunn
On Mon, Nov 19, 2018 at 04:13:10PM +0100, Andreas Schwab wrote: > On Nov 19 2018, Andrew Lunn wrote: > > > On Mon, Nov 19, 2018 at 03:57:17PM +0100, Andreas Schwab wrote: > >> On Okt 08 2018, Quentin Schulz wrote: > >> > >> > The Microsemi PHYs have

Re: [PATCH net-next 1/4] enetc: Introduce basic PF and VF ENETC ethernet drivers

2018-11-19 Thread Andrew Lunn
= dma_set_mask_and_coherent(>dev, > >DMA_BIT_MASK(32)); > >> + if (err) { > >> + dev_err(>dev, > >> + "DMA configuration failed: 0x%x\n", err); > >> + goto err_dma; > >> + } > >> + } > > > >Humm, i thought drivers were not supposed to do this. The architecture > >code should be setting masks. But i've not followed all those > >conversations... > > > > Documentation/DMA-API-HOWTO.txt still states: > " For correct operation, you must interrogate the kernel in your device > probe routine to see if the DMA controller on the machine can properly > support the DMA addressing limitation your device has. It is good > style to do this even if your device holds the default setting, [...]" O.K, thanks for the reference. Andrew

Re: [PATCH net-next v3 1/6] net: phy: mscc: migrate to phy_select/restore_page functions

2018-11-19 Thread Andrew Lunn
ced by their > > lock-free alternative __phy_write/read. > > > > Let's migrate this driver to those functions. > > This has some serious locking problem. Hi Andreas Could you be more specific. Are you getting a deadlock? A WARN_ON? Thanks, Andrew

Re: [PATCH net-next] MAINTAINERS: Add myself as third phylib maintainer

2018-11-19 Thread Andrew Lunn
On Mon, Nov 19, 2018 at 08:01:03AM +0100, Heiner Kallweit wrote: > Add myself as third phylib maintainer. > > Signed-off-by: Heiner Kallweit Acked-by: Andrew Lunn Andrew

Re: DSA support for Marvell 88e6065 switch

2018-11-18 Thread Andrew Lunn
. Look in Documentation/devicetree/bindings/net/dsa/dsa.txt, section Deprecated Binding. You can get more examples if you checkout old kernels. Or kirkwood-rd88f6281.dtsi, the dsa { } node which is disabled. Andrew

Re: DSA support for Marvell 88e6065 switch

2018-11-18 Thread Andrew Lunn
On Sun, Nov 18, 2018 at 07:07:12PM +0100, Pavel Machek wrote: > On Thu 2018-11-15 21:26:18, Andrew Lunn wrote: > > On Thu, Nov 15, 2018 at 08:51:11PM +0100, Pavel Machek wrote: > > > Hi! > > > > > > I'm trying to create support for Marvell 88e6065 switch... and

Re: Linux kernel hangs if using RV1108 with MSZ8863 switch with two ports connected

2018-11-18 Thread Andrew Lunn
narrow it down to the one patch which broke it.. Basically, at the moment, you just need to try lots of things, to narrow it down. Andrew

Re: [PATCH RFC net-next] net: SAIL based FIB lookup for XDP

2018-11-18 Thread Andrew Lunn
of VLANs 255 is nothing and VLANs are an > essential deployment feature. I agree with David here. Doing some network simulation work using namespaces, i've had more than 255 devices in the root namespace. Andrew

Re: Linux kernel hangs if using RV1108 with MSZ8863 switch with two ports connected

2018-11-16 Thread Andrew Lunn
ies very early, you might need to enable "kernel low-level debugping print and EARLY_PRINTK, in order to see anything. Andrew

Re: DSA support for Marvell 88e6065 switch

2018-11-15 Thread Andrew Lunn
he mv88e6xxx_ops to what the datasheet says for the registers, and pick those that match. Andrew

[PATCHv2 net-net] net: dsa: mv88e6xxx: Work around mv886e6161 SERDES missing MII_PHYSID2

2018-11-12 Thread Andrew Lunn
Signed-off-by: Andrew Lunn --- v2: grammar fix in commit message. PHYS->PHYs --- drivers/net/dsa/mv88e6xxx/chip.c | 21 - 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c index fc0f50887

Re: [PATCH net-next] net: phy: switch to lockdep_assert_held in phylib

2018-11-12 Thread Andrew Lunn
checking the lock is held is very small compared to the actual MDIO transaction. So i don't think we really need to optimise this. I do sometimes build with lockdep on, but not always. So it is good to know when locking is broken on normal builds. Florian, what do you think? Andrew

Re: [PATCH net-next] net: phy: icplus: add config_intr callback

2018-11-12 Thread Andrew Lunn
upposed to be register-compatible > with IP101A/G). Change is compile-tested only. Hi Heiner This looks sensible. Thanks for fixing up this driver. Reviewed-by: Andrew Lunn Andrew

Re: [RFC PATCH 1/3] acpi: Add acpi mdio support code

2018-11-12 Thread Andrew Lunn
; @@ -0,0 +1,167 @@ > +// SPDX-License-Identifier: GPL-2.0+ > +// Lots of code in this file is copy from drivers/of/of_mdio.c > +// Copyright (c) 2018 Huaxintong Semiconductor Technology Co., Ltd. I agree with Rafael here. We should try to refactor and combine this code. And where possible, we should try to add a uniform fwnode_ API which underneath either uses OF or ACPI, depending on the type of the node. We already have fwnode_get_mac_address(), fwmode_irq_get(), fwnode_get_phy_mode(), so where possible, PHYs should be no different. Andrew

Re: [RFC PATCH 0/3] acpi: Add acpi mdio support code

2018-11-12 Thread Andrew Lunn
add something to Documentation/acpi/dsd? Andrew

Re: [RFC PATCH 2/6] phy: armada38x: add common phy support

2018-11-12 Thread Andrew Lunn
); > + if ((val & mask) == value) > + return 0; > + if (!timeout--) > + break; > + udelay(10); > + } Hi Russell Maybe use one of the readx_poll_timeout() variants? Andrew

[PATCH net-next] net: dsa: mv88e6xxx: Work around mv886e6161 SERDES missing MII_PHYSID2

2018-11-10 Thread Andrew Lunn
Signed-off-by: Andrew Lunn --- drivers/net/dsa/mv88e6xxx/chip.c | 21 - 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c index fc0f508879d4..4906a4f39d62 100644 --- a/drivers/net/dsa/mv88e6xxx/chip.c

Re: Should the bridge learn from frames with link local destination MAC address?

2018-11-10 Thread Andrew Lunn
> >Andrew, I agree with your analysis also. We have hit this problem too > >(and we have an internal bug tracking it). > >We have not acted on this so far because of the fear of breaking > >existing deployments. I am all for fixing this if there is a > >clean way

[patch net] net: dsa: mv88e6xxx: Fix clearing of stats counters

2018-11-10 Thread Andrew Lunn
parameters, resulting in the switch not responding. We need to preserve the histogram mode bits, so apply a mask to keep them. Reported-by: Chris Healy Fixes: 40cff8fca9e3 ("net: dsa: mv88e6xxx: Fix stats histogram mode") Signed-off-by: Andrew Lunn --- drivers/net/dsa/mv88e6xxx/global1.c

[PATCH net-next 4/4] net: dsa: mv88e6xxx: Add support for SERDES on ports 2-8 for 6390X

2018-11-10 Thread Andrew Lunn
The 6390X family has 8 SERDES interfaces. When ports 9 and 10 are not using all their SERDES interfaces, the unused ones can be assigned to ports 2-8. Add support for interrupts from SERDES interfaces connected to these lower ports. Signed-off-by: Andrew Lunn --- drivers/net/dsa/mv88e6xxx

[PATCH net-next 0/4] net: dsa: mv88e6xxx: Support more SERDES interfacxes

2018-11-10 Thread Andrew Lunn
. Andrew Lunn (4): net: dsa: mv88e6xxx: Group cmode ops together net: dsa: mv88e6xxx: Differentiate between 6390 and 6390X cmodes net: dsa: mv88e6xxx: Default ports 9/10 6390X CMODE to 1000BaseX net: dsa: mv88e6xxx: Add support for SERDES on ports 2-8 for 6390X drivers/net/dsa/mv88e6xxx

  1   2   3   4   5   6   7   8   9   10   >