Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5449511imu; Wed, 19 Dec 2018 11:21:03 -0800 (PST) X-Google-Smtp-Source: AFSGD/XCmmqTRjLxXcInWH2q4F5CoLfebXh1X9tdih8bKBBo2FLoeHJy+8dU/3cGxVFM7xXsEbx2 X-Received: by 2002:a63:7e5b:: with SMTP id o27mr20270553pgn.214.1545247263138; Wed, 19 Dec 2018 11:21:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545247263; cv=none; d=google.com; s=arc-20160816; b=yP7oNDZzhto5IXIWszBZd1qGHLbl+4qRVwhHzLIJ4a6ehUPg0uyoiGsbQ/C69UGQhD mIbQMoOxRcqedlzgyrESwcapXa5u066mHQjVjBaJ4T8B0k/SHwf7ZLaBgOiKMUAScqCg 6ZLWcSO9I9Cwy2QTYJqvy1T38nz+TPiaRD5nZI49lQDogcgnnc7hIpgVeaPRFjTZ+Kjk gtbBBldiqPYA02cIPLVZz3epMG3luVsIPJsjdu7rrRBhbia1EvzqYB5W1+CVkT0gaNqJ Eg+NkHuXIlex2Ob3ldfUdgPcDz03BMNkmtN+m1LFqHlA7RMTcNDkI6WXOuYQj3vqKeIr 7l8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=m9fl/aCX5m5Ur8ChHfXZr3/ukIHUp9kxU8GUbtmijdQ=; b=zoKc1m96x7V0ahcVe9tB4rdoJPpQvTv+gzgi8DrHxcRREEj6moHiOgi22GRV7gSTrB KCdiFzW0tei9GzxFVYe+uNa8e9PYxarC7Imijy0BTfeStG/UVi/Yuwrk1/XvbtPr+tuq 0mjsbbTZb79/eqjPzxEWwYpopgC2q1v9tdCJ4rm2cdGNGrN7KyXlTSHgNYG19qd0Zkeo NBV6jWyFhd9osb8nW1Xgcz8i3Ad9L+RmpaYGkN0s3t8F8S2AkkIGWILYsdNsoo8uRqg6 W4XfPPpySBsk5vxCpOfNrKzB4ed7gpfZ3ZI3/cFFpBFXIuXCzgjbETGGSjj2SdbsC+f9 FXoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Zwnf5qoY; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v34si16488055plg.205.2018.12.19.11.20.47; Wed, 19 Dec 2018 11:21:03 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Zwnf5qoY; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730092AbeLSSxR (ORCPT + 99 others); Wed, 19 Dec 2018 13:53:17 -0500 Received: from mail-qk1-f194.google.com ([209.85.222.194]:44385 "EHLO mail-qk1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728559AbeLSSxR (ORCPT ); Wed, 19 Dec 2018 13:53:17 -0500 Received: by mail-qk1-f194.google.com with SMTP id n12so12271546qkh.11 for ; Wed, 19 Dec 2018 10:53:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=m9fl/aCX5m5Ur8ChHfXZr3/ukIHUp9kxU8GUbtmijdQ=; b=Zwnf5qoY/CoCfBvk+//3ZjPnGaRT86QmcyoJuHqaGsmsEfBUp/kiyM6kyZIahur596 QduosiUpsqsQzwrfMyyjY+1IkLwjusVdchkSIOpVOyRnlJMkIsmJF1tVmlRovH541kRg lG6b23vMrq4fqsOLSHcYPglGEFdlfCJfSG2/0= 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=m9fl/aCX5m5Ur8ChHfXZr3/ukIHUp9kxU8GUbtmijdQ=; b=W5AW19cHB/HYv1HeG7x3hBK6b1ziyLmo5+45EQW/I6psC3hgT1bt8An8lpNhLurKTi ttfbrbMqkS1zSAkcd7UbGC/0VvSXkubzDq4Swu/x0uZWwLMTFy/p/eCNJmM+2nCUS8QN mee5HKTPX+xc5O+WNQaMKpoTnjE95MiazItFEpG4EC7dkZGRQLSoZWQ2vSb37ztuoH+U EQdso4jmkDb8FgrWDitkd3AgP1gXt1AW+CoopP/tPMYhtb78qnxpGyGsCdpf1jOSkEN5 UFfVBCTkEQh5q7T8trraehr1U5yltYrjKfrGYVi79oL6kMEHttH7x8atfxPwK6QrHFfi 3/Tg== X-Gm-Message-State: AA+aEWbaEg+7sAAtjCc4prx2EcOtdyKf2W7EpaG7Q+rpCBN1PMzc1Ukb Guo/gTon6X0fntstnnOR4VmpnlTW0TpFp1fyANi7bhqYiKQ= X-Received: by 2002:ae9:efd6:: with SMTP id d205mr20135298qkg.274.1545245596355; Wed, 19 Dec 2018 10:53:16 -0800 (PST) MIME-Version: 1.0 References: <20181219181747.118278-1-mka@chromium.org> In-Reply-To: From: Ryan Case Date: Wed, 19 Dec 2018 10:53:05 -0800 Message-ID: Subject: Re: [PATCH] tty: serial: qcom_geni_serial: Fix wrap around of TX buffer To: Evan Green Cc: mka@chromium.org, Greg Kroah-Hartman , Jiri Slaby , linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, msavaliy@codeaurora.org, Doug Anderson Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Dec 19, 2018 at 10:50 AM Evan Green wrote: > > On Wed, Dec 19, 2018 at 10:17 AM Matthias Kaehlcke wrote: > > > > Before commit a1fee899e5bed ("tty: serial: qcom_geni_serial: Fix > > softlock") the size of TX transfers was limited to the TX FIFO size, > > and wrap arounds of the UART circular buffer were split into two > > transfers. With the commit wrap around are allowed within a transfer. > > The TX FIFO of the geni serial port uses a word size of 4 bytes. In > > case of a circular buffer wrap within a transfer the driver currently > > may write an incomplete word to the FIFO, with some bytes containing > > data from the circular buffer and others being zero. Since the > > transfer isn't completed yet the zero bytes are sent as if they were > > actual data. > > > > Handle wrap arounds of the TX buffer properly and ensure that words > > written to the TX FIFO always contain valid data (unless the transfer > > is completed). > > > > Fixes: a1fee899e5bed ("tty: serial: qcom_geni_serial: Fix softlock") > > Signed-off-by: Matthias Kaehlcke > > Oh nice, so this did end up being your problem with corrupt > characters? Strange though, I still would have expected this bug to > result in inserted serial characters, rather than edited ones. > Either way, this looks good to me. > > Reviewed-by: Evan Green UART bluetooth firmware downloads consistently working for me again. Tested-by: Ryan Case