Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp589714ybt; Wed, 1 Jul 2020 05:47:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxVapN+m9CDyGk9z570MINc6hE5d4Du7cgJ5DwVoYRMS5W/tDAuk4nM8WWihhDYhoYEn/nA X-Received: by 2002:a17:906:488b:: with SMTP id v11mr23770535ejq.173.1593607632043; Wed, 01 Jul 2020 05:47:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593607632; cv=none; d=google.com; s=arc-20160816; b=ov4zAwfSj+SwYl6QsfBWqZRGJNh5JmUc1rMc2y/FITq72tZw8qtvazLyLI+bxwWGvS pmEgoWBMtkfUUq2FZRD0hzK92j+86Y6uHflK0Zu4kq3J3SooECa8z/K58ULP/mYDsMAw t+a4l0udpkia3w4t4hHlBGdOwc08dPff50xscWxjUHr6GxUz+Q2sJjx/pGBLt3yIb1U3 SbyJbI/JqtvChg2xwU4YM5GoTcmGw7oyAt08Evf7sjJLDyEwjlWJrEJKFAifO+gnDNLw P/vERq1SVb7xGGrSFTJR/OK0AdYdWTesb/tAZUW8fj0HNtIH2DyykbgbRyHGBjHa9y91 IkMg== 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=zOvTyVPom8sy12IqSAPoAUTKHIeIoMVlwU22bcDjqVI=; b=0+JJA7TrrpCS1J+ONVgvFW4ybSpIh52A/JXuEH3bocAyttnRgo5HEZEhTUgyfCuawF jUUn6vHwr8ZzLmAeMhmOoGyXHYFtkqCrBHzuHxrU5KGWZplSuIYKOUbDxbjesnGoLfvf udZ/kguicGOF9QCckRHfUkuD2w9ngiqmJnXq4jaN/LTqUpkdxqjcCd9AMHLqHNXJtwbS aahwwq9C/ZXsmtIgjcNuEQRkqjgLsueJ+FZI3n65Tn1J6tTuarla3sLpiX3bfgUrdsKm ZP98ibtlWCtsw3RnwDPXQonRtkkSJ0P6z6UNv+/DaywVdtZ/OorilN+5+jD65ckAmyXR 8kKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=oqT6qh0I; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j8si3708525edt.383.2020.07.01.05.46.47; Wed, 01 Jul 2020 05:47:12 -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=@google.com header.s=20161025 header.b=oqT6qh0I; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730610AbgGAMqh (ORCPT + 99 others); Wed, 1 Jul 2020 08:46:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34714 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730603AbgGAMqf (ORCPT ); Wed, 1 Jul 2020 08:46:35 -0400 Received: from mail-lj1-x242.google.com (mail-lj1-x242.google.com [IPv6:2a00:1450:4864:20::242]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 32F3BC03E97A for ; Wed, 1 Jul 2020 05:46:35 -0700 (PDT) Received: by mail-lj1-x242.google.com with SMTP id f5so10864287ljj.10 for ; Wed, 01 Jul 2020 05:46:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=zOvTyVPom8sy12IqSAPoAUTKHIeIoMVlwU22bcDjqVI=; b=oqT6qh0IRRfF/hnPkpSxBlCyj8JlcIeGScOsmu3MknpD1FOeumlsiueZV9yQrK6CbT irSqPO/UzaDN6TU8bs6xDqkerVRlNw8OtpvQIms+HZuijJce976FRgfZHVOMOzJ+iuX4 KBxf6UE202KXfO2JbQ1mpcEZVV9gmuk+p/140T9mOkIVSVCp87s5NiE61LmBwFODPUiU HwuzN2rXXXp45jIAlyYWd2kpJooAB9pHBRbaHLSeoDnG954hScv6X8EOLIonsgOKOnvQ x+nCGPJrXDOssJfQ48uLMfwawqYhSXcU+SF7oq5ZY1VWDhKG4AUadO3Gth8hyX8CbkSG AdfA== 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=zOvTyVPom8sy12IqSAPoAUTKHIeIoMVlwU22bcDjqVI=; b=XSrjFT3BdsxIoTpbZfcITNHvXKcn9DWCMRWHPVCLF5Ha+7bt5cgGlPdbp5WVjyOcKt 1OBsgJg//veXNP+PzgDe7F4lvU4pNv56Lxmd/OqiFvxWDKXTtnDn3CAgEYMa3Un3yt9e RCB26+Zc98FWgfdxclChvpIfTujrP2sm8wmPnWw8Bu/oadswBf0+Jp9vaVGyhQ61irl7 qwSpNvlC+GJtleGbob2w52+NJJirMWmf4rByrofq/5yrpbCZ9FYw89qbd4YHSxcEAPXb 6l2ua270xdPjdjLb83+jpjvI5d+3CJBKn1gOUan37Q7QcBCgjCJJh94kmylIoLKcfU7e 1mvQ== X-Gm-Message-State: AOAM5314PUAPq9Bxpas3zSQ2SO9Xu1nrG/62aklFWQdAfZ2r7UlA7p4t a18hB13jBcV9tEVhZlFn5a9PPjqUmrbtOFC6A6T3Aw== X-Received: by 2002:a2e:85d8:: with SMTP id h24mr12658637ljj.274.1593607593233; Wed, 01 Jul 2020 05:46:33 -0700 (PDT) MIME-Version: 1.0 References: <20200630164204.1.I2cc415fa5793b3e55acfd521ba8f0a71e79aa5f1@changeid> <20200701043001.73qhxyyjx6bayn2m@wunner.de> <20200701113904.7zh534vmlvjvojia@mobilestation> In-Reply-To: <20200701113904.7zh534vmlvjvojia@mobilestation> From: Alain Michaud Date: Wed, 1 Jul 2020 08:46:21 -0400 Message-ID: Subject: Re: [PATCH] Revert "serial: 8250: Fix max baud limit in generic 8250 port" To: Serge Semin , BlueZ Cc: Lukas Wunner , Daniel Winkler , Alexey Malahov , linux-serial@vger.kernel.org, linux-mediatek@lists.infradead.org, chromeos-bluetooth-upstreaming , Aaron Sierra , Andy Shevchenko , Greg Kroah-Hartman , Jiri Slaby , Vignesh Raghavendra , LKML 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 Adding the bluetooth list as well per the Bluetooth impact. On Wed, Jul 1, 2020 at 7:39 AM Serge Semin wrote: > > Hello Lukas, > > On Wed, Jul 01, 2020 at 06:30:01AM +0200, Lukas Wunner wrote: > > On Tue, Jun 30, 2020 at 04:42:11PM -0700, Daniel Winkler wrote: > > > This reverts commit 0eeaf62981ecc79e8395ca8caa1570eaf3a12257. > > > > That is not an upstream commit. You probably mean: > > > > commit 7b668c064ec33f3d687c3a413d05e355172e6c92 > > Author: Serge Semin > > Date: Thu May 7 02:31:32 2020 +0300 > > > > serial: 8250: Fix max baud limit in generic 8250 port > > > > And you didn't cc the commit author (hereby fixed). > > > > Thanks, > > > > Lukas > > Thanks for Cc'ing me. > > > > > > > > > The change regresses the QCA6174A-3 bluetooth chip, preventing > > > firmware from being properly loaded. We have verified that without > > > this patch, the chip works as intended. > > That text doesn't say what is really wrong and why the firmware couldn't be loaded. > The original commit gets back the 8250 port baud rate limitation so if the baud > gets out of the range [uartclk / 16 / UART_DIV_MAX; (port->uartclk + tolerance) / > 16], then it will be clamped to be within it. That range is what the standard > 8250 port supports. Acceptance of out of that range values will cause a > problem further in calling serial8250_get_divisor() and uart_get_divisor() > methods (see the original patch log message) for standard 8250 ports. Any different > behavior must be taken into account by a custom set_termios() callbacks or at > least must be workarounded so the standard 8250 ports wouldn't be affected. So in > order to investigate the root cause of the problem it would be good to at least > know what your platform was and what UART port has been used in the attempt to > load the QCA6174A-3 chip firmware. > > -Sergey > > > > > > > Signed-off-by: Daniel Winkler > > > --- > > > > > > drivers/tty/serial/8250/8250_port.c | 4 +--- > > > 1 file changed, 1 insertion(+), 3 deletions(-) > > > > > > diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8250/8250_port.c > > > index 1632f7d25acca..e057c65ac1580 100644 > > > --- a/drivers/tty/serial/8250/8250_port.c > > > +++ b/drivers/tty/serial/8250/8250_port.c > > > @@ -2618,8 +2618,6 @@ static unsigned int serial8250_get_baud_rate(struct uart_port *port, > > > struct ktermios *termios, > > > struct ktermios *old) > > > { > > > - unsigned int tolerance = port->uartclk / 100; > > > - > > > /* > > > * Ask the core to calculate the divisor for us. > > > * Allow 1% tolerance at the upper limit so uart clks marginally > > > @@ -2628,7 +2626,7 @@ static unsigned int serial8250_get_baud_rate(struct uart_port *port, > > > */ > > > return uart_get_baud_rate(port, termios, old, > > > port->uartclk / 16 / UART_DIV_MAX, > > > - (port->uartclk + tolerance) / 16); > > > + port->uartclk); > > > } > > > > > > void > > > -- > > > 2.27.0.212.ge8ba1cc988-goog > > -- > You received this message because you are subscribed to the Google Groups "ChromeOS Bluetooth Upstreaming" group. > To unsubscribe from this group and stop receiving emails from it, send an email to chromeos-bluetooth-upstreaming+unsubscribe@chromium.org. > To post to this group, send email to chromeos-bluetooth-upstreaming@chromium.org. > To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromeos-bluetooth-upstreaming/20200701113904.7zh534vmlvjvojia%40mobilestation.