Skip to content

Commit a8f89fa

Browse files
jacob-kellerkuba-moo
authored andcommitted
ice: do not abort devlink info if board identifier can't be found
The devlink dev info command reports version information about the device and firmware running on the board. This includes the "board.id" field which is supposed to represent an identifier of the board design. The ice driver uses the Product Board Assembly identifier for this. In some cases, the PBA is not present in the NVM. If this happens, devlink dev info will fail with an error. Instead, modify the ice_info_pba function to just exit without filling in the context buffer. This will cause the board.id field to be skipped. Log a dev_dbg message in case someone wants to confirm why board.id is not showing up for them. Fixes: e961b67 ("ice: add board identifier info to devlink .info_get") Signed-off-by: Jacob Keller <[email protected]> Tested-by: Tony Brelinski <[email protected]> Signed-off-by: Tony Nguyen <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent f87d643 commit a8f89fa

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/net/ethernet/intel/ice/ice_devlink.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ static int ice_info_pba(struct ice_pf *pf, struct ice_info_ctx *ctx)
4242

4343
status = ice_read_pba_string(hw, (u8 *)ctx->buf, sizeof(ctx->buf));
4444
if (status)
45-
return -EIO;
45+
/* We failed to locate the PBA, so just skip this entry */
46+
dev_dbg(ice_pf_to_dev(pf), "Failed to read Product Board Assembly string, status %s\n",
47+
ice_stat_str(status));
4648

4749
return 0;
4850
}

0 commit comments

Comments
 (0)