From patchwork Fri Feb 5 14:25:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 12071157 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.2 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 10C44C433DB for ; Fri, 5 Feb 2021 22:29:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C7CFA64DD9 for ; Fri, 5 Feb 2021 22:29:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232783AbhBEW25 (ORCPT ); Fri, 5 Feb 2021 17:28:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41164 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231672AbhBEOVV (ORCPT ); Fri, 5 Feb 2021 09:21:21 -0500 Received: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [IPv6:2a00:1450:4864:20::52a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F1125C061797; Fri, 5 Feb 2021 07:59:06 -0800 (PST) Received: by mail-ed1-x52a.google.com with SMTP id y18so9287969edw.13; Fri, 05 Feb 2021 07:59:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:from:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=pl9PtiuMxl0Wa0UufjsEq2pee41iNKdi+j7uGSkuBlY=; b=ifXVpwXtvtBs/eY+e1RftosFX11LP0QgXLOAecM6RjNtp1MBBYfe6a8sGTnuqdGieD juOScMbSeZLQXpxrGmerKmCHw5Yxz5R463SwpcFnLdBUYk/Dbp2BBV+UqipuOVIWEjmc ex7dVgjYVCXS+My4kk1vGAhNGKmVJo2AqiFnskJRz7f0CPTKZ4Ryo3HUhsWI6gfrKcZk u83byyBo+QfqQdX9gcFSpExUFWWVBSX1qGmDUDfIfttdqTFRuuyumX8SPP2Bzvj7Mlmu 5oncJjPirvf/h2CpokF8aU6yg1VrtZD/BM/JePBDSBBHowMzYdxH2k949bHlVrLMgrbw URGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=pl9PtiuMxl0Wa0UufjsEq2pee41iNKdi+j7uGSkuBlY=; b=eJoh3iYrODUxRZssg+oFB4yCxP7qLvGeOY0GW3TiyGGWVKOzBzk4IvXTevt5FMkMJ0 m0KbPUXVX9mMbBcD09lT5Ub55pkMp6Q8AnIP1Xo8t1u5nx/Ay7vvOx1/p1RtnbEH90ld w66Z9fkwyEvfhIWHzNN1vi55Vc57Yn3Yzboj09HW2MJfRbRVdeBHKvKEYDHwMSkR8a2y re+IWJiKIt81ihDQG6Nmr3yE5lNO3pgyHTyKPiYT/qzonoLD1O6OzFH2BvDIBhEQeDDp ++cN4OlFeltouvhuPiVVgC7ybMv/Th6PqM0tBvb7FmhTE8sZ0qjQW4nn3PewaDQIzbaC v2GQ== X-Gm-Message-State: AOAM533eSScaLiXrRXQuD5aTvBFjuJPlYlPIHLfpsJWfqVaGjWO0wdIU f0xJqcFNKXc2RPlemhE+Izk+8IFXx16uuA== X-Google-Smtp-Source: ABdhPJwCCFXDZDrN4miU79NjOF7WAm1zKAMS0y2CG9OU6uhlmWNyiyQCgzq1BZAYb0iOFvxskCIJxg== X-Received: by 2002:adf:ef03:: with SMTP id e3mr5519833wro.98.1612535136318; Fri, 05 Feb 2021 06:25:36 -0800 (PST) Received: from ?IPv6:2003:ea:8f1f:ad00:9118:8653:7e7:879e? (p200300ea8f1fad009118865307e7879e.dip0.t-ipconnect.de. [2003:ea:8f1f:ad00:9118:8653:7e7:879e]) by smtp.googlemail.com with ESMTPSA id 36sm13069342wrj.97.2021.02.05.06.25.33 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 05 Feb 2021 06:25:35 -0800 (PST) Subject: [PATCH net-next v2 1/3] cxgb4: remove unused vpd_cap_addr From: Heiner Kallweit To: Raju Rangoju , Jakub Kicinski , David Miller , Bjorn Helgaas Cc: "linux-pci@vger.kernel.org" , "netdev@vger.kernel.org" References: <8edfa4ae-1e78-249d-14fb-0e44a2c51864@gmail.com> Message-ID: Date: Fri, 5 Feb 2021 15:25:33 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0 MIME-Version: 1.0 In-Reply-To: <8edfa4ae-1e78-249d-14fb-0e44a2c51864@gmail.com> Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org Supposedly this is a leftover from T3 driver heritage. cxgb4 uses the PCI core VPD access code that handles detection of VPD capabilities. Signed-off-by: Heiner Kallweit Reviewed-by: Alexander Duyck --- drivers/net/ethernet/chelsio/cxgb4/cxgb4.h | 1 - drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 2 -- 2 files changed, 3 deletions(-) diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4.h b/drivers/net/ethernet/chelsio/cxgb4/cxgb4.h index 8e681ce72..314f8d806 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4.h +++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4.h @@ -414,7 +414,6 @@ struct pf_resources { }; struct pci_params { - unsigned int vpd_cap_addr; unsigned char speed; unsigned char width; }; diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c index 9f1965c80..6264bc66a 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c +++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c @@ -3201,8 +3201,6 @@ static void cxgb4_mgmt_fill_vf_station_mac_addr(struct adapter *adap) int err; u8 *na; - adap->params.pci.vpd_cap_addr = pci_find_capability(adap->pdev, - PCI_CAP_ID_VPD); err = t4_get_raw_vpd_params(adap, &adap->params.vpd); if (err) return; From patchwork Fri Feb 5 14:26:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 12071125 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.2 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CB86AC4332D for ; Fri, 5 Feb 2021 22:19:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9E03464FA0 for ; Fri, 5 Feb 2021 22:19:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233137AbhBEWSo (ORCPT ); Fri, 5 Feb 2021 17:18:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43364 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232236AbhBEOcQ (ORCPT ); Fri, 5 Feb 2021 09:32:16 -0500 Received: from mail-ed1-x52b.google.com (mail-ed1-x52b.google.com [IPv6:2a00:1450:4864:20::52b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2D89DC061793; Fri, 5 Feb 2021 08:09:17 -0800 (PST) Received: by mail-ed1-x52b.google.com with SMTP id t5so9338536eds.12; Fri, 05 Feb 2021 08:09:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:from:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=wxlenn/Tv/yLURp6IteuVrvWieBU43C0FAD9g2/etSo=; b=ij3zbJCEpwTPf87zbOsYISZsPUb19idDDJrvE9XM9xCFnOsUZuWvG1/R7CMjTzKZOz SPZDW6DAOXZ29sMw9E7vWDRffLvKP5C9QA88NmNAS91+8pdGpGuJUajrXnK8+P+UQcA/ Zp6z0TSVOs2T+MeyF11pVqY04pi1OFKpA7XxVp2uX7QVTXoFe7F8ygwkGHHbfPx8iqYV 8mRUJMqmXttocyjGjO3K/tZKKipSjDhYQaQlntMOw2jMLEXczBDForO0g2vBOsQwzvEc YoD9NW/EMcGxEmrfn0geD/rcxPo19VAIHTj45GMyigHnbD5iwO6vWyfemRMnP0d+e17f 6UeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=wxlenn/Tv/yLURp6IteuVrvWieBU43C0FAD9g2/etSo=; b=SNeSjFM69Ygn2KfrwXzzKebk3qAo+Aqc913jR9GqkJgoIXLCiG7ZfcSWIBq6gvhaGy zlQ4W3vM7pVyIFUA+Not3PQfF3eZmqq+GQgDj5dmtbnv8XricM2TW08+W8BRdaUQ6z81 WaQ4gWR3WoWMb/fP8+1p1s0buHkXFe3W8MPAUIEoA9CF7yA3hp3SdsovZg8el6EjmirN wCzZLwGmt0uVcHejLQnMRkWaEZszEezpuc6Dzm3k3Vc2x5oRYM7ZhcNl44rzTqTuvw1z dD8ivxMP6l8yDKzzNZlBXDv7da7to6Y61JjjtU+2s13ljlo+B8IcZAS54e+FsSOVxx/G JJyg== X-Gm-Message-State: AOAM53240gnZQdJlzFvAkD5exYH2lcQ6FyrXFaKYN8+PvGW4gHr9hsWN XDoWuf/N/QssbZ5HpkJxrlXKKCZn6zMEmw== X-Google-Smtp-Source: ABdhPJxs0PygHnzvsetjZYcjTSHc63XTRUDWqQp4+9fNmj229VOdhcZh+uFAJMg2aNXDZNNIHyVO6Q== X-Received: by 2002:adf:dd83:: with SMTP id x3mr5230018wrl.421.1612535188425; Fri, 05 Feb 2021 06:26:28 -0800 (PST) Received: from ?IPv6:2003:ea:8f1f:ad00:9118:8653:7e7:879e? (p200300ea8f1fad009118865307e7879e.dip0.t-ipconnect.de. [2003:ea:8f1f:ad00:9118:8653:7e7:879e]) by smtp.googlemail.com with ESMTPSA id o12sm12235744wrx.82.2021.02.05.06.26.25 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 05 Feb 2021 06:26:27 -0800 (PST) Subject: [PATCH net-next v2 2/3] PCI/VPD: Change Chelsio T4 quirk to provide access to full virtual address space From: Heiner Kallweit To: Raju Rangoju , Jakub Kicinski , David Miller , Bjorn Helgaas Cc: "linux-pci@vger.kernel.org" , "netdev@vger.kernel.org" References: <8edfa4ae-1e78-249d-14fb-0e44a2c51864@gmail.com> Message-ID: <0e55480b-67cb-8a2f-fb82-734d4b1b0eb0@gmail.com> Date: Fri, 5 Feb 2021 15:26:25 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0 MIME-Version: 1.0 In-Reply-To: <8edfa4ae-1e78-249d-14fb-0e44a2c51864@gmail.com> Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org cxgb4 uses the full VPD address space for accessing its EEPROM (with some mapping, see t4_eeprom_ptov()). In cudbg_collect_vpd_data() it sets the VPD len to 32K (PCI_VPD_MAX_SIZE), and then back to 2K (CUDBG_VPD_PF_SIZE). Having official (structured) and inofficial (unstructured) VPD data violates the PCI spec, let's set VPD len according to all data that can be accessed via PCI VPD access, no matter of its structure. Signed-off-by: Heiner Kallweit Reviewed-by: Alexander Duyck --- drivers/pci/vpd.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/pci/vpd.c b/drivers/pci/vpd.c index 7915d10f9..06a7954d0 100644 --- a/drivers/pci/vpd.c +++ b/drivers/pci/vpd.c @@ -633,9 +633,8 @@ static void quirk_chelsio_extend_vpd(struct pci_dev *dev) /* * If this is a T3-based adapter, there's a 1KB VPD area at offset * 0xc00 which contains the preferred VPD values. If this is a T4 or - * later based adapter, the special VPD is at offset 0x400 for the - * Physical Functions (the SR-IOV Virtual Functions have no VPD - * Capabilities). The PCI VPD Access core routines will normally + * later based adapter, provide access to the full virtual EEPROM + * address space. The PCI VPD Access core routines will normally * compute the size of the VPD by parsing the VPD Data Structure at * offset 0x000. This will result in silent failures when attempting * to accesses these other VPD areas which are beyond those computed @@ -644,7 +643,7 @@ static void quirk_chelsio_extend_vpd(struct pci_dev *dev) if (chip == 0x0 && prod >= 0x20) pci_set_vpd_size(dev, 8192); else if (chip >= 0x4 && func < 0x8) - pci_set_vpd_size(dev, 2048); + pci_set_vpd_size(dev, PCI_VPD_MAX_SIZE); } DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_CHELSIO, PCI_ANY_ID, From patchwork Fri Feb 5 14:27:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 12071123 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.2 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A8B98C43332 for ; Fri, 5 Feb 2021 22:18:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 77F7564EE4 for ; Fri, 5 Feb 2021 22:18:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233117AbhBEWRr (ORCPT ); Fri, 5 Feb 2021 17:17:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43372 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232609AbhBEOcQ (ORCPT ); Fri, 5 Feb 2021 09:32:16 -0500 Received: from mail-ed1-x529.google.com (mail-ed1-x529.google.com [IPv6:2a00:1450:4864:20::529]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 01B1FC061222; Fri, 5 Feb 2021 08:09:19 -0800 (PST) Received: by mail-ed1-x529.google.com with SMTP id c6so9422269ede.0; Fri, 05 Feb 2021 08:09:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:from:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=XrFiGb4s98X8FFWeanrSHmTuST16C6ouipnGlKmt0Hk=; b=TeA04exmhdK8CwkVcVfIrvYN8A/vC8+PT4oCJhQv/Hkz5dLDaEaGJlEO6X4ZY52qu3 DjQwH2+IwZgc/QTJgSSdT6OuOww8SAoioHrPJwvanB7V+XQgv9528+dogteXJaO+02Jw 5rBLv3iFBcY3INfCZvD+OAhsDTfM7/iFMjDTPNd5bdvxFF7lfZDFsAwOiX1bjiZiDQex IMHhY3XeXztkTMlZWRhGEIAJ/IGcWryX0qvW5vTsEp+72V4yX22baKLGglRjm6DJM1oQ tar2TT3ner5KYYAsoMOUMvAv3Yv0ZT75sLSQDLm7mbJHGV3XIgo7PowFxo/C/RqyH+xs QPpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=XrFiGb4s98X8FFWeanrSHmTuST16C6ouipnGlKmt0Hk=; b=hdKynnhGTpzg8Av5e9+7Aq3ZugNO4nQERvOf8ur2Cayx2yAR59CwjfbWQbfLAtm3MA oFCftN1ouY660ZkF6uA5cczgxgWyWCjRTtjMJytv0/NNRsKxIogBwPfbuiHy8SXgX3jN akpBXul6iUwKYQuwqWEGLUPCtMb2VV9txZqiFd1X5Rf+/ltgUblkDTOSEnHmAMAxDSqF b//oEYgX7fPYXXxuYy5lWK5Zk+Y5w3CtFS2hJ5Ns3q7Z+DxJEYl2NgPf8vGS+DXo8Njt qLeWjzpLiU9/0vwIurzk95a6Q1IwgB4cDEuXcIac27u34q8KfURoFLcYNe+652R3OFIm jVLw== X-Gm-Message-State: AOAM530u8XGTYQtWraEUd9qLg7AeWC6chsr21vf/mVi2w3LUXGYe0PEy /ZoU3OiDrQ2l+W0o7Oh/sGuEafE4hPZQfw== X-Google-Smtp-Source: ABdhPJyRiNFjoyAZIP4kvF/mH6laIlKd/ow9c7yk++Q4WoxsGDAMaKmRuj+6vRJPyr3xz0txYPaU4w== X-Received: by 2002:a5d:5111:: with SMTP id s17mr5270890wrt.331.1612535256274; Fri, 05 Feb 2021 06:27:36 -0800 (PST) Received: from ?IPv6:2003:ea:8f1f:ad00:9118:8653:7e7:879e? (p200300ea8f1fad009118865307e7879e.dip0.t-ipconnect.de. [2003:ea:8f1f:ad00:9118:8653:7e7:879e]) by smtp.googlemail.com with ESMTPSA id j7sm13275057wrp.72.2021.02.05.06.27.33 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 05 Feb 2021 06:27:35 -0800 (PST) Subject: [PATCH net-next v2 3/3] cxgb4: remove changing VPD len From: Heiner Kallweit To: Raju Rangoju , Jakub Kicinski , David Miller , Bjorn Helgaas Cc: "linux-pci@vger.kernel.org" , "netdev@vger.kernel.org" References: <8edfa4ae-1e78-249d-14fb-0e44a2c51864@gmail.com> Message-ID: <90961c36-b345-5a7c-5ae8-c7c2311b56a8@gmail.com> Date: Fri, 5 Feb 2021 15:27:32 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0 MIME-Version: 1.0 In-Reply-To: <8edfa4ae-1e78-249d-14fb-0e44a2c51864@gmail.com> Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org Now that the PCI VPD for Chelsio devices from T4 has been changed and VPD len is set to PCI_VPD_MAX_SIZE (32K), we don't have to change the VPD len any longer. Signed-off-by: Heiner Kallweit Reviewed-by: Alexander Duyck --- .../net/ethernet/chelsio/cxgb4/cudbg_entity.h | 1 - .../net/ethernet/chelsio/cxgb4/cudbg_lib.c | 21 ++++--------------- 2 files changed, 4 insertions(+), 18 deletions(-) diff --git a/drivers/net/ethernet/chelsio/cxgb4/cudbg_entity.h b/drivers/net/ethernet/chelsio/cxgb4/cudbg_entity.h index 876f90e57..02ccb610a 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/cudbg_entity.h +++ b/drivers/net/ethernet/chelsio/cxgb4/cudbg_entity.h @@ -220,7 +220,6 @@ struct cudbg_mps_tcam { u8 reserved[2]; }; -#define CUDBG_VPD_PF_SIZE 0x800 #define CUDBG_SCFG_VER_ADDR 0x06 #define CUDBG_SCFG_VER_LEN 4 #define CUDBG_VPD_VER_ADDR 0x18c7 diff --git a/drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c b/drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c index 75474f810..addac5518 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c +++ b/drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c @@ -2689,7 +2689,7 @@ int cudbg_collect_vpd_data(struct cudbg_init *pdbg_init, u32 scfg_vers, vpd_vers, fw_vers; struct cudbg_vpd_data *vpd_data; struct vpd_params vpd = { 0 }; - int rc, ret; + int rc; rc = t4_get_raw_vpd_params(padap, &vpd); if (rc) @@ -2699,24 +2699,11 @@ int cudbg_collect_vpd_data(struct cudbg_init *pdbg_init, if (rc) return rc; - /* Serial Configuration Version is located beyond the PF's vpd size. - * Temporarily give access to entire EEPROM to get it. - */ - rc = pci_set_vpd_size(padap->pdev, EEPROMVSIZE); - if (rc < 0) - return rc; - - ret = cudbg_read_vpd_reg(padap, CUDBG_SCFG_VER_ADDR, CUDBG_SCFG_VER_LEN, - &scfg_vers); - - /* Restore back to original PF's vpd size */ - rc = pci_set_vpd_size(padap->pdev, CUDBG_VPD_PF_SIZE); - if (rc < 0) + rc = cudbg_read_vpd_reg(padap, CUDBG_SCFG_VER_ADDR, CUDBG_SCFG_VER_LEN, + &scfg_vers); + if (rc) return rc; - if (ret) - return ret; - rc = cudbg_read_vpd_reg(padap, CUDBG_VPD_VER_ADDR, CUDBG_VPD_VER_LEN, vpd_str); if (rc)