Disabling certain PCI devices

Rick Stevens rstevens at vitalstream.com
Thu Mar 11 00:45:08 UTC 2004


Mark Knecht wrote:
> Rick Stevens wrote:
> 
>>>    Just wondering if anyone here has a solution to this sort of problem.
>>
>>
>>
>> Try editing /lib/modules/`uname -r`/modules.pcimap and deleting the
>> line that correponds to the device you want to disable.  It shouldn't
>> load a driver then.
> 
> 
> Rick,
>    Very interesting. I have never seen these files. Thanks.
> 
>    There seems to be only one line for the OHCI devices. I'm sort of 
> assuming that having all f's is an indictation that this driver should 
> load for all OHCI devices?

I believe it's a bitmask that's ANDed with the vendor and device fields,
so yes, it's a wildcard, in this case, controlled by the "class" bit.

>    Would I change the vendor/device values on the ohci1394 line to match 
> the TI chip and then possibly nothing would get loaded for the Creative 
> Labs? Looks like I need to reverse map the TI/TSB12LV23 numbers, as well 
> as the ADS Subsystem values to get what I'd put in this file.

> 
>    Sound basically correct?

Yes.  You need to get the vendor, device and subvendor, subdevice values
(lspci -vn) and stuff them into it.  I'd copy the line, comment out the
copy (just in case), then change the original to reflect it.  For 
example, my laptop has this:

     # lspci -v
     (snip)
     00:0e.0 FireWire (IEEE 1394): NEC Corporation: Unknown device
	00e7 (rev 01) (prog-if 10 [OHCI])
	Subsystem: Fujitsu Limited.: Unknown device 11a0
     (snip)

The ID is "00:0e.0", so look for that in the "-vn" output:

     # lspci -vn
     (snip)
     00:0e.0 Class 0c00: 1033:00e7 (rev 01) (prog-if 10)
        	Subsystem: 10cf:11a0
     (snip)

So I'd change the line to read:

     ohci1394    0x00001033 0x000000e7 0x000010cf 0x000011a0 0x000c0010 \
		0x00ffffff 0x00000000

I think that'd do it.  Your mileage may vary.  By the way, a similar
mechanism is used for USB devices, but you'd use the data from "lsusb"
for the vendor and device IDs and the file format is a bit different.

Hey, kernel hacking has its benefits!  You get to find all these
obscure little things.
----------------------------------------------------------------------
- Rick Stevens, Senior Systems Engineer     rstevens at vitalstream.com -
- VitalStream, Inc.                       http://www.vitalstream.com -
-                                                                    -
-                  Heisenberg _may_ have slept here                  -
----------------------------------------------------------------------





More information about the Redhat-install-list mailing list