From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f179.google.com (mail-pf0-f179.google.com [209.85.192.179]) by dpdk.org (Postfix) with ESMTP id 0DEAF1E2B for ; Mon, 9 Jan 2017 00:04:03 +0100 (CET) Received: by mail-pf0-f179.google.com with SMTP id y143so4861336pfb.0 for ; Sun, 08 Jan 2017 15:04:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=+oua9LyfFE9UDkGVGJ4Ic2drzyGMM58NLg61+y5Ql0E=; b=J1AM/lBxLXtmuPCToLqEc1UiBGLsUXHrtIfjwQzvQg2HXZL12StttBBfpQ38KV6Hgj pcobW+Dylc6FTnA43igpJM+ELqmJ972N4eV1Ody6zQe/im2zr+E2dWk44mxlefvCvULt WYcG63aSH8shiYN6ZHNMGD1gNFQ0P/h7Ci8g7C+X9s5SeBi752nKv9+DJUkge7DXkR9q bMlo8G+3UuLMnQ2VdH9SxeVGqVEq+shpS8pByU+euB+nXW7bT2jIYDe43AQAPPMdNI9k ynhwMhl5K41KtwsHzdzRvmP/wknD1yDxfJR2B0HTGrEDqsf6n4AoSV1UvWrqcKxUa+fr O49Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=+oua9LyfFE9UDkGVGJ4Ic2drzyGMM58NLg61+y5Ql0E=; b=ghgj+w2njP4clohUrMbdkJSc0+fNLGPAe6ML9B03a2CgaDjZxy2L1C+dgBTCg30u5a 0rfR+3E/3mzWM0jxYIM1QqlOyLqqLyfwUzlm7E0Ampm7Ylb07WIP+IjSy1Do0BGwhfMK c/ajGXClP9sWjguPeK9IBDfrCruXqUQpmMseW9ejLZuOui8fT7DKAkH1nLbeymV7+4qG t8MhhDwBYXWxlwmYd9BQiZzjlAnYnIySFhtpVnCncQ48rEg/XsYjFM/v9YqAPkH6VVn5 xTfWliJcqI+msjARKTj501Vzxo74GIdnb1DT/1+KHcyKLUkx+k5WMKAUT/7ZYmCrqWEv Hzsg== X-Gm-Message-State: AIkVDXL9Xo1jgkCTz8v3K/Lh4S04BBxTTPchu9bk8Ca7lloa5YPuhDsxgmJHTamKQFK6lw== X-Received: by 10.84.238.131 with SMTP id v3mr14519995plk.143.1483916643337; Sun, 08 Jan 2017 15:04:03 -0800 (PST) Received: from xeon-e3 (204-195-18-65.wavecable.com. [204.195.18.65]) by smtp.gmail.com with ESMTPSA id i86sm15062803pfj.87.2017.01.08.15.04.02 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 08 Jan 2017 15:04:03 -0800 (PST) Date: Sun, 8 Jan 2017 15:03:55 -0800 From: Stephen Hemminger To: Qiming Yang Cc: dev@dpdk.org, ferruh.yigit@intel.com, helin.zhang@intel.com, remy.horton@intel.com Message-ID: <20170108150355.3bce1403@xeon-e3> In-Reply-To: <1483848695-44643-3-git-send-email-qiming.yang@intel.com> References: <1483531428-14481-1-git-send-email-qiming.yang@intel.com> <1483848695-44643-1-git-send-email-qiming.yang@intel.com> <1483848695-44643-3-git-send-email-qiming.yang@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v5 2/5] net/e1000: add firmware version get X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Jan 2017 23:04:04 -0000 On Sun, 8 Jan 2017 12:11:32 +0800 Qiming Yang wrote: > + switch (hw->mac.type) { > + case e1000_i210: > + case e1000_i211: > + if (!(e1000_get_flash_presence_i210(hw))) { > + snprintf(fw_version, fw_length, > + "%2d.%2d-%d", > + fw.invm_major, fw.invm_minor, > + fw.invm_img_type); > + break; > + } > + /* fall through */ > + default: > + /* if option rom is valid, display its version too*/ > + if (fw.or_valid) { > + snprintf(fw_version, fw_length, > + "%d.%d, 0x%08x, %d.%d.%d", > + fw.eep_major, fw.eep_minor, fw.etrack_id, > + fw.or_major, fw.or_build, fw.or_patch); > + /* no option rom */ > + } else { > + if (fw.etrack_id != 0X0000) { > + snprintf(fw_version, fw_length, > + "%d.%d, 0x%08x", > + fw.eep_major, fw.eep_minor, fw.etrack_id); > + } else { > + snprintf(fw_version, fw_length, > + "%d.%d.%d", > + fw.eep_major, fw.eep_minor, fw.eep_build); Indentation is incorrect here.