hptmv not compatible with WITNESS / INVARIANTS pointers required

Steven Hartland killing at multiplay.co.uk
Thu Jan 4 00:02:57 UTC 2007


I'm currently trying to debug an issue with Tyan s2892
based machine but when I enable WITNESS / INVARIANTS
the Highpoint 182x driver panics the kernel with:
panic: blocakble sleep lock ( sleep mutex )
128 @ vm/uma_core.c: 1845

I believe this is due to the fact that you cant hold
a spin mutex while using: bus_dma_tag_create, malloc
bus_dmamem_alloc etc which the driver currently does,
but I have no experience with drivers hence dont know
what it should be doing instead.

If someone's willing to give me some pointers I'd be
willing to give creating a patch and testing it a go.

Here's a snipet of what I think is causing the issue:
/* This uses a mtx_lock_spin */
    intrmask_t oldspl = lock_driver();

    pAdapter->next = 0;

    if(gIal_Adapter == 0) {
        gIal_Adapter = pAdapter;
        pCurAdapter = gIal_Adapter;
    } else {
        pCurAdapter->next = pAdapter;
        pCurAdapter = pAdapter;
    }

    pAdapter->outstandingCommands = 0;

    pMvSataAdapter = &(pAdapter->mvSataAdapter);
    _vbus_p->OsExt = (void *)pAdapter;
    pMvSataAdapter->IALData = pAdapter;

/* Errors due to lock_driver holding mtx_lock_spin?? */
    if (bus_dma_tag_create(NULL, 1, 0, BUS_SPACE_MAXADDR_32BIT,
        BUS_SPACE_MAXADDR, NULL, NULL, BUS_SPACE_MAXSIZE_32BIT,
        MV_MAX_SEGMENTS, BUS_SPACE_MAXSIZE_32BIT, 0, NULL, NULL,
        &pAdapter->parent_dmat) != 0) {
        MV_ERROR("RR182x: Failed to create busdma resources\n");
        unlock_driver(oldspl);
        return (ENOMEM);
    }


================================================
This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. 

In the event of misdirection, illegible or incomplete transmission please telephone +44 845 868 1337
or return the E.mail to postmaster at multiplay.co.uk.



More information about the freebsd-hackers mailing list