From patchwork Wed Dec 16 23:11:59 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Smart X-Patchwork-Id: 7866661 Return-Path: X-Original-To: patchwork-linux-scsi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id CA019BEEE5 for ; Wed, 16 Dec 2015 23:12:28 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id F19FB20396 for ; Wed, 16 Dec 2015 23:12:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 259C6202FF for ; Wed, 16 Dec 2015 23:12:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755308AbbLPXM0 (ORCPT ); Wed, 16 Dec 2015 18:12:26 -0500 Received: from mail-pa0-f41.google.com ([209.85.220.41]:34861 "EHLO mail-pa0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934252AbbLPXMS (ORCPT ); Wed, 16 Dec 2015 18:12:18 -0500 Received: by mail-pa0-f41.google.com with SMTP id jx14so2182282pad.2 for ; Wed, 16 Dec 2015 15:12:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=avagotech.com; s=google; h=date:from:to:subject:message-id:user-agent:mime-version :content-type:content-transfer-encoding; bh=lWvREZDL79XZ2kvJKklZnECoNBTvKMrp0vBVftRDqrc=; b=X5MUREmAigYG7oOnWxN5/OOrZKngMzkiP1XCf1u5GI5xG8KTaWg4iiDQU+S0P04doA bnWVow1ZcTnmwg+kw7uZiIpbm7rV4YMzqihPV/wHGCkUF2gQferhhB6XQAzxb3zrG59l VmPXn3gzdZi5E5sm9E5EqEB2SRsK5wsLoejpQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:subject:message-id:user-agent :mime-version:content-type:content-transfer-encoding; bh=lWvREZDL79XZ2kvJKklZnECoNBTvKMrp0vBVftRDqrc=; b=gZmEoc4GAEllHFOSAjAS6NobafGEL8vUZE2ZNF+qTNdWQu7vGp1i61Ucbooj+WKlhU CfDp1uc8jBFtpKK4PqL6R3w9WcjbUmZRyK+Y+tifqqHvkKDo2FsT+ucDw5u/GA65ZD7T yiA0kjI1M2dQDxIHFvnHqKu+zz4xLFMHgKpTCYpkhSmm/aN4mI2BTJSCg8SnXPtpKWMC YZAqqSdHSeikuwYNzM8phrc3gdaDhKHP4net37rlXPyg5dgBlIKALyqRYQa83S3Nr9iT dvdNixQlAwqyJHkpBn+dwBZsllPqarqDrS1K66F1qZ185WM3V5lDXwodHrH9oinKuqng 3mEg== X-Gm-Message-State: ALoCoQn8Qit0yxsokD3cmAeNh78oTJIHdfxaPs/sWmG79i66kR5bkRZGNADVFoxM9jwXqZk2aZPdTegxLjd23wOr/72/E3ezfw== X-Received: by 10.66.193.73 with SMTP id hm9mr67660609pac.117.1450307538046; Wed, 16 Dec 2015 15:12:18 -0800 (PST) Received: from myfc17 (cm-wififw.emulex.com. [138.239.220.50]) by smtp.gmail.com with ESMTPSA id e14sm11414352pap.24.2015.12.16.15.12.16 for (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 16 Dec 2015 15:12:16 -0800 (PST) Date: Wed, 16 Dec 2015 18:11:59 -0500 From: james.smart@avagotech.com (James Smart) To: linux-scsi@vger.kernel.org Subject: [PATCH 08/17] lpfc: Fix RDP Speed reporting. Message-ID: <5671efbf.h8YAdmlPeIEJ3AcO%james.smart@avagotech.com> User-Agent: Heirloom mailx 12.5 7/5/10 MIME-Version: 1.0 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID,T_RP_MATCHES_RCVD,UNPARSEABLE_RELAY autolearn=ham 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 Fix RDP Speed reporting. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke --- drivers/scsi/lpfc/lpfc_els.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c index 3394648..f7a2967 100644 --- a/drivers/scsi/lpfc/lpfc_els.c +++ b/drivers/scsi/lpfc/lpfc_els.c @@ -4730,28 +4730,25 @@ lpfc_rdp_res_speed(struct fc_rdp_port_speed_desc *desc, struct lpfc_hba *phba) desc->tag = cpu_to_be32(RDP_PORT_SPEED_DESC_TAG); - switch (phba->sli4_hba.link_state.speed) { - case LPFC_FC_LA_SPEED_1G: + switch (phba->fc_linkspeed) { + case LPFC_LINK_SPEED_1GHZ: rdp_speed = RDP_PS_1GB; break; - case LPFC_FC_LA_SPEED_2G: + case LPFC_LINK_SPEED_2GHZ: rdp_speed = RDP_PS_2GB; break; - case LPFC_FC_LA_SPEED_4G: + case LPFC_LINK_SPEED_4GHZ: rdp_speed = RDP_PS_4GB; break; - case LPFC_FC_LA_SPEED_8G: + case LPFC_LINK_SPEED_8GHZ: rdp_speed = RDP_PS_8GB; break; - case LPFC_FC_LA_SPEED_10G: + case LPFC_LINK_SPEED_10GHZ: rdp_speed = RDP_PS_10GB; break; - case LPFC_FC_LA_SPEED_16G: + case LPFC_LINK_SPEED_16GHZ: rdp_speed = RDP_PS_16GB; break; - case LPFC_FC_LA_SPEED_32G: - rdp_speed = RDP_PS_32GB; - break; default: rdp_speed = RDP_PS_UNKNOWN; break;