Correct PCI suspend and resume operations [ was Re: cirrus ich3 doesn't work after suspend to disk ]

2003-06-10 Thread Orion Hodson
/-- Mark Santcroos wrote:
| 
| I did some checking with pciconf before and after suspend and come up with
| the following fix:
| 
| # set nambar
| pciconf -w -b pci0:31:5 0x11 0xd8
| # set nabmbar:
| pciconf -w -b pci0:31:5 0x14 0x81
| pciconf -w -b pci0:31:5 0x15 0xdc
| # set pcicmd:
| pciconf -w -b pci0:31:5 0x4 0x5

It looks like the pci configuration space state has been lost during
the suspend and resume.  This may be because the bus has removed power
from the devices attached to it on suspend.

I've been through a cross section of drivers this morning and some
explicitly save and restore the PCI configuration state space and
others don't.  The former seems like the safest path in most cases.
AFAICT, we don't common code for handling this and maybe there should
be some rather than have each driver replicate this behaviour.

- Orion





___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: cirrus ich3 doesn't work after suspend to disk

2003-06-08 Thread Mark Santcroos
Hi Orion,

On Thu, Jun 05, 2003 at 01:05:32PM -0700, Orion Hodson wrote:
 The problem you are experiencing is almost certainly localized in the ich 
 code, specifically ich_init - we may also want ich_reinit.  The intel specs 
 are very good as a rule and certainly the place to start - I don't think we 
 do warm reset properly (like at all) and probably don't do very good job of
 cold reset.  The specs live under developer.intel.com and should show up in 
 a search there.

I've found and read the spec. I think it has all the info to come to a
fully working version eventually.

 You might also want to check the power state as the chip comes back up - look 
 for pci_{get,set}_powerstate in cs4281.c.  I don't know offhand whether the 
 lower level PCI code does this automatically now or not.

This is ok. (D0)

I did some checking with pciconf before and after suspend and come up with
the following fix:

# set nambar
pciconf -w -b pci0:31:5 0x11 0xd8
# set nabmbar:
pciconf -w -b pci0:31:5 0x14 0x81
pciconf -w -b pci0:31:5 0x15 0xdc
# set pcicmd:
pciconf -w -b pci0:31:5 0x4 0x5

I hacked the same thing into ich.c, that works too, but is not very clean.

Anyway that still doesn't seem to really solve the problem as that won't
help the hang on module reload. I'll investigate further.

Mark

-- 
Mark SantcroosRIPE Network Coordination Centre
http://www.ripe.net/home/mark/New Projects Group/TTM
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to [EMAIL PROTECTED]