From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 264E7B62 for ; Fri, 2 Sep 2016 04:07:18 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga103.jf.intel.com with ESMTP; 01 Sep 2016 19:07:17 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.30,269,1470726000"; d="scan'208";a="1050421051" Received: from unknown (HELO dpdk-fedora20.icx.intel.com) ([10.239.254.239]) by fmsmga002.fm.intel.com with ESMTP; 01 Sep 2016 19:07:16 -0700 From: "xu,gang" To: dts@dpdk.org Cc: "xu,gang" Date: Fri, 2 Sep 2016 10:02:44 +0800 Message-Id: <1472781764-15708-1-git-send-email-gangx.xu@intel.com> X-Mailer: git-send-email 1.9.3 Subject: [dts] [PATCH V2] modify DTS stop_ports error on freesbd V2 X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Sep 2016 02:07:19 -0000 Signed-off-by: xu,gang --- framework/dut.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/framework/dut.py b/framework/dut.py index 2f4e53a..c688801 100644 --- a/framework/dut.py +++ b/framework/dut.py @@ -237,10 +237,14 @@ class Dut(Crb): if driver is not None: # unbind device driver addr_array = pci_bus.split(':') + if len(addr_array) == 3: + devfun_id = addr_array[2] + elif len(addr_array) == 2: + devfun_id = '' domain_id = addr_array[0] bus_id = addr_array[1] - devfun_id = addr_array[2] port = GetNicObj(self, domain_id, bus_id, devfun_id) + port.stop() def restore_interfaces_linux(self): -- 1.9.3