netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Chan <michael.chan@broadcom.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org,
	Vasundhara Volam <vasundhara-v.volam@broadcom.com>
Subject: [PATCH net-next 14/15] bnxt_en: Rename switch_id to dsn
Date: Sat, 23 Nov 2019 03:26:09 -0500	[thread overview]
Message-ID: <1574497570-22102-15-git-send-email-michael.chan@broadcom.com> (raw)
In-Reply-To: <1574497570-22102-1-git-send-email-michael.chan@broadcom.com>

From: Vasundhara Volam <vasundhara-v.volam@broadcom.com>

Instead of switch_id, renaming it to dsn will be more meaningful
so that it can be used to display device serial number in follow up
patch via devlink_info command.

Signed-off-by: Vasundhara Volam <vasundhara-v.volam@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
---
 drivers/net/ethernet/broadcom/bnxt/bnxt.c         | 6 +++---
 drivers/net/ethernet/broadcom/bnxt/bnxt.h         | 2 +-
 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
index 85983f0..76b398d 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
@@ -11343,8 +11343,8 @@ int bnxt_get_port_parent_id(struct net_device *dev,
 	if (!BNXT_PF(bp))
 		return -EOPNOTSUPP;
 
-	ppid->id_len = sizeof(bp->switch_id);
-	memcpy(ppid->id, bp->switch_id, ppid->id_len);
+	ppid->id_len = sizeof(bp->dsn);
+	memcpy(ppid->id, bp->dsn, ppid->id_len);
 
 	return 0;
 }
@@ -11822,7 +11822,7 @@ static int bnxt_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
 
 	if (BNXT_PF(bp)) {
 		/* Read the adapter's DSN to use as the eswitch switch_id */
-		rc = bnxt_pcie_dsn_get(bp, bp->switch_id);
+		rc = bnxt_pcie_dsn_get(bp, bp->dsn);
 		if (rc)
 			goto init_err_pci_clean;
 	}
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.h b/drivers/net/ethernet/broadcom/bnxt/bnxt.h
index 505af5c..9ce9b1d 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.h
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.h
@@ -1845,7 +1845,7 @@ struct bnxt {
 	enum devlink_eswitch_mode eswitch_mode;
 	struct bnxt_vf_rep	**vf_reps; /* array of vf-rep ptrs */
 	u16			*cfa_code_map; /* cfa_code -> vf_idx map */
-	u8			switch_id[8];
+	u8			dsn[8];
 	struct bnxt_tc_info	*tc_info;
 	struct list_head	tc_indr_block_list;
 	struct notifier_block	tc_netdev_nb;
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c
index acb2dd6..1c456fc 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c
@@ -488,8 +488,8 @@ int bnxt_dl_register(struct bnxt *bp)
 	}
 
 	devlink_port_attrs_set(&bp->dl_port, DEVLINK_PORT_FLAVOUR_PHYSICAL,
-			       bp->pf.port_id, false, 0,
-			       bp->switch_id, sizeof(bp->switch_id));
+			       bp->pf.port_id, false, 0, bp->dsn,
+			       sizeof(bp->dsn));
 	rc = devlink_port_register(dl, &bp->dl_port, bp->pf.port_id);
 	if (rc) {
 		netdev_err(bp->dev, "devlink_port_register failed");
-- 
2.5.1


  parent reply	other threads:[~2019-11-23  8:26 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-23  8:25 [PATCH net-next 00/15] bnxt_en: Updates Michael Chan
2019-11-23  8:25 ` [PATCH net-next 01/15] bnxt_en: Add chip IDs for 57452 and 57454 chips Michael Chan
2019-11-23  8:25 ` [PATCH net-next 02/15] bnxt_en: Disable/enable Bus master during suspend/resume Michael Chan
2019-11-23  8:25 ` [PATCH net-next 03/15] bnxt_en: Do driver unregister cleanup in bnxt_init_one() failure path Michael Chan
2019-11-23  8:25 ` [PATCH net-next 04/15] bnxt_en: Combine 2 functions calling the same HWRM_DRV_RGTR fw command Michael Chan
2019-11-23  8:26 ` [PATCH net-next 05/15] bnxt_en: Send FUNC_RESOURCE_QCAPS command in bnxt_resume() Michael Chan
2019-11-23  8:26 ` [PATCH net-next 06/15] bnxt_en: Fix suspend/resume path on 57500 chips Michael Chan
2019-11-23  8:26 ` [PATCH net-next 07/15] bnxt_en: Initialize context memory to the value specified by firmware Michael Chan
2019-11-23  8:26 ` [PATCH net-next 08/15] bnxt_en: Assign more RSS context resources to the VFs Michael Chan
2019-11-23  8:26 ` [PATCH net-next 09/15] bnxt_en: Skip disabling autoneg before PHY loopback when appropriate Michael Chan
2019-11-23  8:26 ` [PATCH net-next 10/15] bnxt_en: Refactor the initialization of the ethtool link settings Michael Chan
2019-11-23  8:26 ` [PATCH net-next 11/15] bnxt_en: Add async. event logic for PHY configuration changes Michael Chan
2019-11-23  8:26 ` [PATCH net-next 12/15] bnxt_en: Allow PHY settings on multi-function or NPAR PFs if allowed by FW Michael Chan
2019-11-23  8:26 ` [PATCH net-next 13/15] bnxt_en: Add support for flashing the device via devlink Michael Chan
2019-11-23  8:26 ` Michael Chan [this message]
2019-11-23  8:26 ` [PATCH net-next 15/15] bnxt_en: Add support for devlink info command Michael Chan
2019-11-23 19:55   ` Jakub Kicinski
2019-11-23 20:15     ` Michael Chan
2019-11-24  0:09       ` Jakub Kicinski

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=1574497570-22102-15-git-send-email-michael.chan@broadcom.com \
    --to=michael.chan@broadcom.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=vasundhara-v.volam@broadcom.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).