All of lore.kernel.org
 help / color / mirror / Atom feed
From: G, GurucharanX <gurucharanx.g@intel.com>
To: intel-wired-lan@osuosl.org
Subject: [Intel-wired-lan] [net-next 3/4] ice: refactor ice_flash_pldm_image and combine with ice_devlink_flash_update
Date: Mon, 27 Sep 2021 17:39:13 +0000	[thread overview]
Message-ID: <BYAPR11MB3367CDDE15181F344B459434FCA79@BYAPR11MB3367.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20210908234924.3416592-4-jacob.e.keller@intel.com>



> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of
> Jacob Keller
> Sent: Thursday, September 9, 2021 5:19 AM
> To: Intel Wired LAN <intel-wired-lan@lists.osuosl.org>
> Subject: [Intel-wired-lan] [net-next 3/4] ice: refactor ice_flash_pldm_image
> and combine with ice_devlink_flash_update
> 
> The ice_devlink_flash_update function performs a few upfront checks and
> then calls ice_flash_pldm_image.
> 
> Most of these checks actually make more sense within the context of
> ice_flash_pldm_image. Refactor this function to fit the argument format of
> the .flash_update devlink handler, and merge the checks from
> ice_devlink_flash_update.
> 
> Note that the check for overwrite mask was converted to a switch because it
> made the check easier to read by avoiding the massively long line or weird
> line breaks that were hard for my eyes to follow.
> 
> When moving the ice_cancel_pending_update function, notice that it also
> takes the NVM semaphore. The main flash update process also requires the
> NVM hardware semaphore. We can eliminate the call to get the semaphore
> from ice_cancel_pending_update by placing the check after we acquire the
> semaphore during ice_flash_pldm_image.
> 
> With this change, the ice_flash_pldm_image becomes the main entry point
> for the devlink flash update, eliminating some unnecessary boiler plate code.
> This also eases supporting a dry run with the PLDM library in a future change.
> 
> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
> ---
>  drivers/net/ethernet/intel/ice/ice_devlink.c  | 52 +-------------
>  .../net/ethernet/intel/ice/ice_fw_update.c    | 70 +++++++++++--------
>  .../net/ethernet/intel/ice/ice_fw_update.h    |  7 +-
>  3 files changed, 45 insertions(+), 84 deletions(-)
> 

Tested-by: Gurucharan G <gurucharanx.g@intel.com> (A Contingent worker at Intel)

  reply	other threads:[~2021-09-27 17:39 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-08 23:49 [Intel-wired-lan] [net-next 0/4] ice: miscellaneous firmware features Jacob Keller
2021-09-08 23:49 ` [Intel-wired-lan] [net-next 1/4] ice: devlink: add shadow-ram region to snapshot Shadow RAM Jacob Keller
2021-09-30 17:45   ` G, GurucharanX
2021-09-08 23:49 ` [Intel-wired-lan] [net-next 2/4] ice: move and rename ice_check_for_pending_update Jacob Keller
2021-09-27 17:40   ` G, GurucharanX
2021-09-08 23:49 ` [Intel-wired-lan] [net-next 3/4] ice: refactor ice_flash_pldm_image and combine with ice_devlink_flash_update Jacob Keller
2021-09-27 17:39   ` G, GurucharanX [this message]
2021-09-08 23:49 ` [Intel-wired-lan] [net-next 4/4] ice: support immediate firmware activation via devlink reload Jacob Keller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BYAPR11MB3367CDDE15181F344B459434FCA79@BYAPR11MB3367.namprd11.prod.outlook.com \
    --to=gurucharanx.g@intel.com \
    --cc=intel-wired-lan@osuosl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.