From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS, USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B9F66C2F441 for ; Mon, 21 Jan 2019 16:55:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 75A9120663 for ; Mon, 21 Jan 2019 16:55:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="m+Fbhe/J" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729913AbfAUQzk (ORCPT ); Mon, 21 Jan 2019 11:55:40 -0500 Received: from vps0.lunn.ch ([185.16.172.187]:50564 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729366AbfAUQzk (ORCPT ); Mon, 21 Jan 2019 11:55:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date; bh=Z6gjegJz/2t6AuQEq6VydqWiz252EXvesL/aB7QX9wY=; b=m+Fbhe/JfZqVHlAh1+TXbN6DP2eBU/gxBcD1usdA+hA74IpfE8QIWiWHC2iDxS5zWbu3FIRjPO17q8A4QxH753zoaR2KDmde+kKQV1c5SCDeN3YMrzWTDPEa7O1W+jB/Jwso0uLBqf7p1myHYjxsxviED7X+EHSO97dC28jd8Ys=; Received: from andrew by vps0.lunn.ch with local (Exim 4.84_2) (envelope-from ) id 1glcrK-0002uu-FT; Mon, 21 Jan 2019 17:55:38 +0100 Date: Mon, 21 Jan 2019 17:55:38 +0100 From: Andrew Lunn To: Daniele Orlandi Cc: "netdev@vger.kernel.org" Subject: Re: DSA incompatible with TI CPSW device model in dual mac mode Message-ID: <20190121165538.GG8620@lunn.ch> References: <15e21356-0301-62c8-7d8f-0ea9680331f5@orlandi.com> <20190120173047.GA15048@lunn.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Mon, Jan 21, 2019 at 03:57:32PM +0100, Daniele Orlandi wrote: > On 20/01/19 18:30, Andrew Lunn wrote: > > > >Looking at Documentation/devicetree/bindings/net/cpsw.txt, your DSA > >Ethernet phandle should point to cpsw_emac1: slave@1. > > Hi Andrew, > > Yes, that's what sounds logical, however that node does not become the > parent device net class nodes: > > root@r600:/sys/class/net# ls -l > [...] > lrwxrwxrwx 1 root root 0 Jan 1 1970 eth0 -> > ../../devices/platform/ocp/4a100000.ethernet/net/eth0 > lrwxrwxrwx 1 root root 0 Jan 1 1970 eth1 -> > ../../devices/platform/ocp/4a100000.ethernet/net/eth1 > [...] > > root@r600:/sys/class/net# cd eth0 > root@r600:/sys/devices/platform/ocp/4a100000.ethernet/net/eth0# ls -l > [...] > lrwxrwxrwx 1 root root 0 Jan 1 1970 device -> > ../../../4a100000.ethernet > [...] > > root@r600:/sys/class/net# cd eth1 > root@r600:/sys/devices/platform/ocp/4a100000.ethernet/net/eth1# ls -l > [...] > lrwxrwxrwx 1 root root 0 Jan 1 1970 device -> > ../../../4a100000.ethernet > [...] > > > I don't know if this actually works, but i _think_ some people have used > DSA with this > >device. > > IMHO it should be the CPSW driver that should istantiate two separate > devices, one for each cpsw_emacX node in the device tree. > > Do you think they could be receptive to such proposal? Hi Danielse I suggest you ask. Or post a patch. CPSW does all sorts of things in odd ways. So i would always expect trouble with this device. From what i hear, there is a new driver being written for it, so hopefully that driver will be more normal and easier to use. Andrew