All drivers which implement the devlink flash update support, with the exception of netdevsim, use either request_firmware or request_firmware_direct to locate the firmware file. Rather than having each driver do this separately as part of its .flash_update implementation, perform the request_firmware within net/core/devlink.c Replace the file_name parameter in the struct devlink_flash_update_params with a pointer to the fw object. Use request_firmware rather than request_firmware_direct. Although most Linux distributions today do not have the fallback mechanism implemented, only about half the drivers used the _direct request, as compared to the generic request_firmware. In the event that a distribution does support the fallback mechanism, the devlink flash update ought to be able to use it to provide the firmware contents. For distributions which do not support the fallback userspace mechanism, there should be essentially no difference between request_firmware and request_firmware_direct. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Acked-by: Shannon Nelson <snelson@pensando.io> Acked-by: Vasundhara Volam <vasundhara-v.volam@broadcom.com> Reviewed-by: Jiri Pirko <jiri@nvidia.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
18 lines
521 B
C
18 lines
521 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/* Copyright(c) 2017 - 2019 Pensando Systems, Inc */
|
|
|
|
#ifndef _IONIC_DEVLINK_H_
|
|
#define _IONIC_DEVLINK_H_
|
|
|
|
#include <net/devlink.h>
|
|
|
|
int ionic_firmware_update(struct ionic_lif *lif, const struct firmware *fw,
|
|
struct netlink_ext_ack *extack);
|
|
|
|
struct ionic *ionic_devlink_alloc(struct device *dev);
|
|
void ionic_devlink_free(struct ionic *ionic);
|
|
int ionic_devlink_register(struct ionic *ionic);
|
|
void ionic_devlink_unregister(struct ionic *ionic);
|
|
|
|
#endif /* _IONIC_DEVLINK_H_ */
|