Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp6584261pxb; Wed, 17 Feb 2021 08:09:28 -0800 (PST) X-Google-Smtp-Source: ABdhPJz4TwmZ7dfwaw4MBgW2eOkIhJtrnBdKewTERedN6CpN6JmwfkvtTy7xIbajZVOY41Ahy6Ln X-Received: by 2002:aa7:c80d:: with SMTP id a13mr16755169edt.327.1613578168682; Wed, 17 Feb 2021 08:09:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613578168; cv=none; d=google.com; s=arc-20160816; b=VJudAP2ytqZaF3bJV6tgKtgGNfCrP1t9BLhyOaFq0Vba9rfnZVKUFGK5HEtrU+nfXz Hxg0V/5d4djdJIQH6q0+OAl1sDMCtt1RjlG5EHyveB3mXQW3YU50p4MQlClZkwirFUHk QwLtM0D1EST4iejg4DPfJ71M2Kug5IFpwkkxv1gekjIawiFJMclktj7OGjHwoPLU5mEK HnWxaap0N1M31uJcG+YTjsldnBUmTV0O2FmdYu6+wHdoMO6m0KL2KUelXlAdROsdMprh fwKOuWuiOUnPjH1hZru068+YoTqG0yq2+0ZoaN24ReQRdQMbdacZsx2FVtH13yGs6t1J /sVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=AftdaebIpCDcjcG7rOA2wIM0Y3Td1DLEqD5IAEbRfXA=; b=E2pRDT//J7LMdgjwc3YdZ0noa95DZqTcpPBR6Im8cIC7pscW4dtUSpp7YTbZl5uNYT BbKKyi8GWbR/NxPGkd/9nMXT1maYJXcoMX9tTgPRPriw/SojHnbsfyTNnHm3Lsq0wBBA ORXNEEm5jHHEsyAv2hDkd7Pit/Gx/tlFyO/Y4CLhX8/LrXxAcO8T71lbJA1x6+20HRHf 8IMOnnoDicl2lGw87ZYYHAOZMO0uQeXmGY8Br9dVohzqtZ31UT7m04bm3S/AY5z1g6uD D4uc1gDNRG3Y6powNXYAqJFl/vAaa5dslXZ0u/dk1ZL9cg/HvxKsGZaeCgbWLqJ3bsVF Z+mw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gxiLTE5Y; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y21si1613064ejp.340.2021.02.17.08.09.03; Wed, 17 Feb 2021 08:09:28 -0800 (PST) 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=@linaro.org header.s=google header.b=gxiLTE5Y; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233992AbhBQQHp (ORCPT + 99 others); Wed, 17 Feb 2021 11:07:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41182 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233991AbhBQQHo (ORCPT ); Wed, 17 Feb 2021 11:07:44 -0500 Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [IPv6:2a00:1450:4864:20::62d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ABE95C061756 for ; Wed, 17 Feb 2021 08:07:03 -0800 (PST) Received: by mail-ej1-x62d.google.com with SMTP id i23so16870398ejg.10 for ; Wed, 17 Feb 2021 08:07:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=AftdaebIpCDcjcG7rOA2wIM0Y3Td1DLEqD5IAEbRfXA=; b=gxiLTE5YG3jxuCRIaDNoSwKLCBkeEhm1sTjPlCDekWh5yazl3P3UuueZXS97uf2yzb /hBKb3Cl6EhdNBvGhf0WcTy7HLPophHbdGjJvPYDqTDkJhmrGr263S/ihS7BzrlLyY7g EJ2Cw2vfFyeZrgaYQTFHKddw/IaIymBH/7xcUt+2BiJsMxtttV8j2vY49ewN3+bWrlri /P5VBRrDhfpzggqRFmiylwZn9MSEsHsVtFZtu9ZdbIQe9CbnnrpcVLoykxjBA4wDSZK8 7DLLfbbx5ijyjGExDtL7L4WUjhO1uuaP/jW0hMOzL83Q+RNySuAqPL0BJho1MmV6K3mS 4guQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=AftdaebIpCDcjcG7rOA2wIM0Y3Td1DLEqD5IAEbRfXA=; b=NUoGXfM5h3CXfppnVCQgCJ6Nz/tqdjhdLDbfHLeM8qoX7hkLmVfaCIo9I9v0/yiEG1 tGakI9act75wv25qrBJNPkEUOTPP+JfR704L6uW3Lovyw57PbjTh+t+pRfMquo9epJrd j9BeVpomw558nLBp99wYPWlXPi4Zq3oIeBtw/dCcz0BU20nl9SB2QvE0TsLJTM+Q3TIK vbUK/NRWa3OFvzlvy9jiIw5xbKyGHt09DSM6l6u8cR3z1xp3Coqwot1o1MuQwxJURxFR n4xhHpeagyNMp8G8bWNUEcxIhI0cFbF8PY5uLnmusPS7PyO6MRQlveCYQkxeSovjfYbM 5jWg== X-Gm-Message-State: AOAM530UCHwikjFstUapUtBZwjD/Tu2wf5L9lqV1ypMd1UhY57lhyJ5C obKK6/6khEeN53vYm0CIjTObBsAea6CmHocz3M2tAw== X-Received: by 2002:a17:907:9702:: with SMTP id jg2mr26681055ejc.48.1613578022322; Wed, 17 Feb 2021 08:07:02 -0800 (PST) MIME-Version: 1.0 References: <1613501314-2392-1-git-send-email-jhugo@codeaurora.org> In-Reply-To: From: Loic Poulain Date: Wed, 17 Feb 2021 17:14:34 +0100 Message-ID: Subject: Re: [PATCH] mhi_bus: core: Return EBUSY if MHI ring is full To: Jeffrey Hugo Cc: Manivannan Sadhasivam , Hemant Kumar , Bhaumik Bhatt , linux-arm-msm , open list , Fan Wu Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 17 Feb 2021 at 16:06, Jeffrey Hugo wrote: > > On 2/17/2021 8:02 AM, Loic Poulain wrote: > > On Tue, 16 Feb 2021 at 19:50, Jeffrey Hugo wrote: > >> > >> From: Fan Wu > >> > >> Currently ENOMEM is returned when MHI ring is full. This error code is > >> very misleading. Change to EBUSY instead. > > > > Well, there is no space left in the ring, so it's no so misleading. > > ENOMEM is typically a memory allocation failure which is not what a > client is going to think of regarding the ring, and it's not a unique > failure code in this case. gen_tre can also return ENOMEM, which makes > it difficult for the client to know if there is some significant > failure, or they might just need to wait (assuming that is something the > client can do). Yes, fair enough, I overlooked the other thread, -EAGAIN would indeed make sense. Regards, Loic