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.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no 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 59275C43603 for ; Tue, 17 Dec 2019 11:00:05 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1CD7F2064B for ; Tue, 17 Dec 2019 11:00:05 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="od6CsZfS"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="RWR5ySgH" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1CD7F2064B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lunn.ch Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Fm+vwiHYbE24/nL8/amlsrUzauPLErjg7BV9eeAcKsA=; b=od6CsZfSZz1olr eViBvsKDNjOGmhaZNdiSn2Pntd4xC7klKnsQW+iK4Y5c/436VlclyJ4oy71wlOKRyEOfTezwZCN+m +MPrcunSjtbPSpHZTNZ6C4MFZ3dz3tdyGICPf7ciGCoxSj8ReIoXqvh2fxnL9XyeigAXuqaAPBupc 9Wyr7WBhaVioh4ouKtdFkTHMjVWwYw8sp0DaeDdkdbekg+3UBZH9alzYog8J9s2euthJ9iZqxhk7Y n6C9ZALueD/oZ7F4hNiW3FLKHYxpESEKNcptO72peh+9UCuYmeKKfDKj7VFKVEqASs5tnDn8ASMbg zjA2WiI/h4XUCUYYbVPA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ihAaB-0005Tw-KV; Tue, 17 Dec 2019 11:00:03 +0000 Received: from vps0.lunn.ch ([185.16.172.187]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ihAa5-0005Hh-Ac for linux-arm-kernel@lists.infradead.org; Tue, 17 Dec 2019 11:00:01 +0000 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:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=j+kDSnNZibDPGmGiavTo8MBbX0StIr3Q6zqHd8Wr8m8=; b=RWR5ySgH5WF0N8DME7aypZQWpM QRnSlcwOD2YVcxgoz1DTu1qgN8s4UuejHEbgewyeE8nZQgb8bkUcoLDA/A1o1WugxM/YG3RjPlI6T BYwFOkjiYqUwiJZ+DSd0CZt9k3USMvWFk0v9BltXNQHX3crx2JsPL0HTmXcVTdRG7tVA=; Received: from andrew by vps0.lunn.ch with local (Exim 4.92.2) (envelope-from ) id 1ihAZt-0007CG-CF; Tue, 17 Dec 2019 11:59:45 +0100 Date: Tue, 17 Dec 2019 11:59:45 +0100 From: Andrew Lunn To: Richard Cochran Subject: Re: [PATCH net-next 3/3] net: axienet: Pass ioctls to the phy. Message-ID: <20191217105945.GA17965@lunn.ch> References: <361f63095be92df10e8e953af3b981cdac58d98e.1576520432.git.richardcochran@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <361f63095be92df10e8e953af3b981cdac58d98e.1576520432.git.richardcochran@gmail.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191217_025957_361177_40EE11F8 X-CRM114-Status: UNSURE ( 6.67 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: netdev@vger.kernel.org, Radhey Shyam Pandey , David Miller , linux-arm-kernel@lists.infradead.org, Michal Simek Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org > +static int axienet_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) > +{ > + if (!netif_running(dev)) > + return -EINVAL; > + > + switch (cmd) { > + case SIOCGMIIPHY: > + case SIOCGMIIREG: > + case SIOCSMIIREG: > + case SIOCSHWTSTAMP: > + case SIOCGHWTSTAMP: > + return phy_mii_ioctl(dev->phydev, rq, cmd); > + default: > + return -EOPNOTSUPP; > + } > +} Hi Richard You don't need to be conditional. phy_mii_ioctl() and phylink_mii_ioctl() will return -EOPNOTSUPP for anything it does not support. Andrew _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel