From: Johan Hovold <johan@kernel.org>
To: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Cc: Johan Hovold <johan@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Pete Zaitcev <zaitcev@redhat.com>,
Alan Stern <stern@rowland.harvard.edu>,
linux-media@vger.kernel.org, linux-usb@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/4] USB: fix runtime PM after driver unbind
Date: Tue, 1 Oct 2019 10:23:22 +0200 [thread overview]
Message-ID: <20191001082322.GH13531@localhost> (raw)
In-Reply-To: <20190930133603.0192f809@coco.lan>
On Mon, Sep 30, 2019 at 01:36:03PM -0300, Mauro Carvalho Chehab wrote:
> Em Mon, 30 Sep 2019 18:12:01 +0200
> Johan Hovold <johan@kernel.org> escreveu:
>
> > A recent change in USB core broke runtime-PM after driver unbind in
> > several drivers (when counting all USB serial drivers). Specifically,
> > drivers which took care not modify the runtime-PM usage counter after
> > their disconnect callback had returned, would now fail to be suspended
> > when a driver is later bound.
> >
> > I guess Greg could take all of these directly through his tree, unless
> > the media maintainers disagree.
>
> Patches look ok and I'm fine if they go via Greg's tree. So:
>
> Acked-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Thanks for taking a look.
> Yet, on a quick look on media:
>
> $ git grep -l usb_.*pm drivers/media/usb/
> drivers/media/usb/cpia2/cpia2_usb.c
> drivers/media/usb/dvb-usb-v2/az6007.c
> drivers/media/usb/dvb-usb-v2/dvb_usb.h
> drivers/media/usb/dvb-usb-v2/dvb_usb_core.c
> drivers/media/usb/gspca/gspca.c
> drivers/media/usb/gspca/gspca.h
> drivers/media/usb/siano/smsusb.c
> drivers/media/usb/stkwebcam/stk-webcam.c
> drivers/media/usb/usbvision/usbvision-i2c.c
> drivers/media/usb/uvc/uvc_driver.c
> drivers/media/usb/uvc/uvc_v4l2.c
> drivers/media/usb/zr364xx/zr364xx.c
>
> There are other drivers beside stkwebcam with has some PM routines.
Yeah, but that may be for system-wide suspend.
> Ok, only two (stkwebcam and uvcvideo) uses usb_autopm_get_interface() and
> usb_autopm_put_interface(), but I'm wondering if the others are doing the
> right thing, as their implementation are probably older.
Right, only these two support runtime PM through USB core (autosuspend).
In fact, I see now that stkwebcam fails to set the supports_autosuspend
flag in its usb_driver struct, so runtime PM has never actually been
enabled for this driver either. But I guess it doesn't hurt to fix
missing puts if someones wants to try enabling it, if not only for
documentation purposes and avoiding copy-paste proliferation.
Lots of legacy...
Johan
prev parent reply other threads:[~2019-10-01 8:23 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-30 16:12 [PATCH 0/4] USB: fix runtime PM after driver unbind Johan Hovold
2019-09-30 16:12 ` [PATCH 1/4] USB: usb-skeleton: " Johan Hovold
2019-09-30 16:12 ` [PATCH 2/4] USB: usblp: " Johan Hovold
2019-09-30 16:12 ` [PATCH 3/4] USB: serial: " Johan Hovold
2019-09-30 16:12 ` [PATCH 4/4] media: stkwebcam: " Johan Hovold
2019-09-30 16:36 ` [PATCH 0/4] USB: " Mauro Carvalho Chehab
2019-10-01 8:23 ` Johan Hovold [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191001082322.GH13531@localhost \
--to=johan@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mchehab+samsung@kernel.org \
--cc=stern@rowland.harvard.edu \
--cc=zaitcev@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.