lkml.org 
[lkml]   [2023]   [Jun]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [net-next PATCH] octeon_ep: Add control plane host and firmware versions.
>  int octep_ctrl_net_init(struct octep_device *oct)
> {
> struct octep_ctrl_mbox *ctrl_mbox;
> @@ -84,12 +101,22 @@ int octep_ctrl_net_init(struct octep_device *oct)
>
> /* Initialize control mbox */
> ctrl_mbox = &oct->ctrl_mbox;
> + ctrl_mbox->version = OCTEP_CP_VERSION_CURRENT;
> ctrl_mbox->barmem = CFG_GET_CTRL_MBOX_MEM_ADDR(oct->conf);
> ret = octep_ctrl_mbox_init(ctrl_mbox);
> if (ret) {
> dev_err(&pdev->dev, "Failed to initialize control mbox\n");
> return ret;
> }
> + dev_info(&pdev->dev, "Control plane versions host: %llx, firmware: %x:%x\n",
> + ctrl_mbox->version, ctrl_mbox->min_fw_version,
> + ctrl_mbox->max_fw_version);

Please consider exporting this information via devlink.

> + ret = validate_fw_version(ctrl_mbox);
> + if (ret < 0) {
> + dev_err(&pdev->dev, "Control plane version mismatch\n");
> + octep_ctrl_mbox_uninit(ctrl_mbox);
> + return -EINVAL;
> + }

If i'm reading this correct, a mismatch is fatal, the driver probe
will error out. That sort of thing is generally not liked. The driver
worked so far with mismatched firmware. It should keep working, but
not offer the features which require matching firmware.

Andrew

\
 
 \ /
  Last update: 2023-06-29 15:42    [W:0.046 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site