[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAKgT0Ufw-hF92SWqha+yy4hjA0WVYkAZkqZMdnP=+mTJvmvnNA@mail.gmail.com>
Date: Mon, 8 Feb 2021 09:07:13 -0800
From: Alexander Duyck <alexander.duyck@...il.com>
To: Heiner Kallweit <hkallweit1@...il.com>
Cc: Raju Rangoju <rajur@...lsio.com>, Jakub Kicinski <kuba@...nel.org>,
David Miller <davem@...emloft.net>,
Bjorn Helgaas <bhelgaas@...gle.com>,
"linux-pci@...r.kernel.org" <linux-pci@...r.kernel.org>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [PATCH net-next v2 3/3] cxgb4: remove changing VPD len
On Fri, Feb 5, 2021 at 2:18 PM Heiner Kallweit <hkallweit1@...il.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@...il.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@...com>
Powered by blists - more mailing lists