Skip to contentSkip to conversation

ar9170usb: reset device on resume

PATCH In review Christian Lamparter 2 participants 2 messages Apr 25, 2009 – Apr 26, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ar9170usb: reset device on resume

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

Quoted 5 lines

However, the device does not accept the firmware on resume. and it will exit with:

Quoted 2 lines

firmware part 1 upload failed (-71).
device is in a bad state. please reconnect it!

---
Johannes,

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

Regards,
Chr
---

drivers/net/wireless/ath/ar9170/usb.c +2 -0
index fddda47..368fc2d 100644
@@ -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 */
 };
 
Tested-by on v1 1/1
#1 lore raw
Quoted 9 lines · Christian Lamparter

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

Quoted 5 lines

However, the device does not accept the firmware on resume. and it will exit with:

Quoted 2 lines

firmware part 1 upload failed (-71).
device is in a bad state. please reconnect it!

Quoted 6 lines

---
Johannes,

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

Yes, this helps.

johannes