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: <832fc6ec78074b49a719221ccefd2d90@realtek.com>
Date:   Mon, 24 Jul 2023 08:46:18 +0000
From:   Stanley Chang[昌育德] 
        <stanley_chang@...ltek.com>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>
CC:     Vinod Koul <vkoul@...nel.org>,
        Kishon Vijay Abraham I <kishon@...nel.org>,
        Rob Herring <robh+dt@...nel.org>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        Conor Dooley <conor+dt@...nel.org>,
        Alan Stern <stern@...land.harvard.edu>,
        Roy Luo <royluo@...gle.com>,
        Matthias Kaehlcke <mka@...omium.org>,
        Douglas Anderson <dianders@...omium.org>,
        Flavio Suligoi <f.suligoi@...m.it>,
        Ray Chi <raychi@...gle.com>,
        "linux-phy@...ts.infradead.org" <linux-phy@...ts.infradead.org>,
        "devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>
Subject: RE: [PATCH v7 1/5] usb: phy: add usb phy notify port status API

Hi Greg,

> > > > > +
> > > > > +     if (!ret) {
> > > > > +             struct usb_device *hdev = hub->hdev;
> > > > > +
> > > > > +             if (hdev && !hdev->parent) {
> > > >
> > > > Why the check for no parent?  Please document that here in a
> comment.
> > >
> > > I will add a comment :
> > > /* Only notify roothub. That is, when hdev->parent is empty. */
> >
> > Also document this that this will only happen for root hub status
> > changes, that's not obvious in the callback name or documentation or
> anywhere else here.
> 
> All usb phy notifications (connection, disconnection) are only for roothub.
> So I don't special to doc this.

I will add the comment:
/*
 * Applies to roothub only. That is, when hdev->parent is
 * empty. Only the roothub will be notified of port state
 * changes, since the USB PHY only cares about changes at
 * the next level.
 */


Thanks,
Stanley

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ