Bug 7969 - tg3 driver: S3 problem in MSI mode
Summary: tg3 driver: S3 problem in MSI mode
Status: CLOSED CODE_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: Network (show other bugs)
Hardware: i386 Linux
: P2 normal
Assignee: Rafael J. Wysocki
URL:
Keywords:
Depends on:
Blocks: 7216 56331
  Show dependency tree
 
Reported: 2007-02-08 17:00 UTC by Zhang Rui
Modified: 2013-04-09 06:23 UTC (History)
1 user (show)

See Also:
Kernel Version: 2.6.19
Subsystem:
Regression: ---
Bisected commit-id:


Attachments
/proc/interrupts w/ and w/o "pci=nomsi" (1.23 KB, text/plain)
2007-02-08 17:03 UTC, Zhang Rui
Details
save pci state in suspend method and don't call tg3_halt (1.07 KB, patch)
2007-02-08 17:15 UTC, Zhang Rui
Details | Diff
bug fix patch (391 bytes, patch)
2007-02-09 14:25 UTC, Michael Chan
Details | Diff

Description Zhang Rui 2007-02-08 17:00:23 UTC
Software Environment: 2.6.19 with MSI enabled
Problem Description:
After a S3 resume, I got "irq 20 nobody cared...",
and then IRQ 20 is disabled.
I tried different workarounds and finally found the two below make sense to me:
1. boot option "pci=nomsi". At this time, eth0 interrupt is routed to irq #20 
rather than PCI-MSI-edge 219.
2. rmmod tg3 driver before suspend and modprobe it after resume.
So, I think it's a tg3 driver S3 problem.
IMO, after resume from S3, tg3 driver forgets the whole "PCI-MSI" thing and 
routes the net card interrupt to irq #20, while leaves the actual interrupt 
handler waiting for PCI-MSI-edge *219.
This explains why kernel can not find a handler for irq #20 and the eth0 
interrupts from /proc/interrupts stop growing after resume.
steps to reproduce:
Build kernel with CONFIG_PCI_MSI enabled.
echo mem >/sys/power/state
press the power button
Comment 1 Zhang Rui 2007-02-08 17:03:31 UTC
Created attachment 10359 [details]
/proc/interrupts w/ and w/o "pci=nomsi"
Comment 2 Zhang Rui 2007-02-08 17:15:29 UTC
Created attachment 10360 [details]
save pci state in suspend method and don't call tg3_halt

Hi,
I knew nothing about the tg3 hardware, so this patch may be totally wrong.
But at least it can help network works well after S3 resume on my laptop.
So I think this may be useful for you to find the problem.
Comment 3 Michael Chan 2007-02-09 14:25:26 UTC
Created attachment 10371 [details]
bug fix patch

Thanks for reporting this problem and providing the initial patch.  I've
attached a better patch which preserves the reset during suspend.  We'll push
out the patch after more testing.
Comment 4 Zhang Rui 2007-02-27 23:11:38 UTC
Sorry for the delay. :)
I tested the patch on my laptop and it works well.
I think we can close this bug.
Thanks.
Comment 5 Rafael J. Wysocki 2007-05-30 10:38:09 UTC
Closing. :-)

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