diff options
| author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2010-10-04 16:13:20 +0000 |
|---|---|---|
| committer | Henrik Rydberg <rydberg@euromail.se> | 2010-10-15 15:13:41 +0200 |
| commit | 2c06b47c113544965a8d99078ae2c8bda883f72b (patch) | |
| tree | d3132226a41526064c5bede37bcff416d4b8e5a1 /usr | |
| parent | b869fda960cc2eba37aa42678c42f378c626c34c (diff) | |
wacom + runtime PM = AA deadlock
On Tue, Sep 14, 2010 at 08:07:39AM +0200, Oliver Neukum wrote:
> Am Dienstag, 14. September 2010, 02:52:10 schrieb Dmitry Torokhov:
> > On Mon, Sep 13, 2010 at 09:20:23PM +0200, Oliver Neukum wrote:
> > > Am Montag, 13. September 2010, 19:10:47 schrieb Dmitry Torokhov:
> > >
> > > > I think this introduces significant change in behavior though - before
> > > > we did not do usb_autopm_put_interface() on successful open, basically
> > > > disabling autopm facilities, right?
> > >
> > > Right. Which makes no sense at all. You'd better remove anything related
> > > to runtime PM and not set supports_autosuspend for that.
> > >
> >
> > That not what I meant, I do not want to remove autopm, it's just it was
> > effectively disabled and if we fix it we might start getting some
> > regression reports ;)
>
> True. So currently we have
>
> - a deadlock
> - disabled runtime power management
>
> We need to fix the deadlock. We can fix it retaining a disabled
> runtime power management. Or we can fix it fixing the runtime
> power management at the same time. However this opens
> the door to regressions. So for now I really suggest removing
> it from the driver and reintroduce it properly for the next merge
> window.
>
Lost track of this issue for a while. So I think we still need to fix
the deadlock for .36 and I think that the following will do that. Then
we'll adjust the driver to actually enable runtime PM for .37.
Thanks.
Acked-by: Oliver Neukum <oneukum@suse.de>
Diffstat (limited to 'usr')
| -rw-r--r-- | usr/src/dkms_source_tree/wacom_sys.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/usr/src/dkms_source_tree/wacom_sys.c b/usr/src/dkms_source_tree/wacom_sys.c index 1e3af29..02de653 100644 --- a/usr/src/dkms_source_tree/wacom_sys.c +++ b/usr/src/dkms_source_tree/wacom_sys.c | |||
| @@ -103,27 +103,26 @@ static void wacom_sys_irq(struct urb *urb) | |||
| 103 | static int wacom_open(struct input_dev *dev) | 103 | static int wacom_open(struct input_dev *dev) |
| 104 | { | 104 | { |
| 105 | struct wacom *wacom = input_get_drvdata(dev); | 105 | struct wacom *wacom = input_get_drvdata(dev); |
| 106 | int retval = 0; | ||
| 106 | 107 | ||
| 107 | mutex_lock(&wacom->lock); | 108 | if (usb_autopm_get_interface(wacom->intf) < 0) |
| 108 | |||
| 109 | wacom->irq->dev = wacom->usbdev; | ||
| 110 | |||
| 111 | if (usb_autopm_get_interface(wacom->intf) < 0) { | ||
| 112 | mutex_unlock(&wacom->lock); | ||
| 113 | return -EIO; | 109 | return -EIO; |
| 114 | } | 110 | |
| 111 | mutex_lock(&wacom->lock); | ||
| 115 | 112 | ||
| 116 | if (usb_submit_urb(wacom->irq, GFP_KERNEL)) { | 113 | if (usb_submit_urb(wacom->irq, GFP_KERNEL)) { |
| 117 | usb_autopm_put_interface(wacom->intf); | 114 | retval = -EIO; |
| 118 | mutex_unlock(&wacom->lock); | 115 | goto out; |
| 119 | return -EIO; | ||
| 120 | } | 116 | } |
| 121 | 117 | ||
| 122 | wacom->open = true; | 118 | wacom->open = true; |
| 123 | wacom->intf->needs_remote_wakeup = 1; | 119 | wacom->intf->needs_remote_wakeup = 1; |
| 124 | 120 | ||
| 121 | out: | ||
| 125 | mutex_unlock(&wacom->lock); | 122 | mutex_unlock(&wacom->lock); |
| 126 | return 0; | 123 | if (retval) |
| 124 | usb_autopm_put_interface(wacom->intf); | ||
| 125 | return retval; | ||
| 127 | } | 126 | } |
| 128 | 127 | ||
| 129 | static void wacom_close(struct input_dev *dev) | 128 | static void wacom_close(struct input_dev *dev) |
| @@ -135,6 +134,8 @@ static void wacom_close(struct input_dev *dev) | |||
| 135 | wacom->open = false; | 134 | wacom->open = false; |
| 136 | wacom->intf->needs_remote_wakeup = 0; | 135 | wacom->intf->needs_remote_wakeup = 0; |
| 137 | mutex_unlock(&wacom->lock); | 136 | mutex_unlock(&wacom->lock); |
| 137 | |||
| 138 | usb_autopm_put_interface(wacom->intf); | ||
| 138 | } | 139 | } |
| 139 | 140 | ||
| 140 | static int wacom_parse_hid(struct usb_interface *intf, struct hid_descriptor *hid_desc, | 141 | static int wacom_parse_hid(struct usb_interface *intf, struct hid_descriptor *hid_desc, |
