platform/mellanox: mlxbf-pmc: Ignore unsupported performance blocks
authorLuiz Capitulino <luizcap@redhat.com>
Thu, 22 Feb 2024 20:57:30 +0000 (15:57 -0500)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Tue, 27 Feb 2024 12:45:38 +0000 (14:45 +0200)
commitc0459eeb64e955b8fb9dd9f73b937f750387ef9a
treed6326ba04aead78ee0238f8579d73682fe6fa26e
parent0d46439bda37e2e13f14d6a9e211c4f645c6336a
platform/mellanox: mlxbf-pmc: Ignore unsupported performance blocks

Currently, the driver has two behaviors to deal with new & unsupported
performance blocks reported by the firmware:

 1. For register and unknown block types, the driver will fail to load
    with the following error message:

    [ 4510.956369] mlxbf-pmc: probe of MLNXBFD2:00 failed with error -22

 2. For counter and crspace blocks, the driver will load and sysfs files
    will be created but getting the contents of event_list or trying to
    setup the counter will fail

Instead, let's ignore and log unsupported blocks. This means the driver
will always load and unsupported blocks will never show up in sysfs.

Signed-off-by: Luiz Capitulino <luizcap@redhat.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/f8e2e6210b43e825b69824b420c801cd513d401d.1708635408.git.luizcap@redhat.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
drivers/platform/mellanox/mlxbf-pmc.c