diff options
author | Brad Smith <brad@cvs.openbsd.org> | 2005-11-07 02:57:47 +0000 |
---|---|---|
committer | Brad Smith <brad@cvs.openbsd.org> | 2005-11-07 02:57:47 +0000 |
commit | 122c6d25289aaf1ae44207930b4b0660a098558c (patch) | |
tree | 83e03d0a047ee9488d7bf6fb0891f3d61a4ad5d3 /sys/dev/pci/if_vr.c | |
parent | c8e59e19f57b8b7a6a10b4531c5600549429472e (diff) |
- splimp -> splnet
- remove spl's from attach
- removing redundant checks before pci_mapreg_map()
- fix dmesg printing
- de-allocate resources on failure to attach
- remove unused VLAN input code from vge(4)
Diffstat (limited to 'sys/dev/pci/if_vr.c')
-rw-r--r-- | sys/dev/pci/if_vr.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/sys/dev/pci/if_vr.c b/sys/dev/pci/if_vr.c index 781d78ac09c..f05bec31232 100644 --- a/sys/dev/pci/if_vr.c +++ b/sys/dev/pci/if_vr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_vr.c,v 1.48 2005/11/04 16:59:45 brad Exp $ */ +/* $OpenBSD: if_vr.c,v 1.49 2005/11/07 02:57:45 brad Exp $ */ /* * Copyright (c) 1997, 1998 @@ -596,9 +596,11 @@ vr_reset(sc) printf("%s: reset never completed!\n", sc->sc_dev.dv_xname); else { +#ifdef DEBUG /* Use newer force reset command */ printf("%s: Using force reset command.\n", sc->sc_dev.dv_xname); +#endif VR_SETBIT(sc, VR_MISC_CR1, VR_MISCCR1_FORSRST); } } @@ -760,23 +762,23 @@ vr_attach(parent, self, aux) sc->sc_dmat = pa->pa_dmat; if (bus_dmamem_alloc(sc->sc_dmat, sizeof(struct vr_list_data), PAGE_SIZE, 0, &sc->sc_listseg, 1, &rseg, BUS_DMA_NOWAIT)) { - printf("%s: can't alloc list\n", sc->sc_dev.dv_xname); + printf(": can't alloc list\n"); goto fail_2; } if (bus_dmamem_map(sc->sc_dmat, &sc->sc_listseg, rseg, sizeof(struct vr_list_data), &kva, BUS_DMA_NOWAIT)) { - printf("%s: can't map dma buffers (%d bytes)\n", - sc->sc_dev.dv_xname, sizeof(struct vr_list_data)); + printf(": can't map dma buffers (%d bytes)\n", + sizeof(struct vr_list_data)); goto fail_3; } if (bus_dmamap_create(sc->sc_dmat, sizeof(struct vr_list_data), 1, sizeof(struct vr_list_data), 0, BUS_DMA_NOWAIT, &sc->sc_listmap)) { - printf("%s: can't create dma map\n", sc->sc_dev.dv_xname); + printf(": can't create dma map\n"); goto fail_4; } if (bus_dmamap_load(sc->sc_dmat, sc->sc_listmap, kva, sizeof(struct vr_list_data), NULL, BUS_DMA_NOWAIT)) { - printf("%s: can't load dma map\n", sc->sc_dev.dv_xname); + printf(": can't load dma map\n"); goto fail_5; } sc->vr_ldata = (struct vr_list_data *)kva; |