Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp2342112iog; Sun, 26 Jun 2022 13:10:23 -0700 (PDT) X-Google-Smtp-Source: AGRyM1v+y/5Oa7zEfkZynWjrEtUZZqm57SvZ39hZJB2lckuEDuMXcUYc8sKH0oftM9yHDfg9STcd X-Received: by 2002:aa7:818d:0:b0:525:1f1d:185d with SMTP id g13-20020aa7818d000000b005251f1d185dmr10967193pfi.23.1656274222811; Sun, 26 Jun 2022 13:10:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656274222; cv=none; d=google.com; s=arc-20160816; b=H8JXF1WN5Cmi1GKP9RxOSsH9qpXEohvrCP4aGTQmNs0o6vruPNrMKOturgRyb/Cvbp PLzZOukYEpyXcYuJTkTp3//dHf8AIEWhDgdAD/wgDbM1NDne27FY2uuDg4JYtdKzK9Of 0RpHQ0JGMZqc1XsbaXSLRyrCOQi1GsZycSx+sScsE3n2vJWQ7xGqmMNyL0SdZLA8Nb0y A/3vaSIgWgba88jyVv0QF1Hag9zp3Et0euTXzjpvt/QlWLq0iBkVYYRzncNNUDAc5Lr2 TEX/Hpw2frE3fH9VLsAUgeDlpUSNnnmGbUB6zuX6/1LfkoDzzh9bz2YqxfSflQxyLqQp iCXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=K0lQdmcK0/9nFRSw74vjTtekH+ms1WPGE7ZqayvvKrw=; b=zPCckAV3l3SWLzHFtgiKrLjde3jQNzy0iQORQL4zYoIrYkfXcK8MwzxNnJNd5JqayH xMP02dabBLaL3tnqK8sUD8bk42lvgaVTOM+pRw84gmUNzpQ3VMm6sZ2iQq4Vili6zdO7 HbtsAfAPfXRx06438VhxkQbCUHjp1PHeaa8pfj7bEbFRKxhM0d/cLlCh+g/4Lh1OurZ6 +mwkadTL5mqp5Wv6k2hwcgsCGgM4xLsKEKDVKdVAC2e3ZF9Z6PehmgrCjX0AtvqEd/50 XRY9r6XakisX6goZkzvXBGQh3/bOIr6lKU6MuGn9KCdQlZ2kxRZ3a69+pbKEsS/JmKbQ KFdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gOAuwtj5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id kb1-20020a17090ae7c100b001ed37b0be62si10928397pjb.90.2022.06.26.13.10.09; Sun, 26 Jun 2022 13:10:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gOAuwtj5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S229986AbiFZTvN (ORCPT + 99 others); Sun, 26 Jun 2022 15:51:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49364 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229492AbiFZTvM (ORCPT ); Sun, 26 Jun 2022 15:51:12 -0400 Received: from mail-ed1-x52b.google.com (mail-ed1-x52b.google.com [IPv6:2a00:1450:4864:20::52b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 75FB12BD for ; Sun, 26 Jun 2022 12:51:11 -0700 (PDT) Received: by mail-ed1-x52b.google.com with SMTP id eo8so10406851edb.0 for ; Sun, 26 Jun 2022 12:51:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=K0lQdmcK0/9nFRSw74vjTtekH+ms1WPGE7ZqayvvKrw=; b=gOAuwtj5y3iNhfNmc4kq2lxsDNQizfMwaOcLup7QDRcXKe2yJTygk5AwLcFNEaL1LQ AXFi+2eV1wc5qW6hahCf43BG92NKkPFJgUJGKcEHz0+s1+lTOlDjWIgxDjaD7Rlsr5Jh /O0yr221KZRAxv9td3SsO2rn5Uk0i3rdIvkvHoLImH91zfJ/vOuC7c2loyAwvhZCxbRX vGQKgfTkIf0AQg3YSyS2Bnpfpi+IxEi3HPdqAUNHxBYBY/z1oXCEn8Z9YWINVUSLTUi8 JKb+bmO1V9yxP67adKC398pjjN2ZQXt6x+Gg6c04Nk+1HfO5I2NTD4E1i2gQ/0+mSXp2 aM8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=K0lQdmcK0/9nFRSw74vjTtekH+ms1WPGE7ZqayvvKrw=; b=RtKAgGkYDTiVrBGNb2pqIMQPuQBd1pZFj0/4cXDklYoBWo91DwV1FjkVQjURHIVJBD X//qWSHumDsL4/1AtKiAhMOAJBWKlN1zilW/dsnEfqhjJTeUvBJXtzRsYL/18i891WW4 xBz1MedECdiwyTcNKHL9RthN4KKm3KDkfYWacWPseqQE36k+SOaGsZ/yJAXjSIU07xyt sQWW7JlrEGRGOa5wU8LK70vueMXRzNDH/u5fxNt2sbpldgjz6K2Qe26ntqRfKMYELLNT 1JX88Kt4QHSv9xSKgB/R7ouESYLKn60BNcztFK/PxsQTLRcz4u2m8zh4dzyccOuJneh4 hU3g== X-Gm-Message-State: AJIora+U2/+9wX4SfnIZgE2gbkSYANd8su/XO/4UDumRamhTijMBbTJY zuFpwJpDZ/HvHFgtzUZLzk902g== X-Received: by 2002:a05:6402:2812:b0:437:6235:adbe with SMTP id h18-20020a056402281200b004376235adbemr12573023ede.416.1656273070059; Sun, 26 Jun 2022 12:51:10 -0700 (PDT) Received: from [192.168.0.244] (xdsl-188-155-176-92.adslplus.ch. [188.155.176.92]) by smtp.gmail.com with ESMTPSA id k10-20020a170906970a00b006fea59ef3a5sm4151835ejx.32.2022.06.26.12.51.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 26 Jun 2022 12:51:08 -0700 (PDT) Message-ID: <3c28bc43-4994-8e12-25f4-32b723e6e7ac@linaro.org> Date: Sun, 26 Jun 2022 21:51:08 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: [PATCH 2/2] NFC: nxp-nci: Don't issue a zero length i2c_master_read() Content-Language: en-US To: Michael Walle , Charles Gorand Cc: =?UTF-8?Q?Cl=c3=a9ment_Perrochaud?= , netdev@vger.kernel.org, linux-kernel@vger.kernel.org References: <20220626194243.4059870-1-michael@walle.cc> <20220626194243.4059870-2-michael@walle.cc> From: Krzysztof Kozlowski In-Reply-To: <20220626194243.4059870-2-michael@walle.cc> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 26/06/2022 21:42, Michael Walle wrote: > There are packets which doesn't have a payload. In that case, the second > i2c_master_read() will have a zero length. But because the NFC > controller doesn't have any data left, it will NACK the I2C read and > -ENXIO will be returned. In case there is no payload, just skip the > second i2c master read. > > Fixes: 6be88670fc59 ("NFC: nxp-nci_i2c: Add I2C support to NXP NCI driver") > Signed-off-by: Michael Walle Reviewed-by: Krzysztof Kozlowski Best regards, Krzysztof