linux-fpga.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/2] fpga: add cancel() and get_error() to update ops
@ 2021-05-19 20:43 trix
  2021-05-19 20:50 ` Moritz Fischer
  0 siblings, 1 reply; 3+ messages in thread
From: trix @ 2021-05-19 20:43 UTC (permalink / raw)
  To: mdf; +Cc: linux-fpga, linux-kernel, Tom Rix

From: Tom Rix <trix@redhat.com>

A user may want to cancel an update or get
more information on when an update fails.
Add some device ops to do these.

Signed-off-by: Tom Rix <trix@redhat.com>
---
 include/linux/fpga/fpga-mgr.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/linux/fpga/fpga-mgr.h b/include/linux/fpga/fpga-mgr.h
index ab68280f3b4a4..31d6ebc34d87a 100644
--- a/include/linux/fpga/fpga-mgr.h
+++ b/include/linux/fpga/fpga-mgr.h
@@ -111,6 +111,8 @@ struct fpga_image_info {
  * @write: write count bytes of configuration data to the FPGA
  * @write_sg: write the scatter list of configuration data to the FPGA
  * @write_complete: set FPGA to operating state after writing is done
+ * @cancel: cancel the update
+ * @get_error: get extended error information
  */
 struct fpga_manager_update_ops {
 	int (*write_init)(struct fpga_manager *mgr,
@@ -120,6 +122,8 @@ struct fpga_manager_update_ops {
 	int (*write_sg)(struct fpga_manager *mgr, struct sg_table *sgt);
 	int (*write_complete)(struct fpga_manager *mgr,
 			      struct fpga_image_info *info);
+	int (*cancel)(struct fpga_manager *mgr);
+	int (*get_error)(struct fpga_manager *mgr, u64 *err);
 };
 
 /**
-- 
2.26.3


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 2/2] fpga: add cancel() and get_error() to update ops
  2021-05-19 20:43 [PATCH 2/2] fpga: add cancel() and get_error() to update ops trix
@ 2021-05-19 20:50 ` Moritz Fischer
  2021-05-20 13:39   ` Tom Rix
  0 siblings, 1 reply; 3+ messages in thread
From: Moritz Fischer @ 2021-05-19 20:50 UTC (permalink / raw)
  To: trix; +Cc: mdf, linux-fpga, linux-kernel

Tom,

On Wed, May 19, 2021 at 01:43:18PM -0700, trix@redhat.com wrote:
> From: Tom Rix <trix@redhat.com>
> 
> A user may want to cancel an update or get
> more information on when an update fails.
> Add some device ops to do these.
> 
> Signed-off-by: Tom Rix <trix@redhat.com>
> ---
>  include/linux/fpga/fpga-mgr.h | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/include/linux/fpga/fpga-mgr.h b/include/linux/fpga/fpga-mgr.h
> index ab68280f3b4a4..31d6ebc34d87a 100644
> --- a/include/linux/fpga/fpga-mgr.h
> +++ b/include/linux/fpga/fpga-mgr.h
> @@ -111,6 +111,8 @@ struct fpga_image_info {
>   * @write: write count bytes of configuration data to the FPGA
>   * @write_sg: write the scatter list of configuration data to the FPGA
>   * @write_complete: set FPGA to operating state after writing is done
> + * @cancel: cancel the update
> + * @get_error: get extended error information
>   */
>  struct fpga_manager_update_ops {
>  	int (*write_init)(struct fpga_manager *mgr,
> @@ -120,6 +122,8 @@ struct fpga_manager_update_ops {
>  	int (*write_sg)(struct fpga_manager *mgr, struct sg_table *sgt);
>  	int (*write_complete)(struct fpga_manager *mgr,
>  			      struct fpga_image_info *info);
> +	int (*cancel)(struct fpga_manager *mgr);
> +	int (*get_error)(struct fpga_manager *mgr, u64 *err);
>  };
>  
>  /**
> -- 
> 2.26.3
> 

There is no user for this, so if we add this, we add it with code
calling it.

Thanks

- Moritz

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 2/2] fpga: add cancel() and get_error() to update ops
  2021-05-19 20:50 ` Moritz Fischer
@ 2021-05-20 13:39   ` Tom Rix
  0 siblings, 0 replies; 3+ messages in thread
From: Tom Rix @ 2021-05-20 13:39 UTC (permalink / raw)
  To: Moritz Fischer, Russ Weight; +Cc: linux-fpga, linux-kernel


On 5/19/21 1:50 PM, Moritz Fischer wrote:
> Tom,
>
> On Wed, May 19, 2021 at 01:43:18PM -0700, trix@redhat.com wrote:
>> From: Tom Rix <trix@redhat.com>
>>
>> A user may want to cancel an update or get
>> more information on when an update fails.
>> Add some device ops to do these.
>>
>> Signed-off-by: Tom Rix <trix@redhat.com>
>> ---
>>   include/linux/fpga/fpga-mgr.h | 4 ++++
>>   1 file changed, 4 insertions(+)
>>
>> diff --git a/include/linux/fpga/fpga-mgr.h b/include/linux/fpga/fpga-mgr.h
>> index ab68280f3b4a4..31d6ebc34d87a 100644
>> --- a/include/linux/fpga/fpga-mgr.h
>> +++ b/include/linux/fpga/fpga-mgr.h
>> @@ -111,6 +111,8 @@ struct fpga_image_info {
>>    * @write: write count bytes of configuration data to the FPGA
>>    * @write_sg: write the scatter list of configuration data to the FPGA
>>    * @write_complete: set FPGA to operating state after writing is done
>> + * @cancel: cancel the update
>> + * @get_error: get extended error information
>>    */
>>   struct fpga_manager_update_ops {
>>   	int (*write_init)(struct fpga_manager *mgr,
>> @@ -120,6 +122,8 @@ struct fpga_manager_update_ops {
>>   	int (*write_sg)(struct fpga_manager *mgr, struct sg_table *sgt);
>>   	int (*write_complete)(struct fpga_manager *mgr,
>>   			      struct fpga_image_info *info);
>> +	int (*cancel)(struct fpga_manager *mgr);
>> +	int (*get_error)(struct fpga_manager *mgr, u64 *err);
>>   };
>>   
>>   /**
>> -- 
>> 2.26.3
>>
> There is no user for this, so if we add this, we add it with code
> calling it.

These additions come for unioning the fpga manager ops with the secure 
manager ops.

So will be needed if the secure manager goes this this way.

Tom

> Thanks
>
> - Moritz
>


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-05-20 13:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-19 20:43 [PATCH 2/2] fpga: add cancel() and get_error() to update ops trix
2021-05-19 20:50 ` Moritz Fischer
2021-05-20 13:39   ` Tom Rix

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).