--- drivers/ieee1394/ohci1394.c.orig 2004-12-24 16:35:25.000000000 -0500 +++ drivers/ieee1394/ohci1394.c 2005-01-30 15:46:34.000000000 -0500 @@ -99,6 +99,7 @@ #include #include #include +#include #include #include @@ -164,6 +165,7 @@ static char version[] __devinitdata = "$Rev: 1223 $ Ben Collins "; + /* Module Parameters */ static int phys_dma = 1; module_param(phys_dma, int, 0644); @@ -184,6 +186,8 @@ static void ohci1394_pci_remove(struct pci_dev *pdev); +static void ohci_free_dma_work_fn(void* data); + #ifndef __LITTLE_ENDIAN static unsigned hdr_sizes[] = { @@ -1130,6 +1134,13 @@ return retval; } +static void ohci_free_dma_work_fn(void* data) +{ + struct pci_pool* prg_pool = (struct pci_pool*) data; + pci_pool_destroy(prg_pool); + OHCI_DMA_FREE("dma_rcv prg pool"); +} + /*********************************** * rawiso ISO reception * ***********************************/ @@ -2898,13 +2909,14 @@ kfree(d->buf_bus); } if (d->prg_cpu) { + struct work_struct ohci_free_dma_work; for (i=0; inum_desc; i++) if (d->prg_cpu[i] && d->prg_bus[i]) { pci_pool_free(d->prg_pool, d->prg_cpu[i], d->prg_bus[i]); OHCI_DMA_FREE("consistent dma_rcv prg[%d]", i); } - pci_pool_destroy(d->prg_pool); - OHCI_DMA_FREE("dma_rcv prg pool"); + INIT_WORK(&ohci_free_dma_work, ohci_free_dma_work_fn, (void*) d->prg_pool); + schedule_work(&ohci_free_dma_work); kfree(d->prg_cpu); kfree(d->prg_bus); }