CVS commit: [netbsd-9] src/sys/dev/hyperv
Module Name:src Committed By: martin Date: Tue Nov 26 08:22:51 UTC 2019 Modified Files: src/sys/dev/hyperv [netbsd-9]: if_hvn.c Log Message: Pull up following revision(s) (requested by nonaka in ticket #484): sys/dev/hyperv/if_hvn.c: revision 1.11 hvn(4): Fix incorrect ident when waiting for NVS command response. To generate a diff of this commit: cvs rdiff -u -r1.4.2.4 -r1.4.2.5 src/sys/dev/hyperv/if_hvn.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/hyperv/if_hvn.c diff -u src/sys/dev/hyperv/if_hvn.c:1.4.2.4 src/sys/dev/hyperv/if_hvn.c:1.4.2.5 --- src/sys/dev/hyperv/if_hvn.c:1.4.2.4 Mon Nov 25 16:58:54 2019 +++ src/sys/dev/hyperv/if_hvn.c Tue Nov 26 08:22:51 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: if_hvn.c,v 1.4.2.4 2019/11/25 16:58:54 martin Exp $ */ +/* $NetBSD: if_hvn.c,v 1.4.2.5 2019/11/26 08:22:51 martin Exp $ */ /* $OpenBSD: if_hvn.c,v 1.39 2018/03/11 14:31:34 mikeb Exp $ */ /*- @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_hvn.c,v 1.4.2.4 2019/11/25 16:58:54 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_hvn.c,v 1.4.2.5 2019/11/26 08:22:51 martin Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -1097,7 +1097,8 @@ hvn_nvs_cmd(struct hvn_softc *sc, void * hvn_nvs_intr(sc); splx(s); } else - tsleep(sc, PRIBIO | PCATCH, "nvscmd", mstohz(1)); + tsleep(sc->sc_nvsrsp, PRIBIO | PCATCH, "nvscmd", + mstohz(1)); } while (--timo > 0 && sc->sc_nvsdone != 1); if (timo == 0 && sc->sc_nvsdone != 1) {
CVS commit: [netbsd-9] src/sys/dev/hyperv
Module Name:src Committed By: martin Date: Tue Nov 26 08:22:51 UTC 2019 Modified Files: src/sys/dev/hyperv [netbsd-9]: if_hvn.c Log Message: Pull up following revision(s) (requested by nonaka in ticket #484): sys/dev/hyperv/if_hvn.c: revision 1.11 hvn(4): Fix incorrect ident when waiting for NVS command response. To generate a diff of this commit: cvs rdiff -u -r1.4.2.4 -r1.4.2.5 src/sys/dev/hyperv/if_hvn.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/dev/hyperv
Module Name:src Committed By: martin Date: Mon Nov 25 16:58:55 UTC 2019 Modified Files: src/sys/dev/hyperv [netbsd-9]: hvs.c if_hvn.c Log Message: Pull up following revision(s) (requested by nonaka in ticket #480): sys/dev/hyperv/hvs.c: revision 1.3 sys/dev/hyperv/if_hvn.c: revision 1.10 hvs(4), hvn(4): Set correct size for bus_dmamap_sync(9). To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.1.8.1 src/sys/dev/hyperv/hvs.c cvs rdiff -u -r1.4.2.3 -r1.4.2.4 src/sys/dev/hyperv/if_hvn.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/dev/hyperv
Module Name:src Committed By: martin Date: Mon Nov 25 16:58:55 UTC 2019 Modified Files: src/sys/dev/hyperv [netbsd-9]: hvs.c if_hvn.c Log Message: Pull up following revision(s) (requested by nonaka in ticket #480): sys/dev/hyperv/hvs.c: revision 1.3 sys/dev/hyperv/if_hvn.c: revision 1.10 hvs(4), hvn(4): Set correct size for bus_dmamap_sync(9). To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.1.8.1 src/sys/dev/hyperv/hvs.c cvs rdiff -u -r1.4.2.3 -r1.4.2.4 src/sys/dev/hyperv/if_hvn.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/hyperv/hvs.c diff -u src/sys/dev/hyperv/hvs.c:1.1 src/sys/dev/hyperv/hvs.c:1.1.8.1 --- src/sys/dev/hyperv/hvs.c:1.1 Fri Feb 15 08:54:01 2019 +++ src/sys/dev/hyperv/hvs.c Mon Nov 25 16:58:54 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: hvs.c,v 1.1 2019/02/15 08:54:01 nonaka Exp $ */ +/* $NetBSD: hvs.c,v 1.1.8.1 2019/11/25 16:58:54 martin Exp $ */ /* $OpenBSD: hvs.c,v 1.17 2017/08/10 17:22:48 mikeb Exp $ */ /*- @@ -37,7 +37,7 @@ /* #define HVS_DEBUG_IO */ #include -__KERNEL_RCSID(0, "$NetBSD: hvs.c,v 1.1 2019/02/15 08:54:01 nonaka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hvs.c,v 1.1.8.1 2019/11/25 16:58:54 martin Exp $"); #include #include @@ -1095,7 +1095,8 @@ hvs_free_ccbs(struct hvs_softc *sc) if (ccb->ccb_dmap == NULL) continue; - bus_dmamap_sync(sc->sc_dmat, ccb->ccb_dmap, 0, 0, + bus_dmamap_sync(sc->sc_dmat, ccb->ccb_dmap, + 0, ccb->ccb_dmap->dm_mapsize, BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); bus_dmamap_unload(sc->sc_dmat, ccb->ccb_dmap); bus_dmamap_destroy(sc->sc_dmat, ccb->ccb_dmap); Index: src/sys/dev/hyperv/if_hvn.c diff -u src/sys/dev/hyperv/if_hvn.c:1.4.2.3 src/sys/dev/hyperv/if_hvn.c:1.4.2.4 --- src/sys/dev/hyperv/if_hvn.c:1.4.2.3 Sun Nov 24 08:13:07 2019 +++ src/sys/dev/hyperv/if_hvn.c Mon Nov 25 16:58:54 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: if_hvn.c,v 1.4.2.3 2019/11/24 08:13:07 martin Exp $ */ +/* $NetBSD: if_hvn.c,v 1.4.2.4 2019/11/25 16:58:54 martin Exp $ */ /* $OpenBSD: if_hvn.c,v 1.39 2018/03/11 14:31:34 mikeb Exp $ */ /*- @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_hvn.c,v 1.4.2.3 2019/11/24 08:13:07 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_hvn.c,v 1.4.2.4 2019/11/25 16:58:54 martin Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -632,7 +632,8 @@ hvn_decap(struct hvn_softc *sc, struct h { struct ifnet *ifp = SC2IFP(sc); - bus_dmamap_sync(sc->sc_dmat, txd->txd_dmap, 0, 0, + bus_dmamap_sync(sc->sc_dmat, txd->txd_dmap, + 0, txd->txd_dmap->dm_mapsize, BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); bus_dmamap_unload(sc->sc_dmat, txd->txd_dmap); txd->txd_buf = NULL; @@ -667,7 +668,8 @@ hvn_txeof(struct hvn_softc *sc, uint64_t } txd->txd_buf = NULL; - bus_dmamap_sync(sc->sc_dmat, txd->txd_dmap, 0, 0, + bus_dmamap_sync(sc->sc_dmat, txd->txd_dmap, + 0, txd->txd_dmap->dm_mapsize, BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); bus_dmamap_unload(sc->sc_dmat, txd->txd_dmap); m_freem(m); @@ -844,7 +846,8 @@ hvn_tx_ring_destroy(struct hvn_softc *sc txd = &sc->sc_tx_desc[i]; if (txd->txd_dmap == NULL) continue; - bus_dmamap_sync(sc->sc_dmat, txd->txd_dmap, 0, 0, + bus_dmamap_sync(sc->sc_dmat, txd->txd_dmap, + 0, txd->txd_dmap->dm_mapsize, BUS_DMASYNC_POSTWRITE); bus_dmamap_unload(sc->sc_dmat, txd->txd_dmap); bus_dmamap_destroy(sc->sc_dmat, txd->txd_dmap); @@ -855,7 +858,8 @@ hvn_tx_ring_destroy(struct hvn_softc *sc txd->txd_buf = NULL; } if (sc->sc_tx_rmap) { - bus_dmamap_sync(sc->sc_dmat, sc->sc_tx_rmap, 0, 0, + bus_dmamap_sync(sc->sc_dmat, sc->sc_tx_rmap, + 0, txd->txd_dmap->dm_mapsize, BUS_DMASYNC_POSTWRITE); bus_dmamap_unload(sc->sc_dmat, sc->sc_tx_rmap); bus_dmamap_destroy(sc->sc_dmat, sc->sc_tx_rmap);
CVS commit: [netbsd-9] src/sys/dev/hyperv
Module Name:src Committed By: martin Date: Sun Nov 24 08:13:07 UTC 2019 Modified Files: src/sys/dev/hyperv [netbsd-9]: hvkbd.c if_hvn.c vmbus.c Log Message: Pull up following revision(s) (requested by nonaka in ticket #464): sys/dev/hyperv/if_hvn.c: revision 1.8 sys/dev/hyperv/if_hvn.c: revision 1.9 sys/dev/hyperv/hvkbd.c: revision 1.5 sys/dev/hyperv/hvkbd.c: revision 1.6 sys/dev/hyperv/vmbus.c: revision 1.5 vmbus(4), hvn(4), hvkbd(4): Fixed wait time for tsleep(9). hvn(4), hvkbd(4): Only need to poll when cold. To generate a diff of this commit: cvs rdiff -u -r1.2.2.1 -r1.2.2.2 src/sys/dev/hyperv/hvkbd.c cvs rdiff -u -r1.4.2.2 -r1.4.2.3 src/sys/dev/hyperv/if_hvn.c cvs rdiff -u -r1.4 -r1.4.2.1 src/sys/dev/hyperv/vmbus.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/dev/hyperv
Module Name:src Committed By: martin Date: Sun Nov 24 08:13:07 UTC 2019 Modified Files: src/sys/dev/hyperv [netbsd-9]: hvkbd.c if_hvn.c vmbus.c Log Message: Pull up following revision(s) (requested by nonaka in ticket #464): sys/dev/hyperv/if_hvn.c: revision 1.8 sys/dev/hyperv/if_hvn.c: revision 1.9 sys/dev/hyperv/hvkbd.c: revision 1.5 sys/dev/hyperv/hvkbd.c: revision 1.6 sys/dev/hyperv/vmbus.c: revision 1.5 vmbus(4), hvn(4), hvkbd(4): Fixed wait time for tsleep(9). hvn(4), hvkbd(4): Only need to poll when cold. To generate a diff of this commit: cvs rdiff -u -r1.2.2.1 -r1.2.2.2 src/sys/dev/hyperv/hvkbd.c cvs rdiff -u -r1.4.2.2 -r1.4.2.3 src/sys/dev/hyperv/if_hvn.c cvs rdiff -u -r1.4 -r1.4.2.1 src/sys/dev/hyperv/vmbus.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/hyperv/hvkbd.c diff -u src/sys/dev/hyperv/hvkbd.c:1.2.2.1 src/sys/dev/hyperv/hvkbd.c:1.2.2.2 --- src/sys/dev/hyperv/hvkbd.c:1.2.2.1 Sat Nov 16 16:51:45 2019 +++ src/sys/dev/hyperv/hvkbd.c Sun Nov 24 08:13:07 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: hvkbd.c,v 1.2.2.1 2019/11/16 16:51:45 martin Exp $ */ +/* $NetBSD: hvkbd.c,v 1.2.2.2 2019/11/24 08:13:07 martin Exp $ */ /*- * Copyright (c) 2017 Microsoft Corp. @@ -36,7 +36,7 @@ #endif /* _KERNEL_OPT */ #include -__KERNEL_RCSID(0, "$NetBSD: hvkbd.c,v 1.2.2.1 2019/11/16 16:51:45 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hvkbd.c,v 1.2.2.2 2019/11/24 08:13:07 martin Exp $"); #include #include @@ -359,13 +359,13 @@ hvkbd_connect(struct hvkbd_softc *sc) } do { - if (cold) + if (cold) { delay(1000); - else - tsleep(sc, PRIBIO | PCATCH, "hvkbdcon", 1); - s = spltty(); - hvkbd_intr(sc); - splx(s); + s = spltty(); + hvkbd_intr(sc); + splx(s); + } else + tsleep(sc, PRIBIO | PCATCH, "hvkbdcon", mstohz(1)); } while (--timo > 0 && sc->sc_connected == 0); if (timo == 0 && sc->sc_connected == 0) { Index: src/sys/dev/hyperv/if_hvn.c diff -u src/sys/dev/hyperv/if_hvn.c:1.4.2.2 src/sys/dev/hyperv/if_hvn.c:1.4.2.3 --- src/sys/dev/hyperv/if_hvn.c:1.4.2.2 Mon Nov 18 19:46:33 2019 +++ src/sys/dev/hyperv/if_hvn.c Sun Nov 24 08:13:07 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: if_hvn.c,v 1.4.2.2 2019/11/18 19:46:33 martin Exp $ */ +/* $NetBSD: if_hvn.c,v 1.4.2.3 2019/11/24 08:13:07 martin Exp $ */ /* $OpenBSD: if_hvn.c,v 1.39 2018/03/11 14:31:34 mikeb Exp $ */ /*- @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_hvn.c,v 1.4.2.2 2019/11/18 19:46:33 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_hvn.c,v 1.4.2.3 2019/11/24 08:13:07 martin Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -1069,7 +1069,7 @@ hvn_nvs_cmd(struct hvn_softc *sc, void * if (cold) delay(1000); else -tsleep(cmd, PRIBIO, "nvsout", 1); +tsleep(cmd, PRIBIO, "nvsout", mstohz(1)); } else if (rv) { DPRINTF("%s: NVSP operation %u send error %d\n", device_xname(sc->sc_dev), hdr->nvs_type, rv); @@ -1087,13 +1087,13 @@ hvn_nvs_cmd(struct hvn_softc *sc, void * return 0; do { - if (cold) + if (cold) { delay(1000); - else - tsleep(sc, PRIBIO | PCATCH, "nvscmd", 1); - s = splnet(); - hvn_nvs_intr(sc); - splx(s); + s = splnet(); + hvn_nvs_intr(sc); + splx(s); + } else + tsleep(sc, PRIBIO | PCATCH, "nvscmd", mstohz(1)); } while (--timo > 0 && sc->sc_nvsdone != 1); if (timo == 0 && sc->sc_nvsdone != 1) { @@ -1391,7 +1391,7 @@ hvn_rndis_cmd(struct hvn_softc *sc, stru if (cold) delay(1000); else -tsleep(rc, PRIBIO, "rndisout", 1); +tsleep(rc, PRIBIO, "rndisout", mstohz(1)); } else if (rv) { DPRINTF("%s: RNDIS operation %u send error %d\n", device_xname(sc->sc_dev), hdr->rm_type, rv); @@ -1410,13 +1410,13 @@ hvn_rndis_cmd(struct hvn_softc *sc, stru BUS_DMASYNC_POSTWRITE); do { - if (cold) + if (cold) { delay(1000); - else - tsleep(rc, PRIBIO | PCATCH, "rndiscmd", 1); - s = splnet(); - hvn_nvs_intr(sc); - splx(s); + s = splnet(); + hvn_nvs_intr(sc); + splx(s); + } else + tsleep(rc, PRIBIO | PCATCH, "rndiscmd", mstohz(1)); } while (--timo > 0 && rc->rc_done != 1); bus_dmamap_sync(sc->sc_dmat, rc->rc_dmap, 0, PAGE_SIZE, Index: src/sys/dev/hyperv/vmbus.c diff -u src/sys/dev/hyperv/vmbus.c:1.4 src/sys/dev/hyperv/vmbus.c:1.4.2.1 --- src/sys/dev/hyperv/vmbus.c:1.4 Tue Jul 9 10:07:11 2019 +++ src/sys/dev/hyperv/vmbus.c Sun Nov 24 08:13:07 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: vmbus.c,v 1.4 2019/07/09 10:07:11 nakayama Exp $ */ +/* $NetBSD: vmbus.c,v 1.4.2.1 2019/11/24 08:13:07 martin Exp $ */ /* $OpenBSD: hyperv.c,v 1.43 2017/06/27 13:56:15 mikeb Exp $ */ /*- @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: vmbus.c,v 1.4 2019/07/09 10:07:11 nakayama Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vmbus.c,v 1.4.2.1 2019/11/24 08:13:07 martin Exp $"); #include #include @@ -604,7 +604,7 @@ vm
CVS commit: [netbsd-9] src/sys/dev/hyperv
Module Name:src Committed By: martin Date: Sat Nov 16 16:51:45 UTC 2019 Modified Files: src/sys/dev/hyperv [netbsd-9]: hvkbd.c if_hvn.c Log Message: Pull up following revision(s) (requested by nonaka in ticket #428): sys/dev/hyperv/if_hvn.c: revision 1.6 sys/dev/hyperv/hvkbd.c: revision 1.4 hvn(4), hvkbd(4): No need to call vmbus_channel_setdeferred(). These devices do not perform batch reading. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.2.2.1 src/sys/dev/hyperv/hvkbd.c cvs rdiff -u -r1.4 -r1.4.2.1 src/sys/dev/hyperv/if_hvn.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/hyperv/hvkbd.c diff -u src/sys/dev/hyperv/hvkbd.c:1.2 src/sys/dev/hyperv/hvkbd.c:1.2.2.1 --- src/sys/dev/hyperv/hvkbd.c:1.2 Sun Jul 21 16:08:13 2019 +++ src/sys/dev/hyperv/hvkbd.c Sat Nov 16 16:51:45 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: hvkbd.c,v 1.2 2019/07/21 16:08:13 rin Exp $ */ +/* $NetBSD: hvkbd.c,v 1.2.2.1 2019/11/16 16:51:45 martin Exp $ */ /*- * Copyright (c) 2017 Microsoft Corp. @@ -36,7 +36,7 @@ #endif /* _KERNEL_OPT */ #include -__KERNEL_RCSID(0, "$NetBSD: hvkbd.c,v 1.2 2019/07/21 16:08:13 rin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hvkbd.c,v 1.2.2.1 2019/11/16 16:51:45 martin Exp $"); #include #include @@ -216,12 +216,6 @@ hvkbd_attach(device_t parent, device_t s return; } - if (vmbus_channel_setdeferred(sc->sc_chan, device_xname(self))) { - aprint_error_dev(self, - "failed to create the interrupt thread\n"); - goto free_buf; - } - sc->sc_chan->ch_flags &= ~CHF_BATCHED; if (vmbus_channel_open(sc->sc_chan, HVKBD_TX_RING_SIZE + HVKBD_RX_RING_SIZE, NULL, 0, hvkbd_intr, sc)) { Index: src/sys/dev/hyperv/if_hvn.c diff -u src/sys/dev/hyperv/if_hvn.c:1.4 src/sys/dev/hyperv/if_hvn.c:1.4.2.1 --- src/sys/dev/hyperv/if_hvn.c:1.4 Tue Jul 9 08:46:58 2019 +++ src/sys/dev/hyperv/if_hvn.c Sat Nov 16 16:51:45 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: if_hvn.c,v 1.4 2019/07/09 08:46:58 msaitoh Exp $ */ +/* $NetBSD: if_hvn.c,v 1.4.2.1 2019/11/16 16:51:45 martin Exp $ */ /* $OpenBSD: if_hvn.c,v 1.39 2018/03/11 14:31:34 mikeb Exp $ */ /*- @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_hvn.c,v 1.4 2019/07/09 08:46:58 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_hvn.c,v 1.4.2.1 2019/11/16 16:51:45 martin Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -928,12 +928,6 @@ hvn_nvs_attach(struct hvn_softc *sc) sc->sc_chan->ch_flags &= ~CHF_BATCHED; - if (vmbus_channel_setdeferred(sc->sc_chan, device_xname(sc->sc_dev))) { - aprint_error_dev(sc->sc_dev, - "failed to create the interrupt thread\n"); - return -1; - } - /* Associate our interrupt handler with the channel */ if (vmbus_channel_open(sc->sc_chan, ringsize, NULL, 0, hvn_nvs_intr, sc)) {
CVS commit: [netbsd-9] src/sys/dev/hyperv
Module Name:src Committed By: martin Date: Sat Nov 16 16:51:45 UTC 2019 Modified Files: src/sys/dev/hyperv [netbsd-9]: hvkbd.c if_hvn.c Log Message: Pull up following revision(s) (requested by nonaka in ticket #428): sys/dev/hyperv/if_hvn.c: revision 1.6 sys/dev/hyperv/hvkbd.c: revision 1.4 hvn(4), hvkbd(4): No need to call vmbus_channel_setdeferred(). These devices do not perform batch reading. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.2.2.1 src/sys/dev/hyperv/hvkbd.c cvs rdiff -u -r1.4 -r1.4.2.1 src/sys/dev/hyperv/if_hvn.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.