nvidia.ko freezes system in -current

Andrew Atrens atrens at nortelnetworks.com
Fri Aug 29 07:12:01 PDT 2003


Hendrik Hasenbein wrote:

>
> Does somebody use the nvidia driver together with a nforce2 chipset? 

> The driver won't enable the agp port:

>
> nvidia0: <Unknown> at device 0.1 on pci0
> nvidia0: Unable to enable PCI busmastering.
> device_probe_and_attach: nvidia0 attach returned 6


These messages are actually bogus.
The problem is that the driver tries to attach any devices whose 
vendorid is nVIDIA.
In the port, there's a file called nvidia_pci.c.   I've modified the 
probe to ignore the mb devices -

Try this version -

int nvidia_pci_probe(device_t dev)
{
    U016 vendor;
    U016 device;
    char name[NV_DEVICE_NAME_LENGTH];

    vendor = pci_get_vendor(dev);
    device = pci_get_device(dev);

    if (vendor != NVIDIA_VENDORID || device < 0x0020)
        return ENXIO;
    switch ( device ) {
            /* exclude these nForce and nForce2 devices from the probe */
            case 0x01e0: /* nForce2 AGP Controller */
            case 0x01e8: /* nForce2 AGP Host to PCI Bridge */
            case 0x01eb: /* nForce2 Memory Controller 1 */
            case 0x01ee: /* nForce2 Memory Controller 4 */
            case 0x01ed: /* nForce2 Memory Controller 3 */
            case 0x01ec: /* nForce2 Memory Controller 2 */
            case 0x01ef: /* nForce2 Memory Controller 5 */
            case 0x0060: /* nForce MCP2 ISA Bridge */
            case 0x0064: /* nForce MCP-T? SMBus Controller */
            case 0x0067: /* nForce MCP2 OpenHCI USB Controller */
            case 0x006b: /* nForce MCP-T? Audio Processing Unit (Dolby 
Digital) */
            case 0x006a: /* nForce MCP2 Audio Codec Interface */
            case 0x006c: /* nForce PCI to PCI Bridge */
            case 0x0065: /* nForce MCP2 EIDE Controller */
            case 0x006d: /*  Nvidia (unknown) PCI to PCI Bridge */
            case 0x006e: /* nForce MCP2 OHCI Compliant IEEE 1394 
Controller */
                    return ENXIO;
                    break;
            default:
                    break;
    }

    if (rm_get_device_name(device, NV_DEVICE_NAME_LENGTH, name)
            != RM_OK) {
        strcpy(name, "Unknown");
    }
    device_set_desc_copy(dev, name);
    return 0;
}

Note that I don't have the usb2.0 controller (ehci) enabled, because 
it's not supported yet in -STABLE. Because it's not support I've 
disabled it in the bios and didn't add the device id to the switch 
statement for it (actually I don't know what it is :) )...  If you have 
USB2.0 support enabled in your bios you can do a 'pciconf -l -v'  to 
extract the device id, and then add that device to the 'ignore list' aka 
switch statement :)

Here's an example snippet of pciconf output -

atapci0 at pci0:9:0:       class=0x01018a card=0x0c111043 chip=0x006510de 
rev=0xa2 hdr=0x00
                                                                                                                 
^^
0x10de is the vendorid, and the top part 0x0065 is your device id.



The combination that works for me (in -STABLE) is nvidia gart and no 
hacks.  I spent some time trying to get Matt Dodd's os agp to work, 
again in -STABLE, and while it does probe and attach the agp correctly - 
and from what I could tell seems to follow the linux code very closely - 
I can't get the nvidia driver to work with it.

Good luck,

Andrew.




More information about the freebsd-current mailing list