Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1416800pxb; Thu, 21 Oct 2021 23:59:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzp9e+H9h7FHQOCTvjPTWEuOft3dxVgFbLQ3qdPyT6Xq7CmxM5t+m5y/+eG9NMU2Hpmf3Qw X-Received: by 2002:a05:6a00:984:b0:44c:e996:fc2d with SMTP id u4-20020a056a00098400b0044ce996fc2dmr11095299pfg.31.1634885966720; Thu, 21 Oct 2021 23:59:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634885966; cv=none; d=google.com; s=arc-20160816; b=Y3Yl1xRpQYWHzRLb9sEefxvRJ3NkOqUYaj1LrILsX+gpqkZs5UtO0PJoG/N2w613jz 2MKkXSysVCcTbn6YgYavd5WYtEnv3n9hFN8rgq++7dpk3T1Tzr5t8zl1F4swdkU5ZM+6 jEjhGcL5Q/DUw2Td82TTeg5/gGOMmCOUuuMstwgPDR6VU9nt29Oec00mWH8IOOmoI0Rt BIqnXV3WdAJtdaMwv58s36yS+GHTAq0X2LxrO4eS0P1FkVXFklyceipd3ULk7mamGXUp DTumVCyjd/JubReRZWIstOgG0kcMlPewUIXelJeqfokqTdpfm+V+CCXJArPPpa95klh6 /+HQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=c7Ryh42xjoZrd458X0PuRKzO/jGZ4LiJFN49yEEUKqU=; b=nRNnWS+ZpRE82f6pD5BhOavSTPw4Zw0tSXh5qVeeUCrOV+pjWLufgCaqVGLGyR/MNZ 0pXj/Q4AMfiaUIX1SW+ZdOwzG4DEcgln6nGjHpLuzmmQf++dw0vZXrbuaqAKggjkAH0C IShWsExayrYW5bxxog3jGGKnEaiOQ4iK5hneGpHG39mFJVrAT+FqQk3iqtxZVHz/0v5A He4vcqa6QY+iraWSKYYYJp+jDhGNL/01yAwcjZ4LQm11K7AsZClo8g1oPnTqBIQW0qPG ITApDzOhIzEpN29FknVZMstV5zbBG/r8ts7SIIur2saxqHXcycl09RV6I8H0c1xzkdkf q9Bw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qBAzCypT; 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 y2si11950980pfi.335.2021.10.21.23.59.12; Thu, 21 Oct 2021 23:59:26 -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=@linaro.org header.s=google header.b=qBAzCypT; 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 S231984AbhJVHA2 (ORCPT + 99 others); Fri, 22 Oct 2021 03:00:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37296 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231778AbhJVHA1 (ORCPT ); Fri, 22 Oct 2021 03:00:27 -0400 Received: from mail-pj1-x1032.google.com (mail-pj1-x1032.google.com [IPv6:2607:f8b0:4864:20::1032]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D39CBC061766 for ; Thu, 21 Oct 2021 23:58:10 -0700 (PDT) Received: by mail-pj1-x1032.google.com with SMTP id s61-20020a17090a69c300b0019f663cfcd1so5007002pjj.1 for ; Thu, 21 Oct 2021 23:58:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=c7Ryh42xjoZrd458X0PuRKzO/jGZ4LiJFN49yEEUKqU=; b=qBAzCypTQajk5c9kRrbb3OjnMB83pysGa8f0+yBZdKL3RKQ9HraA7zOzdmRoSKAmve CnOAiNK9bzTLXT656DXcuMss006ywRhgEFfULF+cZJzghyce6Ot5MjPSSgouy1gG7Trp dcoATQqZj9/ZVmWRLErSAWHIAmmljTluNWtfllA4/Shl08bLf4y0M/w7KbzDSpRWn7OH zihPq9LHC0G05PZBso4aRpbkrDr6jf41VDoIb2YOrMiEdCf/4MFLh+2fuduJyU0BQVdb 745oMHnJMUCETHWzU5q90ajexcmQZ3PeLWiNUhAybl/o9HhV3scHsmdFOjPfRQ1ynbNk 0GOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=c7Ryh42xjoZrd458X0PuRKzO/jGZ4LiJFN49yEEUKqU=; b=twEsWeSGs78nvhqV9q8tifiWyismBegmBxSdEUj3XRn3hu2BTY0sHjnyNSipUWHyR5 wyh8FxlNQUpAzfdeob5tgZkMtwCE7vxNQCa8kOs2UpWjvA6a2dURZocXwCeIT/pTAB2z eJU6qgNBduf+4aCgRUnuGVrXDI6PqcV3KmnkEDnvzKt07xy0A59bvAE2t917vgFtimQk rH35yMFKqNZEOUsRq5XlOdZdyI0Z5sXoVpDliomJRmNjPzRRwUY9M93S7Qni+16x/8Gl ktXC7gu12s1mcwjs/C9itSiaheNU5f5CJ06Vv7PBlgvx9vRgroKsBsv2UUXqhna6clLd LRfQ== X-Gm-Message-State: AOAM531s1p7WGJHw2sW3ivJGLQ8Fxk8ck3GzPbUXgV3xL2uiLEUUdxg8 +aAhjkeHi8ZH3cIuK2CvRr5zTw== X-Received: by 2002:a17:90a:f0c9:: with SMTP id fa9mr12611364pjb.107.1634885890395; Thu, 21 Oct 2021 23:58:10 -0700 (PDT) Received: from localhost ([106.201.113.61]) by smtp.gmail.com with ESMTPSA id u23sm9841299pfg.162.2021.10.21.23.58.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Oct 2021 23:58:09 -0700 (PDT) Date: Fri, 22 Oct 2021 12:28:08 +0530 From: Viresh Kumar To: Jie Deng Cc: Wolfram Sang , "Michael S. Tsirkin" , Jason Wang , Vincent Guittot , Arnd Bergmann , stratos-dev@op-lists.linaro.org, Alex =?utf-8?Q?Benn=C3=A9e?= , cohuck@redhat.com, Vincent Whitchurch , linux-i2c@vger.kernel.org, virtualization@lists.linux-foundation.org, linux-kernel@vger.kernel.org, conghui.chen@intel.com Subject: Re: [PATCH] i2c: virtio: Add support for zero-length requests Message-ID: <20211022065808.2rvbr6nvollz5mz6@vireshk-i7> References: <7c58868cd26d2fc4bd82d0d8b0dfb55636380110.1634808714.git.viresh.kumar@linaro.org> <0adf1c36-a00b-f16f-e631-439148c4f956@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0adf1c36-a00b-f16f-e631-439148c4f956@intel.com> User-Agent: NeoMutt/20180716-391-311a52 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 22-10-21, 14:51, Jie Deng wrote: > > + if (!virtio_has_feature(vdev, VIRTIO_I2C_F_ZERO_LENGTH_REQUEST)) { > > + dev_err(&vdev->dev, "Zero-length request feature is mandatory\n"); > > + return -EINVAL; > > > It might be better to return -EOPNOTSUPP ? Maybe that or one of these: #define EBADE 52 /* Invalid exchange */ #define EPROTO 71 /* Protocol error */ #define EPFNOSUPPORT 96 /* Protocol family not supported */ #define ECONNREFUSED 111 /* Connection refused */ Arnd, any suggestions ? This is about the mandatory feature not being offered by the device. -- viresh