diff options
author | Stefan Agner <stefan@agner.ch> | 2015-05-18 18:33:27 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-08-10 12:21:51 -0700 |
commit | 8a5d1e374b59ffaf10bd64c319cdca7560d49c4c (patch) | |
tree | f95bb9c9108a0772d791b36604a9dbe56fc39d5d /drivers/net/ppp/ppp_generic.c | |
parent | 23596d7deb0401e36aef49e96d252d8095cdff79 (diff) | |
download | lwn-8a5d1e374b59ffaf10bd64c319cdca7560d49c4c.tar.gz lwn-8a5d1e374b59ffaf10bd64c319cdca7560d49c4c.zip |
can: mcp251x: fix resume when device is down
commit 25b401c1816ae64bcc5dcb1d39ab41812522a0ce upstream.
If a valid power regulator or a dummy regulator is used (which
happens to be the case when no regulator is specified), restart_work
is queued no matter whether the device was running or not at suspend
time. Since work queues get initialized in the ndo_open callback,
resuming leads to a NULL pointer exception.
Reverse exactly the steps executed at suspend time:
- Enable the power regulator in any case
- Enable the transceiver regulator if the device was running, even in
case we have a power regulator
- Queue restart_work only in case the device was running
Fixes: bf66f3736a94 ("can: mcp251x: Move to threaded interrupts instead of workqueues.")
Signed-off-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/net/ppp/ppp_generic.c')
0 files changed, 0 insertions, 0 deletions