Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp2647566rdg; Mon, 16 Oct 2023 10:21:26 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGSB7nXjecRiN0SJHMy67z6GSJD1jBwd/Om2LAf9e2KUYGlaBMGpqViRxeRtq0m674Fv+kK X-Received: by 2002:a05:6a21:3289:b0:174:d189:2f93 with SMTP id yt9-20020a056a21328900b00174d1892f93mr11605141pzb.59.1697476885636; Mon, 16 Oct 2023 10:21:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697476885; cv=none; d=google.com; s=arc-20160816; b=NfTsGmjtRXZImy6rdhX3h/pZNaiYKlSkJXiuKEEE73E8iClSjpPoBOFqcpqZEwwEKi bsiTfvDvGxkxwXpydCGFvP8ILPuS1p+HZIwJqyI6EMBJg4leEArbaBD5PYyYDd2uDNy8 i/35Kp5RwkR4XSNMu5W3VVlJlsuz5KbpqkC1z++WMLZhi3BsomUAsTblq583eFPkcG7B OESjM6RsaUosJqN4NbACAKAHtDKYBsMu5Jp8GQhAjqeBAJ+eWwR4QJdtrTZZnobrT7U7 BtXxOf+gfk3D4h+IMeogheX2gy0trYmrPoEczbGKWgghNcslVK3DnJVPKHhxklZ3cOCu GprA== 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 :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=IB8ijEdDwJemoPTssoo1rbFdLIyoQawFS03Tg5RD9fQ=; fh=Xq4Q2nAS0LwrH8qQAv8rODq5np2u2ef+zh+30Vukl8M=; b=oDOJLAqlUnDmNGUDP8RzTqazZRUSqDcXZanVAkpsT/AdK5k9qsFCbACqCoG43LxTUJ oPYoD5jOhdi7+WXaXo2WewV8POqVlTYcgibRBap8notkHDagG2f4D/BNZj35DUpHAFAs AwvStT2nqCzfQKlx6V31Bi6VrLt4/0fT39BA7SD2aVUxAlc4z/E9VPwKoqHTp7yzWB/T nwCqa59PnWVKsTL8u6PcoGQ/Zd6juoCjXKR9IeWbex43/aIEvRs+5ZwJb9/PGLwkdrty t/8kOiOIixQN/ZQ+C2jbDPc0IW7z8hXsDNrDtagXGxEH134usMknfODv/OQKfh6+MHwn RPbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="HZc/JTan"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id h11-20020a65480b000000b005898db9d676si10585721pgs.260.2023.10.16.10.21.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Oct 2023 10:21:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="HZc/JTan"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 4E62C8021235; Mon, 16 Oct 2023 10:21:23 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233799AbjJPRVP (ORCPT + 99 others); Mon, 16 Oct 2023 13:21:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39944 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233412AbjJPRVE (ORCPT ); Mon, 16 Oct 2023 13:21:04 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4F516D9 for ; Mon, 16 Oct 2023 10:20:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1697476822; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=IB8ijEdDwJemoPTssoo1rbFdLIyoQawFS03Tg5RD9fQ=; b=HZc/JTankE+lWC8WPpMmNGtvpnI5USQJZ5JLRSZ/X5LEYnuhQy39GjlpBmPxw3EZ6eLZAd lGpR/OrCfWT0DXftNrVxnMvRWh5u88wNyXZNeHEaPeeed9J+oAn9hKI2qNlMUowW9gzXvW p6mhZgGBLQvj8KO5760q+wtjJc8/MnU= Received: from mail-ej1-f71.google.com (mail-ej1-f71.google.com [209.85.218.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-636-ASUrYn5MPN25NnmaONN8XA-1; Mon, 16 Oct 2023 13:20:20 -0400 X-MC-Unique: ASUrYn5MPN25NnmaONN8XA-1 Received: by mail-ej1-f71.google.com with SMTP id a640c23a62f3a-9b65c46bca8so64876466b.1 for ; Mon, 16 Oct 2023 10:20:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697476819; x=1698081619; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=IB8ijEdDwJemoPTssoo1rbFdLIyoQawFS03Tg5RD9fQ=; b=i0GJAqnigmv0EzTYjGYcrofjF96MfbpbfsEDTAJ/6CcGl25TRgIWFJsB0ah1R+e4MX Zo2HclKedh3bKaOrDw3YhmwkXtFPNcw3z9ODx3mNNHN/An76tQcBeKPHXBP/1SbHdQAz d/3QCR2OGEJI3tCzNlq3/Jsq06CgcTRBU1a48PpuPiIB7o8OjQInNCCR9DBKiqI6GvO+ 8stxycub1sKXSlKRnKhpaNmqbHKxwsDUFrFnvgR6Zlw2W6ZM61Lc6qJQON0fl+f6jCmy h7Msll/rbObYMyJLiUh7Bqrq/1lMwgdRNEAd16Fpr1+NwzVirqTw5v+liP7C/kS8ed0l N6JQ== X-Gm-Message-State: AOJu0Yyfw6IbE+g8/2H/SL0xFyl7WYVEo3XX+vXn+iozjScQg58q/FBw ZDaS3NFca0PUBlNBEPRaNMDFzVvEqFUm8/aetf+NLoCkYXmUH9uU4ecj1R9BWokGj7sjQQvFXZL iR0YFZYJ4xvgpLpPVYTDz7Jxg X-Received: by 2002:a17:906:4fc7:b0:9be:dce3:6e07 with SMTP id i7-20020a1709064fc700b009bedce36e07mr5538506ejw.32.1697476819507; Mon, 16 Oct 2023 10:20:19 -0700 (PDT) X-Received: by 2002:a17:906:4fc7:b0:9be:dce3:6e07 with SMTP id i7-20020a1709064fc700b009bedce36e07mr5538478ejw.32.1697476819117; Mon, 16 Oct 2023 10:20:19 -0700 (PDT) Received: from ?IPV6:2001:1c00:c32:7800:5bfa:a036:83f0:f9ec? (2001-1c00-0c32-7800-5bfa-a036-83f0-f9ec.cable.dynamic.v6.ziggo.nl. [2001:1c00:c32:7800:5bfa:a036:83f0:f9ec]) by smtp.gmail.com with ESMTPSA id r20-20020a1709062cd400b009ad8084e08asm4363084ejr.0.2023.10.16.10.20.18 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 16 Oct 2023 10:20:18 -0700 (PDT) Message-ID: <5747b78e-1956-8249-8f5e-85426b3efd01@redhat.com> Date: Mon, 16 Oct 2023 19:20:17 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH v20 1/4] usb: Add support for Intel LJCA device To: "Shevchenko, Andriy" , "Wu, Wentong" Cc: "gregkh@linuxfoundation.org" , "oneukum@suse.com" , "wsa@kernel.org" , "andi.shyti@linux.intel.com" , "broonie@kernel.org" , "bartosz.golaszewski@linaro.org" , "linus.walleij@linaro.org" , "linux-usb@vger.kernel.org" , "linux-i2c@vger.kernel.org" , "linux-spi@vger.kernel.org" , "sakari.ailus@linux.intel.com" , "Wang, Zhifeng" , "linux-gpio@vger.kernel.org" , "linux-kernel@vger.kernel.org" References: <6a87b43a-0648-28d4-6c69-e0f684e44eb6@redhat.com> <5d2e9eba-a941-ea9a-161a-5b97d09d5d35@redhat.com> <9a080d06-586d-686f-997e-674cb8d16099@redhat.com> <2023101653-shiftless-scorebook-19e3@gregkh> Content-Language: en-US, nl From: Hans de Goede In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.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 (morse.vger.email [0.0.0.0]); Mon, 16 Oct 2023 10:21:23 -0700 (PDT) Hi, On 10/16/23 18:05, Shevchenko, Andriy wrote: > On Mon, Oct 16, 2023 at 06:44:21PM +0300, Wu, Wentong wrote: >>> From: gregkh@linuxfoundation.org >>> On Mon, Oct 16, 2023 at 03:05:09PM +0000, Wu, Wentong wrote: >>>>> From: Shevchenko, Andriy >>>>> On Mon, Oct 16, 2023 at 08:52:28AM +0300, Wu, Wentong wrote: > > ... > >>>>> But this does not confirm if you have such devices. Moreover, My >>>>> question about _CID per function stays the same. Why firmware is not using >>> it? >>>> >>>> Yes, both _ADR and _CID can stop growing list in the driver. And for >>>> _ADR, it also only require one ID per function. I don't know why BIOS >>>> team doesn't select _CID, but I have suggested use _ADR internally, >>>> and , to make things moving forward, the driver adds support for _ADR here >>> first. >>>> >>>> But you're right, _CID is another solution as well, we will discuss it >>>> with firmware team more. >>> >>> Should I revert this series now until this gets sorted out? >> >> Current _ADR support is a solution, I don't think _CID is better than _ADR to both >> stop growing list in driver and support the shipped hardware at the same time. >> >> Andy, what's your idea? > > In my opinion if _CID can be made, it's better than _ADR. As using _ADR like > you do is a bit of grey area in the ACPI specification. I.o.w. can you get > a confirmation, let's say, from Microsoft, that they will go your way for other > similar devices? > > Btw, Microsoft has their own solution actually using _ADR for the so called > "wired" USB devices. Is it your case? If so, I'm not sure why _HID has been > used from day 1... > > Also I suggest to wait for Hans' opinion on the topic. I definitely don't think we should revert the entire series since this supports actual hw which has already been shipping for years. But if the _ADR support is only there to support future hw and it is not even certain yet that that future hw is actually going to be using _ADR support then I believe that a follow-up patch to drop _ADR support for now is in order. We can then re-introduce it (revert the follow up patch) if future hw actually starts using _ADR support. Specifically what I'm suggesting is something like the following: diff --git a/drivers/usb/misc/usb-ljca.c b/drivers/usb/misc/usb-ljca.c index c9decd0396d4..e1bbaf964786 100644 --- a/drivers/usb/misc/usb-ljca.c +++ b/drivers/usb/misc/usb-ljca.c @@ -457,8 +457,8 @@ static void ljca_auxdev_acpi_bind(struct ljca_adapter *adap, u64 adr, u8 id) { struct ljca_match_ids_walk_data wd = { 0 }; - struct acpi_device *parent, *adev; struct device *dev = adap->dev; + struct acpi_device *parent; char uid[4]; parent = ACPI_COMPANION(dev); @@ -466,17 +466,7 @@ static void ljca_auxdev_acpi_bind(struct ljca_adapter *adap, return; /* - * get auxdev ACPI handle from the ACPI device directly - * under the parent that matches _ADR. - */ - adev = acpi_find_child_device(parent, adr, false); - if (adev) { - ACPI_COMPANION_SET(&auxdev->dev, adev); - return; - } - - /* - * _ADR is a grey area in the ACPI specification, some + * Currently LJCA hw does not use _ADR instead current * platforms use _HID to distinguish children devices. */ switch (adr) { As a follow-up patch to the existing series. Regards, Hans