[intelxl] Always issue "clear PXE mode" admin queue command
Remove knowledge of the GLLAN_RCTL_0 register (which changes location between the XL810 and E810 register maps), and instead unconditionally issue the "clear PXE mode" command with the EEXIST error silenced. Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -544,20 +544,12 @@ static int intelxl_admin_shutdown ( struct intelxl_nic *intelxl ) {
|
||||
static int intelxl_admin_clear_pxe ( struct intelxl_nic *intelxl ) {
|
||||
struct intelxl_admin_descriptor *cmd;
|
||||
struct intelxl_admin_clear_pxe_params *pxe;
|
||||
uint32_t gllan_rctl_0;
|
||||
int rc;
|
||||
|
||||
/* Do nothing if device is already out of PXE mode */
|
||||
gllan_rctl_0 = readl ( intelxl->regs + INTELXL_GLLAN_RCTL_0 );
|
||||
if ( ! ( gllan_rctl_0 & INTELXL_GLLAN_RCTL_0_PXE_MODE ) ) {
|
||||
DBGC2 ( intelxl, "INTELXL %p already in non-PXE mode\n",
|
||||
intelxl );
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Populate descriptor */
|
||||
cmd = intelxl_admin_command_descriptor ( intelxl );
|
||||
cmd->opcode = cpu_to_le16 ( INTELXL_ADMIN_CLEAR_PXE );
|
||||
cmd->ret = cpu_to_le16 ( INTELXL_ADMIN_EEXIST );
|
||||
pxe = &cmd->params.pxe;
|
||||
pxe->magic = INTELXL_ADMIN_CLEAR_PXE_MAGIC;
|
||||
|
||||
@@ -565,6 +557,13 @@ static int intelxl_admin_clear_pxe ( struct intelxl_nic *intelxl ) {
|
||||
if ( ( rc = intelxl_admin_command ( intelxl ) ) != 0 )
|
||||
return rc;
|
||||
|
||||
/* Check for expected errors */
|
||||
if ( cmd->ret == cpu_to_le16 ( INTELXL_ADMIN_EEXIST ) ) {
|
||||
DBGC ( intelxl, "INTELXL %p already in non-PXE mode\n",
|
||||
intelxl );
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user