Hi, all.
I have a question about a resource allocation at a child device of PCI
device.

I'm thinking about to write a CardBud device driver.
CardBus is attached at PCI bus.
So I think CardBus is a child device of PCI device.

Before revision 1.122 of @src/sys/pci/pci.c, I can allocate a resouce when
I set rid 0 and call bus_alloc_resource().
CardBus driver is a child of PCI driver, so bus_alloc_resource(), called at
CardBus driver, call pci_alloc_resource().
When rid == 0, pci_alloc_resource() call an resource allocation method of
parent bus.

But revision 1.122 or later, pci_alloc_resource() was rewritten very simply.
pci_alloc_resource() only call resource_list_alloc() and
resource_list_alloc() returns 0 when requested resource is not registered
nor reserved.
It seems me new PCI driver assume all resources are assigned by BIOS.
But a BIOS of my notebood, VAIO 818/Phoenix BIOS, does not assign a resource
for a CardBus socket/ExCA base address register.
#of cource, I set a BIOS as 'Plug & Play O/S: No'.
I can't allocate a resource using bus_alloc_resource().

How to allocate a resource for a device which resources are not assigned by
BIOS?
What is a right way to allocate a resource in a new-bus device driver?

Thanks,
-------
YAMAMOTO Shigeru                        Internet Initiative Japan Inc.
<[EMAIL PROTECTED]>                     Network Engineering Div.


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to