From patchwork Fri Apr 17 20:24:00 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Toppins X-Patchwork-Id: 462222 X-Patchwork-Delegate: jeffrey.t.kirsher@intel.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from silver.osuosl.org (silver.osuosl.org [140.211.166.136]) by ozlabs.org (Postfix) with ESMTP id BDAAD140283 for ; Sat, 18 Apr 2015 09:46:10 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="verification failed; unprotected key" header.d=cumulusnetworks.com header.i=@cumulusnetworks.com header.b=E0I6cjwz; dkim-adsp=none (unprotected policy); dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id C017733377; Fri, 17 Apr 2015 23:46:09 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id zDhBWwcPpncr; Fri, 17 Apr 2015 23:46:08 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id E3AB633385; Fri, 17 Apr 2015 23:46:07 +0000 (UTC) X-Original-To: intel-wired-lan@lists.osuosl.org Delivered-To: intel-wired-lan@lists.osuosl.org Received: from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 6C3621C2E43 for ; Fri, 17 Apr 2015 20:24:17 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 6912395EBF for ; Fri, 17 Apr 2015 20:24:17 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Iyc3f2e34-4E for ; Fri, 17 Apr 2015 20:24:16 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pd0-f182.google.com (mail-pd0-f182.google.com [209.85.192.182]) by hemlock.osuosl.org (Postfix) with ESMTPS id BE3E895EB1 for ; Fri, 17 Apr 2015 20:24:16 +0000 (UTC) Received: by pdbnk13 with SMTP id nk13so138573785pdb.0 for ; Fri, 17 Apr 2015 13:24:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cumulusnetworks.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Wr7muAgoWD6kk9EwN7/r1t4pkJk+9r4vkUapVlniCfE=; b=E0I6cjwz2A0GCp3U/yUNs02m29kdyrkNPGg7E6cJtCBP+z7+QqOLksNDvm2fY2oQT+ DGLOce3EdgCFww0HsJP5k+wypgDYtbXf6VHJF9llI6Vkxouk5soeP1za4pEU5KDKy2Np wfO7Ol4t81HMN+OgdAKZvigIPUPCK9LuxuzNA= 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:in-reply-to :references; bh=Wr7muAgoWD6kk9EwN7/r1t4pkJk+9r4vkUapVlniCfE=; b=bXdioOgsaIZmgHuvuDQUlb79dbajli2IvAL3/dhY9XRhlxcUA/edH0lxXhGaRT8bEi CVD4otErvXLu9mw61kuNXa9bdYb5uwGycH7yt42NGfyudiiKLiWHshjK2RwAUnFls8XU XwYRmIiqEnDMeYIeswTcnip1PbH+PAawQmU7bSaMCpjIAvR+ozN+mXiS1cGGmTxg9j3W JtZFYfDqj4GU7Dw1lXfQE57QdUAJAG1KDiZ2ZCj5Us8uGE+ZUVCGyiGz17GvjnwbT9gi TbZMxjHpFQMluuq376DSsH+YtPjfRlgND3qKFDW5qbj1R8rVGq27rAi4BZZflRbYkMJ9 HIYg== X-Gm-Message-State: ALoCoQkijYcBLG5Ipv7v8iJSFnlHKXZ9lfGVQud/LoTFciZebdgrY3bdY7DrsXf0G7gREY6ULkE1 X-Received: by 10.66.63.7 with SMTP id c7mr8564369pas.13.1429302256479; Fri, 17 Apr 2015 13:24:16 -0700 (PDT) Received: from monster-01.cumulusnetworks.com ([216.129.126.126]) by mx.google.com with ESMTPSA id nd3sm10951713pbc.9.2015.04.17.13.24.15 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Apr 2015 13:24:15 -0700 (PDT) From: Jonathan Toppins To: jeffrey.t.kirsher@intel.com Date: Fri, 17 Apr 2015 13:24:00 -0700 Message-Id: <1429302240-654-2-git-send-email-jtoppins@cumulusnetworks.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1429302240-654-1-git-send-email-jtoppins@cumulusnetworks.com> References: <1429302240-654-1-git-send-email-jtoppins@cumulusnetworks.com> X-Mailman-Approved-At: Fri, 17 Apr 2015 23:46:06 +0000 Cc: shm@cumulusnetworks.com, gospo@cumulusnetworks.com, Alan Liebthal , intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org Subject: [Intel-wired-lan] [PATCH v1 net-next 2/2] igb: support SIOCSMIIREG X-BeenThere: intel-wired-lan@lists.osuosl.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-wired-lan-bounces@lists.osuosl.org Sender: "Intel-wired-lan" From: Alan Liebthal Support setting the MII register via SIOCSMIIREG. Signed-off-by: Alan Liebthal Signed-off-by: Jonathan Toppins Tested-by: Aaron Brown --- drivers/net/ethernet/intel/igb/igb_main.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c index 720b785..1071a71 100644 --- a/drivers/net/ethernet/intel/igb/igb_main.c +++ b/drivers/net/ethernet/intel/igb/igb_main.c @@ -7141,6 +7141,11 @@ static int igb_mii_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd) return -EIO; break; case SIOCSMIIREG: + adapter->hw.phy.addr = data->phy_id; + if (igb_write_phy_reg(&adapter->hw, data->reg_num & 0x1F, + data->val_in)) + return -EIO; + break; default: return -EOPNOTSUPP; }