DragonFly bugs List (threaded) for 2004-10
Re: panic in bus_dma_tag_destroy()
On Sun, Oct 10, 2004 at 12:13:53PM -0700, Matthew Dillon wrote:
> :Probably, this is a driver bug, which is fine by me, but there are a
> :couple of disk drivers which do something similar (adv_pci.c,
> :adw_pci.c, bt_pci.c, mpt_pci.c) and maybe some other non-disk drivers
> :(didn't look).
> No, these guys are doing something different. Their malloc()'s,
> are based on the maximum number of requests, which is some fairly
> small number, not on the maximum size of the DMA space.
> e.g. the MPT driver:
No, I'm not refering to the malloc()'s in the driver. I'm refering to
the malloc that bus_dma_tag_create() does internally (i.e. the driver
has no visibility to this malloc). Take a look at line 158 in
That is that malloc at issue. This is involked in the mpt driver on
line 504 in
with the 4th to the last argument causing the problem. I'm pretty sure
that mpt_pci.c will fail in the same way my driver did as I used
mpt_pci.c as a template :)
That said, I changed the bus_dma_tag_create() in my driver to look
like what isp does, and this problem goes away.
Would it be clearer if I submitted patches for the above 4 drivers? I
know what to do for the drivers, but not how best to protect