Daemon News Ezine BSD News BSD Mall BSD Support Forum BSD Advocacy BSD Updates

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ppbus probe problem



: What is the correct way to fix the probe call incrementing problem?

Typically this is done by checking to see if there's a child already.

However, all the ISA drivers don't do this...  At work we've worked
around this problem like so:

static void
sub00798identify(driver_t * driver, device_t parent)
{
    devclass_t        dc;

    dc = devclass_find(DRIVERNAME);
    if (devclass_get_device(dc, 0) == NULL)
    {
        if (BUS_ADD_CHILD(parent, 0, DRIVERNAME, 0) == 0)
            panic("failed to add " DRIVERNAME);
    }
}

Warner