From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Subject: Re: [PATCH v9 REBASE 6/9] USB: notify phy when root hub port connect change Date: Tue, 10 Jul 2012 13:38:58 +0200 Message-ID: <201207101338.58340.marex@denx.de> References: <1341673008-29808-1-git-send-email-richard.zhao@freescale.com> <201207100522.21162.marex@denx.de> <20120710112050.GH26888@b20223-02.ap.freescale.net> Mime-Version: 1.0 Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20120710112050.GH26888-iWYTGMXpHj9ITqJhDdzsOjpauB2SiJktrE5yTffgRl4@public.gmane.org> Sender: linux-usb-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Richard Zhao Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org, B29397-KZfg59tc24xl57MIdRCFDg@public.gmane.org, B20596-KZfg59tc24xl57MIdRCFDg@public.gmane.org, shawn.guo-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org, kernel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org, alexander.shishkin-VuQAYsv1563Yd54FQh9/CA@public.gmane.org, gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org, fabio.estevam-KZfg59tc24xl57MIdRCFDg@public.gmane.org, dong.aisheng-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org, stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz@public.gmane.org, linuxzsc-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, balbi-l0cyMroinI0@public.gmane.org, mkl-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org List-Id: devicetree@vger.kernel.org Dear Richard Zhao, [...] > > > --- a/drivers/usb/core/hub.c > > > +++ b/drivers/usb/core/hub.c > > > @@ -1924,6 +1924,11 @@ void usb_disconnect(struct usb_device **pdev) > > > > > > */ > > > > > > device_del(&udev->dev); > > > > > > + if (udev->parent && !udev->parent->parent) { > > > + struct usb_hcd *hcd = bus_to_hcd(udev->bus); > > > + usb_phy_notify_disconnect(hcd->phy, udev->portnum); > > > + } > > > > Shouldn't that go before device_del() ? > > Any difference? I was worried some corruption of other members in udev structure might happen, but I'm not so sure anymore after taking deer look. > Thanks > Richard Best regards, Marek Vasut -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html From mboxrd@z Thu Jan 1 00:00:00 1970 From: marek.vasut@gmail.com (Marek Vasut) Date: Tue, 10 Jul 2012 13:38:58 +0200 Subject: [PATCH v9 REBASE 6/9] USB: notify phy when root hub port connect change In-Reply-To: <20120710112050.GH26888@b20223-02.ap.freescale.net> References: <1341673008-29808-1-git-send-email-richard.zhao@freescale.com> <201207100522.21162.marex@denx.de> <20120710112050.GH26888@b20223-02.ap.freescale.net> Message-ID: <201207101338.58340.marex@denx.de> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Dear Richard Zhao, [...] > > > --- a/drivers/usb/core/hub.c > > > +++ b/drivers/usb/core/hub.c > > > @@ -1924,6 +1924,11 @@ void usb_disconnect(struct usb_device **pdev) > > > > > > */ > > > > > > device_del(&udev->dev); > > > > > > + if (udev->parent && !udev->parent->parent) { > > > + struct usb_hcd *hcd = bus_to_hcd(udev->bus); > > > + usb_phy_notify_disconnect(hcd->phy, udev->portnum); > > > + } > > > > Shouldn't that go before device_del() ? > > Any difference? I was worried some corruption of other members in udev structure might happen, but I'm not so sure anymore after taking deer look. > Thanks > Richard Best regards, Marek Vasut