Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp3678014iog; Mon, 27 Jun 2022 23:47:15 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tKl99K1TbAC89xy7CDEVmx7W3ayWgEhZB2HHV4wosSyNgC4oo7chhK0rs8+bmxf2j4uoZ2 X-Received: by 2002:a05:6a00:1496:b0:525:24b0:8243 with SMTP id v22-20020a056a00149600b0052524b08243mr1978708pfu.84.1656398835530; Mon, 27 Jun 2022 23:47:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656398835; cv=none; d=google.com; s=arc-20160816; b=ogGgMHEZfCa7pR6FxRskWCxqqGnUpHNXXgW/dDstMeCrJdtPS6GTSjYApPE9U3dVCH XF8ohd9tK56AHSMgNMEz8TTuRqp2LmcyNBPOTtoNlieM2EXA9pfXc6AIwppz795AJcw4 bFgftMUxiCeOgAI+OBZwG415PNxk09vZRa+55/66SLG/qLaf58SAwVrxe4ncX8npdZBJ 1q73t4Pncob+eTPcRi2cwZmMBEx6Zp/deJUfJHAxZLZ8fwU9yunGMkD68yMHiIhqAa7a 7B6sHzHtFMHlrsY54JTLfThXZy+7OJ63GncZJBhXR0uXjTfJF/lqXhne9tKoxegzVLSt s7ww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:user-agent:references:in-reply-to :subject:cc:to:from:date:content-transfer-encoding:mime-version :dkim-signature; bh=hUd8P/SkVlofXTKn9syJL1n/rWoIOtj/5SMImykU6LQ=; b=Pa534trDw/fTcQ2oMW8RT53tLVcMjZHVVYB+A5qaNE+SzDYPLcFBPcEhxpYmJWN5yJ Hx74M1lgPHk9nSGytr94szDmWjS7ZR0e6HwD3yRgiXuM6vJV/z4UoNzdMEZkRat3zIa9 ICLiWWzruOKF9FMsO28Y7dHy29sL2oNYCaTt3TsNbyFQUl1qDJRS34Am35VktRCUDKc5 5OSUBOYDuWGCK/6usvSkzsbKvtsV0B4aHUasdoBOF8B+jajW5dODiiVR/lZ9+1qilgzO XynC5OmtsMc6LIrq92sugHb+LTb7fLBIv2d/0wmU9sp9C5mkJ0VeiOB29QGSPbI+vnx4 CTeA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2016061301 header.b=b2FEBhqf; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c15-20020a170902d48f00b0016406e6ff4asi19885940plg.102.2022.06.27.23.47.03; Mon, 27 Jun 2022 23:47:15 -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=@walle.cc header.s=mail2016061301 header.b=b2FEBhqf; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343719AbiF1Gmy (ORCPT + 99 others); Tue, 28 Jun 2022 02:42:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50868 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343578AbiF1Gmc (ORCPT ); Tue, 28 Jun 2022 02:42:32 -0400 Received: from ssl.serverraum.org (ssl.serverraum.org [176.9.125.105]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5A8A22657B; Mon, 27 Jun 2022 23:42:30 -0700 (PDT) Received: from ssl.serverraum.org (web.serverraum.org [172.16.0.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ssl.serverraum.org (Postfix) with ESMTPSA id 778E122247; Tue, 28 Jun 2022 08:42:27 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2016061301; t=1656398548; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=hUd8P/SkVlofXTKn9syJL1n/rWoIOtj/5SMImykU6LQ=; b=b2FEBhqfx7igAaLX4nfAElU9OpHoPtLryraU7I08s85hpQG5v10ddCtJur/x8Sa3YG/vVa XqGFiUgr9NDIZpjlvKn5C6WtmtEMwe6rFVD6N9VnqyvEt7BU5AstCsWs4+MxCZXap6fZGC 2BKcCcbYu3XZ+mcYLvybfM/fR+363PM= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Tue, 28 Jun 2022 08:42:26 +0200 From: Michael Walle To: Jakub Kicinski Cc: Krzysztof Kozlowski , =?UTF-8?Q?Cl?= =?UTF-8?Q?=C3=A9ment_Perrochaud?= , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] NFC: nxp-nci: Don't issue a zero length i2c_master_read() In-Reply-To: <20220627220320.29ca05ec@kernel.org> References: <20220626194243.4059870-1-michael@walle.cc> <20220626194243.4059870-2-michael@walle.cc> <20220627220320.29ca05ec@kernel.org> User-Agent: Roundcube Webmail/1.4.13 Message-ID: <6a429e1e42178d863ce54cf2497b86b3@walle.cc> X-Sender: michael@walle.cc X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,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 Am 2022-06-28 07:03, schrieb Jakub Kicinski: > On Sun, 26 Jun 2022 21:42:43 +0200 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. > > Whoa, are you using this code or just found the problem thru code > inspection? NFC is notorious for having no known users. Ha! Well, I *try* to use it with a PN7160. No luck so far, we'll see. At least the communication with the chip works now. I was also kinda tricked by the Supported status ;) -michael