linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ar9170usb: reset device on resume
@ 2009-04-25 19:32 Christian Lamparter
  2009-04-26  9:08 ` Johannes Berg
  0 siblings, 1 reply; 2+ messages in thread
From: Christian Lamparter @ 2009-04-25 19:32 UTC (permalink / raw)
  To: linux-wireless; +Cc: Johannes Berg, John W. Linville

This patch takes care of an outstanding comment in
"[PATCH] ar9170usb: fix hang on resume" commit message.

>However, the device does not accept the firmware on resume.
>and it will exit with:
>
>> firmware part 1 upload failed (-71).
>> device is in a bad state. please reconnect it!

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Christian Lamparter <chunkeey@web.de>
---
Johannes,

does this two-liner breathe life into the device after resume?

Regards,
	Chr
---
diff --git a/drivers/net/wireless/ath/ar9170/usb.c b/drivers/net/wireless/ath/ar9170/usb.c
index fddda47..368fc2d 100644
--- a/drivers/net/wireless/ath/ar9170/usb.c
+++ b/drivers/net/wireless/ath/ar9170/usb.c
@@ -689,6 +689,7 @@ static int ar9170_usb_probe(struct usb_interface *intf,
 	aru->common.exec_cmd = ar9170_usb_exec_cmd;
 	aru->common.callback_cmd = ar9170_usb_callback_cmd;
 
+	udev->reset_resume = 1;
 	err = ar9170_usb_reset(aru);
 	if (err)
 		goto err_freehw;
@@ -805,6 +806,7 @@ static struct usb_driver ar9170_driver = {
 #ifdef CONFIG_PM
 	.suspend = ar9170_suspend,
 	.resume = ar9170_resume,
+	.reset_resume = ar9170_resume,
 #endif /* CONFIG_PM */
 };
 

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ar9170usb: reset device on resume
  2009-04-25 19:32 [PATCH] ar9170usb: reset device on resume Christian Lamparter
@ 2009-04-26  9:08 ` Johannes Berg
  0 siblings, 0 replies; 2+ messages in thread
From: Johannes Berg @ 2009-04-26  9:08 UTC (permalink / raw)
  To: Christian Lamparter; +Cc: linux-wireless, John W. Linville

[-- Attachment #1: Type: text/plain, Size: 668 bytes --]

On Sat, 2009-04-25 at 21:32 +0200, Christian Lamparter wrote:
> This patch takes care of an outstanding comment in
> "[PATCH] ar9170usb: fix hang on resume" commit message.
> 
> >However, the device does not accept the firmware on resume.
> >and it will exit with:
> >
> >> firmware part 1 upload failed (-71).
> >> device is in a bad state. please reconnect it!
> 
> Reported-by: Johannes Berg <johannes@sipsolutions.net>
> Signed-off-by: Christian Lamparter <chunkeey@web.de>
> ---
> Johannes,
> 
> does this two-liner breathe life into the device after resume?

Yes, this helps.

Tested-by: Johannes Berg <johannes@sipsolutions.net>

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-04-26  9:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-25 19:32 [PATCH] ar9170usb: reset device on resume Christian Lamparter
2009-04-26  9:08 ` Johannes Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).