[intelxl] Use one admin queue buffer per admin queue descriptor

We currently use a single data buffer shared between all admin queue
descriptors.  This works for the physical function driver since we
have at most one command in progress and only a single event (which
does not use a data buffer).

The communication path between the physical and virtual function
drivers uses the event data buffer, and there is no way to prevent a
solicited event (i.e. a response to a request) from being overwritten
by an unsolicited event (e.g. a link status change).

Provide individual data buffers for each admin event queue descriptor
(and for each admin command queue descriptor, for the sake of
consistency).

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2019-04-24 12:18:12 +01:00
parent c5ccfe79cf
commit 8f3e648b6c
2 changed files with 197 additions and 118 deletions

View File

@@ -319,6 +319,8 @@ union intelxl_admin_buffer {
struct intelxl_admin_switch_buffer sw;
/** Get VSI Parameters data buffer */
struct intelxl_admin_vsi_buffer vsi;
/** Alignment padding */
uint8_t pad[INTELXL_ALIGN];
} __attribute__ (( packed ));
/** Admin queue descriptor */
@@ -358,6 +360,8 @@ struct intelxl_admin_descriptor {
struct intelxl_admin {
/** Descriptors */
struct intelxl_admin_descriptor *desc;
/** Data buffers */
union intelxl_admin_buffer *buf;
/** Queue index */
unsigned int index;
@@ -365,8 +369,6 @@ struct intelxl_admin {
unsigned int base;
/** Register offsets */
const struct intelxl_admin_offsets *regs;
/** Data buffer */
union intelxl_admin_buffer *buffer;
};
/**