Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
kernel
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Linaro
qcomlt
kernel
Commits
7682455e
Commit
7682455e
authored
15 years ago
by
David S. Miller
Browse files
Options
Downloads
Plain Diff
Merge branch 'linux-2.6.30.y' of
git://git.kernel.org/pub/scm/linux/kernel/git/inaky/wimax
parents
f11a377b
e069c0cf
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
drivers/net/wimax/i2400m/usb.c
+30
-5
30 additions, 5 deletions
drivers/net/wimax/i2400m/usb.c
with
30 additions
and
5 deletions
drivers/net/wimax/i2400m/usb.c
+
30
−
5
View file @
7682455e
...
...
@@ -505,27 +505,52 @@ int i2400mu_suspend(struct usb_interface *iface, pm_message_t pm_msg)
#ifdef CONFIG_PM
struct
usb_device
*
usb_dev
=
i2400mu
->
usb_dev
;
#endif
unsigned
is_autosuspend
=
0
;
struct
i2400m
*
i2400m
=
&
i2400mu
->
i2400m
;
#ifdef CONFIG_PM
if
(
usb_dev
->
auto_pm
>
0
)
is_autosuspend
=
1
;
#endif
d_fnstart
(
3
,
dev
,
"(iface %p pm_msg %u)
\n
"
,
iface
,
pm_msg
.
event
);
if
(
i2400m
->
updown
==
0
)
goto
no_firmware
;
d_printf
(
1
,
dev
,
"fw up, requesting standby
\n
"
);
if
(
i2400m
->
state
==
I2400M_SS_DATA_PATH_CONNECTED
&&
is_autosuspend
)
{
/* ugh -- the device is connected and this suspend
* request is an autosuspend one (not a system standby
* / hibernate).
*
* The only way the device can go to standby is if the
* link with the base station is in IDLE mode; that
* were the case, we'd be in status
* I2400M_SS_CONNECTED_IDLE. But we are not.
*
* If we *tell* him to go power save now, it'll reset
* as a precautionary measure, so if this is an
* autosuspend thing, say no and it'll come back
* later, when the link is IDLE
*/
result
=
-
EBADF
;
d_printf
(
1
,
dev
,
"fw up, link up, not-idle, autosuspend: "
"not entering powersave
\n
"
);
goto
error_not_now
;
}
d_printf
(
1
,
dev
,
"fw up: entering powersave
\n
"
);
atomic_dec
(
&
i2400mu
->
do_autopm
);
result
=
i2400m_cmd_enter_powersave
(
i2400m
);
atomic_inc
(
&
i2400mu
->
do_autopm
);
#ifdef CONFIG_PM
if
(
result
<
0
&&
usb_dev
->
auto_pm
==
0
)
{
if
(
result
<
0
&&
!
is_autosuspend
)
{
/* System suspend, can't fail */
dev_err
(
dev
,
"failed to suspend, will reset on resume
\n
"
);
result
=
0
;
}
#endif
if
(
result
<
0
)
goto
error_enter_powersave
;
i2400mu_notification_release
(
i2400mu
);
d_printf
(
1
,
dev
,
"
fw up, got standby
\n
"
);
d_printf
(
1
,
dev
,
"
powersave requested
\n
"
);
error_enter_powersave:
error_not_now:
no_firmware:
d_fnend
(
3
,
dev
,
"(iface %p pm_msg %u) = %d
\n
"
,
iface
,
pm_msg
.
event
,
result
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment