diff options
author | 2013-09-12 04:42:03 +0000 | |
---|---|---|
committer | 2013-09-12 04:42:03 +0000 | |
commit | 386f0050e752812a80f74121744702e7fdeedbc5 (patch) | |
tree | ad10e6e796c93fa9e3ea6e8322b7bc1c6f7a5910 | |
parent | print version on attach (diff) | |
download | wireguard-openbsd-386f0050e752812a80f74121744702e7fdeedbc5.tar.xz wireguard-openbsd-386f0050e752812a80f74121744702e7fdeedbc5.zip |
allocate the pad for the short ethernet frames with dma_alloc instead of
malloc. shouldnt make a difference on this platform, but is more correct.
-rw-r--r-- | sys/arch/armv7/omap/if_cpsw.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/sys/arch/armv7/omap/if_cpsw.c b/sys/arch/armv7/omap/if_cpsw.c index eb8f8f27fc8..0081af25d78 100644 --- a/sys/arch/armv7/omap/if_cpsw.c +++ b/sys/arch/armv7/omap/if_cpsw.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_cpsw.c,v 1.16 2013/09/12 04:23:28 dlg Exp $ */ +/* $OpenBSD: if_cpsw.c,v 1.17 2013/09/12 04:42:03 dlg Exp $ */ /* $NetBSD: if_cpsw.c,v 1.3 2013/04/17 14:36:34 bouyer Exp $ */ /* @@ -393,10 +393,7 @@ cpsw_attach(struct device *parent, struct device *self, void *aux) sc->sc_rdp->rx_mb[i] = NULL; } - /* XXX Not sure if this is the correct way to do this. orig below. - sc->sc_txpad = kmem_zalloc(ETHER_MIN_LEN, KM_SLEEP); - */ - sc->sc_txpad = malloc(ETHER_MIN_LEN, M_TEMP, M_WAITOK); + sc->sc_txpad = dma_alloc(ETHER_MIN_LEN, PR_WAITOK | PR_ZERO); KASSERT(sc->sc_txpad != NULL); bus_dmamap_create(sc->sc_bdt, ETHER_MIN_LEN, 1, ETHER_MIN_LEN, 0, BUS_DMA_WAITOK, &sc->sc_txpad_dm); |