From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from APAC01-SG1-obe.outbound.protection.outlook.com (mail-sg1on0135.outbound.protection.outlook.com [134.170.132.135]) by dpdk.org (Postfix) with ESMTP id 0F2855A8C for ; Sat, 7 Mar 2015 04:57:51 +0100 (CET) Received: from localhost.localdomain (123.139.55.217) by HKNPR04MB145.apcprd04.prod.outlook.com (10.242.103.142) with Microsoft SMTP Server (TLS) id 15.1.106.15; Sat, 7 Mar 2015 03:57:46 +0000 From: Shelton Chia To: Date: Sat, 7 Mar 2015 11:57:38 +0800 Message-ID: <1425700658-12077-1-git-send-email-jiaxt@sinogrid.com> X-Mailer: git-send-email 2.3.0 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [123.139.55.217] X-ClientProxiedBy: HKXPR04CA008.apcprd04.prod.outlook.com (10.242.96.38) To HKNPR04MB145.apcprd04.prod.outlook.com (10.242.103.142) Authentication-Results: dpdk.org; dkim=none (message not signed) header.d=none; X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:HKNPR04MB145; X-Microsoft-Antispam-PRVS: X-Forefront-Antispam-Report: BMV:1; SFV:NSPM; SFS:(10019020)(6009001)(6069001)(2351001)(229853001)(19580395003)(46102003)(48376002)(110136001)(86362001)(87976001)(66066001)(92566002)(33646002)(50226001)(40100003)(450100001)(42186005)(50986999)(77096005)(50466002)(19580405001)(47776003)(62966003)(36756003)(122386002)(77156002)(42262002); DIR:OUT; SFP:1102; SCL:1; SRVR:HKNPR04MB145; H:localhost.localdomain; FPR:; SPF:None; MLV:sfv; LANG:en; X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(5005006)(5002009); SRVR:HKNPR04MB145; BCL:0; PCL:0; RULEID:; SRVR:HKNPR04MB145; X-Forefront-PRVS: 05087F0C24 X-OriginatorOrg: sinogrid.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Mar 2015 03:57:46.4273 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: HKNPR04MB145 Subject: [dpdk-dev] [PATCH] librte_pmd_e1000: power down the serdes link X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Mar 2015 03:57:51 -0000 Signed-off-by: Shelton Chia --- lib/librte_pmd_e1000/igb_ethdev.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/librte_pmd_e1000/igb_ethdev.c b/lib/librte_pmd_e1000/igb_ethdev.c index 504ae74..314ef2a 100644 --- a/lib/librte_pmd_e1000/igb_ethdev.c +++ b/lib/librte_pmd_e1000/igb_ethdev.c @@ -948,7 +948,10 @@ eth_igb_stop(struct rte_eth_dev *dev) } /* Power down the phy. Needed to make the link go Down */ - e1000_power_down_phy(hw); + if (hw->phy.media_type == e1000_media_type_copper) + e1000_power_down_phy(hw); + else + e1000_shutdown_fiber_serdes_link(hw); igb_dev_clear_queues(dev); -- 2.3.0