From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id 35A44E00D3D; Fri, 19 Feb 2016 07:16:57 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on yocto-www.yoctoproject.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 X-Spam-HAM-Report: * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (csanchezdll[at]gmail.com) * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [74.125.82.52 listed in list.dnswl.org] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's * domain * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Received: from mail-wm0-f52.google.com (mail-wm0-f52.google.com [74.125.82.52]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 64465E00CD1 for ; Fri, 19 Feb 2016 07:16:55 -0800 (PST) Received: by mail-wm0-f52.google.com with SMTP id a4so75297083wme.1 for ; Fri, 19 Feb 2016 07:16:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:user-agent:mime-version; bh=D3On6ShFhqwROWVvJvxucI/En4Xpi24iLCH6yZj6y04=; b=yjEla2sObs9A9101/rc2Ld/gX19qOEG+DHHS9OA0nNQ9tgrv3m5ggelLHtrlxcisnn phV/CqWwSXCzk8AX4LGxCsW+IyHAvDJmUwjEPAigcK4pn0/nDf0P3camf0am6b+ZDSGl 6l+H/BZ0eHFETq0X662raqL9mYeywyaAYxR5MDigHgoTUNwtt7TCx+8dIFlNCSc+uPio AdF7Q+pchdpVJgawDfGnVD+rATEziprqreqa9kQkEi4LBjzfP4JluTNkeWPPbVkwr86c sC2GUbuF5SQgDSaGVJvszBcW9NFJ0lOjv8YHb5lN7kyDBPSV5Y6wvjGu9OzzeUMD4q+b QGNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:user-agent :mime-version; bh=D3On6ShFhqwROWVvJvxucI/En4Xpi24iLCH6yZj6y04=; b=BAgRHd8WU2Qx26JqxHVsI9VfPXXOSyNfc1KsCgVGudXJLRzgYKv9nHPS/uBiT3xZlQ QTm4njjCo06X51d9D4uildEE5q+5O33Zwx1zwenuzq77GjCmd/AW/9noLShI2ani24R0 KT7y/TDQwN8J7Vc3fmx+Wtvako4Xawz5CMoO3K2cu5iaiqnbEQjjlNeNuo3uayzCRxqw XIeGllTxizUw6JtNFJxmq62CU0e2BMglX7QgWEZAWX3bSX04YqZxaRBFL7+iLRHOB/5z 6t8lksFuH5KqFrnEybPO1ICgAq+VIK4zmycGCEo5+iQ9EEz5o476xLCMC5IXkkyX840e 32Iw== X-Gm-Message-State: AG10YOTRGtdzZB0d8JFLgigojRGiI75XXUT2CKiXd+QRyRqcqWOePEKzrQoOCrdYHz4s9w== X-Received: by 10.28.126.205 with SMTP id z196mr9322543wmc.44.1455895015027; Fri, 19 Feb 2016 07:16:55 -0800 (PST) Received: from boole (galileo.kdpof.com. [80.38.102.19]) by smtp.gmail.com with ESMTPSA id ka4sm11613323wjc.47.2016.02.19.07.16.53 (version=TLS1_1 cipher=AES128-SHA bits=128/128); Fri, 19 Feb 2016 07:16:54 -0800 (PST) From: csanchezdll@gmail.com (Carlos =?utf-8?Q?S=C3=A1nchez?= de La Lama) To: meta-freescale@yoctoproject.org Date: Fri, 19 Feb 2016 16:16:51 +0100 Message-ID: <7td1rs4tng.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Cc: Luwei Zhou , Jason Liu Subject: fec_main.c patch ENGR00275371 (2013-10-30) prevents use of MII ioctls X-BeenThere: meta-freescale@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Usage and development list for the meta-fsl-* layers List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2016 15:16:57 -0000 Content-Type: text/plain Hi all, I was trying so use MII ioctls (SIOCGMIIPHY & SIOG{G,M}MIIREG) to access registers of the PHY attached to FEC MAC in an iMX6 using Freescale BSP. I noticed they were failing, so after some debug I found that this patch (author and commiter cc'ed): http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/commit/drivers/net/ethernet/freescale/fec_main.c?h=imx_3.10.17_1.0.0_ga&id=8eeda5ac98beb9e43f5a76ae77af3251c0b97ec8 includes the following modification: @@ -1656,8 +1677,11 @@ static int fec_enet_ioctl(struct net_device *ndev, struct ifreq *rq, int cmd) if (!phydev) return -ENODEV; - if (cmd == SIOCSHWTSTAMP && fep->bufdesc_ex) + if (((cmd == SIOCSHWTSTAMP) || ((cmd >= PTP_ENBL_TXTS_IOCTL) && + (cmd <= PTP_FLUSH_TIMESTAMP))) && fep->bufdesc_ex) return fec_ptp_ioctl(ndev, rq, cmd); + else if (fep->bufdesc_ex) + return -ENODEV; return phy_mii_ioctl(phydev, rq, cmd); } which effectively prevents phy_mii_ioctl to be reached (the code will always return through one of the if/else branches). The code in the repo seems to be unchanged since that patch. After removing else branch on my local sources, I am able to use the ioctls. BR Carlos