All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Martin Hundebøll" <mhu@silicom.dk>
To: Russ Weight <russell.h.weight@intel.com>,
	mdf@kernel.org, linux-fpga@vger.kernel.org,
	linux-kernel@vger.kernel.org
Cc: trix@redhat.com, lgoncalv@redhat.com, yilun.xu@intel.com,
	hao.wu@intel.com, matthew.gerlach@intel.com
Subject: Re: [PATCH v6 2/7] fpga: sec-mgr: enable secure updates
Date: Thu, 19 Nov 2020 10:28:33 +0100	[thread overview]
Message-ID: <900b19f2-3fdb-1df1-f811-a56ea9c68de8@silicom.dk> (raw)
In-Reply-To: <20201106010905.11935-3-russell.h.weight@intel.com>

Hi Russ,

Just stumbled upon the below when preparing to upstream some Silicom changes

On 06/11/2020 02.09, Russ Weight wrote:

<snip>

> diff --git a/include/linux/fpga/fpga-sec-mgr.h b/include/linux/fpga/fpga-sec-mgr.h
> index f85665b79b9d..e03de72134d6 100644
> --- a/include/linux/fpga/fpga-sec-mgr.h
> +++ b/include/linux/fpga/fpga-sec-mgr.h
> @@ -7,16 +7,57 @@
>   #ifndef _LINUX_FPGA_SEC_MGR_H
>   #define _LINUX_FPGA_SEC_MGR_H
>   
> +#include <linux/completion.h>
>   #include <linux/device.h>
>   #include <linux/mutex.h>
>   #include <linux/types.h>
>   
>   struct fpga_sec_mgr;
>   
> +enum fpga_sec_err {
> +	FPGA_SEC_ERR_NONE,
> +	FPGA_SEC_ERR_HW_ERROR,
> +	FPGA_SEC_ERR_TIMEOUT,
> +	FPGA_SEC_ERR_CANCELED,
> +	FPGA_SEC_ERR_BUSY,
> +	FPGA_SEC_ERR_INVALID_SIZE,
> +	FPGA_SEC_ERR_RW_ERROR,
> +	FPGA_SEC_ERR_WEAROUT,
> +	FPGA_SEC_ERR_FILE_READ,
> +	FPGA_SEC_ERR_MAX
> +};

<snip>

> +
> +/* Update progress codes */
> +enum fpga_sec_prog {
> +	FPGA_SEC_PROG_IDLE,
> +	FPGA_SEC_PROG_READING,
> +	FPGA_SEC_PROG_PREPARING,
> +	FPGA_SEC_PROG_WRITING,
> +	FPGA_SEC_PROG_PROGRAMMING,
> +	FPGA_SEC_PROG_MAX
>   };

Shouldn't this enum and the fpga_sec_err above be indexed starting from 
0, to make comparison with FPGA_SEC_ERR_MAX and

FPGA_SEC_PROG_MAX correct?

// Martin

  reply	other threads:[~2020-11-19  9:29 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-06  1:08 [PATCH v6 0/7] FPGA Security Manager Class Driver Russ Weight
2020-11-06  1:08 ` [PATCH v6 1/7] fpga: sec-mgr: fpga security manager class driver Russ Weight
2020-11-15 23:03   ` Moritz Fischer
2020-11-20  2:39     ` Russ Weight
2020-11-20  6:26       ` Moritz Fischer
2020-11-06  1:09 ` [PATCH v6 2/7] fpga: sec-mgr: enable secure updates Russ Weight
2020-11-19  9:28   ` Martin Hundebøll [this message]
2020-11-26 14:02   ` Martin Hundebøll
2020-11-30 23:54     ` Russ Weight
2020-12-01  8:47       ` Martin Hundebøll
2020-12-01 23:30         ` Russ Weight
2020-12-02 13:40           ` Martin Hundebøll
2020-11-06  1:09 ` [PATCH v6 3/7] fpga: sec-mgr: expose sec-mgr update status Russ Weight
2020-11-06  1:09 ` [PATCH v6 4/7] fpga: sec-mgr: expose sec-mgr update errors Russ Weight
2020-11-06  1:09 ` [PATCH v6 5/7] fpga: sec-mgr: expose sec-mgr update size Russ Weight
2020-11-06  1:09 ` [PATCH v6 6/7] fpga: sec-mgr: enable cancel of secure update Russ Weight
2020-11-06  1:09 ` [PATCH v6 7/7] fpga: sec-mgr: expose hardware error info Russ Weight

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=900b19f2-3fdb-1df1-f811-a56ea9c68de8@silicom.dk \
    --to=mhu@silicom.dk \
    --cc=hao.wu@intel.com \
    --cc=lgoncalv@redhat.com \
    --cc=linux-fpga@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matthew.gerlach@intel.com \
    --cc=mdf@kernel.org \
    --cc=russell.h.weight@intel.com \
    --cc=trix@redhat.com \
    --cc=yilun.xu@intel.com \
    /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.