Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp327389ybv; Wed, 19 Feb 2020 22:33:54 -0800 (PST) X-Google-Smtp-Source: APXvYqzE2TroE3GAAHqajskAnQxVYV9R3DtbHiyzhCYlKNuhrSBz5KImPoff8hGB3/YNijH/Q8BG X-Received: by 2002:a9d:811:: with SMTP id 17mr23219188oty.369.1582180434566; Wed, 19 Feb 2020 22:33:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582180434; cv=none; d=google.com; s=arc-20160816; b=P5MvJkZe8vyp0386RHUsfdJcqs5WgMNeTb+spJMH8R2qt9QEi1jz/IBxcfTt1vV4TU JPs+si38d2L1MU2oZ85iJJwec9mS70tRh8BZ9gDxAZN05vZyM9kmpQcmST7p2jTf1oTe 2TauQwXLwpNFQ/bBaoEf0OaPVX8gWWQRkROwfbw9bBQyPVGHFVfpBF701F0kGo4OZCj0 XDJpT5LpKuwcN0F9vweMd54FjYzxknz4TygbGbrt0Jaa/Ubj2m7sIe7XpoiW8j1HCa0d 19de7P1niGUbvKmvXxCxLgYJoayf0cja2hnHEznwDBYos+16zu33pJnKyS/Rb5kwyYQt 0whg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:dkim-signature:dkim-filter :date; bh=vhZWh+2Ztj0g9xXmISjjSlOG2XuQ/opDLS+2Tm7NtT8=; b=B0GVIChpWhsWcoJ563biEebiYsml4PGL9rrhgrVN/oLBrVhgvlljX3VAirIpcdXYiu NITqRZUQblD/sF1iNnJ2tjXeR7H+UtWheGh4dUp11lhBnyyBsTmPgaaJOm9W68Dlfeh+ 8BNy+xuOv7EumKhcgiYzVG0mQ8eqLq/IfD2gs8XXJRIO2q9dw+ObkyXdWRt2MdGrMnWf p5ZkoddUNBqE/Vpx7oeoBf0D+oYKpYGjekte0PzZ6mH+1pOGvPj6GkGaLcy3Fvm96LGO iY1Ua00hO7MeOKYhC3pclNR0GCz4oy8E03Ht1lKJMN67m4UaodQ4ZZJj0lN0s5KcZunq MXEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@innovation.ch header.s=default header.b=fLH5IrYz; 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=QUARANTINE dis=NONE) header.from=innovation.ch Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a9si10550660oib.59.2020.02.19.22.33.42; Wed, 19 Feb 2020 22:33:54 -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=@innovation.ch header.s=default header.b=fLH5IrYz; 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=QUARANTINE dis=NONE) header.from=innovation.ch Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726379AbgBTGdg (ORCPT + 99 others); Thu, 20 Feb 2020 01:33:36 -0500 Received: from chill.innovation.ch ([216.218.245.220]:40544 "EHLO chill.innovation.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725962AbgBTGdg (ORCPT ); Thu, 20 Feb 2020 01:33:36 -0500 Date: Wed, 19 Feb 2020 22:33:35 -0800 DKIM-Filter: OpenDKIM Filter v2.10.3 chill.innovation.ch 542756412C7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=innovation.ch; s=default; t=1582180415; bh=vhZWh+2Ztj0g9xXmISjjSlOG2XuQ/opDLS+2Tm7NtT8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=fLH5IrYzS0EdMc1N/kj00Tub4ak+6tCwmXHiPFqLdxUZbWsIVAnbLAU1JPXwtXDbk Ifv0uXnKrK01hHrLJn2xEwuAJYXk42kdKJ07HfyaoSWUn9tH0aonajEPOF0NvRlyVp jzFfdliaDxUJV/a1+mNUFRXw7xM7hiWjcTLFfY28veVyXxrmCcxmvXJb3TMMGEQQnr hTAvLHPRyueeegtBGah99+fgGBDLRTisUeSr1r5O2Gv8trIfmzxq1NWHXKqVZyV9go uY5wh58pVFBBZzduOXCCSaatN+YRhwct+dQ5/gIZ4cwaU9GtbGpfMYd/Zf1B04w27k pEbxHdB+gpmFQ== From: "Life is hard, and then you die" To: Greg Kroah-Hartman Cc: Rob Herring , Jiri Slaby , Maximilian Luz , linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH] serdev: Fix detection of UART devices on Apple machines. Message-ID: <20200220063335.GA9421@innovation.ch> References: <20200211194723.486217-1-ronald@innovation.ch> <20200219111519.GB2814125@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200219111519.GB2814125@kroah.com> User-Agent: Mutt/1.11.4 (2019-03-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 19, 2020 at 12:15:19PM +0100, Greg Kroah-Hartman wrote: > On Tue, Feb 11, 2020 at 11:47:23AM -0800, Ronald Tschal?r wrote: > > On Apple devices the _CRS method returns an empty resource template, and > > the resource settings are instead provided by the _DSM method. But > > commit 33364d63c75d6182fa369cea80315cf1bb0ee38e (serdev: Add ACPI > > devices by ResourceSource field) changed the search for serdev devices > > to require valid, non-empty resource template, thereby breaking Apple > > devices and causing bluetooth devices to not be found. > > > > This expands the check so that if we don't find a valid template, and > > we're on an Apple machine, then just check for the device being an > > immediate child of the controller and having a "baud" property. > > > > Cc: # 5.5 > > Signed-off-by: Ronald Tschal?r > > --- > > drivers/tty/serdev/core.c | 10 ++++++++++ > > 1 file changed, 10 insertions(+) > > > > diff --git a/drivers/tty/serdev/core.c b/drivers/tty/serdev/core.c > > index ce5309d00280..0f64a10ba51f 100644 > > --- a/drivers/tty/serdev/core.c > > +++ b/drivers/tty/serdev/core.c > > @@ -18,6 +18,7 @@ > > #include > > #include > > #include > > +#include > > Why is this needed? Just for the x86_apple_machine variable? Yes. > Why do we still have platform_data for new systems anymore? Can't this > go into a much more generic location? Like as an inline function? I'm not sure I follow you. What exactly would you like to see in the function? The check that sets this variable? Note that this was originally pulled out into a variable that is set once for performance reasons - see commit 630b3aff8a51c. Cheers, Ronald