Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp1164862rwb; Sun, 18 Sep 2022 01:50:42 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5GDyHeyLJdjMf8+7jyLzbHCDNvkJwq2Q4vixE1uEhLau0MhkBfrqteWlLT2pCTZOlwIwtb X-Received: by 2002:a17:903:230d:b0:178:29a3:df38 with SMTP id d13-20020a170903230d00b0017829a3df38mr7837416plh.10.1663491042046; Sun, 18 Sep 2022 01:50:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663491042; cv=none; d=google.com; s=arc-20160816; b=fi6DJcdHeB5KzsO2Gz6dor8BOLakcY655pPgyzR2Ih4f5ayHxQRiwzOyMlwnJoIOAd 8YgdSznfQNSZRDfEBXKxdzfLEP9u+iZqkr6rkYSPSa8voIickhmt8WyyOB2hkYDKr8eW 0c+riJ8E3/j+PBbR1kQ7QELQzOTV2g+vUKgbAitUpgRuq+De42znRgNOmPp33yDSiVyD +r/1rA+XLVeiCPCIM2DQzbLviRZufq7VnnfZQZ7cKXh+zNpNrdpiGB3LF67NntigfWKk 0SKP5xpR7okoFKc3BscdvKr+pqf6ZfTKm2Pe7gxQ6yffvZVL4GUo3f5nZsb/P8M6QT5Q MgFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:message-id :in-reply-to:subject:cc:to:from:date; bh=7WHnJI+5091v88h8ux9lovI30kSwVB7M/rf6FmSMung=; b=tHj6zS6pvj3XzR8c406jUydPX6ywkTllysM+Zq7DfXW2qjzXAcVgnbWbaG/bn1Az9O oiiGsMJVmvPwXZvlS19g9RQ2JN2E82qPRm+3UDRI+N48Hzhhi65DpPZVkWLB9JFQr8ax jAK8hbHzPJRvTkcsBJ1n3dRtnWP5bDH54VCcCxCg1vhq2+BkrTwYW6lZcuwQ97apg+d2 nqFA9ODcr88jqA/0YrMHLDw0oVBSo0oU31ufH4bNACrczNOGW7yAYj2s+2ZcqXyRIN9K glbI32WBst7UY3rNGE2yOWG/N7k0dGQherN9usgjO6hyanHcGrpZoxcMQ9KFdNRaKhA9 r2ig== ARC-Authentication-Results: i=1; mx.google.com; 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 a5-20020a17090a480500b0020305a31cb9si7707200pjh.84.2022.09.18.01.50.30; Sun, 18 Sep 2022 01:50:42 -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; 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 S229587AbiIRI0n (ORCPT + 99 others); Sun, 18 Sep 2022 04:26:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59170 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229454AbiIRI0l (ORCPT ); Sun, 18 Sep 2022 04:26:41 -0400 Received: from angie.orcam.me.uk (angie.orcam.me.uk [78.133.224.34]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id A49EC23BFD; Sun, 18 Sep 2022 01:26:40 -0700 (PDT) Received: by angie.orcam.me.uk (Postfix, from userid 500) id C201292009C; Sun, 18 Sep 2022 10:26:39 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by angie.orcam.me.uk (Postfix) with ESMTP id BB15C92009B; Sun, 18 Sep 2022 09:26:39 +0100 (BST) Date: Sun, 18 Sep 2022 09:26:39 +0100 (BST) From: "Maciej W. Rozycki" To: Josh Triplett cc: Greg Kroah-Hartman , Jiri Slaby , Anders Blomdell , linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH 0/2] serial: 8250: Let drivers request full 16550A feature probing In-Reply-To: <0B189972-4FD8-4245-BF2F-ADEAB18AAAE0@joshtriplett.org> Message-ID: References: <0B189972-4FD8-4245-BF2F-ADEAB18AAAE0@joshtriplett.org> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE 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 Sat, 17 Sep 2022, Josh Triplett wrote: > > This small patch series fixes the issue by letting individual device > >subdrivers to request full 16550A device feature probing by means of a > >flag regardless of the SERIAL_8250_16550A_VARIANTS setting chosen. > > > > The changes have been verified with an OXPCIe952 device, in the native > >UART mode and a 64-bit RISC-V system as well as in the legacy UART mode > >and a 32-bit x86 system. > > Seems reasonable to me, as long as the flag is only set by drivers that > know they've found their hardware. That has been my intent or otherwise the change would make no sense as far as I am concerned. In principle for most if not all PCI/e devices we could suppress UART probing altogether and still support device's features as we could infer the features from the vendor:device ID pair via a table of per-device flags. This might even have worked if we started making one right from the beginning as individual devices were added to our 8250/PCI driver. Though I can imagine that for some devices no documentation was available to the contributor and it could have been hard to determine whether a feature actually discovered is really guaranteed for a given vendor:device ID or whether there are additional constraints, such as a device revision. I imagine especially early PCI serial port devices may have used discrete UART chips behind a piece of PCI glue (just as we now see numerous PCIe devices with the actual device placed behind a PCIe-to-PCI bridge onboard) and then the set of features could have depended on the specific UART chips chosen which may have changed in the course of the life of product. At this point however I suspect it would be hard to (re)construct such a table and in any case it could have been a maintenance burden, so I guess we need to live with what we have. Thank you for your input. Maciej