* pci device resume too early?
@ 2004-07-28 17:53 Stefan Dösinger
[not found] ` <200407281953.39159.stefandoesinger-RbZlAiThDcE@public.gmane.org>
0 siblings, 1 reply; 8+ messages in thread
From: Stefan Dösinger @ 2004-07-28 17:53 UTC (permalink / raw)
To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
[-- Attachment #1: Type: text/plain, Size: 873 bytes --]
Hello,
I have problems with a few pci devices after resume. Hardware environment is a
acer Travelmate 803(lspci attached), I use an unpatched linux-2.6.8-rc2
kernel.
The problem is that directly after S3 resume, any attempt to write to pci
configuration registers of three of my devices(00:1d.7, 00:1f.5, 00:1f.6)
locks up my system. After some testing, I found out that pci_restore_state
works nice if I place it into a function which is scheduled with
schedule_delayed_work. I use my dummydriver module for testing.
Using mdelay(something) instead of scheduling a work doesn't help, so it's not
the hardware which needs some time.
Is it possible that the driver's resume functions are called too early? Can
you point me to the place in the acpi code which calls the resume methods
that I can do further testing? I couldn't find it.
Thanks in advance,
Stefan
[-- Attachment #2: lspci --]
[-- Type: text/plain, Size: 27167 bytes --]
0000:00:00.0 Host bridge: Intel Corp.: Unknown device 3340 (rev 03)
Subsystem: Acer Incorporated [ALI]: Unknown device 001f
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B-
Status: Cap+ 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort+ >SERR- <PERR-
Latency: 0
Region 0: Memory at e0000000 (32-bit, prefetchable)
Capabilities: [e4] #09 [f104]
Capabilities: [a0] AGP version 2.0
Status: RQ=32 Iso- ArqSz=0 Cal=0 SBA+ ITACoh- GART64- HTrans- 64bit- FW+ AGP3- Rate=x1,x2,x4
Command: RQ=1 ArqSz=0 Cal=0 SBA+ AGP+ GART64- 64bit- FW- Rate=x4
00: 86 80 40 33 06 01 90 20 03 00 00 06 00 00 00 00
10: 08 00 00 e0 00 00 00 00 00 00 00 00 00 00 00 00
20: 00 00 00 00 00 00 00 00 00 00 00 00 25 10 1f 00
30: 00 00 00 00 e4 00 00 00 00 00 00 00 00 00 00 00
40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
50: 00 02 00 00 00 00 00 00 00 00 00 00 00 27 00 00
60: 04 08 0c 10 00 00 00 00 00 00 00 00 00 00 00 00
70: 02 02 00 00 00 00 00 00 00 02 02 2c 71 32 40 30
80: 71 00 80 05 00 00 00 00 00 02 01 00 00 00 00 00
90: 10 11 11 01 00 13 11 00 41 19 00 00 00 0a 7d 00
a0: 02 00 20 00 17 02 00 1f 04 03 00 00 00 00 00 00
b0: 80 00 00 00 00 00 00 00 00 00 04 1e 20 10 00 00
c0: 44 40 50 11 00 20 05 08 00 00 00 00 00 00 00 00
d0: 02 28 00 0e 0b 00 00 30 00 00 31 b5 00 00 02 00
e0: 00 00 00 00 09 a0 04 f1 00 00 00 00 00 00 00 00
f0: 00 00 01 00 74 f8 20 80 38 0f 00 00 04 00 00 00
0000:00:01.0 PCI bridge: Intel Corp.: Unknown device 3341 (rev 03) (prog-if 00 [Normal decode])
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B-
Status: Cap- 66Mhz+ UDF- FastB2B+ ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 96
Bus: primary=00, secondary=01, subordinate=01, sec-latency=64
I/O behind bridge: 00003000-00003fff
Memory behind bridge: d0100000-d01fffff
Prefetchable memory behind bridge: d8000000-dfffffff
Expansion ROM at 00003000 [disabled] [size=4K]
BridgeCtl: Parity- SERR- NoISA+ VGA+ MAbort- >Reset- FastB2B-
00: 86 80 41 33 07 01 a0 00 03 00 04 06 00 60 01 00
10: 00 00 00 00 00 00 00 00 00 01 01 40 30 30 a0 22
20: 10 d0 10 d0 00 d8 f0 df 00 00 00 00 00 00 00 00
30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0c 00
40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
60: 01 00 00 00 00 00 49 00 00 00 00 00 00 00 00 00
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0000:00:1d.0 USB Controller: Intel Corp. 82801DB USB (Hub #1) (rev 03) (prog-if 00 [UHCI])
Subsystem: Acer Incorporated [ALI]: Unknown device 001f
Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
Status: Cap- 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 0
Interrupt: pin A routed to IRQ 10
Region 4: I/O ports at 1800 [size=32]
00: 86 80 c2 24 05 00 80 02 03 00 03 0c 00 00 80 00
10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
20: 01 18 00 00 00 00 00 00 00 00 00 00 25 10 1f 00
30: 00 00 00 00 00 00 00 00 00 00 00 00 0a 01 00 00
40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
60: 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
c0: 00 2f 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
f0: 00 00 00 00 00 00 00 00 60 0f 00 00 00 00 00 00
0000:00:1d.1 USB Controller: Intel Corp. 82801DB USB (Hub #2) (rev 03) (prog-if 00 [UHCI])
Subsystem: Acer Incorporated [ALI]: Unknown device 001f
Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
Status: Cap- 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 0
Interrupt: pin B routed to IRQ 5
Region 4: I/O ports at 1820 [size=32]
00: 86 80 c4 24 05 00 80 02 03 00 03 0c 00 00 00 00
10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
20: 21 18 00 00 00 00 00 00 00 00 00 00 25 10 1f 00
30: 00 00 00 00 00 00 00 00 00 00 00 00 05 02 00 00
40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
60: 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
c0: 00 2f 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
f0: 00 00 00 00 00 00 00 00 60 0f 00 00 00 00 00 00
0000:00:1d.2 USB Controller: Intel Corp. 82801DB USB (Hub #3) (rev 03) (prog-if 00 [UHCI])
Subsystem: Acer Incorporated [ALI]: Unknown device 001f
Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
Status: Cap- 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 0
Interrupt: pin C routed to IRQ 10
Region 4: I/O ports at 1840 [size=32]
00: 86 80 c7 24 05 00 80 02 03 00 03 0c 00 00 00 00
10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
20: 41 18 00 00 00 00 00 00 00 00 00 00 25 10 1f 00
30: 00 00 00 00 00 00 00 00 00 00 00 00 0a 03 00 00
40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
60: 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
c0: 00 2f 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
f0: 00 00 00 00 00 00 00 00 60 0f 00 00 00 00 00 00
0000:00:1d.7 USB Controller: Intel Corp. 82801DB USB EHCI Controller (rev 03) (prog-if 20 [EHCI])
Subsystem: Acer Incorporated [ALI]: Unknown device 001f
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B-
Status: Cap+ 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 0
Interrupt: pin D routed to IRQ 10
Region 0: Memory at d0000000 (32-bit, non-prefetchable)
Capabilities: [50] Power Management version 2
Flags: PMEClk- DSI- D1- D2- AuxCurrent=375mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
Status: D0 PME-Enable- DSel=0 DScale=0 PME-
Capabilities: [58] #0a [2080]
00: 86 80 cd 24 06 01 90 02 03 20 03 0c 00 00 00 00
10: 00 00 00 d0 00 00 00 00 00 00 00 00 00 00 00 00
20: 00 00 00 00 00 00 00 00 00 00 00 00 25 10 1f 00
30: 00 00 00 00 50 00 00 00 00 00 00 00 0a 04 00 00
40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
50: 01 58 c2 c9 00 00 00 00 0a 00 80 20 00 00 00 00
60: 20 20 7f 00 10 00 00 00 01 00 00 00 00 00 08 c0
70: 00 00 d7 0f 00 00 00 00 00 00 00 00 00 00 00 00
80: 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 27 00
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
f0: 78 bf 1f 00 88 83 00 00 60 0f 00 00 06 00 00 00
0000:00:1e.0 PCI bridge: Intel Corp. 82801BAM/CAM PCI Bridge (rev 83) (prog-if 00 [Normal decode])
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B-
Status: Cap- 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR+
Latency: 0
Bus: primary=00, secondary=02, subordinate=02, sec-latency=64
I/O behind bridge: 00004000-00004fff
Memory behind bridge: d0200000-d05fffff
BridgeCtl: Parity- SERR- NoISA+ VGA- MAbort- >Reset- FastB2B-
00: 86 80 48 24 07 01 80 80 83 00 04 06 00 00 01 00
10: 00 00 00 00 00 00 00 00 00 02 02 40 40 40 80 22
20: 20 d0 50 d0 f0 ff 00 00 00 00 00 00 00 00 00 00
30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 04 00
40: 02 28 20 00 00 01 00 00 00 00 00 00 00 00 00 00
50: 02 74 00 00 00 00 00 00 00 00 00 00 00 00 00 00
60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
70: 40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
80: 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 00
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a0: 10 00 08 00 00 00 00 00 00 00 00 00 00 00 00 00
b0: 01 00 02 00 00 00 c0 00 00 00 00 00 00 00 00 00
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
f0: 00 00 00 00 00 00 00 00 60 0f 00 00 00 00 2e 46
0000:00:1f.0 ISA bridge: Intel Corp.: Unknown device 24cc (rev 03)
Control: I/O+ Mem+ BusMaster+ SpecCycle+ MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
Status: Cap- 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 0
00: 86 80 cc 24 0f 00 80 02 03 00 01 06 00 00 80 00
10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
40: 01 10 00 00 10 00 00 00 00 00 00 00 00 00 00 00
50: 00 00 00 00 00 00 00 00 81 11 00 00 10 00 00 00
60: 0a 0a 0a 05 90 00 00 00 0b 80 80 0a 00 00 00 00
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
90: ff fc 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a0: a4 03 00 00 04 00 00 00 0d 00 00 00 00 00 00 00
b0: 00 00 00 00 00 00 00 00 00 00 01 0a 00 00 00 00
c0: 00 00 00 00 00 fe 00 00 00 00 00 00 00 00 00 00
d0: 06 28 00 00 02 cf 00 00 04 00 00 00 00 00 00 00
e0: 10 00 00 ff 00 00 00 00 33 22 11 00 00 00 67 45
f0: 0f 00 00 00 00 00 00 00 60 0f 03 00 00 00 80 00
0000:00:1f.1 IDE interface: Intel Corp.: Unknown device 24ca (rev 03) (prog-if 8a [Master SecP PriP])
Subsystem: Acer Incorporated [ALI]: Unknown device 001f
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
Status: Cap- 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 0
Interrupt: pin A routed to IRQ 10
Region 0: I/O ports at <unassigned>
Region 1: I/O ports at <unassigned>
Region 2: I/O ports at <unassigned>
Region 3: I/O ports at <unassigned>
Region 4: I/O ports at 1860 [size=16]
Region 5: Memory at 20000000 (32-bit, non-prefetchable) [size=1K]
00: 86 80 ca 24 07 00 80 02 03 8a 01 01 00 00 00 00
10: 01 00 00 00 01 00 00 00 01 00 00 00 01 00 00 00
20: 61 18 00 00 00 00 00 20 00 00 00 00 25 10 1f 00
30: 00 00 00 00 00 00 00 00 00 00 00 00 ff 01 00 00
40: 07 a3 00 80 00 00 00 00 01 00 01 00 00 00 00 00
50: 00 00 00 00 11 14 00 00 00 00 00 00 00 00 00 00
60: 08 00 00 00 00 00 00 00 08 00 00 00 00 00 00 00
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
f0: 00 00 00 00 00 00 00 00 60 0f 00 00 00 00 00 00
0000:00:1f.3 SMBus: Intel Corp. 82801DB SMBus (rev 03)
Subsystem: Acer Incorporated [ALI]: Unknown device 001f
Control: I/O+ Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
Status: Cap- 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Interrupt: pin B routed to IRQ 10
Region 4: I/O ports at 1880 [size=32]
00: 86 80 c3 24 01 00 80 02 03 00 05 0c 00 00 00 00
10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
20: 81 18 00 00 00 00 00 00 00 00 00 00 25 10 1f 00
30: 00 00 00 00 00 00 00 00 00 00 00 00 0a 02 00 00
40: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
f0: 00 00 00 00 00 00 00 00 60 0f 00 00 00 00 00 00
0000:00:1f.5 Multimedia audio controller: Intel Corp. 82801DB AC'97 Audio (rev 03)
Subsystem: Acer Incorporated [ALI]: Unknown device 001f
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
Status: Cap+ 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 0
Interrupt: pin B routed to IRQ 10
Region 0: I/O ports at 1c00
Region 1: I/O ports at 18c0 [size=64]
Region 2: Memory at d0000c00 (32-bit, non-prefetchable) [size=512]
Region 3: Memory at d0000800 (32-bit, non-prefetchable) [size=256]
Capabilities: [50] Power Management version 2
Flags: PMEClk- DSI- D1- D2- AuxCurrent=375mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
Status: D0 PME-Enable- DSel=0 DScale=0 PME-
00: 86 80 c5 24 07 00 90 02 03 00 01 04 00 00 00 00
10: 01 1c 00 00 c1 18 00 00 00 0c 00 d0 00 08 00 d0
20: 00 00 00 00 00 00 00 00 00 00 00 00 25 10 1f 00
30: 00 00 00 00 50 00 00 00 00 00 00 00 0a 02 00 00
40: 09 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00
50: 01 00 c2 c9 00 00 00 00 00 00 00 00 00 00 00 00
60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
f0: 00 00 00 00 00 00 00 00 60 0f 00 00 00 00 00 00
0000:00:1f.6 Modem: Intel Corp. 82801DB AC'97 Modem (rev 03) (prog-if 00 [Generic])
Subsystem: Acer Incorporated [ALI]: Unknown device 001f
Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
Status: Cap+ 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 0
Interrupt: pin B routed to IRQ 10
Region 0: I/O ports at 2400
Region 1: I/O ports at 2000 [size=128]
Capabilities: [50] Power Management version 2
Flags: PMEClk- DSI- D1- D2- AuxCurrent=375mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
Status: D0 PME-Enable- DSel=0 DScale=0 PME-
00: 86 80 c6 24 05 00 90 02 03 00 03 07 00 00 00 00
10: 01 24 00 00 01 20 00 00 00 00 00 00 00 00 00 00
20: 00 00 00 00 00 00 00 00 00 00 00 00 25 10 1f 00
30: 00 00 00 00 50 00 00 00 00 00 00 00 0a 02 00 00
40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
50: 01 00 c2 c9 00 00 00 00 00 00 00 00 00 00 00 00
60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
f0: 00 00 00 00 00 00 00 00 60 0f 00 00 00 00 00 00
0000:01:00.0 VGA compatible controller: ATI Technologies Inc Radeon R250 Lf [Radeon Mobility 9000] (rev 01) (prog-if 00 [VGA])
Subsystem: Acer Incorporated [ALI]: Unknown device 001f
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping+ SERR+ FastB2B+
Status: Cap+ 66Mhz+ UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 66 (2000ns min), cache line size 08
Interrupt: pin A routed to IRQ 10
Region 0: Memory at d8000000 (32-bit, prefetchable)
Region 1: I/O ports at 3000 [size=256]
Region 2: Memory at d0100000 (32-bit, non-prefetchable) [size=64K]
Capabilities: [58] AGP version 2.0
Status: RQ=48 Iso- ArqSz=0 Cal=0 SBA+ ITACoh- GART64- HTrans- 64bit- FW+ AGP3- Rate=x1,x2,x4
Command: RQ=32 ArqSz=0 Cal=0 SBA+ AGP+ GART64- 64bit- FW- Rate=x4
Capabilities: [50] Power Management version 2
Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D0 PME-Enable- DSel=0 DScale=0 PME-
00: 02 10 66 4c 87 03 b0 02 01 00 00 03 08 42 00 00
10: 08 00 00 d8 01 30 00 00 00 00 10 d0 00 00 00 00
20: 00 00 00 00 00 00 00 00 00 00 00 00 25 10 1f 00
30: 00 00 00 00 58 00 00 00 00 00 00 00 0a 01 08 00
40: 00 00 00 00 00 00 00 00 00 00 00 00 25 10 1f 00
50: 01 00 02 06 00 00 00 00 02 50 20 00 17 02 00 2f
60: 04 03 00 1f 00 00 00 00 00 00 00 00 00 00 00 00
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0000:02:02.0 Ethernet controller: Broadcom Corporation BCM4401 100Base-T (rev 01)
Subsystem: Acer Incorporated [ALI]: Unknown device 001f
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B-
Status: Cap+ 66Mhz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 64
Interrupt: pin A routed to IRQ 5
Region 0: Memory at d0204000 (32-bit, non-prefetchable)
Capabilities: [40] Power Management version 2
Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=375mA PME(D0+,D1+,D2+,D3hot+,D3cold+)
Status: D0 PME-Enable- DSel=0 DScale=2 PME-
00: e4 14 01 44 06 01 10 00 01 00 00 02 00 40 00 00
10: 00 40 20 d0 00 00 00 00 00 00 00 00 00 00 00 00
20: 00 00 00 00 00 00 00 00 00 00 00 00 25 10 1f 00
30: 00 00 00 00 40 00 00 00 00 00 00 00 05 01 00 00
40: 01 00 c2 ff 00 40 00 00 00 00 00 00 00 00 00 00
50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
80: 00 00 00 18 00 00 00 00 00 00 00 00 00 00 00 00
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a0: 00 10 00 00 01 20 00 00 00 00 00 00 00 00 00 00
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0000:02:04.0 Network controller: Intel Corp.: Unknown device 1043 (rev 04)
Subsystem: Intel Corp.: Unknown device 2527
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV+ VGASnoop- ParErr- Stepping- SERR+ FastB2B-
Status: Cap+ 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 64 (500ns min, 8500ns max), cache line size 08
Interrupt: pin A routed to IRQ 11
Region 0: Memory at d0206000 (32-bit, non-prefetchable)
Capabilities: [dc] Power Management version 2
Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D0 PME-Enable- DSel=0 DScale=1 PME-
00: 86 80 43 10 16 01 90 02 04 00 80 02 08 40 00 00
10: 00 60 20 d0 00 00 00 00 00 00 00 00 00 00 00 00
20: 00 00 00 00 00 00 00 00 00 00 00 00 86 80 27 25
30: 00 00 00 00 dc 00 00 00 00 00 00 00 0b 01 02 22
40: 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d0: 00 00 00 00 00 00 00 00 00 00 00 00 01 00 02 00
e0: 00 20 00 14 00 00 00 00 00 00 00 00 00 00 00 00
f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0000:02:06.0 CardBus bridge: O2 Micro, Inc.: Unknown device 7114 (rev 20)
Subsystem: Acer Incorporated [ALI]: Unknown device 001f
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping+ SERR+ FastB2B-
Status: Cap+ 66Mhz- UDF- FastB2B- ParErr- DEVSEL=slow >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 64
Interrupt: pin A routed to IRQ 10
Region 0: Memory at d0207000 (32-bit, non-prefetchable)
Bus: primary=02, secondary=03, subordinate=06, sec-latency=176
Memory window 0: d0400000-d04ff000 (prefetchable)
Memory window 1: d0300000-d03ff000 (prefetchable)
I/O window 0: 00004400-000044ff
I/O window 1: 00004000-000040ff
BridgeCtl: Parity- SERR- ISA- VGA- MAbort- >Reset+ 16bInt+ PostWrite-
16-bit legacy interface ports at 0001
00: 17 12 14 71 87 01 10 04 20 00 07 06 00 40 82 00
10: 00 70 20 d0 a0 00 00 02 02 03 06 b0 00 00 40 d0
20: 00 f0 4f d0 00 00 30 d0 00 f0 3f d0 01 44 00 00
30: fd 44 00 00 01 40 00 00 fd 40 00 00 ff 01 c0 03
40: 25 10 1f 00 01 00 00 00 00 00 00 00 00 00 00 00
50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
80: 00 00 00 00 00 00 00 00 00 00 00 00 82 18 8c 01
90: 03 00 25 02 00 00 00 00 00 00 00 00 00 00 00 00
a0: 01 00 02 fe 00 40 c0 00 00 00 00 00 09 00 00 00
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d0: 00 40 00 08 ea 0b 81 80 00 00 00 00 00 00 40 00
e0: 01 00 82 00 00 00 00 00 00 00 00 00 00 00 00 00
f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0000:02:06.1 CardBus bridge: O2 Micro, Inc.: Unknown device 7114 (rev 20)
Subsystem: Acer Incorporated [ALI]: Unknown device 001f
Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping+ SERR- FastB2B-
Status: Cap+ 66Mhz- UDF- FastB2B- ParErr- DEVSEL=slow >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Interrupt: pin A routed to IRQ 10
Region 0: Memory at 20001000 (32-bit, non-prefetchable) [disabled]
Bus: primary=02, secondary=07, subordinate=0a, sec-latency=176
I/O window 0: 00000000-00000003 [disabled]
I/O window 1: 00000000-00000003 [disabled]
BridgeCtl: Parity- SERR- ISA- VGA- MAbort- >Reset- 16bInt- PostWrite-
16-bit legacy interface ports at 0001
00: 17 12 14 71 80 00 10 04 20 00 07 06 00 00 82 00
10: 00 10 00 20 a0 00 00 02 02 07 0a b0 00 00 00 00
20: 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00
30: 01 00 00 00 01 00 00 00 01 00 00 00 00 01 00 00
40: 25 10 1f 00 01 00 00 00 00 00 00 00 00 00 00 00
50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
80: 00 00 00 00 00 00 00 00 00 00 00 00 82 18 8c 01
90: 03 00 25 02 00 00 00 00 00 00 00 00 00 00 00 00
a0: 01 00 02 fe 00 40 c0 00 00 00 00 00 09 00 00 00
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d0: 00 40 00 08 ea 0b 82 80 00 00 00 00 00 00 40 10
e0: 01 00 82 00 00 00 00 00 00 00 00 00 00 00 00 00
f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0000:02:06.2 System peripheral: O2 Micro, Inc.: Unknown device 7110
Subsystem: Acer Incorporated [ALI]: Unknown device 001f
Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B-
Status: Cap+ 66Mhz- UDF- FastB2B- ParErr- DEVSEL=slow >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Interrupt: pin A routed to IRQ 10
Region 0: Memory at d0208000 (32-bit, non-prefetchable)
Capabilities: [a0] Power Management version 2
Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA PME(D0+,D1+,D2+,D3hot+,D3cold+)
Status: D0 PME-Enable- DSel=0 DScale=0 PME-
00: 17 12 10 71 03 01 10 04 00 00 80 08 08 40 00 00
10: 00 80 20 d0 00 00 00 00 00 00 00 00 00 00 00 00
20: 00 00 00 00 00 00 00 00 00 00 00 00 25 10 1f 00
30: 00 00 00 00 a0 00 00 00 00 00 00 00 0a 01 00 00
40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a0: 01 00 02 fe 00 00 00 00 00 00 00 00 00 00 00 00
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0000:02:07.0 FireWire (IEEE 1394): Texas Instruments TSB43AB21 IEEE-1394a-2000 Controller (PHY/Link) (prog-if 10 [OHCI])
Subsystem: Acer Incorporated [ALI]: Unknown device 001f
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV+ VGASnoop- ParErr- Stepping- SERR+ FastB2B-
Status: Cap+ 66Mhz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 64 (500ns min, 1000ns max), cache line size 08
Interrupt: pin A routed to IRQ 10
Region 0: Memory at d0209000 (32-bit, non-prefetchable)
Region 1: Memory at d0200000 (32-bit, non-prefetchable) [size=16K]
Capabilities: [44] Power Management version 2
Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA PME(D0+,D1+,D2+,D3hot+,D3cold-)
Status: D0 PME-Enable- DSel=0 DScale=0 PME-
00: 4c 10 26 80 16 01 10 02 00 10 00 0c 08 40 00 00
10: 00 90 20 d0 00 00 20 d0 00 00 00 00 00 00 00 00
20: 00 00 00 00 00 00 00 00 00 00 00 00 25 10 1f 00
30: 00 00 00 00 44 00 00 00 00 00 00 00 0a 01 02 04
40: 00 00 00 00 01 00 02 7e 00 00 00 00 00 00 00 00
50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
e0: 00 00 00 00 00 00 00 00 00 00 00 00 88 00 00 00
f0: 10 00 00 00 86 10 00 00 25 10 1f 00 00 00 00 00
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: dummydriver.c --]
[-- Type: text/x-csrc; charset="us-ascii"; name="dummydriver.c", Size: 4820 bytes --]
/***************************************************************************
* Copyright (C) 2004 by Stefan Dösinger *
* stefandoesinger-RbZlAiThDcE@public.gmane.org *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
/*This driver provides an empty suspend and resume function for the sound card
and the modem built into the Acer Travelmate 800. This is to prevent the
default resume function of the kernel from crashing the system.*/
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/module.h>
#include <linux/pci.h>
#include <linux/delay.h> /*For testing with mdelay*/
MODULE_DESCRIPTION("My kernel module");
MODULE_AUTHOR("Stefan Dösinger (stefandoesinger-RbZlAiThDcE@public.gmane.org)");
MODULE_LICENSE("GPL");
static struct pci_device_id dummy_pci_tbl [] = {
{0x8086, 0x24c5, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, /*Sound card*/
{0x8086, 0x24c6, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* Modem */
// {0x1217, 0x7114, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* pcmcia */
// {0x1217, 0x7110, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* unknown */
// {0x104c, 0x8026, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* firewire */
// {0x8086, 0x24c2, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* usb */
// {0x8086, 0x24c4, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* usb*/
// {0x8086, 0x24c7, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* usb*/
{0x8086, 0x24cd, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* usb */
{0,}
};
static struct work_struct work;
int queued_work=0;
unsigned int pci_config[16];
static void delayed_resume(void *data)
{
struct pci_dev *dev = data;
printk("delayed resume\n");
pci_restore_state(dev, pci_config);
}
static int dummy_pm_suspend(struct pci_dev *dev, u32 pm_state)
{
printk("%s: not doing anything\n", __FUNCTION__);
if( (dev->vendor == 0x8086) && (dev->device == 0x24c5) ) /*Do some testing with the soundcard*/
{
pci_save_state(dev, pci_config);
}
return 0;
}
static int dummy_pm_resume(struct pci_dev *dev)
{
printk("%s: not doing anything\n", __FUNCTION__);
if( (dev->vendor == 0x8086) && (dev->device == 0x24c5) ) /*Try to restore the soundcard's config*/
{
printk("Resuming sound card\n");
PREPARE_WORK(&work, &delayed_resume, dev);
/* mdelay(2000); *this does NOT work. I have to use schedule_delayed_work*/
schedule_delayed_work(&work, 2000);
}
return 0;
}
static void __devexit dummy_remove(struct pci_dev *pci_dev)
{
printk("%s\n", __FUNCTION__);
return;
}
static int __devinit dummy_probe(struct pci_dev *pci_dev, const struct pci_device_id *pci_id)
{
printk("%s\n", __FUNCTION__);
if( (pci_dev->vendor == 0x8086 ) && (pci_dev->device == 0x24c5) )
{
INIT_WORK(&work, &delayed_resume, NULL);
}
return 0;
}
static struct pci_driver dummy_pci_driver = {
.name = "dummy_driver",
.id_table = dummy_pci_tbl,
.probe = dummy_probe,
.remove = __devexit_p(dummy_remove),
#ifdef CONFIG_PM
.suspend = dummy_pm_suspend,
.resume = dummy_pm_resume,
#endif /* CONFIG_PM */
};
static int dummydriver_init_module(void)
{
printk( KERN_DEBUG "Module dummydriver init\n" );
if (!pci_register_driver(&dummy_pci_driver))
{
pci_unregister_driver(&dummy_pci_driver);
return -ENODEV;
}
return 0;
}
static void dummydriver_exit_module(void)
{
printk( KERN_DEBUG "Module dummydriver exit\n" );
pci_unregister_driver(&dummy_pci_driver);
}
module_init(dummydriver_init_module);
module_exit(dummydriver_exit_module);
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: pci device resume too early?
[not found] ` <200407281953.39159.stefandoesinger-RbZlAiThDcE@public.gmane.org>
@ 2004-07-28 18:14 ` Matthew Garrett
[not found] ` <1091038485.15464.9.camel-myFlNLNQP+Q@public.gmane.org>
0 siblings, 1 reply; 8+ messages in thread
From: Matthew Garrett @ 2004-07-28 18:14 UTC (permalink / raw)
To: stefandoesinger-RbZlAiThDcE; +Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
On Wed, 2004-07-28 at 19:53 +0200, Stefan Dösinger wrote:
> The problem is that directly after S3 resume, any attempt to write to pci
> configuration registers of three of my devices(00:1d.7, 00:1f.5, 00:1f.6)
> locks up my system. After some testing, I found out that pci_restore_state
> works nice if I place it into a function which is scheduled with
> schedule_delayed_work. I use my dummydriver module for testing.
Ooh, neat. This might explain the problems I have with yenta resuming on
my Thinkpad 240X. pci_restore_state is called from drivers/pci/pci-
driver.c (see pci_default_resume), and from some specific drivers (it
can probably be removed from them now though, really). That gets called
from the chain of things called in device_resume in
drivers/base/power/resume.c - it steps through each registered driver
and calls the associated resume method. For PCI stuff, that will either
be pci_default_resume or a driver-specific resume method. device_resume
is called from suspend_finish in kernel/power/main.c.
--
Matthew Garrett | mjg59-1xO5oi07KQx4cg9Nei1l7Q@public.gmane.org
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_idG21&alloc_id\x10040&op=click
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: pci device resume too early?
[not found] ` <1091038485.15464.9.camel-myFlNLNQP+Q@public.gmane.org>
@ 2004-07-28 19:18 ` Stefan Dösinger
[not found] ` <200407282118.52624.stefandoesinger-RbZlAiThDcE@public.gmane.org>
0 siblings, 1 reply; 8+ messages in thread
From: Stefan Dösinger @ 2004-07-28 19:18 UTC (permalink / raw)
To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f; +Cc: Matthew Garrett
Hi,
> Ooh, neat. This might explain the problems I have with yenta resuming on
> my Thinkpad 240X. pci_restore_state is called from drivers/pci/pci-
> driver.c (see pci_default_resume), and from some specific drivers (it
> can probably be removed from them now though, really). That gets called
> from the chain of things called in device_resume in
> drivers/base/power/resume.c - it steps through each registered driver
> and calls the associated resume method. For PCI stuff, that will either
> be pci_default_resume or a driver-specific resume method. device_resume
> is called from suspend_finish in kernel/power/main.c.
Thanks for the informations.
I moved device_resume(); in suspend_finish to be called after
pm_ops->finish(state); and my system resumes MUCH nicer.
Sound resume works, usb-uhci resume works, ehci pci restore works. My suspend
script will shink a lot.
That's what suspend_finish looks like:
static void suspend_finish(u32 state)
{
if (pm_ops && pm_ops->finish)
pm_ops->finish(state);
device_resume(); /*Call it after pm_ops->finish*/
thaw_processes();
pm_restore_console();
}
Can you try if this helps your yenta?
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: pci device resume too early?
[not found] ` <200407282118.52624.stefandoesinger-RbZlAiThDcE@public.gmane.org>
@ 2004-07-28 21:06 ` Luca
[not found] ` <20040728210602.GA26087-sTXFmx6KbOnUXq0IF5SVAZ4oGUkBHcCu@public.gmane.org>
2004-07-28 21:59 ` Matthew Garrett
1 sibling, 1 reply; 8+ messages in thread
From: Luca @ 2004-07-28 21:06 UTC (permalink / raw)
To: Stefan Dösinger
Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f, Matthew Garrett
Il Wed, Jul 28, 2004 at 09:18:52PM +0200, Stefan Dösinger ha scritto:
> I moved device_resume(); in suspend_finish to be called after
> pm_ops->finish(state); and my system resumes MUCH nicer.
> Sound resume works, usb-uhci resume works, ehci pci restore works. My suspend
> script will shink a lot.
>
> That's what suspend_finish looks like:
>
> static void suspend_finish(u32 state)
> {
> if (pm_ops && pm_ops->finish)
> pm_ops->finish(state);
> device_resume(); /*Call it after pm_ops->finish*/
> thaw_processes();
> pm_restore_console();
> }
Well, it may work but it's not correct. ->finish is meant to be called
to finalize the wakeup procedure *after* devices are waked up.
ACPI finish calls acpi_leave_sleep_state() and restore the waking
vectore. I'm not an ACPI guru but my guess is that what you need is
in acpi_leave_sleep_state().
If that's the case we may want to split the finish callback (say
prepare_wake and finish_wake).
Luca
--
Home: http://kronoz.cjb.net
"In linea di principio sarei indifferente al natale, se solo il natale
ricambiasse la cortesia e mi lasciasse in pace." -- Marco d'Itri
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_idG21&alloc_id\x10040&op=click
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: pci device resume too early?
[not found] ` <200407282118.52624.stefandoesinger-RbZlAiThDcE@public.gmane.org>
2004-07-28 21:06 ` Luca
@ 2004-07-28 21:59 ` Matthew Garrett
1 sibling, 0 replies; 8+ messages in thread
From: Matthew Garrett @ 2004-07-28 21:59 UTC (permalink / raw)
To: stefandoesinger-RbZlAiThDcE; +Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
On Wed, 2004-07-28 at 21:18 +0200, Stefan Dösinger wrote:
> Can you try if this helps your yenta?
Hmm. Sadly not. If pci_restore_state is called on my yenta, every other
character of the next printk is missing and then the machine hangs. I'm
at something of a loss as to why it does this...
--
Matthew Garrett | mjg59-1xO5oi07KQx4cg9Nei1l7Q@public.gmane.org
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_idG21&alloc_id\x10040&op=click
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: pci device resume too early?
@ 2004-07-29 0:48 Li, Shaohua
0 siblings, 0 replies; 8+ messages in thread
From: Li, Shaohua @ 2004-07-29 0:48 UTC (permalink / raw)
To: stefandoesinger-RbZlAiThDcE; +Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
How about add one line in pci_default_resume just like this:
static void pci_default_resume(struct pci_dev *pci_dev)
{
+ pci_set_power_state(pci_dev, 0);
/* restore the PCI config space */
pci_restore_state(pci_dev, pci_dev->saved_config_space);
/* if the device was enabled before suspend, reenable */
Thanks,
Shaohua
>-----Original Message-----
>From: acpi-devel-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org [mailto:acpi-devel-
>admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org] On Behalf Of stefandoesinger-RbZlAiThDcE@public.gmane.org
>Sent: Thursday, July 29, 2004 1:54 AM
>To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
>Subject: [ACPI] pci device resume too early?
>
>Hello,
>I have problems with a few pci devices after resume. Hardware
environment
>is a
>acer Travelmate 803(lspci attached), I use an unpatched linux-2.6.8-rc2
>kernel.
>
>The problem is that directly after S3 resume, any attempt to write to
pci
>configuration registers of three of my devices(00:1d.7, 00:1f.5,
00:1f.6)
>locks up my system. After some testing, I found out that
pci_restore_state
>works nice if I place it into a function which is scheduled with
>schedule_delayed_work. I use my dummydriver module for testing.
>
>Using mdelay(something) instead of scheduling a work doesn't help, so
it's
>not
>the hardware which needs some time.
>Is it possible that the driver's resume functions are called too early?
Can
>you point me to the place in the acpi code which calls the resume
methods
>that I can do further testing? I couldn't find it.
>
>Thanks in advance,
>Stefan
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_idG21&alloc_id\x10040&op=click
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: pci device resume too early?
[not found] ` <20040728210602.GA26087-sTXFmx6KbOnUXq0IF5SVAZ4oGUkBHcCu@public.gmane.org>
@ 2004-07-29 15:04 ` Stefan Dösinger
2004-08-04 18:47 ` Stefan Dösinger
1 sibling, 0 replies; 8+ messages in thread
From: Stefan Dösinger @ 2004-07-29 15:04 UTC (permalink / raw)
To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f, Matthew Garrett,
Luca
Hi,
> Well, it may work but it's not correct. ->finish is meant to be called
> to finalize the wakeup procedure *after* devices are waked up.
>
> ACPI finish calls acpi_leave_sleep_state() and restore the waking
> vectore. I'm not an ACPI guru but my guess is that what you need is
> in acpi_leave_sleep_state().
You're right.
acpi_leave_sleep_state(state);
device_resume();
if (pm_ops && pm_ops->finish)
pm_ops->finish(state);
Works too!
Stefan
-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: pci device resume too early?
[not found] ` <20040728210602.GA26087-sTXFmx6KbOnUXq0IF5SVAZ4oGUkBHcCu@public.gmane.org>
2004-07-29 15:04 ` Stefan Dösinger
@ 2004-08-04 18:47 ` Stefan Dösinger
1 sibling, 0 replies; 8+ messages in thread
From: Stefan Dösinger @ 2004-08-04 18:47 UTC (permalink / raw)
To: kronos-0Y2hHv2PMqFeoWH0uzbU5w
Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f, Matthew Garrett
[-- Attachment #1: Type: text/plain, Size: 545 bytes --]
Hi,
> ACPI finish calls acpi_leave_sleep_state() and restore the waking
> vectore. I'm not an ACPI guru but my guess is that what you need is
> in acpi_leave_sleep_state().
>
> If that's the case we may want to split the finish callback (say
> prepare_wake and finish_wake).
I've got a small patch which introduces ->leave function which calls(if acpi
is used) acpi_leave_sleep_state and acpi_disable_wakeup_device which are
needed for me to make device resume work properly.
Hope it's correct and you like it,
Stefan Dösinger
[-- Attachment #2: resume-finish-split.patch --]
[-- Type: text/x-diff, Size: 1774 bytes --]
--- linux-2.6.8-rc2/include/linux/pm.h 2004-08-04 20:36:48.044455680 +0200
+++ include/linux/pm.h 2004-08-04 19:50:07.000000000 +0200
@@ -214,6 +214,7 @@
u32 pm_disk_mode;
int (*prepare)(u32 state);
int (*enter)(u32 state);
+ int (*leave)(u32 state);
int (*finish)(u32 state);
};
--- linux-2.6.8-rc2/kernel/power/main.c 2004-08-04 20:36:17.755060368 +0200
+++ kernel/power/main.c 2004-08-04 19:52:26.000000000 +0200
@@ -108,6 +108,8 @@
static void suspend_finish(u32 state)
{
+ if (pm_ops && pm_ops->leave)
+ pm_ops->leave(state);
device_resume();
if (pm_ops && pm_ops->finish)
pm_ops->finish(state);
--- linux-2.6.8-rc2/drivers/acpi/sleep/main.c 2004-08-04 20:29:23.863981376 +0200
+++ drivers/acpi/sleep/main.c 2004-08-04 20:33:41.348837728 +0200
@@ -127,7 +127,23 @@
return ACPI_SUCCESS(status) ? 0 : -EFAULT;
}
+/**
+ * acpi_pm_leave - Make system ready to resume devices.
+ * @pm_state: State we're coming out of.
+ *
+ * This is called after we wake back up and before device
+ * resume methods are called.
+ */
+
+static int acpi_pm_leave(u32 pm_state)
+{
+ u32 acpi_state = acpi_suspend_states[pm_state];
+ acpi_leave_sleep_state(acpi_state);
+ acpi_disable_wakeup_device(acpi_state);
+
+ return 0;
+}
/**
* acpi_pm_finish - Finish up suspend sequence.
* @pm_state: State we're coming out of.
@@ -140,9 +156,6 @@
{
u32 acpi_state = acpi_suspend_states[pm_state];
- acpi_leave_sleep_state(acpi_state);
- acpi_disable_wakeup_device(acpi_state);
-
/* reset firmware waking vector */
acpi_set_firmware_waking_vector((acpi_physical_address) 0);
@@ -170,6 +183,7 @@
static struct pm_ops acpi_pm_ops = {
.prepare = acpi_pm_prepare,
.enter = acpi_pm_enter,
+ .leave = acpi_pm_leave,
.finish = acpi_pm_finish,
};
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2004-08-04 18:47 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-07-28 17:53 pci device resume too early? Stefan Dösinger
[not found] ` <200407281953.39159.stefandoesinger-RbZlAiThDcE@public.gmane.org>
2004-07-28 18:14 ` Matthew Garrett
[not found] ` <1091038485.15464.9.camel-myFlNLNQP+Q@public.gmane.org>
2004-07-28 19:18 ` Stefan Dösinger
[not found] ` <200407282118.52624.stefandoesinger-RbZlAiThDcE@public.gmane.org>
2004-07-28 21:06 ` Luca
[not found] ` <20040728210602.GA26087-sTXFmx6KbOnUXq0IF5SVAZ4oGUkBHcCu@public.gmane.org>
2004-07-29 15:04 ` Stefan Dösinger
2004-08-04 18:47 ` Stefan Dösinger
2004-07-28 21:59 ` Matthew Garrett
-- strict thread matches above, loose matches on Subject: below --
2004-07-29 0:48 Li, Shaohua
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox