Skip to content

Commit 7112d1c

Browse files
authored
Merge pull request #324 from Microsemi/iss323
lib: Fallback on EBADMSG error code
2 parents 6513448 + cbe7f8c commit 7112d1c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/switchtec.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1755,7 +1755,7 @@ int switchtec_get_device_info(struct switchtec_dev *dev,
17551755
*rev = (dev_info >> 8) & 0x0f;
17561756
if (gen)
17571757
*gen = map_to_gen((dev_info >> 12) & 0x0f);
1758-
} else if (ERRNO_MRPC(errno) == ERR_CMD_INVALID) {
1758+
} else if (errno == EBADMSG || ERRNO_MRPC(errno) == ERR_CMD_INVALID) {
17591759
if (phase)
17601760
*phase = SWITCHTEC_BOOT_PHASE_FW;
17611761
if (gen)

0 commit comments

Comments
 (0)