xref: /freebsd/sys/dev/qat/include/common/adf_transport.h (revision 8ddb146abcdf061be9f2c0db7e391697dafad85c)
1 /* SPDX-License-Identifier: BSD-3-Clause */
2 /* Copyright(c) 2007-2022 Intel Corporation */
3 /* $FreeBSD$ */
4 #ifndef ADF_TRANSPORT_H
5 #define ADF_TRANSPORT_H
6 
7 #include "adf_accel_devices.h"
8 
9 struct adf_etr_ring_data;
10 
11 typedef void (*adf_callback_fn)(void *resp_msg);
12 
13 int adf_create_ring(struct adf_accel_dev *accel_dev,
14 		    const char *section,
15 		    u32 bank_num,
16 		    u32 num_mgs,
17 		    u32 msg_size,
18 		    const char *ring_name,
19 		    adf_callback_fn callback,
20 		    int poll_mode,
21 		    struct adf_etr_ring_data **ring_ptr);
22 
23 int adf_send_message(struct adf_etr_ring_data *ring, u32 *msg);
24 void adf_remove_ring(struct adf_etr_ring_data *ring);
25 int adf_poll_bank(u32 accel_id, u32 bank_num, u32 quota);
26 int adf_poll_all_banks(u32 accel_id, u32 quota);
27 #endif /* ADF_TRANSPORT_H */
28