Received: by 2002:a05:7412:b101:b0:e2:908c:2ebd with SMTP id az1csp2660776rdb; Wed, 15 Nov 2023 07:12:55 -0800 (PST) X-Google-Smtp-Source: AGHT+IHvkgBkOBxArvTNoQLToFZsqFbIBiTWlLdnw+PkILHrPbUXRAnctvtxAivAFTDx9ng1H91J X-Received: by 2002:a17:902:c948:b0:1cc:22db:cf3d with SMTP id i8-20020a170902c94800b001cc22dbcf3dmr7680957pla.15.1700061174922; Wed, 15 Nov 2023 07:12:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700061174; cv=none; d=google.com; s=arc-20160816; b=TXLxeiTXSQMGXtbBs1q6DON0S+MlEIgw/uhM33ucvYjPjMA14Xy7f0rOm5qn1Rf0ty JG6smcC1ans31tt/8cDzKOytq0sHb6Sf3SRrAcbs6TabwHIO21u6LbMLU2MtREjEvNgV E/k2Hy1P8tgi3xBfxZ07l8VTRhuXSO17Xw7f0JISKChUdNbgasJstIERgIhYPs1r78P0 7yiprXl5SmvSN4+1nolfF9HuiBaNHF0p6R0D8wyvLV4D792eUewx+ZrmJV4lCb92ZZe5 po5xbG2iGRivyg0gDVFDxVHNQnNnyRCPcZMIJU5fuN9r9fJA/o4VCZJnNtHZkj7IFRrc PmWw== 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; bh=3/UCbeKB4RTFWRCKi8caCvLtmR7D76nTP6RbFkcaFPk=; fh=MupKUReBzYfP6Gr3X3k9fditB7gkq4OYdK79bCAJJkw=; b=WfXt9/qmoO9ClJFPN97645b0GXwazVtG/JEuU7M6wSJQ0gaCQDIQh3dbaLrvBJUkCI 4wv5xDJ4xwHG8MbZFAGKxcwJCm8d74w3YqpYXSUxAUh/ev6HzMvtpT7475MEk0NWPbzl lfzYT4yQowrPAbvQd3Ewt8UinP8Kf1jLwRywo4K/J044ObhQN7D0ldEb5U6EPHso7P+W AdXP4GM5gIQaeR7uq9YKCsot/OOBTr/MuN3feIji2Ccqdff8LRy7YoQeL9ECwV6D9piE Ni/MI9cpZiWDAHreScdnL8IyNSlCQ5fy5HV8sXntrnkXZncYPQbIdygvdKBeJ6tQLFwt DuXA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id q7-20020a170902edc700b001bbbbb61c71si9918337plk.399.2023.11.15.07.12.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Nov 2023 07:12:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 9BD67802A376; Wed, 15 Nov 2023 07:12:51 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344386AbjKOPMg (ORCPT + 99 others); Wed, 15 Nov 2023 10:12:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36206 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343952AbjKOPMg (ORCPT ); Wed, 15 Nov 2023 10:12:36 -0500 Received: from mail.bugwerft.de (mail.bugwerft.de [46.23.86.59]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 4210818A; Wed, 15 Nov 2023 07:12:32 -0800 (PST) Received: from [192.168.178.97] (pd95ef485.dip0.t-ipconnect.de [217.94.244.133]) by mail.bugwerft.de (Postfix) with ESMTPSA id 1FB5228157A; Wed, 15 Nov 2023 15:12:31 +0000 (UTC) Message-ID: Date: Wed, 15 Nov 2023 16:12:30 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] serial: sc16is7xx: address RX timeout interrupt errata Content-Language: en-US To: Hugo Villeneuve Cc: Lech Perczak , gregkh@linuxfoundation.org, jirislaby@kernel.org, u.kleine-koenig@pengutronix.de, linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, Maxim Popov , stable@vger.kernel.org References: <20231114074904.239458-1-daniel@zonque.org> <20231114102025.d48c0a6ec6c413f274b7680b@hugovil.com> <140280a6-1948-4630-b10c-8e6a2afec2de@zonque.org> <3fac7d72-0a1b-4d93-9245-a0f8af1240a6@camlingroup.com> <20231115100121.5c926d4eb6d3abb02234887d@hugovil.com> From: Daniel Mack In-Reply-To: <20231115100121.5c926d4eb6d3abb02234887d@hugovil.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Wed, 15 Nov 2023 07:12:51 -0800 (PST) Hi Hugo, On 11/15/23 16:01, Hugo Villeneuve wrote: > On Wed, 15 Nov 2023 12:22:10 +0100 > Daniel Mack wrote: > Hi Daniel, > >> The bug has hit us on production units and when it does, sc16is7xx_irq() >> would spin forever because sc16is7xx_port_irq() keeps seeing an >> interrupt in the IIR register that is not cleared because the driver >> does not call into sc16is7xx_handle_rx() unless the RXLVL register >> reports at least one byte in the FIFO. > > I would suggest that you replace the second paragraph or your original > commit message with this, it better explains what is the problem. Good idea, will do. > Also, when the problem happens, you say that "the fill level reporting > is off-by-one", so doest it mean that RXLVL can sometimes be non-zero > when the bug occurs? Maybe, but if that happens we would read one byte too less, which doesn't harm as we would get another interrupt later to handle the rest. The problematic case is when we don't read any data at all even though there is something in the FIFO, and the interrupt suggested that as well. >> Note that this issue might only occur in revision E of the silicon. And > > Is this just a supposition or based on NXP info or some actual tests? Well, the datasheet states "Errata for Rev. E added 12 August 2011", and as "Revision E" does not seem to refer to a datasheet version, it will most likely be about the silicon revision. And another assumption is that the issue would fixed in subsequent versions of the chip, in case there are any at all. FTR, this is the document I'm looking at: https://www.nxp.com/docs/en/data-sheet/SC16IS752_SC16IS762.pdf >> there seems to be now way to read the revision code through I2C, so I >> guess you won't be able to figure out easily whether your chip is affected. >> >> Let me know if I can provide more information. > > I have a board with two SC16IS752IPW using SPI interface, but I don't > know (yet) what is the revision. I will try to determine it if possible, > although I do not see any info on that in the datasheet. > > I will also try to reproduce the issue, and test your patch. Great, thanks! Best regards, Daniel