Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp5456198pxu; Thu, 22 Oct 2020 02:50:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxzYcnwX0g8DBV8hrdQ5TGqUcW3ctV5Yk2kfEpVddJ9rUG2Idhd/kkth0gHB6OEBgNDQjpI X-Received: by 2002:a17:906:cc87:: with SMTP id oq7mr1521248ejb.335.1603360236732; Thu, 22 Oct 2020 02:50:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603360236; cv=none; d=google.com; s=arc-20160816; b=Q/SompvwrTyIHruEJ72qGt/qFmsB/BfTIpGnSOAus0aaZk1ag/NCzf9nEsCXxlJ8KI bDujclTJztB4CQEnecLhYw/Pbl8EYlJuD/rfU4psbqRo8vTiQ3bkqSIczTs9g/59n9+B YIbNsObIEC36gbBAAjx6jgriQnk3Blgwktwghw55ovtZb+BWetC/DpV8kJDqF14wFCDl Zw5Dc39vjiz9TQac9PS7J4MAJwwRclEOXqdO0XkCpuTVArO8lLPyKShwAuC27IQ4U25c mPXk90+BoeWDfgESW7a5POyuIzM0kN5xysT89HPqDWZ7Yr/V0uXDzOefbN45dl8iWTlb MF1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=4h6hAq7l0V4rS9t709EExfcDsTlXaMuAC530Tl9I3lE=; b=0zu2IWpwtgboMoNpa3de53nKRiUDJGwByUIeBkk0gVsYiwq6ZtNKMlfn9sz+xYYYRz Xmu935jWw09YuD4lLAquKGhPuAdl65gsOBerFMnhSt0ekXTuTxMpnNV5hukV4ccTbPfx sMYsN4OREeJ2fB7ZTHJkFevnHgsMZpEFrYHv/5UKyZl3WRnPnZpSRKz6D8Q4nDfIkWxb DZZPWD1glSGqJFSrfreiM0euhHVV8Df9LF/6490wfoOjcfrzeke4hEAR1MwsbVRh8tAd kvK2ZP5JnTL0ulxJAjhQeEcxslH1m4ney7SdZWM0S668IcpkwIK9QEVyY0tb1aiulgRI rDdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=aHofETMC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i26si559403ejk.390.2020.10.22.02.50.14; Thu, 22 Oct 2020 02:50:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=aHofETMC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2896070AbgJVJoo (ORCPT + 99 others); Thu, 22 Oct 2020 05:44:44 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:38689 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S2895918AbgJVJoo (ORCPT ); Thu, 22 Oct 2020 05:44:44 -0400 X-UUID: 646a30c67f8045b6831346530bdd4d8d-20201022 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID:Date:Subject:CC:To:From; bh=4h6hAq7l0V4rS9t709EExfcDsTlXaMuAC530Tl9I3lE=; b=aHofETMCPK01JrxMeZoldwr40Y5X+PCDLPMw/laQrLcXcZ6OlVKBFs/gi/y7vZtRxhEuIY+8c8Vjhp5cxY/Jo4ncD9Jzxc4Rhmr3nx2hmD0xVAH5xF6gyy64QR1/i1s3G5iyJKL+3/iI5oEhUbxCXFcZs8BDVP8Og+rqmCzRabE=; X-UUID: 646a30c67f8045b6831346530bdd4d8d-20201022 Received: from mtkcas08.mediatek.inc [(172.21.101.126)] by mailgw01.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.14 Build 0819 with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1232868719; Thu, 22 Oct 2020 17:44:22 +0800 Received: from mtkcas10.mediatek.inc (172.21.101.39) by mtkmbs02n1.mediatek.inc (172.21.101.77) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 22 Oct 2020 17:44:21 +0800 Received: from localhost.localdomain (10.17.3.153) by mtkcas10.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 22 Oct 2020 17:44:20 +0800 From: Houlong Wei To: Matthias Brugger , Jassi Brar CC: Daniel Kurtz , , , , , Nicolas Boichat , CK HU , Bibby Hsieh , Daoyuan Huang , Dennis-YC Hsieh , Houlong Wei , , Subject: [PATCH] soc: mediatek: cmdq: fixup possible timeout issue Date: Thu, 22 Oct 2020 17:41:53 +0800 Message-ID: <20201022094152.17662-1-houlong.wei@mediatek.com> X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 Content-Type: text/plain X-MTK: N Content-Transfer-Encoding: base64 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Rml4ZXM6IDU3NmYxYjRiYzgwMiAoInNvYzogbWVkaWF0ZWs6IEFkZCBNZWRpYXRlayBDTURRIGhl bHBlciIpDQoNClRoZXJlIG1heSBiZSBwb3NzaWJsZSB0aW1lb3V0IGlzc3VlIHdoZW4gbG90cyBv ZiBjbWRxIHBhY2tldHMgYXJlDQpmbHVzaGVkIHRvIHRoZSBzYW1lIGNtZHEgY2xpZW50LiBUaGUg bmVjZXNzYXJ5IG1vZGlma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