pci_detach

bridged with qdn.public.ddk.network
Post Reply
John A. Murphy

pci_detach

Post by John A. Murphy » Fri Oct 18, 2002 3:45 pm

The docs for pci_detach() say "The pci_detach() function disconnects
from the PCI server. Any resources allocated with pci_attach_device()
are released." Is this correct? Since pci_attach_device() doesn't pass
the handle returned by pci_attach(), it seems less than obvious that the
PCI manager could cleanup after pci_attach_device(0 without some more
information.

Hugh Brown

Re: pci_detach

Post by Hugh Brown » Fri Oct 18, 2002 4:40 pm

The low-level pci_attach code opens a file descriptor against the
pci server. All low-level library calls to the pci server use this fd.
When the pci_detach() function is called, the low-level code does a
close on the file descriptor, which tells the pci server to cleanup
any allocations made by this fd.

Previously, John A. Murphy wrote in qdn.public.ddk.network:
The docs for pci_detach() say "The pci_detach() function disconnects
from the PCI server. Any resources allocated with pci_attach_device()
are released." Is this correct? Since pci_attach_device() doesn't pass
the handle returned by pci_attach(), it seems less than obvious that the
PCI manager could cleanup after pci_attach_device(0 without some more
information.

John A. Murphy

Re: pci_detach

Post by John A. Murphy » Fri Oct 18, 2002 6:43 pm

Great! I suspected something like that, but I wanted to make sure I wasn't
relying on a type.

Murf

Hugh Brown wrote:
The low-level pci_attach code opens a file descriptor against the
pci server. All low-level library calls to the pci server use this fd.
When the pci_detach() function is called, the low-level code does a
close on the file descriptor, which tells the pci server to cleanup
any allocations made by this fd.

Previously, John A. Murphy wrote in qdn.public.ddk.network:
The docs for pci_detach() say "The pci_detach() function disconnects
from the PCI server. Any resources allocated with pci_attach_device()
are released." Is this correct? Since pci_attach_device() doesn't pass
the handle returned by pci_attach(), it seems less than obvious that the
PCI manager could cleanup after pci_attach_device(0 without some more
information.

Post Reply

Return to “qdn.public.ddk.network”