Received: by 2002:a05:6602:2086:0:0:0:0 with SMTP id a6csp4446505ioa; Wed, 27 Apr 2022 04:11:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxz9inztDJZ+td9z7kBHSZDI8AkUSarlOpBu3Pa11m6qmFF1C6KlTojBpiXNqbdUdgyEOtb X-Received: by 2002:a65:6807:0:b0:3c1:424a:2a5b with SMTP id l7-20020a656807000000b003c1424a2a5bmr2940164pgt.499.1651057860356; Wed, 27 Apr 2022 04:11:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651057860; cv=none; d=google.com; s=arc-20160816; b=hZTB1WbHgcUlCzodnvN2zlkckHdTQWuGqDzcRZqm5Sx1cWF7Z5E722twE0gdWbL0hg M8ciEnArMvQdQXeNVQKmTlE29UsS8b8xPQNJykcfvwYAIJxGwyartBTGH50mKKzKZpL7 1qqV7iK7teic8woJ1OpRusL7Os0GZsQpgj2N7cEWWbmsoEEzdPHzhkrq8vkWfAXF583D MgRd1u0W/A+Rp3qGJgj/Pe483AsrbEk+MSF+6NuQoSxzX56RSoPeCIaMU4vjdMqjBYG7 gm5gZCrFDQAjGPVKdWIKrODTYGQ55BIdyd0huUh9ZCawt/Ah3PgtonrpZAGu/fmIO/O7 eQ2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=FAxIuPoah5G/AYcb726dC9xNIt9o4jWN6LM2adFZwxY=; b=n/GJmKi+VnWicZSCxcCHi3tO/KH23LPWN2JBRQflNhVdIpLZ7ickaaod9+eKIFs6Ob BKTsu+9tI8w+gS7jmApdoM6vnscVM50r5ZDPwN4w3VLgpALC0GgwsrFQrOp5AgERtJJO 4ifIEzgTGv5aAd+7akOfurBOD8+BB+HV5r7m8gcZsiXFe/hgW+oA7swy9vQJ7aTb8e+b 0uhLXI1v2JCM2nqtKjl4zCUTpmYfzJoEzSl1mUChT1NihcauW4M4krAyWSUuIyVYvwI4 LbfdsTqzxjV3J36zOV967CG2sgiOJ8nL7q/1jtkY6+7xT7MCAf8BNYnO89TcBHjwEfjO fvhg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=DmrU8Ruu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id h71-20020a63834a000000b003a3a5d9062esi1118667pge.460.2022.04.27.04.10.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Apr 2022 04:11:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=DmrU8Ruu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 747953EA8B9; Wed, 27 Apr 2022 03:04:23 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1358738AbiD0HXT (ORCPT + 99 others); Wed, 27 Apr 2022 03:23:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41310 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239885AbiD0HXR (ORCPT ); Wed, 27 Apr 2022 03:23:17 -0400 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3D1731CFF8; Wed, 27 Apr 2022 00:20:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1651044006; x=1682580006; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=HwM8nfr+sAMSwiE6LUzMo0EfJPHJ3P1NXafGW7GSrxQ=; b=DmrU8RuuiubvlFFbd0Ht/w2YoM8lApLU41fHjTztvCiaSrHaR3GLpOAd AeAC8sqO2RdsAARMwUd+0TmRCClADA91tALmfXXGGATF9mQ6pfMVaq1ct tD9rmYlhsRwsFcWxfjeO4z4hyq95ooq9ZuX/o+TD7DB/1X90Nr57idwV+ cjK+Y+2JQdqWBsL4JUoSYxvpZV1KXOTo0MNBt7YxPScQO08872wSebt63 VIYWwbQSAtgZav/cQyjupOJs8RmLOM96Vx9zrbwGyakOwN8Ai4vHO+hp9 gpEBl8F6RJRCrb8pbV/mFubnyA6kukbPiiRDd/+jr+qqaaL63B31598u1 g==; X-IronPort-AV: E=McAfee;i="6400,9594,10329"; a="246409277" X-IronPort-AV: E=Sophos;i="5.90,292,1643702400"; d="scan'208";a="246409277" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Apr 2022 00:20:05 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,292,1643702400"; d="scan'208";a="705422204" Received: from kuha.fi.intel.com ([10.237.72.185]) by fmsmga001.fm.intel.com with SMTP; 27 Apr 2022 00:20:02 -0700 Received: by kuha.fi.intel.com (sSMTP sendmail emulation); Wed, 27 Apr 2022 10:20:01 +0300 Date: Wed, 27 Apr 2022 10:20:01 +0300 From: Heikki Krogerus To: Andy Shevchenko Cc: Greg Kroah-Hartman , Felipe Balbi , "Rafael J. Wysocki" , Mathias Nyman , Andy Shevchenko , USB , Linux Kernel Mailing List Subject: Re: [PATCH v1 1/2] usb: core: acpi: Use the sysdev pointer instead of controller device Message-ID: References: <20220425121340.1362-1-heikki.krogerus@linux.intel.com> <20220425121340.1362-2-heikki.krogerus@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE autolearn=unavailable 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 Tue, Apr 26, 2022 at 12:18:24PM +0200, Andy Shevchenko wrote: > On Mon, Apr 25, 2022 at 3:41 PM Heikki Krogerus > wrote: > > > > The controller device (hcd) does not always have the ACPI > > companion assigned to it at all. We can not rely on it when > > finding the ACPI companion for the root hub. Instead we need > > to use the sysdev pointer here. > > ... > > > if (!udev->parent) { > > /* root hub is only child (_ADR=0) under its parent, the HC */ > > I believe the comment can be amended now to point out that we use the > physical device representing the parent of this child, and not > (always) a direct parent of the device in terms of Linux device model. Okay, I'll try to improve the comment. > > - adev = ACPI_COMPANION(udev->dev.parent); > > + adev = ACPI_COMPANION(udev->bus->sysdev); > > return acpi_find_child_device(adev, 0, false); > > } thanks, -- heikki