summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorShannon Nelson <shannon.nelson@amd.com>2023-04-19 10:04:19 -0700
committerDavid S. Miller <davem@davemloft.net>2023-04-21 08:29:12 +0100
commit01ba61b55b2041a39c54aefb3153c770dd59a0ef (patch)
treedfcb86e3eb90de8f2b5603a7a464dd180ddc850c /include
parent45d76f492938cdc27ddadc16e1e75103f4cfbf56 (diff)
pds_core: Add adminq processing and commands
Add the service routines for submitting and processing the adminq messages and for handling notifyq events. Signed-off-by: Shannon Nelson <shannon.nelson@amd.com> Acked-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/linux/pds/pds_adminq.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/include/linux/pds/pds_adminq.h b/include/linux/pds/pds_adminq.h
index dd5fbe3ee141..98a60ce87b92 100644
--- a/include/linux/pds/pds_adminq.h
+++ b/include/linux/pds/pds_adminq.h
@@ -4,6 +4,8 @@
#ifndef _PDS_CORE_ADMINQ_H_
#define _PDS_CORE_ADMINQ_H_
+#define PDSC_ADMINQ_MAX_POLL_INTERVAL 256
+
enum pds_core_adminq_flags {
PDS_AQ_FLAG_FASTPOLL = BIT(1), /* completion poll at 1ms */
};
@@ -631,8 +633,15 @@ static_assert(sizeof(union pds_core_notifyq_comp) == 64);
* where the meaning alternates between '1' and '0' for alternating
* passes through the completion descriptor ring.
*/
-static inline u8 pdsc_color_match(u8 color, u8 done_color)
+static inline bool pdsc_color_match(u8 color, bool done_color)
{
return (!!(color & PDS_COMP_COLOR_MASK)) == done_color;
}
+
+struct pdsc;
+int pdsc_adminq_post(struct pdsc *pdsc,
+ union pds_core_adminq_cmd *cmd,
+ union pds_core_adminq_comp *comp,
+ bool fast_poll);
+
#endif /* _PDS_CORE_ADMINQ_H_ */