mirror of
https://github.com/ipxe/ipxe
synced 2026-01-03 10:23:00 +03:00
[intelxl] Allow admin cookie to hold extended opcode and return code
The "send to PF" and "send to VF" admin queue descriptors (ab)use the cookie field to hold the extended opcode and return code values. Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -313,8 +313,11 @@ static int intelxl_admin_command ( struct intelxl_nic *intelxl ) {
|
||||
tail = ( admin->index % INTELXL_ADMIN_NUM_DESC );
|
||||
cmd = &admin->desc[ index % INTELXL_ADMIN_NUM_DESC ];
|
||||
buf = &admin->buf[ index % INTELXL_ADMIN_NUM_DESC ];
|
||||
DBGC2 ( intelxl, "INTELXL %p admin command %#x opcode %#04x:\n",
|
||||
DBGC2 ( intelxl, "INTELXL %p admin command %#x opcode %#04x",
|
||||
intelxl, index, le16_to_cpu ( cmd->opcode ) );
|
||||
if ( cmd->vopcode )
|
||||
DBGC2 ( intelxl, "/%#08x", le32_to_cpu ( cmd->vopcode ) );
|
||||
DBGC2 ( intelxl, ":\n" );
|
||||
|
||||
/* Sanity checks */
|
||||
assert ( ! ( cmd->flags & cpu_to_le16 ( INTELXL_ADMIN_FL_DD ) ) );
|
||||
@@ -329,8 +332,9 @@ static int intelxl_admin_command ( struct intelxl_nic *intelxl ) {
|
||||
cmd->params.buffer.low = cpu_to_le32 ( address & 0xffffffffUL );
|
||||
}
|
||||
|
||||
/* Populate cookie */
|
||||
cmd->cookie = cpu_to_le32 ( index );
|
||||
/* Populate cookie, if not being (ab)used for VF opcode */
|
||||
if ( ! cmd->vopcode )
|
||||
cmd->cookie = cpu_to_le32 ( index );
|
||||
|
||||
/* Record cookie */
|
||||
cookie = cmd->cookie;
|
||||
|
||||
Reference in New Issue
Block a user