diff options
author | Reyk Floeter <reyk@cvs.openbsd.org> | 2006-11-06 07:31:55 +0000 |
---|---|---|
committer | Reyk Floeter <reyk@cvs.openbsd.org> | 2006-11-06 07:31:55 +0000 |
commit | d9cae48fa648a3a5a7da71a610e4653295710e87 (patch) | |
tree | 5b31dfc21b907c007b3366506a46b7c1cb39e0ef /sys/dev/pci/if_vic.c | |
parent | 20246b83a2caf88b8c04b494bf0779eb951f06c4 (diff) |
set the rx filters after setting the shared data address.
this fixes a crash of old vmware versions (like workstation 4.5.2)
when bringing the interface up. it didn't crash the openbsd kernel
running as a guest system, it did crash the complete vmware host
application. that's why i dislike VMs, they're so buggy and
insecure...
ok dlg@ fkr@
Diffstat (limited to 'sys/dev/pci/if_vic.c')
-rw-r--r-- | sys/dev/pci/if_vic.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/pci/if_vic.c b/sys/dev/pci/if_vic.c index 70caeb7e63d..925110d533e 100644 --- a/sys/dev/pci/if_vic.c +++ b/sys/dev/pci/if_vic.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_vic.c,v 1.31 2006/11/02 23:43:35 dlg Exp $ */ +/* $OpenBSD: if_vic.c,v 1.32 2006/11/06 07:31:54 reyk Exp $ */ /* * Copyright (c) 2006 Reyk Floeter <reyk@openbsd.org> @@ -1173,14 +1173,14 @@ vic_init(struct ifnet *ifp) s = splnet(); + vic_write(sc, VIC_DATA_ADDR, VIC_DMA_DVA(sc)); + vic_write(sc, VIC_DATA_LENGTH, sc->sc_dma_size); + if (ifp->if_flags & IFF_PROMISC) vic_iff(sc, VIC_CMD_IFF_PROMISC); else vic_iff(sc, VIC_CMD_IFF_BROADCAST | VIC_CMD_IFF_MULTICAST); - vic_write(sc, VIC_DATA_ADDR, VIC_DMA_DVA(sc)); - vic_write(sc, VIC_DATA_LENGTH, sc->sc_dma_size); - ifp->if_flags |= IFF_RUNNING; ifp->if_flags &= ~IFF_OACTIVE; |