From patchwork Fri Oct 10 20:18:36 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Iyappan Subramanian X-Patchwork-Id: 5067191 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 37456C11AC for ; Fri, 10 Oct 2014 20:22:23 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2EF0520253 for ; Fri, 10 Oct 2014 20:22:22 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 090FE2024F for ; Fri, 10 Oct 2014 20:22:21 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Xcged-0005Gz-S5; Fri, 10 Oct 2014 20:19:11 +0000 Received: from exprod5og123.obsmtp.com ([64.18.0.198]) by bombadil.infradead.org with smtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XcgeN-0005Bw-NM for linux-arm-kernel@lists.infradead.org; Fri, 10 Oct 2014 20:18:56 +0000 Received: from mail-pa0-f53.google.com ([209.85.220.53]) (using TLSv1) by exprod5ob123.postini.com ([64.18.4.12]) with SMTP ID DSNKVDg/GrO2bj9BqkFowes0zmW3mklyOURk@postini.com; Fri, 10 Oct 2014 13:18:55 PDT Received: by mail-pa0-f53.google.com with SMTP id kq14so2370459pab.40 for ; Fri, 10 Oct 2014 13:18:34 -0700 (PDT) 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=ePTSUhwsUf5Gg+dqwUJQcjHil9UekM9CQv0bNrY9yZk=; b=NFXONnjB2jncBCgaV+3KxLIGToTfsUmh/LUsTUHykvT1NDpIxZxpDLGE3OO8QD+Vvk m4/Bkit0SCdtY253up0KYTr48IWx0VGzVh6jeSdX6rmskI7YRKtwlw9O8YN1/L1HQ6Gq gjv5g7k8/Go+dyxuoF5lWkI7AS5Gi83KZPYghzKYoLkN93kO2Mfr5P7/SUFmPbU8cUbt POgqXZFz46vfRVS02RzlfhUGTvN+ShaQCUKGCBxsqfqhlySHje/W+7/pibGfAp754IXv UD0bkvk+GY/mnuHRAJ3UdtjiLdr/kiio/CV1oDi5D2DRYwGU492WORMePHVPqrHmwPa6 7ovg== X-Gm-Message-State: ALoCoQnsErV1pw4K7rD3masCm/6ERFObhDIo4oLKERpyzyCWhfwiI73ijgcyi0ou0wdP/Kt36TzSmp5KSIK1W5xcKLrKN1zBr/opkrLNTLTeDs6MVXG5gtw1grmJ7JggKrwy8hUcGzRgG//KQtTXxiasAxBx+OZad5DjvWzZyka0+rqqoc09Us0= X-Received: by 10.68.219.104 with SMTP id pn8mr4964611pbc.152.1412972314531; Fri, 10 Oct 2014 13:18:34 -0700 (PDT) X-Received: by 10.68.219.104 with SMTP id pn8mr4964603pbc.152.1412972314470; Fri, 10 Oct 2014 13:18:34 -0700 (PDT) Received: from svdclab-13-11.amcc.com (67-207-112-226.static.wiline.com. [67.207.112.226]) by mx.google.com with ESMTPSA id d17sm4301841pdj.32.2014.10.10.13.18.32 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 10 Oct 2014 13:18:33 -0700 (PDT) From: Iyappan Subramanian To: davem@davemloft.net, netdev@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH v1 3/3] drivers: net: xgene: Add SGMII based 1GbE ethtool support Date: Fri, 10 Oct 2014 13:18:36 -0700 Message-Id: <1412972316-16344-4-git-send-email-isubramanian@apm.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1412972316-16344-1-git-send-email-isubramanian@apm.com> References: <1412972316-16344-1-git-send-email-isubramanian@apm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20141010_131855_829874_B762C099 X-CRM114-Status: GOOD ( 11.59 ) X-Spam-Score: -2.3 (--) Cc: kchudgar@apm.com, patches@apm.com, linux-arm-kernel@lists.infradead.org, Iyappan Subramanian X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Iyappan Subramanian Signed-off-by: Keyur Chudgar --- .../net/ethernet/apm/xgene/xgene_enet_ethtool.c | 25 +++++++++++++++------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/drivers/net/ethernet/apm/xgene/xgene_enet_ethtool.c b/drivers/net/ethernet/apm/xgene/xgene_enet_ethtool.c index c1c997b..416d6eb 100644 --- a/drivers/net/ethernet/apm/xgene/xgene_enet_ethtool.c +++ b/drivers/net/ethernet/apm/xgene/xgene_enet_ethtool.c @@ -64,16 +64,25 @@ static int xgene_get_settings(struct net_device *ndev, struct ethtool_cmd *cmd) return -ENODEV; return phy_ethtool_gset(phydev, cmd); + } else if (pdata->phy_mode == PHY_INTERFACE_MODE_SGMII) { + cmd->supported = SUPPORTED_1000baseT_Full | + SUPPORTED_Autoneg | SUPPORTED_MII; + cmd->advertising = cmd->supported; + ethtool_cmd_speed_set(cmd, SPEED_1000); + cmd->duplex = DUPLEX_FULL; + cmd->port = PORT_MII; + cmd->transceiver = XCVR_INTERNAL; + cmd->autoneg = AUTONEG_ENABLE; + } else { + cmd->supported = SUPPORTED_10000baseT_Full | SUPPORTED_FIBRE; + cmd->advertising = cmd->supported; + ethtool_cmd_speed_set(cmd, SPEED_10000); + cmd->duplex = DUPLEX_FULL; + cmd->port = PORT_FIBRE; + cmd->transceiver = XCVR_INTERNAL; + cmd->autoneg = AUTONEG_DISABLE; } - cmd->supported = SUPPORTED_10000baseT_Full | SUPPORTED_FIBRE; - cmd->advertising = cmd->supported; - ethtool_cmd_speed_set(cmd, SPEED_10000); - cmd->duplex = DUPLEX_FULL; - cmd->port = PORT_FIBRE; - cmd->transceiver = XCVR_EXTERNAL; - cmd->autoneg = AUTONEG_DISABLE; - return 0; }