Skip to contentSkip to conversation

Clean up yenta_socket

CFT Jeff Garzik 2 participants 2 messages Aug 25, 2003 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

WIBNI?

Anyway, MSI needs more than the standard size as well.

But I would actually prefer the interface to go the other way:

	pci_save_state(pdev);
		and
	pci_restore_state(pdev);

Allocate and store the state in a pointer in struct pci_dev, or somesuch. And somebody other than the low-level driver figures out the amount to save and restore.

Jeff

#2 lore raw
Quoted 1 line · Jeff Garzik

WIBNI?

"wouldn't it be nice if"

Quoted 11 lines

Anyway, MSI needs more than the standard size as well.

But I would actually prefer the interface to go the other way:

	pci_save_state(pdev);
		and
	pci_restore_state(pdev);

Allocate and store the state in a pointer in struct pci_dev, or somesuch. And somebody other than the low-level driver figures out the amount to save and restore.

Hmm. The reason I wanted to stear clear of that was that sometimes we don't know what's there. Taking the yenta as an example, we know that the "standard" space is 0x48 bytes long. However, some devices have extra control registers at 0x80, and then there's the PCI PM registers up at around 0xa0 or so.

On a different cardbus bridge, the PCI PM registers might be somewhere else.

Do we care if we overwrite the PCI PM registers with possibly old/stale data?

In other words, how does the PCI layer itself know how much configuration space to save and restore over power management calls?

Signature · 2 lines
Russell King ([email protected])                The developer of ARM Linux
             http://www.arm.linux.org.uk/personal/aboutme.html