From patchwork Sun Sep 18 13:04:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jit Loon Lim X-Patchwork-Id: 1679011 X-Patchwork-Delegate: marek.vasut@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=cQ5Ceh5f; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4MVp1P6wh6z1ypH for ; Sun, 18 Sep 2022 23:04:39 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7830484808; Sun, 18 Sep 2022 15:04:29 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="cQ5Ceh5f"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 8A71983FB5; Sun, 18 Sep 2022 15:04:28 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=0.9 required=5.0 tests=AC_FROM_MANY_DOTS,BAYES_00, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, SPF_HELO_NONE,SPF_NONE autolearn=no autolearn_force=no version=3.4.2 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id E883D84808 for ; Sun, 18 Sep 2022 15:04:25 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=jitloonl@ecsmtp.png.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1663506266; x=1695042266; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=E6rADqqvkA467WVar1sVmm75DCNcAMNAi2gh6+UtUoQ=; b=cQ5Ceh5fnSChJrXqv8eFXiFuocokberygh1ObKjbHovd7ZlHPnU/83ez V+W2AnWwbjCr/UBhq1E/fLNK5GVLu0pdAFHBHirnxUVTo8WeubUJAz4GX GSHvGz2AavJfoOr4AHTEheV/tttbcd29RHz9J5WHekxCjI242OP9EgB5x 1Auc/4cSLdvskXMjek3tHXn14wGM96/Ibl9wwi6VKNm0XM16tSJkqr/CB 6i0r7swhcHxzE7YPZ2SLTHvXP4lmZKCaRW52x/mb7ogADrm5YXa8hzhL0 YyAuR3pIf0wVniJWD5udoEkJFJmzfix1Zx/JJV3LzqjEvQ1EDueNcLM+3 w==; X-IronPort-AV: E=McAfee;i="6500,9779,10474"; a="300605215" X-IronPort-AV: E=Sophos;i="5.93,325,1654585200"; d="scan'208";a="300605215" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Sep 2022 06:04:23 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,325,1654585200"; d="scan'208";a="793579434" Received: from pglmail07.png.intel.com ([10.221.193.207]) by orsmga005.jf.intel.com with ESMTP; 18 Sep 2022 06:04:19 -0700 Received: from localhost (pgli0028.png.intel.com [10.221.84.177]) by pglmail07.png.intel.com (Postfix) with ESMTP id 719DE32E9; Sun, 18 Sep 2022 21:04:18 +0800 (+08) Received: by localhost (Postfix, from userid 12048045) id 6D819E00414; Sun, 18 Sep 2022 21:04:18 +0800 (+08) From: Jit Loon Lim To: u-boot@lists.denx.de Cc: Jagan Teki , Vignesh R , Marek , Simon , Tien Fong , Kok Kiang , Siew Chin , Sin Hui , Raaj , Dinesh , Boon Khai , Alif , Teik Heng , Hazim , Jit Loon Lim , Sieu Mun Tang , Ley Foon Tan Subject: [PATCH] drivers: fpga: intel_sdm_mb: Add checking for INTEL_SIP_SMC_STATUS_BUSY Date: Sun, 18 Sep 2022 21:04:14 +0800 Message-Id: <20220918130414.27690-1-jit.loon.lim@intel.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean From: Ley Foon Tan Add checking for INTEL_SIP_SMC_STATUS_BUSY (1). Status busy means transfer is accepted but SDM does not have more freed buffer. It is not an error. Continue process the data if receive OK and BUSY status. Signed-off-by: Ley Foon Tan Signed-off-by: Jit Loon Lim --- drivers/fpga/intel_sdm_mb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/fpga/intel_sdm_mb.c b/drivers/fpga/intel_sdm_mb.c index f5fd9a14c2..807be2f871 100644 --- a/drivers/fpga/intel_sdm_mb.c +++ b/drivers/fpga/intel_sdm_mb.c @@ -70,7 +70,8 @@ static int send_bitstream(const void *rbf_data, size_t rbf_size) debug("wr_ret = %d, rbf_data = %p, buf_size = %08lx\n", wr_ret, rbf_data, buf_size); - if (wr_ret) + if (wr_ret != INTEL_SIP_SMC_STATUS_OK && + wr_ret != INTEL_SIP_SMC_STATUS_BUSY) continue; rbf_size -= buf_size;