Linux Headquarters
[ Register ]
[ About us ] [ Home Page ]

Advertisement
[ Kernel ] [ Documentation ] [ Links ] [ Books ]

Advertisement

Kernel v2.6.9 /Documentation/pci.txt

Filename:/Documentation/pci.txt
Lines Added:9
Lines Deleted:2
Also changed in: (Previous) 2.6.9-final  2.6.9-rc4  2.6.9-rc3  2.6.9-rc2  2.6.9-rc1  2.6.8 
(Following) 2.6.9-bk4  2.6.9-bk5  2.6.9-bk6  2.6.9-bk7  2.6.10-rc1  2.6.10-rc2 

Location
[  2.6.9
  [  Documentation
     o  pci.txt

Patch

diff -Nru a/Documentation/pci.txt b/Documentation/pci.txt
--- a/Documentation/pci.txt   2004-10-18 14:56:29 -07:00
+++ b/Documentation/pci.txt   2004-10-18 14:56:29 -07:00
@@ -25,6 +25,7 @@
    Discover resources (addresses and IRQ numbers) provided by the device
    Allocate these resources
    Communicate with the device
+   Disable the device
 
 Most of these topics are covered by the following sections, for the rest
 look at <linux/pci.h>, it's hopefully well commented.
@@ -162,8 +163,8 @@
 count on these devices by calling pci_dev_put().
 
 
-3. Enabling devices
-~~~~~~~~~~~~~~~~~~~
+3. Enabling and disabling devices
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Before you do anything with the device you've found, you need to enable
 it by calling pci_enable_device() which enables I/O and memory regions of
 the device, allocates an IRQ if necessary, assigns missing resources if
@@ -179,6 +180,12 @@
 and also ensures that the cache line size register is set correctly.
 Make sure to check the return value of pci_set_mwi(), not all architectures
 may support Memory-Write-Invalidate.
+
+   If your driver decides to stop using the device (e.g., there was an
+error while setting it up or the driver module is being unloaded), it
+should call pci_disable_device() to deallocate any IRQ resources, disable
+PCI bus-mastering, etc.  You should not do anything with the device after
+calling pci_disable_device().
 
 4. How to access PCI config space
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Comments: webmaster (at) linuxhq.com.
Advertising: banners (at) linuxhq.com.
Compilation ©1998-2008 Linux Headquarters, Inc.