On Tue, 2015-07-28 at 09:52 +0000, Hayes Wang wrote:
> Oliver Neukum [mailto:oneu...@suse.com]
> > Sent: Tuesday, July 28, 2015 4:53 PM
> [...]
> > > +         return 0;
> > > +
> > > + netdev = tp->netdev;
> > > + if (!netif_running(netdev))
> > > +         return 0;
> > > +
> > > + ret = usb_autopm_get_interface(intf);
> > > + if (ret < 0)
> > > +         return ret;
> > 
> > What sense does this make?
> > 
> [...]
> > > +         return 0;
> > > +
> > > + netdev = tp->netdev;
> > > + if (!netif_running(netdev))
> > > +         return 0;
> > > +
> > > + ret = usb_autopm_get_interface(intf);
> > 
> > The device will be awake.
> 
> I don't sure if the device would be in runtimesuspend, so I wake it up by 
> myself.
> I think you mean I don't have to do this. I would remove them and resend the
> patch. Thanks.

Usbcore will resume the device.

        HTH
                Oliver

     A. 
        /* Prevent autosuspend during the reset */
        usb_autoresume_device(udev);

        if (config) {
                for (i = 0; i < config->desc.bNumInterfaces; ++i) {
                        struct usb_interface *cintf = config->interface[i];
                        struct usb_driver *drv;
                        int unbind = 0;

                        if (cintf->dev.driver) {
                                drv = to_usb_driver(cintf->dev.driver);
                                if (drv->pre_reset && drv->post_reset)
                                        unbind = (drv->pre_reset)(cintf);




--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to