From: Alexander Duyck <alexander.duyck@gmail.com>
To: Heiner Kallweit <hkallweit1@gmail.com>
Cc: Raju Rangoju <rajur@chelsio.com>,
Jakub Kicinski <kuba@kernel.org>,
David Miller <davem@davemloft.net>,
Bjorn Helgaas <bhelgaas@google.com>,
"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [PATCH net-next v2 3/3] cxgb4: remove changing VPD len
Date: Mon, 8 Feb 2021 09:07:13 -0800 [thread overview]
Message-ID: <CAKgT0Ufw-hF92SWqha+yy4hjA0WVYkAZkqZMdnP=+mTJvmvnNA@mail.gmail.com> (raw)
In-Reply-To: <90961c36-b345-5a7c-5ae8-c7c2311b56a8@gmail.com>
On Fri, Feb 5, 2021 at 2:18 PM Heiner Kallweit <hkallweit1@gmail.com> wrote:
>
> 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 <hkallweit1@gmail.com>
> ---
> .../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)
Assuming that patch 2 is okay then this patch should be fine since it
is just toggling back and forth between the same value anyway.
Reviewed-by: Alexander Duyck <alexanderduyck@fb.com>
prev parent reply other threads:[~2021-02-08 17:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-05 14:24 [PATCH net-next v2 0/3] cxgb4: improve PCI VPD handling Heiner Kallweit
2021-02-05 14:25 ` [PATCH net-next v2 1/3] cxgb4: remove unused vpd_cap_addr Heiner Kallweit
2021-02-08 17:06 ` Alexander Duyck
2021-02-05 14:26 ` [PATCH net-next v2 2/3] PCI/VPD: Change Chelsio T4 quirk to provide access to full virtual address space Heiner Kallweit
2021-02-08 16:59 ` Alexander Duyck
2021-02-05 14:27 ` [PATCH net-next v2 3/3] cxgb4: remove changing VPD len Heiner Kallweit
2021-02-08 17:07 ` Alexander Duyck [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAKgT0Ufw-hF92SWqha+yy4hjA0WVYkAZkqZMdnP=+mTJvmvnNA@mail.gmail.com' \
--to=alexander.duyck@gmail.com \
--cc=bhelgaas@google.com \
--cc=davem@davemloft.net \
--cc=hkallweit1@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=rajur@chelsio.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).