Skip to content

Commit b014232

Browse files
Vasundhara Volamdavem330
authored andcommitted
bnxt_en: Rename switch_id to dsn
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 <[email protected]> Signed-off-by: Michael Chan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 8159cbe commit b014232

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

drivers/net/ethernet/broadcom/bnxt/bnxt.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11388,8 +11388,8 @@ int bnxt_get_port_parent_id(struct net_device *dev,
1138811388
if (!BNXT_PF(bp) || !(bp->flags & BNXT_FLAG_DSN_VALID))
1138911389
return -EOPNOTSUPP;
1139011390

11391-
ppid->id_len = sizeof(bp->switch_id);
11392-
memcpy(ppid->id, bp->switch_id, ppid->id_len);
11391+
ppid->id_len = sizeof(bp->dsn);
11392+
memcpy(ppid->id, bp->dsn, ppid->id_len);
1139311393

1139411394
return 0;
1139511395
}
@@ -11870,7 +11870,7 @@ static int bnxt_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
1187011870

1187111871
if (BNXT_PF(bp)) {
1187211872
/* Read the adapter's DSN to use as the eswitch switch_id */
11873-
bnxt_pcie_dsn_get(bp, bp->switch_id);
11873+
rc = bnxt_pcie_dsn_get(bp, bp->dsn);
1187411874
}
1187511875

1187611876
/* MTU range: 60 - FW defined max */

drivers/net/ethernet/broadcom/bnxt/bnxt.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1848,7 +1848,7 @@ struct bnxt {
18481848
enum devlink_eswitch_mode eswitch_mode;
18491849
struct bnxt_vf_rep **vf_reps; /* array of vf-rep ptrs */
18501850
u16 *cfa_code_map; /* cfa_code -> vf_idx map */
1851-
u8 switch_id[8];
1851+
u8 dsn[8];
18521852
struct bnxt_tc_info *tc_info;
18531853
struct list_head tc_indr_block_list;
18541854
struct notifier_block tc_netdev_nb;

drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -566,8 +566,8 @@ int bnxt_dl_register(struct bnxt *bp)
566566
return 0;
567567

568568
devlink_port_attrs_set(&bp->dl_port, DEVLINK_PORT_FLAVOUR_PHYSICAL,
569-
bp->pf.port_id, false, 0,
570-
bp->switch_id, sizeof(bp->switch_id));
569+
bp->pf.port_id, false, 0, bp->dsn,
570+
sizeof(bp->dsn));
571571
rc = devlink_port_register(dl, &bp->dl_port, bp->pf.port_id);
572572
if (rc) {
573573
netdev_err(bp->dev, "devlink_port_register failed");

0 commit comments

Comments
 (0)