From ee5924021e05918425cd34e873615e90e60568bc Mon Sep 17 00:00:00 2001
From: Michal Krawczyk <mk@semihalf.com>
Date: Wed, 8 Jul 2020 13:26:17 +0200
Subject: [PATCH 054/107] net/ena/base: support admin status for resource busy

The admin command could return ENA_ADMIN_RESOURCE_BUSY status, which
is meaning that currently the given resource cannot be used.

However, the request can be repeted, so it's being converted to the
ENA_COM_TRY_AGAIN error code.

Change-Id: Iede5d8da4d1e0b0dda389c6ba96c986122a5dbfe
Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Guy Tzalik <gtzalik@amazon.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/ena/base/ena_com.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ena/base/ena_com.c b/drivers/net/ena/base/ena_com.c
index d951ae5f60..a1d2646c1c 100644
--- a/drivers/net/ena/base/ena_com.c
+++ b/drivers/net/ena/base/ena_com.c
@@ -517,6 +517,8 @@ static int ena_com_comp_status_to_errno(u8 comp_status)
 	case ENA_ADMIN_ILLEGAL_PARAMETER:
 	case ENA_ADMIN_UNKNOWN_ERROR:
 		return ENA_COM_INVAL;
+	case ENA_ADMIN_RESOURCE_BUSY:
+		return ENA_COM_TRY_AGAIN;
 	}
 
 	return ENA_COM_INVAL;
-- 
2.25.1

