From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Lunn Subject: Re: [PATCH] net: phy: fix PHY_RUNNING in phy_state_machine Date: Thu, 17 Mar 2016 16:12:40 +0100 Message-ID: <20160317151240.GD26019@lunn.ch> References: <1439526220-31458-1-git-send-email-shh.xie@gmail.com> <20160316161848.GE2393@lunn.ch> <20160316230505.GA18161@lunn.ch> <20160317134134.GA24913@lunn.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: shaohui ??? , netdev , David Miller , Shaohui Xie , Florian Fainelli , "N, Mugunthan V" , drivshin@allworx.com To: Yegor Yefremov Return-path: Received: from vps0.lunn.ch ([178.209.37.122]:49386 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932614AbcCQPMp (ORCPT ); Thu, 17 Mar 2016 11:12:45 -0400 Content-Disposition: inline In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: > After changing cpsw_emac0 entry to: > > &cpsw_emac0 { > phy-mode = "rmii"; > dual_emac_res_vlan = <1>; > fixed-link { > speed = <100>; > full-duplex; > }; > }; > > I've got packets running in both directions. Great. > Now I have another problem: I cannot disable ICPlus IP175D ports via > SIOCSMIIREG as I could do previously. I get not ioctl errors [1], but > the ports are always on. > > [1] https://github.com/visionsystemsgmbh/libonrisc/blob/master/src/onrisc.c#L83 The MDIO bus is now logically not connected to eth0. Instead you have the fixed-link mdio device connected to eth0. So SIOCSMIIREG calls on eth0 now try to manipulate the fixed link phys. However, i think you can still access the MDIO bus, just use eth1 in your ioctl call. You should however consider writing a DSA driver for the switch. Andrew