Bug 25382 - Firmware upload on resume fails with carl9170 driver
Summary: Firmware upload on resume fails with carl9170 driver
Status: CLOSED CODE_FIX
Alias: None
Product: Networking
Classification: Unclassified
Component: Wireless (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: networking_wireless@kernel-bugs.osdl.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-21 08:33 UTC by Angus Turnbull
Modified: 2011-01-22 11:05 UTC (History)
3 users (show)

See Also:
Kernel Version: 2.6.35-23-generic #41-Ubuntu SMP Wed Nov 24 11:55:36 UTC 2010 x86_64 GNU/Linux
Subsystem:
Regression: Yes
Bisected commit-id:


Attachments

Description Angus Turnbull 2010-12-21 08:33:06 UTC
Using compat-wireless 2010-12-10 compiled against a stock Ubuntu 10.10 x64 kernel on a Gigabyte GA-MA78GPM-UD2H motherboard (SB780) and AMD Phenom II chip, with a TP-LINK TL-WN821N USB wireless adaptor.

The default ar9170usb driver suspends/resumes perfectly, but suffers from frequent disconnects which carl9170 remedies. However, upon resume from suspend the firmware upload fails with carl9170. Here's the relevant final portion of dmesg:

[18693.982658] PM: resume of drv:usb dev:usb1 complete after 101.027 msecs
[18694.020156] PM: resume of drv:usb dev:usb6 complete after 137.274 msecs
[18694.020170] PM: resume of drv:hub dev:6-0:1.0 complete after 137.255 msecs
[18694.022634] PM: resume of drv:usb dev:usb7 complete after 139.685 msecs
[18694.022647] PM: resume of drv:hub dev:7-0:1.0 complete after 139.662 msecs
[18694.022650] PM: resume of drv:usb dev:usb3 complete after 140.678 msecs
[18694.022664] PM: resume of drv:hub dev:3-0:1.0 complete after 140.656 msecs
[18694.022671] PM: resume of drv:usb dev:usb4 complete after 140.087 msecs
[18694.022674] PM: resume of drv:usb dev:usb5 complete after 139.862 msecs
[18694.022683] PM: resume of drv:hub dev:5-0:1.0 complete after 139.837 msecs
[18694.022685] PM: resume of drv:hub dev:4-0:1.0 complete after 139.907 msecs
[18694.082842] PM: resume of drv:usb dev:3-3 complete after 199.743 msecs
[18694.082857] PM: resume of drv:usbhid dev:3-3:1.0 complete after 199.719 msecs
[18694.082862] PM: resume of drv:usbhid dev:3-3:1.1 complete after 199.688 msecs
[18694.083765] PM: resume of drv:usb dev:4-1 complete after 200.518 msecs
[18694.083776] PM: resume of drv:usbhid dev:4-1:1.0 complete after 191.166 msecs
[18694.230153] ata8: SATA link down (SStatus 0 SControl 300)
[18694.230195] ata4: SATA link down (SStatus 0 SControl 300)
[18694.230197] ata7: SATA link down (SStatus 0 SControl 300)
[18694.232645] ata6: SATA link down (SStatus 0 SControl 300)
[18694.430128] ata5: softreset failed (device not ready)
[18694.430131] ata5: applying SB600 PMP SRST workaround and retrying
[18694.442652] firewire_core: rediscovered device fw0
[18694.630127] ata5: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
[18694.683130] ata5.00: configured for UDMA/100
[18696.080118] usb 1-2: firmware upload failed (-110).
[18696.083728] carl9170 1-2:1.0: resume error -110
[18696.083732] PM: resume of drv:usb dev:1-2 complete after 2200.666 msecs
[18696.083745] PM: resume of drv:carl9170 dev:1-2:1.0 complete after 2200.675 msecs
[18696.083757] PM: resume of drv: dev:ep_01 complete after 2060.927 msecs
[18699.770134] ata3: softreset failed (device not ready)
[18699.770137] ata3: applying SB600 PMP SRST workaround and retrying
[18699.970147] ata3: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[18699.998109] ata3.00: configured for UDMA/133
[18700.012898] PM: resume of drv:sd dev:2:0:0:0 complete after 6129.690 msecs
[18700.012908] PM: resume of drv:scsi_disk dev:2:0:0:0 complete after 3929.098 msecs
[18700.012911] PM: resume of drv:scsi_device dev:2:0:0:0 complete after 6129.693 msecs
[18700.013136] PM: resume of devices complete after 6132.203 msecs
[18700.013262] PM: resume devices took 6.130 seconds
[18700.013396] PM: Finishing wakeup.
[18700.013397] Restarting tasks ... done.

After running "modprobe -r carl9170 && modprobe carl9170" it works as expected:

[18714.462688] usbcore: deregistering interface driver carl9170
[18715.001029] Compat-wireless backport release: compat-wireless-2010-12-10-3-g880bb0b
[18715.001036] Backport based on linux-next.git next-20101216
[18715.012350] cfg80211: Calling CRDA to update world regulatory domain
[18715.023187] cfg80211: World regulatory domain updated:
[18715.023194] cfg80211:     (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[18715.023203] cfg80211:     (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[18715.023210] cfg80211:     (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[18715.023217] cfg80211:     (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[18715.023223] cfg80211:     (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[18715.023229] cfg80211:     (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[18715.142699] usb 1-2: reset high speed USB device using ehci_hcd and address 2
[18716.320697] usbcore: registered new interface driver carl9170
[18716.324602] usb 1-2: driver   API: 1.9.0 2010-10-29 [1-1]
[18716.324612] usb 1-2: firmware API: 1.9.1 2010-12-06
.....etc.....

Other USB devices are a MS keyboard and Logitech mouse, both of which resume well.
Comment 1 Christian Lamparter 2010-12-31 00:06:09 UTC
Patch has been posted:
https://patchwork.kernel.org/patch/433221/

If it works, then let us know so someone can mark this bug as resolved.
Comment 2 Angus Turnbull 2011-01-01 04:58:08 UTC
Many thanks, the patch applied to the 2010-12-31 compat-wireless release (with the 1.9.2 firmware) fixes the issue.
Comment 3 Florian Mickler 2011-01-22 10:56:19 UTC
commit 97e2c40269e168df986daf94af1c62e07d4fc599
Author: Christian Lamparter <chunkeey@googlemail.com>
Date:   Sun Dec 26 18:22:29 2010 +0100

    carl9170: fix usb pm suspend->resume woes
Comment 4 Florian Mickler 2011-01-22 11:05:32 UTC
in 2.6.38-rc1

Note You need to log in before you can comment on or make changes to this bug.