lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <YmjuofeN89UvqDMf@kuha.fi.intel.com>
Date:   Wed, 27 Apr 2022 10:20:01 +0300
From:   Heikki Krogerus <heikki.krogerus@...ux.intel.com>
To:     Andy Shevchenko <andy.shevchenko@...il.com>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Felipe Balbi <balbi@...nel.org>,
        "Rafael J. Wysocki" <rafael.j.wysocki@...el.com>,
        Mathias Nyman <mathias.nyman@...ux.intel.com>,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        USB <linux-usb@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v1 1/2] usb: core: acpi: Use the sysdev pointer instead
 of controller device

On Tue, Apr 26, 2022 at 12:18:24PM +0200, Andy Shevchenko wrote:
> On Mon, Apr 25, 2022 at 3:41 PM Heikki Krogerus
> <heikki.krogerus@...ux.intel.com> 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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ