summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Gallatin <gallatin@FreeBSD.org>2000-07-08 00:15:57 +0000
committerAndrew Gallatin <gallatin@FreeBSD.org>2000-07-08 00:15:57 +0000
commit7a1c2a40e1b5100b6fc403aa63a1492b8bc7267f (patch)
tree100dcb35fe8bebd4d312755278705875a58202ed
parent568fd2f6bb3e5ac855109f9379a95db58e442377 (diff)
Notes
-rw-r--r--sys/pci/if_ti.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/pci/if_ti.c b/sys/pci/if_ti.c
index fe4c8614c02f..8fb663bb4036 100644
--- a/sys/pci/if_ti.c
+++ b/sys/pci/if_ti.c
@@ -630,7 +630,8 @@ static int ti_alloc_jumbo_mem(sc)
entry = malloc(sizeof(struct ti_jpool_entry),
M_DEVBUF, M_NOWAIT);
if (entry == NULL) {
- free(sc->ti_cdata.ti_jumbo_buf, M_DEVBUF);
+ contigfree(sc->ti_cdata.ti_jumbo_buf, TI_JMEM,
+ M_DEVBUF);
sc->ti_cdata.ti_jumbo_buf = NULL;
printf("ti%d: no memory for jumbo "
"buffer queue!\n", sc->ti_unit);
@@ -1681,7 +1682,8 @@ static int ti_attach(dev)
bus_release_resource(dev, SYS_RES_IRQ, 0, sc->ti_irq);
bus_release_resource(dev, SYS_RES_MEMORY,
TI_PCI_LOMEM, sc->ti_res);
- free(sc->ti_rdata, M_DEVBUF);
+ contigfree(sc->ti_rdata, sizeof(struct ti_ring_data),
+ M_DEVBUF);
error = ENXIO;
goto fail;
}
@@ -1752,8 +1754,8 @@ static int ti_detach(dev)
bus_release_resource(dev, SYS_RES_IRQ, 0, sc->ti_irq);
bus_release_resource(dev, SYS_RES_MEMORY, TI_PCI_LOMEM, sc->ti_res);
- free(sc->ti_cdata.ti_jumbo_buf, M_DEVBUF);
- free(sc->ti_rdata, M_DEVBUF);
+ contigfree(sc->ti_cdata.ti_jumbo_buf, TI_JMEM, M_DEVBUF);
+ contigfree(sc->ti_rdata, sizeof(struct ti_ring_data), M_DEVBUF);
ifmedia_removeall(&sc->ifmedia);
splx(s);