/* Callback for asynchronous admin commands. * Invoked on reception of command response.
*/ typedefvoid (*fun_admin_callback_t)(struct fun_dev *fdev, void *rsp, void *cb_data);
/* Callback for events/notifications received by an admin queue. */ typedefvoid (*fun_admin_event_cb)(struct fun_dev *fdev, void *cqe);
/* Callback for pending work handled by the service task. */ typedefvoid (*fun_serv_cb)(struct fun_dev *fd);
/* service task flags */ enum {
FUN_SERV_DISABLED, /* service task is disabled */
FUN_SERV_FIRST_AVAIL
};
/* Driver state associated with a PCI function. */ struct fun_dev { struct device *dev;
void __iomem *bar; /* start of BAR0 mapping */
u32 __iomem *dbs; /* start of doorbells in BAR0 mapping */
/* admin queue */ struct fun_queue *admin_q; struct sbitmap_queue admin_sbq; struct fun_cmd_ctx *cmd_ctx;
fun_admin_event_cb adminq_cb; bool suppress_cmds; /* if set don't write commands to SQ */
/* address increment between consecutive doorbells, in 4B units */ unsignedint db_stride;
/* SW versions of device registers */
u32 cc_reg; /* CC register */
u64 cap_reg; /* CAPability register */
unsignedint q_depth; /* max queue depth supported by device */ unsignedint max_qid; /* = #queues - 1, separately for SQs and CQs */ unsignedint kern_end_qid; /* last qid in the kernel range + 1 */
/* Return the BAR address of a doorbell. */ staticinline u32 __iomem *fun_db_addr(conststruct fun_dev *fdev, unsignedint db_index)
{ return &fdev->dbs[db_index * fdev->db_stride];
}
/* Return the BAR address of an SQ doorbell. SQ and CQ DBs alternate, * SQs have even DB indices.
*/ staticinline u32 __iomem *fun_sq_db_addr(conststruct fun_dev *fdev, unsignedint sqid)
{ return fun_db_addr(fdev, sqid * 2);
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.