Bug 5093

Summary: atmel_cs needs to keep firmware
Product: Drivers Reporter: Daniel Barlow (dan)
Component: PCMCIAAssignee: linux-pcmcia
Status: CLOSED CODE_FIX    
Severity: normal CC: akpm, dwmw2, pavel, protasnb
Priority: P2    
Hardware: i386   
OS: Linux   
Kernel Version: 2.6.13-rc6swsusp1 Subsystem:
Regression: --- Bisected commit-id:
Attachments: hacky patch to fix it

Description Daniel Barlow 2005-08-19 07:57:20 UTC
Distribution: Debian unstable
Hardware Environment: x86 laptop pentium M compaq nc4000
Software Environment: pcmcia_cs (not udev)
Problem Description: 

Machine hangs on swsusp suspend to disk if 3com 3CRSHPW196 (atmel_cs) is in use,
after printing these two lines

Yenta O2: res at 0x94/0xD4: 00/ea
Yenta O2: enabling read prefetch/write burst

Some investigation with Magic Sysrq indicates that it stopped in the middle of
swsusp_write -> device_resume ... -> request_firmware: presumably the pcmcia
device got resumed before the disk it wants to load its firmware from

Steps to reproduce 
# #  -- insert a 3com network card and wait for modules to load --
# echo platform >/sys/power/disk
# echo disk >/sys/power/state
Comment 1 Daniel Barlow 2005-08-19 08:23:43 UTC
Created attachment 5683 [details]
hacky patch to fix it

I don't claim this should be merged (it probably confuses hotplug - which I
regard as cosmic justice for hotplug confusing /me/), but it does make the
problem go away.
Comment 2 Pavel Machek 2005-08-20 01:45:58 UTC
Yes, storing firmware in memory is probably the solution (for now at least). I'd
move firmware handling into separate function, through.
Comment 3 Dominik Brodowski 2006-01-10 09:12:05 UTC
What shall we do with this? Is a patch solving this issue merged already?
Comment 4 Pavel Machek 2006-01-10 13:40:37 UTC
Actually patch pretty much looks okay to me. kmallocing firmware is probably
nicest solution. Danil, can you add " " between "if" and "(" and submit it?
Comment 5 Pavel Machek 2006-01-18 05:26:21 UTC
Daniel, please submit that patch.
Comment 6 Daniel Barlow 2006-01-18 07:17:29 UTC
Submit where?
Comment 7 Anonymous Emailer 2006-01-18 11:00:15 UTC
Reply-To: pavel@ucw.cz


> Submit where?

Mail it to Andrew Morton, cc linux-kernel and me. Put nice changelog
and signed-off-by lines in there.

								Pavel
Comment 8 Dominik Brodowski 2006-03-27 13:19:03 UTC
Pavel: is that patch merged already?
Comment 9 Pavel Machek 2006-03-27 13:57:32 UTC
No, I do not think it is merged.

I guess someone with that hardware should take the patch, test it, clean it up
according to comments in this bug and submit it properly :-).
Comment 10 Dominik Brodowski 2006-05-31 01:21:24 UTC
Daniel, any update on this?
Comment 11 Natalie Protasevich 2007-10-11 00:27:51 UTC
I don't see the patch applied. Has the problem been addressed since some other way?
Thanks.