usbd_abort_pipe(); usbd_close_pipe; dance

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

usbd_abort_pipe(); usbd_close_pipe; dance

Marcus Glocker
Maybe I'm missing something here.

But is there any specific reason why the most of our USB drivers are
calling usbd_abort_pipe() right before usbd_close_pipe()?  Since
usbd_close_pipe() already will call usbd_abort_pipe() if the pipe isn't
empty, as documented in the man page:

DESCRIPTION
     The usbd_abort_pipe() function aborts any transfers queued on pipe.

     The usbd_close_pipe() function aborts any transfers queued on pipe
     then deletes it.

In case this happened because of an inherited copy/paste chain, can we
nuke the superfluous usbd_abort_pipe() calls?


Index: if_atu.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/if_atu.c,v
retrieving revision 1.131
diff -u -p -u -p -r1.131 if_atu.c
--- if_atu.c 10 Jul 2020 13:26:40 -0000 1.131
+++ if_atu.c 31 Jul 2020 08:26:24 -0000
@@ -2252,7 +2252,6 @@ atu_stop(struct ifnet *ifp, int disable)
 
  /* Stop transfers. */
  if (sc->atu_ep[ATU_ENDPT_RX] != NULL) {
- usbd_abort_pipe(sc->atu_ep[ATU_ENDPT_RX]);
  err = usbd_close_pipe(sc->atu_ep[ATU_ENDPT_RX]);
  if (err) {
  DPRINTF(("%s: close rx pipe failed: %s\n",
@@ -2262,7 +2261,6 @@ atu_stop(struct ifnet *ifp, int disable)
  }
 
  if (sc->atu_ep[ATU_ENDPT_TX] != NULL) {
- usbd_abort_pipe(sc->atu_ep[ATU_ENDPT_TX]);
  err = usbd_close_pipe(sc->atu_ep[ATU_ENDPT_TX]);
  if (err) {
  DPRINTF(("%s: close tx pipe failed: %s\n",
Index: if_aue.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/if_aue.c,v
retrieving revision 1.110
diff -u -p -u -p -r1.110 if_aue.c
--- if_aue.c 10 Jul 2020 13:26:40 -0000 1.110
+++ if_aue.c 31 Jul 2020 08:26:25 -0000
@@ -1518,7 +1518,6 @@ aue_stop(struct aue_softc *sc)
 
  /* Stop transfers. */
  if (sc->aue_ep[AUE_ENDPT_RX] != NULL) {
- usbd_abort_pipe(sc->aue_ep[AUE_ENDPT_RX]);
  err = usbd_close_pipe(sc->aue_ep[AUE_ENDPT_RX]);
  if (err) {
  printf("%s: close rx pipe failed: %s\n",
@@ -1528,7 +1527,6 @@ aue_stop(struct aue_softc *sc)
  }
 
  if (sc->aue_ep[AUE_ENDPT_TX] != NULL) {
- usbd_abort_pipe(sc->aue_ep[AUE_ENDPT_TX]);
  err = usbd_close_pipe(sc->aue_ep[AUE_ENDPT_TX]);
  if (err) {
  printf("%s: close tx pipe failed: %s\n",
@@ -1538,7 +1536,6 @@ aue_stop(struct aue_softc *sc)
  }
 
  if (sc->aue_ep[AUE_ENDPT_INTR] != NULL) {
- usbd_abort_pipe(sc->aue_ep[AUE_ENDPT_INTR]);
  err = usbd_close_pipe(sc->aue_ep[AUE_ENDPT_INTR]);
  if (err) {
  printf("%s: close intr pipe failed: %s\n",
Index: if_axe.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/if_axe.c,v
retrieving revision 1.141
diff -u -p -u -p -r1.141 if_axe.c
--- if_axe.c 10 Jul 2020 13:26:40 -0000 1.141
+++ if_axe.c 31 Jul 2020 08:26:25 -0000
@@ -1473,7 +1473,6 @@ axe_stop(struct axe_softc *sc)
 
  /* Stop transfers. */
  if (sc->axe_ep[AXE_ENDPT_RX] != NULL) {
- usbd_abort_pipe(sc->axe_ep[AXE_ENDPT_RX]);
  err = usbd_close_pipe(sc->axe_ep[AXE_ENDPT_RX]);
  if (err) {
  printf("axe%d: close rx pipe failed: %s\n",
@@ -1483,7 +1482,6 @@ axe_stop(struct axe_softc *sc)
  }
 
  if (sc->axe_ep[AXE_ENDPT_TX] != NULL) {
- usbd_abort_pipe(sc->axe_ep[AXE_ENDPT_TX]);
  err = usbd_close_pipe(sc->axe_ep[AXE_ENDPT_TX]);
  if (err) {
  printf("axe%d: close tx pipe failed: %s\n",
@@ -1493,7 +1491,6 @@ axe_stop(struct axe_softc *sc)
  }
 
  if (sc->axe_ep[AXE_ENDPT_INTR] != NULL) {
- usbd_abort_pipe(sc->axe_ep[AXE_ENDPT_INTR]);
  err = usbd_close_pipe(sc->axe_ep[AXE_ENDPT_INTR]);
  if (err) {
  printf("axe%d: close intr pipe failed: %s\n",
Index: if_axen.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/if_axen.c,v
retrieving revision 1.29
diff -u -p -u -p -r1.29 if_axen.c
--- if_axen.c 10 Jul 2020 13:26:40 -0000 1.29
+++ if_axen.c 31 Jul 2020 08:26:25 -0000
@@ -1426,7 +1426,6 @@ axen_stop(struct axen_softc *sc)
 
  /* Stop transfers. */
  if (sc->axen_ep[AXEN_ENDPT_RX] != NULL) {
- usbd_abort_pipe(sc->axen_ep[AXEN_ENDPT_RX]);
  err = usbd_close_pipe(sc->axen_ep[AXEN_ENDPT_RX]);
  if (err) {
  printf("axen%d: close rx pipe failed: %s\n",
@@ -1436,7 +1435,6 @@ axen_stop(struct axen_softc *sc)
  }
 
  if (sc->axen_ep[AXEN_ENDPT_TX] != NULL) {
- usbd_abort_pipe(sc->axen_ep[AXEN_ENDPT_TX]);
  err = usbd_close_pipe(sc->axen_ep[AXEN_ENDPT_TX]);
  if (err) {
  printf("axen%d: close tx pipe failed: %s\n",
@@ -1446,7 +1444,6 @@ axen_stop(struct axen_softc *sc)
  }
 
  if (sc->axen_ep[AXEN_ENDPT_INTR] != NULL) {
- usbd_abort_pipe(sc->axen_ep[AXEN_ENDPT_INTR]);
  err = usbd_close_pipe(sc->axen_ep[AXEN_ENDPT_INTR]);
  if (err) {
  printf("axen%d: close intr pipe failed: %s\n",
Index: if_bwfm_usb.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/if_bwfm_usb.c,v
retrieving revision 1.18
diff -u -p -u -p -r1.18 if_bwfm_usb.c
--- if_bwfm_usb.c 25 Feb 2020 14:24:58 -0000 1.18
+++ if_bwfm_usb.c 31 Jul 2020 08:26:25 -0000
@@ -414,12 +414,10 @@ bwfm_usb_preinit(struct bwfm_softc *bwfm
 
 cleanup:
  if (sc->sc_rx_pipeh) {
- usbd_abort_pipe(sc->sc_rx_pipeh);
  usbd_close_pipe(sc->sc_rx_pipeh);
  sc->sc_rx_pipeh = NULL;
  }
  if (sc->sc_tx_pipeh) {
- usbd_abort_pipe(sc->sc_tx_pipeh);
  usbd_close_pipe(sc->sc_tx_pipeh);
  sc->sc_tx_pipeh = NULL;
  }
@@ -626,14 +624,10 @@ bwfm_usb_detach(struct device *self, int
 
  bwfm_detach(&sc->sc_sc, flags);
 
- if (sc->sc_rx_pipeh != NULL) {
- usbd_abort_pipe(sc->sc_rx_pipeh);
+ if (sc->sc_rx_pipeh != NULL)
  usbd_close_pipe(sc->sc_rx_pipeh);
- }
- if (sc->sc_tx_pipeh != NULL) {
- usbd_abort_pipe(sc->sc_tx_pipeh);
+ if (sc->sc_tx_pipeh != NULL)
  usbd_close_pipe(sc->sc_tx_pipeh);
- }
 
  bwfm_usb_free_rx_list(sc);
  bwfm_usb_free_tx_list(sc);
@@ -743,7 +737,6 @@ bwfm_usb_load_microcode(struct bwfm_usb_
  return 0;
 err:
  if (sc->sc_tx_pipeh != NULL) {
- usbd_abort_pipe(sc->sc_tx_pipeh);
  usbd_close_pipe(sc->sc_tx_pipeh);
  sc->sc_tx_pipeh = NULL;
  }
Index: if_cdce.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/if_cdce.c,v
retrieving revision 1.78
diff -u -p -u -p -r1.78 if_cdce.c
--- if_cdce.c 10 Jul 2020 13:26:40 -0000 1.78
+++ if_cdce.c 31 Jul 2020 08:26:25 -0000
@@ -442,7 +442,6 @@ cdce_stop(struct cdce_softc *sc)
  ifq_clr_oactive(&ifp->if_snd);
 
  if (sc->cdce_bulkin_pipe != NULL) {
- usbd_abort_pipe(sc->cdce_bulkin_pipe);
  err = usbd_close_pipe(sc->cdce_bulkin_pipe);
  if (err)
  printf("%s: close rx pipe failed: %s\n",
@@ -451,7 +450,6 @@ cdce_stop(struct cdce_softc *sc)
  }
 
  if (sc->cdce_bulkout_pipe != NULL) {
- usbd_abort_pipe(sc->cdce_bulkout_pipe);
  err = usbd_close_pipe(sc->cdce_bulkout_pipe);
  if (err)
  printf("%s: close tx pipe failed: %s\n",
@@ -460,7 +458,6 @@ cdce_stop(struct cdce_softc *sc)
  }
 
  if (sc->cdce_intr_pipe != NULL) {
- usbd_abort_pipe(sc->cdce_intr_pipe);
  err = usbd_close_pipe(sc->cdce_intr_pipe);
  if (err)
  printf("%s: close interrupt pipe failed: %s\n",
Index: if_cue.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/if_cue.c,v
retrieving revision 1.79
diff -u -p -u -p -r1.79 if_cue.c
--- if_cue.c 10 Jul 2020 13:26:40 -0000 1.79
+++ if_cue.c 31 Jul 2020 08:26:25 -0000
@@ -1129,7 +1129,6 @@ cue_stop(struct cue_softc *sc)
 
  /* Stop transfers. */
  if (sc->cue_ep[CUE_ENDPT_RX] != NULL) {
- usbd_abort_pipe(sc->cue_ep[CUE_ENDPT_RX]);
  err = usbd_close_pipe(sc->cue_ep[CUE_ENDPT_RX]);
  if (err) {
  printf("%s: close rx pipe failed: %s\n",
@@ -1139,7 +1138,6 @@ cue_stop(struct cue_softc *sc)
  }
 
  if (sc->cue_ep[CUE_ENDPT_TX] != NULL) {
- usbd_abort_pipe(sc->cue_ep[CUE_ENDPT_TX]);
  err = usbd_close_pipe(sc->cue_ep[CUE_ENDPT_TX]);
  if (err) {
  printf("%s: close tx pipe failed: %s\n",
@@ -1149,7 +1147,6 @@ cue_stop(struct cue_softc *sc)
  }
 
  if (sc->cue_ep[CUE_ENDPT_INTR] != NULL) {
- usbd_abort_pipe(sc->cue_ep[CUE_ENDPT_INTR]);
  err = usbd_close_pipe(sc->cue_ep[CUE_ENDPT_INTR]);
  if (err) {
  printf("%s: close intr pipe failed: %s\n",
Index: if_kue.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/if_kue.c,v
retrieving revision 1.91
diff -u -p -u -p -r1.91 if_kue.c
--- if_kue.c 10 Jul 2020 13:26:40 -0000 1.91
+++ if_kue.c 31 Jul 2020 08:26:25 -0000
@@ -1098,7 +1098,6 @@ kue_stop(struct kue_softc *sc)
 
  /* Stop transfers. */
  if (sc->kue_ep[KUE_ENDPT_RX] != NULL) {
- usbd_abort_pipe(sc->kue_ep[KUE_ENDPT_RX]);
  err = usbd_close_pipe(sc->kue_ep[KUE_ENDPT_RX]);
  if (err) {
  printf("%s: close rx pipe failed: %s\n",
@@ -1108,7 +1107,6 @@ kue_stop(struct kue_softc *sc)
  }
 
  if (sc->kue_ep[KUE_ENDPT_TX] != NULL) {
- usbd_abort_pipe(sc->kue_ep[KUE_ENDPT_TX]);
  err = usbd_close_pipe(sc->kue_ep[KUE_ENDPT_TX]);
  if (err) {
  printf("%s: close tx pipe failed: %s\n",
@@ -1118,7 +1116,6 @@ kue_stop(struct kue_softc *sc)
  }
 
  if (sc->kue_ep[KUE_ENDPT_INTR] != NULL) {
- usbd_abort_pipe(sc->kue_ep[KUE_ENDPT_INTR]);
  err = usbd_close_pipe(sc->kue_ep[KUE_ENDPT_INTR]);
  if (err) {
  printf("%s: close intr pipe failed: %s\n",
Index: if_mos.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/if_mos.c,v
retrieving revision 1.42
diff -u -p -u -p -r1.42 if_mos.c
--- if_mos.c 10 Jul 2020 13:26:40 -0000 1.42
+++ if_mos.c 31 Jul 2020 08:26:25 -0000
@@ -1334,7 +1334,6 @@ mos_stop(struct mos_softc *sc)
 
  /* Stop transfers. */
  if (sc->mos_ep[MOS_ENDPT_RX] != NULL) {
- usbd_abort_pipe(sc->mos_ep[MOS_ENDPT_RX]);
  err = usbd_close_pipe(sc->mos_ep[MOS_ENDPT_RX]);
  if (err) {
  printf("%s: close rx pipe failed: %s\n",
@@ -1344,7 +1343,6 @@ mos_stop(struct mos_softc *sc)
  }
 
  if (sc->mos_ep[MOS_ENDPT_TX] != NULL) {
- usbd_abort_pipe(sc->mos_ep[MOS_ENDPT_TX]);
  err = usbd_close_pipe(sc->mos_ep[MOS_ENDPT_TX]);
  if (err) {
  printf("%s: close tx pipe failed: %s\n",
@@ -1354,7 +1352,6 @@ mos_stop(struct mos_softc *sc)
  }
 
  if (sc->mos_ep[MOS_ENDPT_INTR] != NULL) {
- usbd_abort_pipe(sc->mos_ep[MOS_ENDPT_INTR]);
  err = usbd_close_pipe(sc->mos_ep[MOS_ENDPT_INTR]);
  if (err) {
  printf("%s: close intr pipe failed: %s\n",
Index: if_mue.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/if_mue.c,v
retrieving revision 1.9
diff -u -p -u -p -r1.9 if_mue.c
--- if_mue.c 10 Jul 2020 13:26:40 -0000 1.9
+++ if_mue.c 31 Jul 2020 08:26:25 -0000
@@ -1347,7 +1347,6 @@ mue_stop(struct mue_softc *sc)
 
  /* Stop transfers. */
  if (sc->mue_ep[MUE_ENDPT_RX] != NULL) {
- usbd_abort_pipe(sc->mue_ep[MUE_ENDPT_RX]);
  err = usbd_close_pipe(sc->mue_ep[MUE_ENDPT_RX]);
  if (err) {
  printf("%s: close rx pipe failed: %s\n",
@@ -1357,7 +1356,6 @@ mue_stop(struct mue_softc *sc)
  }
 
  if (sc->mue_ep[MUE_ENDPT_TX] != NULL) {
- usbd_abort_pipe(sc->mue_ep[MUE_ENDPT_TX]);
  err = usbd_close_pipe(sc->mue_ep[MUE_ENDPT_TX]);
  if (err) {
  printf("%s: close tx pipe failed: %s\n",
@@ -1367,7 +1365,6 @@ mue_stop(struct mue_softc *sc)
  }
 
  if (sc->mue_ep[MUE_ENDPT_INTR] != NULL) {
- usbd_abort_pipe(sc->mue_ep[MUE_ENDPT_INTR]);
  err = usbd_close_pipe(sc->mue_ep[MUE_ENDPT_INTR]);
  if (err) {
  printf("%s: close intr pipe failed: %s\n",
Index: if_otus.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/if_otus.c,v
retrieving revision 1.66
diff -u -p -u -p -r1.66 if_otus.c
--- if_otus.c 10 Jul 2020 13:22:21 -0000 1.66
+++ if_otus.c 31 Jul 2020 08:26:26 -0000
@@ -555,10 +555,8 @@ otus_close_pipes(struct otus_softc *sc)
 
  if (sc->data_rx_pipe != NULL)
  usbd_close_pipe(sc->data_rx_pipe);
- if (sc->cmd_rx_pipe != NULL) {
- usbd_abort_pipe(sc->cmd_rx_pipe);
+ if (sc->cmd_rx_pipe != NULL)
  usbd_close_pipe(sc->cmd_rx_pipe);
- }
  if (sc->ibuf != NULL)
  free(sc->ibuf, M_USBDEV, sc->ibuflen);
  if (sc->data_tx_pipe != NULL)
Index: if_ral.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/if_ral.c,v
retrieving revision 1.147
diff -u -p -u -p -r1.147 if_ral.c
--- if_ral.c 10 Jul 2020 13:22:21 -0000 1.147
+++ if_ral.c 31 Jul 2020 08:26:26 -0000
@@ -348,15 +348,11 @@ ural_detach(struct device *self, int fla
  sc->amrr_xfer = NULL;
  }
 
- if (sc->sc_rx_pipeh != NULL) {
- usbd_abort_pipe(sc->sc_rx_pipeh);
+ if (sc->sc_rx_pipeh != NULL)
  usbd_close_pipe(sc->sc_rx_pipeh);
- }
 
- if (sc->sc_tx_pipeh != NULL) {
- usbd_abort_pipe(sc->sc_tx_pipeh);
+ if (sc->sc_tx_pipeh != NULL)
  usbd_close_pipe(sc->sc_tx_pipeh);
- }
 
  ural_free_rx_list(sc);
  ural_free_tx_list(sc);
@@ -2067,12 +2063,10 @@ ural_stop(struct ifnet *ifp, int disable
  sc->amrr_xfer = NULL;
  }
  if (sc->sc_rx_pipeh != NULL) {
- usbd_abort_pipe(sc->sc_rx_pipeh);
  usbd_close_pipe(sc->sc_rx_pipeh);
  sc->sc_rx_pipeh = NULL;
  }
  if (sc->sc_tx_pipeh != NULL) {
- usbd_abort_pipe(sc->sc_tx_pipeh);
  usbd_close_pipe(sc->sc_tx_pipeh);
  sc->sc_tx_pipeh = NULL;
  }
Index: if_rsu.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/if_rsu.c,v
retrieving revision 1.46
diff -u -p -u -p -r1.46 if_rsu.c
--- if_rsu.c 10 Jul 2020 13:22:21 -0000 1.46
+++ if_rsu.c 31 Jul 2020 08:26:26 -0000
@@ -381,7 +381,6 @@ rsu_close_pipes(struct rsu_softc *sc)
  for (i = 0; i < sc->npipes; i++) {
  if (sc->pipe[i] == NULL)
  continue;
- usbd_abort_pipe(sc->pipe[i]);
  usbd_close_pipe(sc->pipe[i]);
  }
 }
Index: if_rum.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/if_rum.c,v
retrieving revision 1.125
diff -u -p -u -p -r1.125 if_rum.c
--- if_rum.c 10 Jul 2020 13:22:21 -0000 1.125
+++ if_rum.c 31 Jul 2020 08:26:26 -0000
@@ -441,14 +441,10 @@ rum_detach(struct device *self, int flag
  usbd_free_xfer(sc->amrr_xfer);
  sc->amrr_xfer = NULL;
  }
- if (sc->sc_rx_pipeh != NULL) {
- usbd_abort_pipe(sc->sc_rx_pipeh);
+ if (sc->sc_rx_pipeh != NULL)
  usbd_close_pipe(sc->sc_rx_pipeh);
- }
- if (sc->sc_tx_pipeh != NULL) {
- usbd_abort_pipe(sc->sc_tx_pipeh);
+ if (sc->sc_tx_pipeh != NULL)
  usbd_close_pipe(sc->sc_tx_pipeh);
- }
 
  rum_free_rx_list(sc);
  rum_free_tx_list(sc);
@@ -2091,12 +2087,10 @@ rum_stop(struct ifnet *ifp, int disable)
  sc->amrr_xfer = NULL;
  }
  if (sc->sc_rx_pipeh != NULL) {
- usbd_abort_pipe(sc->sc_rx_pipeh);
  usbd_close_pipe(sc->sc_rx_pipeh);
  sc->sc_rx_pipeh = NULL;
  }
  if (sc->sc_tx_pipeh != NULL) {
- usbd_abort_pipe(sc->sc_tx_pipeh);
  usbd_close_pipe(sc->sc_tx_pipeh);
  sc->sc_tx_pipeh = NULL;
  }
Index: if_run.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/if_run.c,v
retrieving revision 1.129
diff -u -p -u -p -r1.129 if_run.c
--- if_run.c 10 Jul 2020 13:22:21 -0000 1.129
+++ if_run.c 31 Jul 2020 08:26:27 -0000
@@ -750,7 +750,6 @@ run_free_rx_ring(struct run_softc *sc)
  int i;
 
  if (rxq->pipeh != NULL) {
- usbd_abort_pipe(rxq->pipeh);
  usbd_close_pipe(rxq->pipeh);
  rxq->pipeh = NULL;
  }
@@ -809,7 +808,6 @@ run_free_tx_ring(struct run_softc *sc, i
  int i;
 
  if (txq->pipeh != NULL) {
- usbd_abort_pipe(txq->pipeh);
  usbd_close_pipe(txq->pipeh);
  txq->pipeh = NULL;
  }
Index: if_smsc.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/if_smsc.c,v
retrieving revision 1.36
diff -u -p -u -p -r1.36 if_smsc.c
--- if_smsc.c 10 Jul 2020 13:26:40 -0000 1.36
+++ if_smsc.c 31 Jul 2020 08:26:27 -0000
@@ -698,7 +698,6 @@ smsc_stop(struct smsc_softc *sc)
 
  /* Stop transfers. */
  if (sc->sc_ep[SMSC_ENDPT_RX] != NULL) {
- usbd_abort_pipe(sc->sc_ep[SMSC_ENDPT_RX]);
  err = usbd_close_pipe(sc->sc_ep[SMSC_ENDPT_RX]);
  if (err) {
  printf("%s: close rx pipe failed: %s\n",
@@ -708,7 +707,6 @@ smsc_stop(struct smsc_softc *sc)
  }
 
  if (sc->sc_ep[SMSC_ENDPT_TX] != NULL) {
- usbd_abort_pipe(sc->sc_ep[SMSC_ENDPT_TX]);
  err = usbd_close_pipe(sc->sc_ep[SMSC_ENDPT_TX]);
  if (err) {
  printf("%s: close tx pipe failed: %s\n",
@@ -718,7 +716,6 @@ smsc_stop(struct smsc_softc *sc)
  }
 
  if (sc->sc_ep[SMSC_ENDPT_INTR] != NULL) {
- usbd_abort_pipe(sc->sc_ep[SMSC_ENDPT_INTR]);
  err = usbd_close_pipe(sc->sc_ep[SMSC_ENDPT_INTR]);
  if (err) {
  printf("%s: close intr pipe failed: %s\n",
Index: if_udav.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/if_udav.c,v
retrieving revision 1.83
diff -u -p -u -p -r1.83 if_udav.c
--- if_udav.c 10 Jul 2020 13:26:41 -0000 1.83
+++ if_udav.c 31 Jul 2020 08:26:27 -0000
@@ -1226,7 +1226,6 @@ udav_stop(struct ifnet *ifp, int disable
  /* Stop transfers */
  /* RX endpoint */
  if (sc->sc_pipe_rx != NULL) {
- usbd_abort_pipe(sc->sc_pipe_rx);
  err = usbd_close_pipe(sc->sc_pipe_rx);
  if (err)
  printf("%s: close rx pipe failed: %s\n",
@@ -1236,7 +1235,6 @@ udav_stop(struct ifnet *ifp, int disable
 
  /* TX endpoint */
  if (sc->sc_pipe_tx != NULL) {
- usbd_abort_pipe(sc->sc_pipe_tx);
  err = usbd_close_pipe(sc->sc_pipe_tx);
  if (err)
  printf("%s: close tx pipe failed: %s\n",
@@ -1248,7 +1246,6 @@ udav_stop(struct ifnet *ifp, int disable
  /* XXX: Interrupt endpoint is not yet supported!! */
  /* Interrupt endpoint */
  if (sc->sc_pipe_intr != NULL) {
- usbd_abort_pipe(sc->sc_pipe_intr);
  err = usbd_close_pipe(sc->sc_pipe_intr);
  if (err)
  printf("%s: close intr pipe failed: %s\n",
Index: if_ugl.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/if_ugl.c,v
retrieving revision 1.25
diff -u -p -u -p -r1.25 if_ugl.c
--- if_ugl.c 10 Jul 2020 13:26:41 -0000 1.25
+++ if_ugl.c 31 Jul 2020 08:26:27 -0000
@@ -817,19 +817,16 @@ ugl_stop(struct ugl_softc *sc)
 
  /* Stop transfers. */
  if (sc->sc_ep[UGL_ENDPT_RX] != NULL) {
- usbd_abort_pipe(sc->sc_ep[UGL_ENDPT_RX]);
  usbd_close_pipe(sc->sc_ep[UGL_ENDPT_RX]);
  sc->sc_ep[UGL_ENDPT_RX] = NULL;
  }
 
  if (sc->sc_ep[UGL_ENDPT_TX] != NULL) {
- usbd_abort_pipe(sc->sc_ep[UGL_ENDPT_TX]);
  usbd_close_pipe(sc->sc_ep[UGL_ENDPT_TX]);
  sc->sc_ep[UGL_ENDPT_TX] = NULL;
  }
 
  if (sc->sc_ep[UGL_ENDPT_INTR] != NULL) {
- usbd_abort_pipe(sc->sc_ep[UGL_ENDPT_INTR]);
  usbd_close_pipe(sc->sc_ep[UGL_ENDPT_INTR]);
  sc->sc_ep[UGL_ENDPT_INTR] = NULL;
  }
Index: if_upgt.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/if_upgt.c,v
retrieving revision 1.86
diff -u -p -u -p -r1.86 if_upgt.c
--- if_upgt.c 10 Jul 2020 13:22:21 -0000 1.86
+++ if_upgt.c 31 Jul 2020 08:26:27 -0000
@@ -447,14 +447,10 @@ upgt_detach(struct device *self, int fla
  s = splusb();
 
  /* abort and close TX / RX pipes */
- if (sc->sc_tx_pipeh != NULL) {
- usbd_abort_pipe(sc->sc_tx_pipeh);
+ if (sc->sc_tx_pipeh != NULL)
  usbd_close_pipe(sc->sc_tx_pipeh);
- }
- if (sc->sc_rx_pipeh != NULL) {
- usbd_abort_pipe(sc->sc_rx_pipeh);
+ if (sc->sc_rx_pipeh != NULL)
  usbd_close_pipe(sc->sc_rx_pipeh);
- }
 
  /* remove tasks and timeouts */
  usb_rem_task(sc->sc_udev, &sc->sc_task_newstate);
Index: if_upl.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/if_upl.c,v
retrieving revision 1.77
diff -u -p -u -p -r1.77 if_upl.c
--- if_upl.c 10 Jul 2020 13:26:41 -0000 1.77
+++ if_upl.c 31 Jul 2020 08:26:27 -0000
@@ -819,7 +819,6 @@ upl_stop(struct upl_softc *sc)
 
  /* Stop transfers. */
  if (sc->sc_ep[UPL_ENDPT_RX] != NULL) {
- usbd_abort_pipe(sc->sc_ep[UPL_ENDPT_RX]);
  err = usbd_close_pipe(sc->sc_ep[UPL_ENDPT_RX]);
  if (err) {
  printf("%s: close rx pipe failed: %s\n",
@@ -829,7 +828,6 @@ upl_stop(struct upl_softc *sc)
  }
 
  if (sc->sc_ep[UPL_ENDPT_TX] != NULL) {
- usbd_abort_pipe(sc->sc_ep[UPL_ENDPT_TX]);
  err = usbd_close_pipe(sc->sc_ep[UPL_ENDPT_TX]);
  if (err) {
  printf("%s: close tx pipe failed: %s\n",
@@ -839,7 +837,6 @@ upl_stop(struct upl_softc *sc)
  }
 
  if (sc->sc_ep[UPL_ENDPT_INTR] != NULL) {
- usbd_abort_pipe(sc->sc_ep[UPL_ENDPT_INTR]);
  err = usbd_close_pipe(sc->sc_ep[UPL_ENDPT_INTR]);
  if (err) {
  printf("%s: close intr pipe failed: %s\n",
Index: if_ure.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/if_ure.c,v
retrieving revision 1.16
diff -u -p -u -p -r1.16 if_ure.c
--- if_ure.c 10 Jul 2020 13:26:41 -0000 1.16
+++ if_ure.c 31 Jul 2020 08:26:27 -0000
@@ -825,7 +825,6 @@ ure_stop(struct ure_softc *sc)
  sc->ure_flags &= ~URE_FLAG_LINK;
 
  if (sc->ure_ep[URE_ENDPT_RX] != NULL) {
- usbd_abort_pipe(sc->ure_ep[URE_ENDPT_RX]);
  err = usbd_close_pipe(sc->ure_ep[URE_ENDPT_RX]);
  if (err) {
  printf("%s: close rx pipe failed: %s\n",
@@ -835,7 +834,6 @@ ure_stop(struct ure_softc *sc)
  }
 
  if (sc->ure_ep[URE_ENDPT_TX] != NULL) {
- usbd_abort_pipe(sc->ure_ep[URE_ENDPT_TX]);
  err = usbd_close_pipe(sc->ure_ep[URE_ENDPT_TX]);
  if (err) {
  printf("%s: close tx pipe failed: %s\n",
Index: if_url.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/if_url.c,v
retrieving revision 1.87
diff -u -p -u -p -r1.87 if_url.c
--- if_url.c 10 Jul 2020 13:26:41 -0000 1.87
+++ if_url.c 31 Jul 2020 08:26:27 -0000
@@ -1086,7 +1086,6 @@ url_stop(struct ifnet *ifp, int disable)
  /* Stop transfers */
  /* RX endpoint */
  if (sc->sc_pipe_rx != NULL) {
- usbd_abort_pipe(sc->sc_pipe_rx);
  err = usbd_close_pipe(sc->sc_pipe_rx);
  if (err)
  printf("%s: close rx pipe failed: %s\n",
@@ -1096,7 +1095,6 @@ url_stop(struct ifnet *ifp, int disable)
 
  /* TX endpoint */
  if (sc->sc_pipe_tx != NULL) {
- usbd_abort_pipe(sc->sc_pipe_tx);
  err = usbd_close_pipe(sc->sc_pipe_tx);
  if (err)
  printf("%s: close tx pipe failed: %s\n",
@@ -1108,7 +1106,6 @@ url_stop(struct ifnet *ifp, int disable)
  /* XXX: Interrupt endpoint is not yet supported!! */
  /* Interrupt endpoint */
  if (sc->sc_pipe_intr != NULL) {
- usbd_abort_pipe(sc->sc_pipe_intr);
  err = usbd_close_pipe(sc->sc_pipe_intr);
  if (err)
  printf("%s: close intr pipe failed: %s\n",
Index: if_urndis.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/if_urndis.c,v
retrieving revision 1.71
diff -u -p -u -p -r1.71 if_urndis.c
--- if_urndis.c 10 Jul 2020 13:26:41 -0000 1.71
+++ if_urndis.c 31 Jul 2020 08:26:27 -0000
@@ -1140,7 +1140,6 @@ urndis_stop(struct urndis_softc *sc)
  ifq_clr_oactive(&ifp->if_snd);
 
  if (sc->sc_bulkin_pipe != NULL) {
- usbd_abort_pipe(sc->sc_bulkin_pipe);
  err = usbd_close_pipe(sc->sc_bulkin_pipe);
  if (err)
  printf("%s: close rx pipe failed: %s\n",
@@ -1149,7 +1148,6 @@ urndis_stop(struct urndis_softc *sc)
  }
 
  if (sc->sc_bulkout_pipe != NULL) {
- usbd_abort_pipe(sc->sc_bulkout_pipe);
  err = usbd_close_pipe(sc->sc_bulkout_pipe);
  if (err)
  printf("%s: close tx pipe failed: %s\n",
Index: if_urtwn.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/if_urtwn.c,v
retrieving revision 1.92
diff -u -p -u -p -r1.92 if_urtwn.c
--- if_urtwn.c 6 Jul 2020 10:38:54 -0000 1.92
+++ if_urtwn.c 31 Jul 2020 08:26:28 -0000
@@ -615,15 +615,12 @@ urtwn_close_pipes(struct urtwn_softc *sc
  int i;
 
  /* Close Rx pipe. */
- if (sc->rx_pipe != NULL) {
- usbd_abort_pipe(sc->rx_pipe);
+ if (sc->rx_pipe != NULL)
  usbd_close_pipe(sc->rx_pipe);
- }
  /* Close Tx pipes. */
  for (i = 0; i < R92C_MAX_EPOUT; i++) {
  if (sc->tx_pipe[i] == NULL)
  continue;
- usbd_abort_pipe(sc->tx_pipe[i]);
  usbd_close_pipe(sc->tx_pipe[i]);
  }
 }
Index: if_wi_usb.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/if_wi_usb.c,v
retrieving revision 1.72
diff -u -p -u -p -r1.72 if_wi_usb.c
--- if_wi_usb.c 10 Jul 2020 13:26:41 -0000 1.72
+++ if_wi_usb.c 31 Jul 2020 08:26:28 -0000
@@ -416,7 +416,6 @@ wi_usb_detach(struct device *self, int f
  }
 
  if (sc->wi_usb_ep[WI_USB_ENDPT_INTR] != NULL) {
- usbd_abort_pipe(sc->wi_usb_ep[WI_USB_ENDPT_INTR]);
  err =
usbd_close_pipe(sc->wi_usb_ep[WI_USB_ENDPT_INTR]); if (err) {
  printf("%s: close intr pipe failed: %s\n",
@@ -425,7 +424,6 @@ wi_usb_detach(struct device *self, int f
  sc->wi_usb_ep[WI_USB_ENDPT_INTR] = NULL;
  }
  if (sc->wi_usb_ep[WI_USB_ENDPT_TX] != NULL) {
- usbd_abort_pipe(sc->wi_usb_ep[WI_USB_ENDPT_TX]);
  err = usbd_close_pipe(sc->wi_usb_ep[WI_USB_ENDPT_TX]);
  if (err) {
  printf("%s: close tx pipe failed: %s\n",
@@ -434,7 +432,6 @@ wi_usb_detach(struct device *self, int f
  sc->wi_usb_ep[WI_USB_ENDPT_TX] = NULL;
  }
  if (sc->wi_usb_ep[WI_USB_ENDPT_RX] != NULL) {
- usbd_abort_pipe(sc->wi_usb_ep[WI_USB_ENDPT_RX]);
  err = usbd_close_pipe(sc->wi_usb_ep[WI_USB_ENDPT_RX]);
  if (err) {
  printf("%s: close rx pipe failed: %s\n",
Index: if_zyd.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/if_zyd.c,v
retrieving revision 1.124
diff -u -p -u -p -r1.124 if_zyd.c
--- if_zyd.c 10 Jul 2020 13:22:21 -0000 1.124
+++ if_zyd.c 31 Jul 2020 08:26:28 -0000
@@ -518,7 +518,6 @@ zyd_close_pipes(struct zyd_softc *sc)
 
  for (i = 0; i < ZYD_ENDPT_CNT; i++) {
  if (sc->zyd_ep[i] != NULL) {
- usbd_abort_pipe(sc->zyd_ep[i]);
  usbd_close_pipe(sc->zyd_ep[i]);
  sc->zyd_ep[i] = NULL;
  }
Index: ubcmtp.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/ubcmtp.c,v
retrieving revision 1.20
diff -u -p -u -p -r1.20 ubcmtp.c
--- ubcmtp.c 27 May 2019 15:50:26 -0000 1.20
+++ ubcmtp.c 31 Jul 2020 08:26:28 -0000
@@ -583,12 +583,10 @@ ubcmtp_disable(void *v)
  ubcmtp_raw_mode(sc, 0);
 
  if (sc->sc_tp_pipe != NULL) {
- usbd_abort_pipe(sc->sc_tp_pipe);
  usbd_close_pipe(sc->sc_tp_pipe);
  sc->sc_tp_pipe = NULL;
  }
  if (sc->sc_bt_pipe != NULL) {
- usbd_abort_pipe(sc->sc_bt_pipe);
  usbd_close_pipe(sc->sc_bt_pipe);
  sc->sc_bt_pipe = NULL;
  }
@@ -773,17 +771,13 @@ ubcmtp_setup_pipes(struct ubcmtp_softc *
  return (0);
 
 fail2:
- if (sc->sc_tp_pipe != NULL) {
- usbd_abort_pipe(sc->sc_tp_pipe);
+ if (sc->sc_tp_pipe != NULL)
  usbd_close_pipe(sc->sc_tp_pipe);
- }
  if (sc->tp_pkt != NULL)
  free(sc->tp_pkt, M_USBDEV, sc->tp_maxlen);
 fail1:
- if (sc->sc_bt_pipe != NULL) {
- usbd_abort_pipe(sc->sc_bt_pipe);
+ if (sc->sc_bt_pipe != NULL)
  usbd_close_pipe(sc->sc_bt_pipe);
- }
  if (sc->bt_pkt != NULL)
  free(sc->bt_pkt, M_USBDEV, sc->bt_maxlen);
 
Index: ubsa.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/ubsa.c,v
retrieving revision 1.66
diff -u -p -u -p -r1.66 ubsa.c
--- ubsa.c 27 Apr 2018 08:08:06 -0000 1.66
+++ ubsa.c 31 Jul 2020 08:26:28 -0000
@@ -367,7 +367,6 @@ ubsa_detach(struct device *self, int fla
  DPRINTF(("ubsa_detach: sc = %p\n", sc));
 
  if (sc->sc_intr_pipe != NULL) {
- usbd_abort_pipe(sc->sc_intr_pipe);
  usbd_close_pipe(sc->sc_intr_pipe);
  free(sc->sc_intr_buf, M_USBDEV, sc->sc_isize);
  sc->sc_intr_pipe = NULL;
@@ -621,7 +620,6 @@ ubsa_close(void *addr, int portno)
  DPRINTF(("ubsa_close: close\n"));
 
  if (sc->sc_intr_pipe != NULL) {
- usbd_abort_pipe(sc->sc_intr_pipe);
  err = usbd_close_pipe(sc->sc_intr_pipe);
  if (err)
  printf("%s: close interrupt pipe failed: %s\n",
Index: uchcom.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/uchcom.c,v
retrieving revision 1.27
diff -u -p -u -p -r1.27 uchcom.c
--- uchcom.c 8 Apr 2017 02:57:25 -0000 1.27
+++ uchcom.c 31 Jul 2020 08:26:28 -0000
@@ -794,7 +794,6 @@ uchcom_close_intr_pipe(struct uchcom_sof
  usbd_status err;
 
  if (sc->sc_intr_pipe != NULL) {
- usbd_abort_pipe(sc->sc_intr_pipe);
  err = usbd_close_pipe(sc->sc_intr_pipe);
  if (err)
  printf("%s: close interrupt pipe failed: %s\n",
Index: ucom.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/ucom.c,v
retrieving revision 1.70
diff -u -p -u -p -r1.70 ucom.c
--- ucom.c 8 Mar 2020 19:24:15 -0000 1.70
+++ ucom.c 31 Jul 2020 08:26:28 -0000
@@ -217,12 +217,10 @@ ucom_detach(struct device *self, int fla
  sc, flags, tp, sc->sc_bulkin_no, sc->sc_bulkout_no));
 
  if (sc->sc_bulkin_pipe != NULL) {
- usbd_abort_pipe(sc->sc_bulkin_pipe);
  usbd_close_pipe(sc->sc_bulkin_pipe);
  sc->sc_bulkin_pipe = NULL;
  }
  if (sc->sc_bulkout_pipe != NULL) {
- usbd_abort_pipe(sc->sc_bulkout_pipe);
  usbd_close_pipe(sc->sc_bulkout_pipe);
  sc->sc_bulkout_pipe = NULL;
  }
@@ -1196,12 +1194,10 @@ ucom_cleanup(struct ucom_softc *sc)
 
  ucom_shutdown(sc);
  if (sc->sc_bulkin_pipe != NULL) {
- usbd_abort_pipe(sc->sc_bulkin_pipe);
  usbd_close_pipe(sc->sc_bulkin_pipe);
  sc->sc_bulkin_pipe = NULL;
  }
  if (sc->sc_bulkout_pipe != NULL) {
- usbd_abort_pipe(sc->sc_bulkout_pipe);
  usbd_close_pipe(sc->sc_bulkout_pipe);
  sc->sc_bulkout_pipe = NULL;
  }
Index: udl.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/udl.c,v
retrieving revision 1.93
diff -u -p -u -p -r1.93 udl.c
--- udl.c 25 May 2020 09:55:49 -0000 1.93
+++ udl.c 31 Jul 2020 08:26:28 -0000
@@ -438,10 +438,8 @@ udl_detach(struct device *self, int flag
  /*
  * Close bulk TX pipe.
  */
- if (sc->sc_tx_pipeh != NULL) {
- usbd_abort_pipe(sc->sc_tx_pipeh);
+ if (sc->sc_tx_pipeh != NULL)
  usbd_close_pipe(sc->sc_tx_pipeh);
- }
 
  /*
  * Free command buffer.
Index: uhidev.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/uhidev.c,v
retrieving revision 1.79
diff -u -p -u -p -r1.79 uhidev.c
--- uhidev.c 22 Feb 2020 14:01:34 -0000 1.79
+++ uhidev.c 31 Jul 2020 08:26:28 -0000
@@ -394,13 +394,11 @@ uhidev_detach(struct device *self, int f
  DPRINTF(("uhidev_detach: sc=%p flags=%d\n", sc, flags));
 
  if (sc->sc_opipe != NULL) {
- usbd_abort_pipe(sc->sc_opipe);
  usbd_close_pipe(sc->sc_opipe);
  sc->sc_opipe = NULL;
  }
 
  if (sc->sc_ipipe != NULL) {
- usbd_abort_pipe(sc->sc_ipipe);
  usbd_close_pipe(sc->sc_ipipe);
  sc->sc_ipipe = NULL;
  }
@@ -608,13 +606,11 @@ uhidev_close(struct uhidev *scd)
 
  /* Disable interrupts. */
  if (sc->sc_opipe != NULL) {
- usbd_abort_pipe(sc->sc_opipe);
  usbd_close_pipe(sc->sc_opipe);
  sc->sc_opipe = NULL;
  }
 
  if (sc->sc_ipipe != NULL) {
- usbd_abort_pipe(sc->sc_ipipe);
  usbd_close_pipe(sc->sc_ipipe);
  sc->sc_ipipe = NULL;
  }
Index: uhub.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/uhub.c,v
retrieving revision 1.94
diff -u -p -u -p -r1.94 uhub.c
--- uhub.c 16 Mar 2020 13:17:17 -0000 1.94
+++ uhub.c 31 Jul 2020 08:26:28 -0000
@@ -456,7 +456,6 @@ uhub_detach(struct device *self, int fla
  if (hub == NULL) /* Must be partially working */
  return (0);
 
- usbd_abort_pipe(sc->sc_ipipe);
  usbd_close_pipe(sc->sc_ipipe);
 
  for (port = 0; port < hub->nports; port++) {
Index: ulpt.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/ulpt.c,v
retrieving revision 1.56
diff -u -p -u -p -r1.56 ulpt.c
--- ulpt.c 8 Jan 2020 12:57:35 -0000 1.56
+++ ulpt.c 31 Jul 2020 08:26:28 -0000
@@ -575,7 +575,6 @@ ulptclose(dev_t dev, int flag, int mode,
  sc->sc_out_pipe = NULL;
  }
  if (sc->sc_in_pipe != NULL) {
- usbd_abort_pipe(sc->sc_in_pipe);
  usbd_close_pipe(sc->sc_in_pipe);
  sc->sc_in_pipe = NULL;
  if (sc->sc_in_xfer1 != NULL) {
Index: umbg.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/umbg.c,v
retrieving revision 1.26
diff -u -p -u -p -r1.26 umbg.c
--- umbg.c 22 Mar 2019 12:04:25 -0000 1.26
+++ umbg.c 31 Jul 2020 08:26:28 -0000
@@ -299,7 +299,6 @@ umbg_detach(struct device *self, int fla
  usb_rem_task(sc->sc_udev, &sc->sc_task);
 
  if (sc->sc_bulkin_pipe != NULL) {
- usbd_abort_pipe(sc->sc_bulkin_pipe);
  err = usbd_close_pipe(sc->sc_bulkin_pipe);
  if (err)
  printf("%s: close rx pipe failed: %s\n",
@@ -307,7 +306,6 @@ umbg_detach(struct device *self, int fla
  sc->sc_bulkin_pipe = NULL;
  }
  if (sc->sc_bulkout_pipe != NULL) {
- usbd_abort_pipe(sc->sc_bulkout_pipe);
  err = usbd_close_pipe(sc->sc_bulkout_pipe);
  if (err)
  printf("%s: close tx pipe failed: %s\n",
Index: umcs.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/umcs.c,v
retrieving revision 1.7
diff -u -p -u -p -r1.7 umcs.c
--- umcs.c 17 Mar 2020 09:34:52 -0000 1.7
+++ umcs.c 31 Jul 2020 08:26:28 -0000
@@ -471,7 +471,6 @@ umcs_detach(struct device *self, int fla
  task_del(systq, &sc->sc_status_task);
 
  if (sc->sc_ipipe != NULL) {
- usbd_abort_pipe(sc->sc_ipipe);
  usbd_close_pipe(sc->sc_ipipe);
  sc->sc_ipipe = NULL;
  }
Index: umct.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/umct.c,v
retrieving revision 1.47
diff -u -p -u -p -r1.47 umct.c
--- umct.c 30 Dec 2017 20:47:00 -0000 1.47
+++ umct.c 31 Jul 2020 08:26:28 -0000
@@ -295,7 +295,6 @@ umct_detach(struct device *self, int fla
  DPRINTF(("umct_detach: sc=%p flags=%d\n", sc, flags));
 
         if (sc->sc_intr_pipe != NULL) {
-                usbd_abort_pipe(sc->sc_intr_pipe);
                 usbd_close_pipe(sc->sc_intr_pipe);
  free(sc->sc_intr_buf, M_USBDEV, sc->sc_isize);
                 sc->sc_intr_pipe = NULL;
@@ -552,7 +551,6 @@ umct_close(void *addr, int portno)
  DPRINTF(("umct_close: close\n"));
 
  if (sc->sc_intr_pipe != NULL) {
- usbd_abort_pipe(sc->sc_intr_pipe);
  err = usbd_close_pipe(sc->sc_intr_pipe);
  if (err)
  printf("%s: close interrupt pipe failed: %s\n",
Index: umidi.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/umidi.c,v
retrieving revision 1.53
diff -u -p -u -p -r1.53 umidi.c
--- umidi.c 16 Mar 2020 16:12:43 -0000 1.53
+++ umidi.c 31 Jul 2020 08:26:28 -0000
@@ -367,7 +367,6 @@ static void
 free_pipe(struct umidi_endpoint *ep)
 {
  DPRINTF(("%s: %s %p\n", ep->sc->sc_dev.dv_xname, __func__,
ep));
- usbd_abort_pipe(ep->pipe);
  usbd_close_pipe(ep->pipe);
  usbd_free_xfer(ep->xfer);
 }
Index: umodem.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/umodem.c,v
retrieving revision 1.65
diff -u -p -u -p -r1.65 umodem.c
--- umodem.c 22 Feb 2020 14:01:35 -0000 1.65
+++ umodem.c 31 Jul 2020 08:26:28 -0000
@@ -424,7 +424,6 @@ umodem_close(void *addr, int portno)
  DPRINTF(("umodem_close: sc=%p\n", sc));
 
  if (sc->sc_notify_pipe != NULL) {
- usbd_abort_pipe(sc->sc_notify_pipe);
  err = usbd_close_pipe(sc->sc_notify_pipe);
  if (err)
  printf("%s: close notify pipe failed: %s\n",
@@ -702,7 +701,6 @@ umodem_detach(struct device *self, int f
  DPRINTF(("umodem_detach: sc=%p flags=%d\n", sc, flags));
 
  if (sc->sc_notify_pipe != NULL) {
- usbd_abort_pipe(sc->sc_notify_pipe);
  usbd_close_pipe(sc->sc_notify_pipe);
  sc->sc_notify_pipe = NULL;
  }
Index: umsm.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/umsm.c,v
retrieving revision 1.117
diff -u -p -u -p -r1.117 umsm.c
--- umsm.c 5 Feb 2020 16:01:32 -0000 1.117
+++ umsm.c 31 Jul 2020 08:26:29 -0000
@@ -440,7 +440,6 @@ umsm_detach(struct device *self, int fla
 
  /* close the interrupt endpoint if that is opened */
  if (sc->sc_intr_pipe != NULL) {
- usbd_abort_pipe(sc->sc_intr_pipe);
  usbd_close_pipe(sc->sc_intr_pipe);
  free(sc->sc_intr_buf, M_USBDEV, sc->sc_isize);
  sc->sc_intr_pipe = NULL;
@@ -496,7 +495,6 @@ umsm_close(void *addr, int portno)
  return;
 
  if (sc->sc_intr_pipe != NULL) {
- usbd_abort_pipe(sc->sc_intr_pipe);
  err = usbd_close_pipe(sc->sc_intr_pipe);
  if (err)
  printf("%s: close interrupt pipe failed: %s\n",
Index: uow.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/uow.c,v
retrieving revision 1.36
diff -u -p -u -p -r1.36 uow.c
--- uow.c 4 Jan 2020 11:36:05 -0000 1.36
+++ uow.c 31 Jul 2020 08:26:29 -0000
@@ -245,18 +245,12 @@ uow_detach(struct device *self, int flag
 
  s = splusb();
 
- if (sc->sc_ph_ibulk != NULL) {
- usbd_abort_pipe(sc->sc_ph_ibulk);
+ if (sc->sc_ph_ibulk != NULL)
  usbd_close_pipe(sc->sc_ph_ibulk);
- }
- if (sc->sc_ph_obulk != NULL) {
- usbd_abort_pipe(sc->sc_ph_obulk);
+ if (sc->sc_ph_obulk != NULL)
  usbd_close_pipe(sc->sc_ph_obulk);
- }
- if (sc->sc_ph_intr != NULL) {
- usbd_abort_pipe(sc->sc_ph_intr);
+ if (sc->sc_ph_intr != NULL)
  usbd_close_pipe(sc->sc_ph_intr);
- }
 
  if (sc->sc_xfer_in != NULL)
  usbd_free_xfer(sc->sc_xfer_in);
Index: uplcom.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/uplcom.c,v
retrieving revision 1.74
diff -u -p -u -p -r1.74 uplcom.c
--- uplcom.c 11 Mar 2020 13:04:02 -0000 1.74
+++ uplcom.c 31 Jul 2020 08:26:29 -0000
@@ -399,7 +399,6 @@ uplcom_detach(struct device *self, int f
  DPRINTF(("uplcom_detach: sc=%p flags=%d\n", sc, flags));
 
  if (sc->sc_intr_pipe != NULL) {
- usbd_abort_pipe(sc->sc_intr_pipe);
  usbd_close_pipe(sc->sc_intr_pipe);
  free(sc->sc_intr_buf, M_USBDEV, sc->sc_isize);
  sc->sc_intr_pipe = NULL;
@@ -708,7 +707,6 @@ uplcom_close(void *addr, int portno)
  DPRINTF(("uplcom_close: close\n"));
 
  if (sc->sc_intr_pipe != NULL) {
- usbd_abort_pipe(sc->sc_intr_pipe);
  err = usbd_close_pipe(sc->sc_intr_pipe);
  if (err)
  printf("%s: close interrupt pipe failed: %s\n",
Index: usb_subr.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/usb_subr.c,v
retrieving revision 1.150
diff -u -p -u -p -r1.150 usb_subr.c
--- usb_subr.c 6 Oct 2019 17:11:51 -0000 1.150
+++ usb_subr.c 31 Jul 2020 08:26:29 -0000
@@ -1403,10 +1403,8 @@ usb_free_device(struct usbd_device *dev)
 
  DPRINTF(("%s: %p\n", __func__, dev));
 
- if (dev->default_pipe != NULL) {
- usbd_abort_pipe(dev->default_pipe);
+ if (dev->default_pipe != NULL)
  usbd_close_pipe(dev->default_pipe);
- }
  if (dev->ifaces != NULL) {
  nifc = dev->cdesc->bNumInterface;
  for (ifcidx = 0; ifcidx < nifc; ifcidx++)
Index: usps.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/usps.c,v
retrieving revision 1.9
diff -u -p -u -p -r1.9 usps.c
--- usps.c 8 Apr 2017 02:57:25 -0000 1.9
+++ usps.c 31 Jul 2020 08:26:29 -0000
@@ -297,7 +297,6 @@ usps_detach(struct device *self, int fla
 
  s = splusb();
  if (sc->sc_ipipe != NULL) {
- usbd_abort_pipe(sc->sc_ipipe);
  usbd_close_pipe(sc->sc_ipipe);
  if (sc->sc_intrbuf != NULL)
  free(sc->sc_intrbuf, M_USBDEV, sc->sc_isize);
Index: uticom.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/uticom.c,v
retrieving revision 1.33
diff -u -p -u -p -r1.33 uticom.c
--- uticom.c 15 Mar 2018 00:42:41 -0000 1.33
+++ uticom.c 31 Jul 2020 08:26:29 -0000
@@ -453,7 +453,6 @@ uticom_detach(struct device *self, int f
  }
 
  if (sc->sc_intr_pipe != NULL) {
- usbd_abort_pipe(sc->sc_intr_pipe);
  usbd_close_pipe(sc->sc_intr_pipe);
  free(sc->sc_intr_buf, M_USBDEV, sc->sc_isize);
  sc->sc_intr_pipe = NULL;
@@ -750,7 +749,6 @@ uticom_close(void *addr, int portno)
  DPRINTF(("%s: uticom_close: close\n", sc->sc_dev.dv_xname));
 
  if (sc->sc_intr_pipe != NULL) {
- usbd_abort_pipe(sc->sc_intr_pipe);
  err = usbd_close_pipe(sc->sc_intr_pipe);
  if (err)
  printf("%s: close interrupt pipe failed: %s\n",
@@ -912,7 +910,6 @@ finish:
  usbd_free_buffer(oxfer);
  usbd_free_xfer(oxfer);
  oxfer = NULL;
- usbd_abort_pipe(pipe);
  usbd_close_pipe(pipe);
  free(buffer, M_USBDEV, buffer_size);
  return err;
Index: uts.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/uts.c,v
retrieving revision 1.42
diff -u -p -u -p -r1.42 uts.c
--- uts.c 6 Nov 2019 20:25:14 -0000 1.42
+++ uts.c 31 Jul 2020 08:26:29 -0000
@@ -216,7 +216,6 @@ uts_detach(struct device *self, int flag
  int rv = 0;
 
  if (sc->sc_intr_pipe != NULL) {
- usbd_abort_pipe(sc->sc_intr_pipe);
  usbd_close_pipe(sc->sc_intr_pipe);
  sc->sc_intr_pipe = NULL;
  }
@@ -288,7 +287,6 @@ uts_disable(void *v)
 
  /* Disable interrupts. */
  if (sc->sc_intr_pipe != NULL) {
- usbd_abort_pipe(sc->sc_intr_pipe);
  usbd_close_pipe(sc->sc_intr_pipe);
  sc->sc_intr_pipe = NULL;
  }
Index: utvfu.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/utvfu.c,v
retrieving revision 1.10
diff -u -p -u -p -r1.10 utvfu.c
--- utvfu.c 14 Oct 2019 09:20:48 -0000 1.10
+++ utvfu.c 31 Jul 2020 08:26:29 -0000
@@ -1164,7 +1164,6 @@ void
 utvfu_vs_close(struct utvfu_softc *sc)
 {
  if (sc->sc_iface.pipeh != NULL) {
- usbd_abort_pipe(sc->sc_iface.pipeh);
  usbd_close_pipe(sc->sc_iface.pipeh);
  sc->sc_iface.pipeh = NULL;
  }
Index: uvideo.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/uvideo.c,v
retrieving revision 1.208
diff -u -p -u -p -r1.208 uvideo.c
--- uvideo.c 5 Jul 2020 11:47:50 -0000 1.208
+++ uvideo.c 31 Jul 2020 08:26:29 -0000
@@ -1970,7 +1970,6 @@ uvideo_vs_close(struct uvideo_softc *sc)
  }
 
  if (sc->sc_vs_cur->pipeh) {
- usbd_abort_pipe(sc->sc_vs_cur->pipeh);
  usbd_close_pipe(sc->sc_vs_cur->pipeh);
  sc->sc_vs_cur->pipeh = NULL;
  }
Index: uvscom.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/uvscom.c,v
retrieving revision 1.38
diff -u -p -u -p -r1.38 uvscom.c
--- uvscom.c 12 Nov 2019 07:47:30 -0000 1.38
+++ uvscom.c 31 Jul 2020 08:26:29 -0000
@@ -351,7 +351,6 @@ uvscom_detach(struct device *self, int f
  DPRINTF(("uvscom_detach: sc = %p\n", sc));
 
  if (sc->sc_intr_pipe != NULL) {
- usbd_abort_pipe(sc->sc_intr_pipe);
  usbd_close_pipe(sc->sc_intr_pipe);
  free(sc->sc_intr_buf, M_USBDEV, sc->sc_isize);
  sc->sc_intr_pipe = NULL;
@@ -741,7 +740,6 @@ uvscom_close(void *addr, int portno)
  uvscom_shutdown(sc);
 
  if (sc->sc_intr_pipe != NULL) {
- usbd_abort_pipe(sc->sc_intr_pipe);
  err = usbd_close_pipe(sc->sc_intr_pipe);
  if (err)
  printf("%s: close interrupt pipe failed: %s\n",
Index: uxrcom.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/uxrcom.c,v
retrieving revision 1.1
diff -u -p -u -p -r1.1 uxrcom.c
--- uxrcom.c 27 Mar 2019 22:08:51 -0000 1.1
+++ uxrcom.c 31 Jul 2020 08:26:29 -0000
@@ -208,7 +208,6 @@ uxrcom_detach(struct device *self, int f
  int rv = 0;
 
  if (sc->sc_intr_pipe != NULL) {
- usbd_abort_pipe(sc->sc_intr_pipe);
  usbd_close_pipe(sc->sc_intr_pipe);
  sc->sc_intr_pipe = NULL;
  }
@@ -247,7 +246,6 @@ uxrcom_close(void *vsc, int portno)
  return;
 
  if (sc->sc_intr_pipe != NULL) {
- usbd_abort_pipe(sc->sc_intr_pipe);
  err = usbd_close_pipe(sc->sc_intr_pipe);
  if (err)
  printf("%s: close intr pipe failed: %s\n",

Reply | Threaded
Open this post in threaded view
|

Re: usbd_abort_pipe(); usbd_close_pipe; dance

Gerhard Roth-2
Hi Marcus,

On 2020-07-31 11:22, Marcus Glocker wrote:

> Maybe I'm missing something here.
>
> But is there any specific reason why the most of our USB drivers are
> calling usbd_abort_pipe() right before usbd_close_pipe()?  Since
> usbd_close_pipe() already will call usbd_abort_pipe() if the pipe isn't
> empty, as documented in the man page:
>
> DESCRIPTION
>       The usbd_abort_pipe() function aborts any transfers queued on pipe.
>
>       The usbd_close_pipe() function aborts any transfers queued on pipe
>       then deletes it.
>
> In case this happened because of an inherited copy/paste chain, can we
> nuke the superfluous usbd_abort_pipe() calls?

I was asking myself the same question before ;)

Apparently, the call to usbd_abort_pipe() inside of usbd_close_pipe()
wasn't there right from the start. It was added by mpi@ with rev 1.57 of
usbdi.c abort 7 years ago. Hence drivers written before that needed the
the usbd_abort_pipe(). But that is no longer the case.

ok gerhard@




>
>
> Index: if_atu.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/if_atu.c,v
> retrieving revision 1.131
> diff -u -p -u -p -r1.131 if_atu.c
> --- if_atu.c 10 Jul 2020 13:26:40 -0000 1.131
> +++ if_atu.c 31 Jul 2020 08:26:24 -0000
> @@ -2252,7 +2252,6 @@ atu_stop(struct ifnet *ifp, int disable)
>  
>   /* Stop transfers. */
>   if (sc->atu_ep[ATU_ENDPT_RX] != NULL) {
> - usbd_abort_pipe(sc->atu_ep[ATU_ENDPT_RX]);
>   err = usbd_close_pipe(sc->atu_ep[ATU_ENDPT_RX]);
>   if (err) {
>   DPRINTF(("%s: close rx pipe failed: %s\n",
> @@ -2262,7 +2261,6 @@ atu_stop(struct ifnet *ifp, int disable)
>   }
>  
>   if (sc->atu_ep[ATU_ENDPT_TX] != NULL) {
> - usbd_abort_pipe(sc->atu_ep[ATU_ENDPT_TX]);
>   err = usbd_close_pipe(sc->atu_ep[ATU_ENDPT_TX]);
>   if (err) {
>   DPRINTF(("%s: close tx pipe failed: %s\n",
> Index: if_aue.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/if_aue.c,v
> retrieving revision 1.110
> diff -u -p -u -p -r1.110 if_aue.c
> --- if_aue.c 10 Jul 2020 13:26:40 -0000 1.110
> +++ if_aue.c 31 Jul 2020 08:26:25 -0000
> @@ -1518,7 +1518,6 @@ aue_stop(struct aue_softc *sc)
>  
>   /* Stop transfers. */
>   if (sc->aue_ep[AUE_ENDPT_RX] != NULL) {
> - usbd_abort_pipe(sc->aue_ep[AUE_ENDPT_RX]);
>   err = usbd_close_pipe(sc->aue_ep[AUE_ENDPT_RX]);
>   if (err) {
>   printf("%s: close rx pipe failed: %s\n",
> @@ -1528,7 +1527,6 @@ aue_stop(struct aue_softc *sc)
>   }
>  
>   if (sc->aue_ep[AUE_ENDPT_TX] != NULL) {
> - usbd_abort_pipe(sc->aue_ep[AUE_ENDPT_TX]);
>   err = usbd_close_pipe(sc->aue_ep[AUE_ENDPT_TX]);
>   if (err) {
>   printf("%s: close tx pipe failed: %s\n",
> @@ -1538,7 +1536,6 @@ aue_stop(struct aue_softc *sc)
>   }
>  
>   if (sc->aue_ep[AUE_ENDPT_INTR] != NULL) {
> - usbd_abort_pipe(sc->aue_ep[AUE_ENDPT_INTR]);
>   err = usbd_close_pipe(sc->aue_ep[AUE_ENDPT_INTR]);
>   if (err) {
>   printf("%s: close intr pipe failed: %s\n",
> Index: if_axe.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/if_axe.c,v
> retrieving revision 1.141
> diff -u -p -u -p -r1.141 if_axe.c
> --- if_axe.c 10 Jul 2020 13:26:40 -0000 1.141
> +++ if_axe.c 31 Jul 2020 08:26:25 -0000
> @@ -1473,7 +1473,6 @@ axe_stop(struct axe_softc *sc)
>  
>   /* Stop transfers. */
>   if (sc->axe_ep[AXE_ENDPT_RX] != NULL) {
> - usbd_abort_pipe(sc->axe_ep[AXE_ENDPT_RX]);
>   err = usbd_close_pipe(sc->axe_ep[AXE_ENDPT_RX]);
>   if (err) {
>   printf("axe%d: close rx pipe failed: %s\n",
> @@ -1483,7 +1482,6 @@ axe_stop(struct axe_softc *sc)
>   }
>  
>   if (sc->axe_ep[AXE_ENDPT_TX] != NULL) {
> - usbd_abort_pipe(sc->axe_ep[AXE_ENDPT_TX]);
>   err = usbd_close_pipe(sc->axe_ep[AXE_ENDPT_TX]);
>   if (err) {
>   printf("axe%d: close tx pipe failed: %s\n",
> @@ -1493,7 +1491,6 @@ axe_stop(struct axe_softc *sc)
>   }
>  
>   if (sc->axe_ep[AXE_ENDPT_INTR] != NULL) {
> - usbd_abort_pipe(sc->axe_ep[AXE_ENDPT_INTR]);
>   err = usbd_close_pipe(sc->axe_ep[AXE_ENDPT_INTR]);
>   if (err) {
>   printf("axe%d: close intr pipe failed: %s\n",
> Index: if_axen.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/if_axen.c,v
> retrieving revision 1.29
> diff -u -p -u -p -r1.29 if_axen.c
> --- if_axen.c 10 Jul 2020 13:26:40 -0000 1.29
> +++ if_axen.c 31 Jul 2020 08:26:25 -0000
> @@ -1426,7 +1426,6 @@ axen_stop(struct axen_softc *sc)
>  
>   /* Stop transfers. */
>   if (sc->axen_ep[AXEN_ENDPT_RX] != NULL) {
> - usbd_abort_pipe(sc->axen_ep[AXEN_ENDPT_RX]);
>   err = usbd_close_pipe(sc->axen_ep[AXEN_ENDPT_RX]);
>   if (err) {
>   printf("axen%d: close rx pipe failed: %s\n",
> @@ -1436,7 +1435,6 @@ axen_stop(struct axen_softc *sc)
>   }
>  
>   if (sc->axen_ep[AXEN_ENDPT_TX] != NULL) {
> - usbd_abort_pipe(sc->axen_ep[AXEN_ENDPT_TX]);
>   err = usbd_close_pipe(sc->axen_ep[AXEN_ENDPT_TX]);
>   if (err) {
>   printf("axen%d: close tx pipe failed: %s\n",
> @@ -1446,7 +1444,6 @@ axen_stop(struct axen_softc *sc)
>   }
>  
>   if (sc->axen_ep[AXEN_ENDPT_INTR] != NULL) {
> - usbd_abort_pipe(sc->axen_ep[AXEN_ENDPT_INTR]);
>   err = usbd_close_pipe(sc->axen_ep[AXEN_ENDPT_INTR]);
>   if (err) {
>   printf("axen%d: close intr pipe failed: %s\n",
> Index: if_bwfm_usb.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/if_bwfm_usb.c,v
> retrieving revision 1.18
> diff -u -p -u -p -r1.18 if_bwfm_usb.c
> --- if_bwfm_usb.c 25 Feb 2020 14:24:58 -0000 1.18
> +++ if_bwfm_usb.c 31 Jul 2020 08:26:25 -0000
> @@ -414,12 +414,10 @@ bwfm_usb_preinit(struct bwfm_softc *bwfm
>  
>   cleanup:
>   if (sc->sc_rx_pipeh) {
> - usbd_abort_pipe(sc->sc_rx_pipeh);
>   usbd_close_pipe(sc->sc_rx_pipeh);
>   sc->sc_rx_pipeh = NULL;
>   }
>   if (sc->sc_tx_pipeh) {
> - usbd_abort_pipe(sc->sc_tx_pipeh);
>   usbd_close_pipe(sc->sc_tx_pipeh);
>   sc->sc_tx_pipeh = NULL;
>   }
> @@ -626,14 +624,10 @@ bwfm_usb_detach(struct device *self, int
>  
>   bwfm_detach(&sc->sc_sc, flags);
>  
> - if (sc->sc_rx_pipeh != NULL) {
> - usbd_abort_pipe(sc->sc_rx_pipeh);
> + if (sc->sc_rx_pipeh != NULL)
>   usbd_close_pipe(sc->sc_rx_pipeh);
> - }
> - if (sc->sc_tx_pipeh != NULL) {
> - usbd_abort_pipe(sc->sc_tx_pipeh);
> + if (sc->sc_tx_pipeh != NULL)
>   usbd_close_pipe(sc->sc_tx_pipeh);
> - }
>  
>   bwfm_usb_free_rx_list(sc);
>   bwfm_usb_free_tx_list(sc);
> @@ -743,7 +737,6 @@ bwfm_usb_load_microcode(struct bwfm_usb_
>   return 0;
>   err:
>   if (sc->sc_tx_pipeh != NULL) {
> - usbd_abort_pipe(sc->sc_tx_pipeh);
>   usbd_close_pipe(sc->sc_tx_pipeh);
>   sc->sc_tx_pipeh = NULL;
>   }
> Index: if_cdce.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/if_cdce.c,v
> retrieving revision 1.78
> diff -u -p -u -p -r1.78 if_cdce.c
> --- if_cdce.c 10 Jul 2020 13:26:40 -0000 1.78
> +++ if_cdce.c 31 Jul 2020 08:26:25 -0000
> @@ -442,7 +442,6 @@ cdce_stop(struct cdce_softc *sc)
>   ifq_clr_oactive(&ifp->if_snd);
>  
>   if (sc->cdce_bulkin_pipe != NULL) {
> - usbd_abort_pipe(sc->cdce_bulkin_pipe);
>   err = usbd_close_pipe(sc->cdce_bulkin_pipe);
>   if (err)
>   printf("%s: close rx pipe failed: %s\n",
> @@ -451,7 +450,6 @@ cdce_stop(struct cdce_softc *sc)
>   }
>  
>   if (sc->cdce_bulkout_pipe != NULL) {
> - usbd_abort_pipe(sc->cdce_bulkout_pipe);
>   err = usbd_close_pipe(sc->cdce_bulkout_pipe);
>   if (err)
>   printf("%s: close tx pipe failed: %s\n",
> @@ -460,7 +458,6 @@ cdce_stop(struct cdce_softc *sc)
>   }
>  
>   if (sc->cdce_intr_pipe != NULL) {
> - usbd_abort_pipe(sc->cdce_intr_pipe);
>   err = usbd_close_pipe(sc->cdce_intr_pipe);
>   if (err)
>   printf("%s: close interrupt pipe failed: %s\n",
> Index: if_cue.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/if_cue.c,v
> retrieving revision 1.79
> diff -u -p -u -p -r1.79 if_cue.c
> --- if_cue.c 10 Jul 2020 13:26:40 -0000 1.79
> +++ if_cue.c 31 Jul 2020 08:26:25 -0000
> @@ -1129,7 +1129,6 @@ cue_stop(struct cue_softc *sc)
>  
>   /* Stop transfers. */
>   if (sc->cue_ep[CUE_ENDPT_RX] != NULL) {
> - usbd_abort_pipe(sc->cue_ep[CUE_ENDPT_RX]);
>   err = usbd_close_pipe(sc->cue_ep[CUE_ENDPT_RX]);
>   if (err) {
>   printf("%s: close rx pipe failed: %s\n",
> @@ -1139,7 +1138,6 @@ cue_stop(struct cue_softc *sc)
>   }
>  
>   if (sc->cue_ep[CUE_ENDPT_TX] != NULL) {
> - usbd_abort_pipe(sc->cue_ep[CUE_ENDPT_TX]);
>   err = usbd_close_pipe(sc->cue_ep[CUE_ENDPT_TX]);
>   if (err) {
>   printf("%s: close tx pipe failed: %s\n",
> @@ -1149,7 +1147,6 @@ cue_stop(struct cue_softc *sc)
>   }
>  
>   if (sc->cue_ep[CUE_ENDPT_INTR] != NULL) {
> - usbd_abort_pipe(sc->cue_ep[CUE_ENDPT_INTR]);
>   err = usbd_close_pipe(sc->cue_ep[CUE_ENDPT_INTR]);
>   if (err) {
>   printf("%s: close intr pipe failed: %s\n",
> Index: if_kue.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/if_kue.c,v
> retrieving revision 1.91
> diff -u -p -u -p -r1.91 if_kue.c
> --- if_kue.c 10 Jul 2020 13:26:40 -0000 1.91
> +++ if_kue.c 31 Jul 2020 08:26:25 -0000
> @@ -1098,7 +1098,6 @@ kue_stop(struct kue_softc *sc)
>  
>   /* Stop transfers. */
>   if (sc->kue_ep[KUE_ENDPT_RX] != NULL) {
> - usbd_abort_pipe(sc->kue_ep[KUE_ENDPT_RX]);
>   err = usbd_close_pipe(sc->kue_ep[KUE_ENDPT_RX]);
>   if (err) {
>   printf("%s: close rx pipe failed: %s\n",
> @@ -1108,7 +1107,6 @@ kue_stop(struct kue_softc *sc)
>   }
>  
>   if (sc->kue_ep[KUE_ENDPT_TX] != NULL) {
> - usbd_abort_pipe(sc->kue_ep[KUE_ENDPT_TX]);
>   err = usbd_close_pipe(sc->kue_ep[KUE_ENDPT_TX]);
>   if (err) {
>   printf("%s: close tx pipe failed: %s\n",
> @@ -1118,7 +1116,6 @@ kue_stop(struct kue_softc *sc)
>   }
>  
>   if (sc->kue_ep[KUE_ENDPT_INTR] != NULL) {
> - usbd_abort_pipe(sc->kue_ep[KUE_ENDPT_INTR]);
>   err = usbd_close_pipe(sc->kue_ep[KUE_ENDPT_INTR]);
>   if (err) {
>   printf("%s: close intr pipe failed: %s\n",
> Index: if_mos.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/if_mos.c,v
> retrieving revision 1.42
> diff -u -p -u -p -r1.42 if_mos.c
> --- if_mos.c 10 Jul 2020 13:26:40 -0000 1.42
> +++ if_mos.c 31 Jul 2020 08:26:25 -0000
> @@ -1334,7 +1334,6 @@ mos_stop(struct mos_softc *sc)
>  
>   /* Stop transfers. */
>   if (sc->mos_ep[MOS_ENDPT_RX] != NULL) {
> - usbd_abort_pipe(sc->mos_ep[MOS_ENDPT_RX]);
>   err = usbd_close_pipe(sc->mos_ep[MOS_ENDPT_RX]);
>   if (err) {
>   printf("%s: close rx pipe failed: %s\n",
> @@ -1344,7 +1343,6 @@ mos_stop(struct mos_softc *sc)
>   }
>  
>   if (sc->mos_ep[MOS_ENDPT_TX] != NULL) {
> - usbd_abort_pipe(sc->mos_ep[MOS_ENDPT_TX]);
>   err = usbd_close_pipe(sc->mos_ep[MOS_ENDPT_TX]);
>   if (err) {
>   printf("%s: close tx pipe failed: %s\n",
> @@ -1354,7 +1352,6 @@ mos_stop(struct mos_softc *sc)
>   }
>  
>   if (sc->mos_ep[MOS_ENDPT_INTR] != NULL) {
> - usbd_abort_pipe(sc->mos_ep[MOS_ENDPT_INTR]);
>   err = usbd_close_pipe(sc->mos_ep[MOS_ENDPT_INTR]);
>   if (err) {
>   printf("%s: close intr pipe failed: %s\n",
> Index: if_mue.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/if_mue.c,v
> retrieving revision 1.9
> diff -u -p -u -p -r1.9 if_mue.c
> --- if_mue.c 10 Jul 2020 13:26:40 -0000 1.9
> +++ if_mue.c 31 Jul 2020 08:26:25 -0000
> @@ -1347,7 +1347,6 @@ mue_stop(struct mue_softc *sc)
>  
>   /* Stop transfers. */
>   if (sc->mue_ep[MUE_ENDPT_RX] != NULL) {
> - usbd_abort_pipe(sc->mue_ep[MUE_ENDPT_RX]);
>   err = usbd_close_pipe(sc->mue_ep[MUE_ENDPT_RX]);
>   if (err) {
>   printf("%s: close rx pipe failed: %s\n",
> @@ -1357,7 +1356,6 @@ mue_stop(struct mue_softc *sc)
>   }
>  
>   if (sc->mue_ep[MUE_ENDPT_TX] != NULL) {
> - usbd_abort_pipe(sc->mue_ep[MUE_ENDPT_TX]);
>   err = usbd_close_pipe(sc->mue_ep[MUE_ENDPT_TX]);
>   if (err) {
>   printf("%s: close tx pipe failed: %s\n",
> @@ -1367,7 +1365,6 @@ mue_stop(struct mue_softc *sc)
>   }
>  
>   if (sc->mue_ep[MUE_ENDPT_INTR] != NULL) {
> - usbd_abort_pipe(sc->mue_ep[MUE_ENDPT_INTR]);
>   err = usbd_close_pipe(sc->mue_ep[MUE_ENDPT_INTR]);
>   if (err) {
>   printf("%s: close intr pipe failed: %s\n",
> Index: if_otus.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/if_otus.c,v
> retrieving revision 1.66
> diff -u -p -u -p -r1.66 if_otus.c
> --- if_otus.c 10 Jul 2020 13:22:21 -0000 1.66
> +++ if_otus.c 31 Jul 2020 08:26:26 -0000
> @@ -555,10 +555,8 @@ otus_close_pipes(struct otus_softc *sc)
>  
>   if (sc->data_rx_pipe != NULL)
>   usbd_close_pipe(sc->data_rx_pipe);
> - if (sc->cmd_rx_pipe != NULL) {
> - usbd_abort_pipe(sc->cmd_rx_pipe);
> + if (sc->cmd_rx_pipe != NULL)
>   usbd_close_pipe(sc->cmd_rx_pipe);
> - }
>   if (sc->ibuf != NULL)
>   free(sc->ibuf, M_USBDEV, sc->ibuflen);
>   if (sc->data_tx_pipe != NULL)
> Index: if_ral.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/if_ral.c,v
> retrieving revision 1.147
> diff -u -p -u -p -r1.147 if_ral.c
> --- if_ral.c 10 Jul 2020 13:22:21 -0000 1.147
> +++ if_ral.c 31 Jul 2020 08:26:26 -0000
> @@ -348,15 +348,11 @@ ural_detach(struct device *self, int fla
>   sc->amrr_xfer = NULL;
>   }
>  
> - if (sc->sc_rx_pipeh != NULL) {
> - usbd_abort_pipe(sc->sc_rx_pipeh);
> + if (sc->sc_rx_pipeh != NULL)
>   usbd_close_pipe(sc->sc_rx_pipeh);
> - }
>  
> - if (sc->sc_tx_pipeh != NULL) {
> - usbd_abort_pipe(sc->sc_tx_pipeh);
> + if (sc->sc_tx_pipeh != NULL)
>   usbd_close_pipe(sc->sc_tx_pipeh);
> - }
>  
>   ural_free_rx_list(sc);
>   ural_free_tx_list(sc);
> @@ -2067,12 +2063,10 @@ ural_stop(struct ifnet *ifp, int disable
>   sc->amrr_xfer = NULL;
>   }
>   if (sc->sc_rx_pipeh != NULL) {
> - usbd_abort_pipe(sc->sc_rx_pipeh);
>   usbd_close_pipe(sc->sc_rx_pipeh);
>   sc->sc_rx_pipeh = NULL;
>   }
>   if (sc->sc_tx_pipeh != NULL) {
> - usbd_abort_pipe(sc->sc_tx_pipeh);
>   usbd_close_pipe(sc->sc_tx_pipeh);
>   sc->sc_tx_pipeh = NULL;
>   }
> Index: if_rsu.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/if_rsu.c,v
> retrieving revision 1.46
> diff -u -p -u -p -r1.46 if_rsu.c
> --- if_rsu.c 10 Jul 2020 13:22:21 -0000 1.46
> +++ if_rsu.c 31 Jul 2020 08:26:26 -0000
> @@ -381,7 +381,6 @@ rsu_close_pipes(struct rsu_softc *sc)
>   for (i = 0; i < sc->npipes; i++) {
>   if (sc->pipe[i] == NULL)
>   continue;
> - usbd_abort_pipe(sc->pipe[i]);
>   usbd_close_pipe(sc->pipe[i]);
>   }
>   }
> Index: if_rum.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/if_rum.c,v
> retrieving revision 1.125
> diff -u -p -u -p -r1.125 if_rum.c
> --- if_rum.c 10 Jul 2020 13:22:21 -0000 1.125
> +++ if_rum.c 31 Jul 2020 08:26:26 -0000
> @@ -441,14 +441,10 @@ rum_detach(struct device *self, int flag
>   usbd_free_xfer(sc->amrr_xfer);
>   sc->amrr_xfer = NULL;
>   }
> - if (sc->sc_rx_pipeh != NULL) {
> - usbd_abort_pipe(sc->sc_rx_pipeh);
> + if (sc->sc_rx_pipeh != NULL)
>   usbd_close_pipe(sc->sc_rx_pipeh);
> - }
> - if (sc->sc_tx_pipeh != NULL) {
> - usbd_abort_pipe(sc->sc_tx_pipeh);
> + if (sc->sc_tx_pipeh != NULL)
>   usbd_close_pipe(sc->sc_tx_pipeh);
> - }
>  
>   rum_free_rx_list(sc);
>   rum_free_tx_list(sc);
> @@ -2091,12 +2087,10 @@ rum_stop(struct ifnet *ifp, int disable)
>   sc->amrr_xfer = NULL;
>   }
>   if (sc->sc_rx_pipeh != NULL) {
> - usbd_abort_pipe(sc->sc_rx_pipeh);
>   usbd_close_pipe(sc->sc_rx_pipeh);
>   sc->sc_rx_pipeh = NULL;
>   }
>   if (sc->sc_tx_pipeh != NULL) {
> - usbd_abort_pipe(sc->sc_tx_pipeh);
>   usbd_close_pipe(sc->sc_tx_pipeh);
>   sc->sc_tx_pipeh = NULL;
>   }
> Index: if_run.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/if_run.c,v
> retrieving revision 1.129
> diff -u -p -u -p -r1.129 if_run.c
> --- if_run.c 10 Jul 2020 13:22:21 -0000 1.129
> +++ if_run.c 31 Jul 2020 08:26:27 -0000
> @@ -750,7 +750,6 @@ run_free_rx_ring(struct run_softc *sc)
>   int i;
>  
>   if (rxq->pipeh != NULL) {
> - usbd_abort_pipe(rxq->pipeh);
>   usbd_close_pipe(rxq->pipeh);
>   rxq->pipeh = NULL;
>   }
> @@ -809,7 +808,6 @@ run_free_tx_ring(struct run_softc *sc, i
>   int i;
>  
>   if (txq->pipeh != NULL) {
> - usbd_abort_pipe(txq->pipeh);
>   usbd_close_pipe(txq->pipeh);
>   txq->pipeh = NULL;
>   }
> Index: if_smsc.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/if_smsc.c,v
> retrieving revision 1.36
> diff -u -p -u -p -r1.36 if_smsc.c
> --- if_smsc.c 10 Jul 2020 13:26:40 -0000 1.36
> +++ if_smsc.c 31 Jul 2020 08:26:27 -0000
> @@ -698,7 +698,6 @@ smsc_stop(struct smsc_softc *sc)
>  
>   /* Stop transfers. */
>   if (sc->sc_ep[SMSC_ENDPT_RX] != NULL) {
> - usbd_abort_pipe(sc->sc_ep[SMSC_ENDPT_RX]);
>   err = usbd_close_pipe(sc->sc_ep[SMSC_ENDPT_RX]);
>   if (err) {
>   printf("%s: close rx pipe failed: %s\n",
> @@ -708,7 +707,6 @@ smsc_stop(struct smsc_softc *sc)
>   }
>  
>   if (sc->sc_ep[SMSC_ENDPT_TX] != NULL) {
> - usbd_abort_pipe(sc->sc_ep[SMSC_ENDPT_TX]);
>   err = usbd_close_pipe(sc->sc_ep[SMSC_ENDPT_TX]);
>   if (err) {
>   printf("%s: close tx pipe failed: %s\n",
> @@ -718,7 +716,6 @@ smsc_stop(struct smsc_softc *sc)
>   }
>  
>   if (sc->sc_ep[SMSC_ENDPT_INTR] != NULL) {
> - usbd_abort_pipe(sc->sc_ep[SMSC_ENDPT_INTR]);
>   err = usbd_close_pipe(sc->sc_ep[SMSC_ENDPT_INTR]);
>   if (err) {
>   printf("%s: close intr pipe failed: %s\n",
> Index: if_udav.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/if_udav.c,v
> retrieving revision 1.83
> diff -u -p -u -p -r1.83 if_udav.c
> --- if_udav.c 10 Jul 2020 13:26:41 -0000 1.83
> +++ if_udav.c 31 Jul 2020 08:26:27 -0000
> @@ -1226,7 +1226,6 @@ udav_stop(struct ifnet *ifp, int disable
>   /* Stop transfers */
>   /* RX endpoint */
>   if (sc->sc_pipe_rx != NULL) {
> - usbd_abort_pipe(sc->sc_pipe_rx);
>   err = usbd_close_pipe(sc->sc_pipe_rx);
>   if (err)
>   printf("%s: close rx pipe failed: %s\n",
> @@ -1236,7 +1235,6 @@ udav_stop(struct ifnet *ifp, int disable
>  
>   /* TX endpoint */
>   if (sc->sc_pipe_tx != NULL) {
> - usbd_abort_pipe(sc->sc_pipe_tx);
>   err = usbd_close_pipe(sc->sc_pipe_tx);
>   if (err)
>   printf("%s: close tx pipe failed: %s\n",
> @@ -1248,7 +1246,6 @@ udav_stop(struct ifnet *ifp, int disable
>   /* XXX: Interrupt endpoint is not yet supported!! */
>   /* Interrupt endpoint */
>   if (sc->sc_pipe_intr != NULL) {
> - usbd_abort_pipe(sc->sc_pipe_intr);
>   err = usbd_close_pipe(sc->sc_pipe_intr);
>   if (err)
>   printf("%s: close intr pipe failed: %s\n",
> Index: if_ugl.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/if_ugl.c,v
> retrieving revision 1.25
> diff -u -p -u -p -r1.25 if_ugl.c
> --- if_ugl.c 10 Jul 2020 13:26:41 -0000 1.25
> +++ if_ugl.c 31 Jul 2020 08:26:27 -0000
> @@ -817,19 +817,16 @@ ugl_stop(struct ugl_softc *sc)
>  
>   /* Stop transfers. */
>   if (sc->sc_ep[UGL_ENDPT_RX] != NULL) {
> - usbd_abort_pipe(sc->sc_ep[UGL_ENDPT_RX]);
>   usbd_close_pipe(sc->sc_ep[UGL_ENDPT_RX]);
>   sc->sc_ep[UGL_ENDPT_RX] = NULL;
>   }
>  
>   if (sc->sc_ep[UGL_ENDPT_TX] != NULL) {
> - usbd_abort_pipe(sc->sc_ep[UGL_ENDPT_TX]);
>   usbd_close_pipe(sc->sc_ep[UGL_ENDPT_TX]);
>   sc->sc_ep[UGL_ENDPT_TX] = NULL;
>   }
>  
>   if (sc->sc_ep[UGL_ENDPT_INTR] != NULL) {
> - usbd_abort_pipe(sc->sc_ep[UGL_ENDPT_INTR]);
>   usbd_close_pipe(sc->sc_ep[UGL_ENDPT_INTR]);
>   sc->sc_ep[UGL_ENDPT_INTR] = NULL;
>   }
> Index: if_upgt.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/if_upgt.c,v
> retrieving revision 1.86
> diff -u -p -u -p -r1.86 if_upgt.c
> --- if_upgt.c 10 Jul 2020 13:22:21 -0000 1.86
> +++ if_upgt.c 31 Jul 2020 08:26:27 -0000
> @@ -447,14 +447,10 @@ upgt_detach(struct device *self, int fla
>   s = splusb();
>  
>   /* abort and close TX / RX pipes */
> - if (sc->sc_tx_pipeh != NULL) {
> - usbd_abort_pipe(sc->sc_tx_pipeh);
> + if (sc->sc_tx_pipeh != NULL)
>   usbd_close_pipe(sc->sc_tx_pipeh);
> - }
> - if (sc->sc_rx_pipeh != NULL) {
> - usbd_abort_pipe(sc->sc_rx_pipeh);
> + if (sc->sc_rx_pipeh != NULL)
>   usbd_close_pipe(sc->sc_rx_pipeh);
> - }
>  
>   /* remove tasks and timeouts */
>   usb_rem_task(sc->sc_udev, &sc->sc_task_newstate);
> Index: if_upl.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/if_upl.c,v
> retrieving revision 1.77
> diff -u -p -u -p -r1.77 if_upl.c
> --- if_upl.c 10 Jul 2020 13:26:41 -0000 1.77
> +++ if_upl.c 31 Jul 2020 08:26:27 -0000
> @@ -819,7 +819,6 @@ upl_stop(struct upl_softc *sc)
>  
>   /* Stop transfers. */
>   if (sc->sc_ep[UPL_ENDPT_RX] != NULL) {
> - usbd_abort_pipe(sc->sc_ep[UPL_ENDPT_RX]);
>   err = usbd_close_pipe(sc->sc_ep[UPL_ENDPT_RX]);
>   if (err) {
>   printf("%s: close rx pipe failed: %s\n",
> @@ -829,7 +828,6 @@ upl_stop(struct upl_softc *sc)
>   }
>  
>   if (sc->sc_ep[UPL_ENDPT_TX] != NULL) {
> - usbd_abort_pipe(sc->sc_ep[UPL_ENDPT_TX]);
>   err = usbd_close_pipe(sc->sc_ep[UPL_ENDPT_TX]);
>   if (err) {
>   printf("%s: close tx pipe failed: %s\n",
> @@ -839,7 +837,6 @@ upl_stop(struct upl_softc *sc)
>   }
>  
>   if (sc->sc_ep[UPL_ENDPT_INTR] != NULL) {
> - usbd_abort_pipe(sc->sc_ep[UPL_ENDPT_INTR]);
>   err = usbd_close_pipe(sc->sc_ep[UPL_ENDPT_INTR]);
>   if (err) {
>   printf("%s: close intr pipe failed: %s\n",
> Index: if_ure.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/if_ure.c,v
> retrieving revision 1.16
> diff -u -p -u -p -r1.16 if_ure.c
> --- if_ure.c 10 Jul 2020 13:26:41 -0000 1.16
> +++ if_ure.c 31 Jul 2020 08:26:27 -0000
> @@ -825,7 +825,6 @@ ure_stop(struct ure_softc *sc)
>   sc->ure_flags &= ~URE_FLAG_LINK;
>  
>   if (sc->ure_ep[URE_ENDPT_RX] != NULL) {
> - usbd_abort_pipe(sc->ure_ep[URE_ENDPT_RX]);
>   err = usbd_close_pipe(sc->ure_ep[URE_ENDPT_RX]);
>   if (err) {
>   printf("%s: close rx pipe failed: %s\n",
> @@ -835,7 +834,6 @@ ure_stop(struct ure_softc *sc)
>   }
>  
>   if (sc->ure_ep[URE_ENDPT_TX] != NULL) {
> - usbd_abort_pipe(sc->ure_ep[URE_ENDPT_TX]);
>   err = usbd_close_pipe(sc->ure_ep[URE_ENDPT_TX]);
>   if (err) {
>   printf("%s: close tx pipe failed: %s\n",
> Index: if_url.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/if_url.c,v
> retrieving revision 1.87
> diff -u -p -u -p -r1.87 if_url.c
> --- if_url.c 10 Jul 2020 13:26:41 -0000 1.87
> +++ if_url.c 31 Jul 2020 08:26:27 -0000
> @@ -1086,7 +1086,6 @@ url_stop(struct ifnet *ifp, int disable)
>   /* Stop transfers */
>   /* RX endpoint */
>   if (sc->sc_pipe_rx != NULL) {
> - usbd_abort_pipe(sc->sc_pipe_rx);
>   err = usbd_close_pipe(sc->sc_pipe_rx);
>   if (err)
>   printf("%s: close rx pipe failed: %s\n",
> @@ -1096,7 +1095,6 @@ url_stop(struct ifnet *ifp, int disable)
>  
>   /* TX endpoint */
>   if (sc->sc_pipe_tx != NULL) {
> - usbd_abort_pipe(sc->sc_pipe_tx);
>   err = usbd_close_pipe(sc->sc_pipe_tx);
>   if (err)
>   printf("%s: close tx pipe failed: %s\n",
> @@ -1108,7 +1106,6 @@ url_stop(struct ifnet *ifp, int disable)
>   /* XXX: Interrupt endpoint is not yet supported!! */
>   /* Interrupt endpoint */
>   if (sc->sc_pipe_intr != NULL) {
> - usbd_abort_pipe(sc->sc_pipe_intr);
>   err = usbd_close_pipe(sc->sc_pipe_intr);
>   if (err)
>   printf("%s: close intr pipe failed: %s\n",
> Index: if_urndis.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/if_urndis.c,v
> retrieving revision 1.71
> diff -u -p -u -p -r1.71 if_urndis.c
> --- if_urndis.c 10 Jul 2020 13:26:41 -0000 1.71
> +++ if_urndis.c 31 Jul 2020 08:26:27 -0000
> @@ -1140,7 +1140,6 @@ urndis_stop(struct urndis_softc *sc)
>   ifq_clr_oactive(&ifp->if_snd);
>  
>   if (sc->sc_bulkin_pipe != NULL) {
> - usbd_abort_pipe(sc->sc_bulkin_pipe);
>   err = usbd_close_pipe(sc->sc_bulkin_pipe);
>   if (err)
>   printf("%s: close rx pipe failed: %s\n",
> @@ -1149,7 +1148,6 @@ urndis_stop(struct urndis_softc *sc)
>   }
>  
>   if (sc->sc_bulkout_pipe != NULL) {
> - usbd_abort_pipe(sc->sc_bulkout_pipe);
>   err = usbd_close_pipe(sc->sc_bulkout_pipe);
>   if (err)
>   printf("%s: close tx pipe failed: %s\n",
> Index: if_urtwn.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/if_urtwn.c,v
> retrieving revision 1.92
> diff -u -p -u -p -r1.92 if_urtwn.c
> --- if_urtwn.c 6 Jul 2020 10:38:54 -0000 1.92
> +++ if_urtwn.c 31 Jul 2020 08:26:28 -0000
> @@ -615,15 +615,12 @@ urtwn_close_pipes(struct urtwn_softc *sc
>   int i;
>  
>   /* Close Rx pipe. */
> - if (sc->rx_pipe != NULL) {
> - usbd_abort_pipe(sc->rx_pipe);
> + if (sc->rx_pipe != NULL)
>   usbd_close_pipe(sc->rx_pipe);
> - }
>   /* Close Tx pipes. */
>   for (i = 0; i < R92C_MAX_EPOUT; i++) {
>   if (sc->tx_pipe[i] == NULL)
>   continue;
> - usbd_abort_pipe(sc->tx_pipe[i]);
>   usbd_close_pipe(sc->tx_pipe[i]);
>   }
>   }
> Index: if_wi_usb.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/if_wi_usb.c,v
> retrieving revision 1.72
> diff -u -p -u -p -r1.72 if_wi_usb.c
> --- if_wi_usb.c 10 Jul 2020 13:26:41 -0000 1.72
> +++ if_wi_usb.c 31 Jul 2020 08:26:28 -0000
> @@ -416,7 +416,6 @@ wi_usb_detach(struct device *self, int f
>   }
>  
>   if (sc->wi_usb_ep[WI_USB_ENDPT_INTR] != NULL) {
> - usbd_abort_pipe(sc->wi_usb_ep[WI_USB_ENDPT_INTR]);
>   err =
> usbd_close_pipe(sc->wi_usb_ep[WI_USB_ENDPT_INTR]); if (err) {
>   printf("%s: close intr pipe failed: %s\n",
> @@ -425,7 +424,6 @@ wi_usb_detach(struct device *self, int f
>   sc->wi_usb_ep[WI_USB_ENDPT_INTR] = NULL;
>   }
>   if (sc->wi_usb_ep[WI_USB_ENDPT_TX] != NULL) {
> - usbd_abort_pipe(sc->wi_usb_ep[WI_USB_ENDPT_TX]);
>   err = usbd_close_pipe(sc->wi_usb_ep[WI_USB_ENDPT_TX]);
>   if (err) {
>   printf("%s: close tx pipe failed: %s\n",
> @@ -434,7 +432,6 @@ wi_usb_detach(struct device *self, int f
>   sc->wi_usb_ep[WI_USB_ENDPT_TX] = NULL;
>   }
>   if (sc->wi_usb_ep[WI_USB_ENDPT_RX] != NULL) {
> - usbd_abort_pipe(sc->wi_usb_ep[WI_USB_ENDPT_RX]);
>   err = usbd_close_pipe(sc->wi_usb_ep[WI_USB_ENDPT_RX]);
>   if (err) {
>   printf("%s: close rx pipe failed: %s\n",
> Index: if_zyd.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/if_zyd.c,v
> retrieving revision 1.124
> diff -u -p -u -p -r1.124 if_zyd.c
> --- if_zyd.c 10 Jul 2020 13:22:21 -0000 1.124
> +++ if_zyd.c 31 Jul 2020 08:26:28 -0000
> @@ -518,7 +518,6 @@ zyd_close_pipes(struct zyd_softc *sc)
>  
>   for (i = 0; i < ZYD_ENDPT_CNT; i++) {
>   if (sc->zyd_ep[i] != NULL) {
> - usbd_abort_pipe(sc->zyd_ep[i]);
>   usbd_close_pipe(sc->zyd_ep[i]);
>   sc->zyd_ep[i] = NULL;
>   }
> Index: ubcmtp.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/ubcmtp.c,v
> retrieving revision 1.20
> diff -u -p -u -p -r1.20 ubcmtp.c
> --- ubcmtp.c 27 May 2019 15:50:26 -0000 1.20
> +++ ubcmtp.c 31 Jul 2020 08:26:28 -0000
> @@ -583,12 +583,10 @@ ubcmtp_disable(void *v)
>   ubcmtp_raw_mode(sc, 0);
>  
>   if (sc->sc_tp_pipe != NULL) {
> - usbd_abort_pipe(sc->sc_tp_pipe);
>   usbd_close_pipe(sc->sc_tp_pipe);
>   sc->sc_tp_pipe = NULL;
>   }
>   if (sc->sc_bt_pipe != NULL) {
> - usbd_abort_pipe(sc->sc_bt_pipe);
>   usbd_close_pipe(sc->sc_bt_pipe);
>   sc->sc_bt_pipe = NULL;
>   }
> @@ -773,17 +771,13 @@ ubcmtp_setup_pipes(struct ubcmtp_softc *
>   return (0);
>  
>   fail2:
> - if (sc->sc_tp_pipe != NULL) {
> - usbd_abort_pipe(sc->sc_tp_pipe);
> + if (sc->sc_tp_pipe != NULL)
>   usbd_close_pipe(sc->sc_tp_pipe);
> - }
>   if (sc->tp_pkt != NULL)
>   free(sc->tp_pkt, M_USBDEV, sc->tp_maxlen);
>   fail1:
> - if (sc->sc_bt_pipe != NULL) {
> - usbd_abort_pipe(sc->sc_bt_pipe);
> + if (sc->sc_bt_pipe != NULL)
>   usbd_close_pipe(sc->sc_bt_pipe);
> - }
>   if (sc->bt_pkt != NULL)
>   free(sc->bt_pkt, M_USBDEV, sc->bt_maxlen);
>  
> Index: ubsa.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/ubsa.c,v
> retrieving revision 1.66
> diff -u -p -u -p -r1.66 ubsa.c
> --- ubsa.c 27 Apr 2018 08:08:06 -0000 1.66
> +++ ubsa.c 31 Jul 2020 08:26:28 -0000
> @@ -367,7 +367,6 @@ ubsa_detach(struct device *self, int fla
>   DPRINTF(("ubsa_detach: sc = %p\n", sc));
>  
>   if (sc->sc_intr_pipe != NULL) {
> - usbd_abort_pipe(sc->sc_intr_pipe);
>   usbd_close_pipe(sc->sc_intr_pipe);
>   free(sc->sc_intr_buf, M_USBDEV, sc->sc_isize);
>   sc->sc_intr_pipe = NULL;
> @@ -621,7 +620,6 @@ ubsa_close(void *addr, int portno)
>   DPRINTF(("ubsa_close: close\n"));
>  
>   if (sc->sc_intr_pipe != NULL) {
> - usbd_abort_pipe(sc->sc_intr_pipe);
>   err = usbd_close_pipe(sc->sc_intr_pipe);
>   if (err)
>   printf("%s: close interrupt pipe failed: %s\n",
> Index: uchcom.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/uchcom.c,v
> retrieving revision 1.27
> diff -u -p -u -p -r1.27 uchcom.c
> --- uchcom.c 8 Apr 2017 02:57:25 -0000 1.27
> +++ uchcom.c 31 Jul 2020 08:26:28 -0000
> @@ -794,7 +794,6 @@ uchcom_close_intr_pipe(struct uchcom_sof
>   usbd_status err;
>  
>   if (sc->sc_intr_pipe != NULL) {
> - usbd_abort_pipe(sc->sc_intr_pipe);
>   err = usbd_close_pipe(sc->sc_intr_pipe);
>   if (err)
>   printf("%s: close interrupt pipe failed: %s\n",
> Index: ucom.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/ucom.c,v
> retrieving revision 1.70
> diff -u -p -u -p -r1.70 ucom.c
> --- ucom.c 8 Mar 2020 19:24:15 -0000 1.70
> +++ ucom.c 31 Jul 2020 08:26:28 -0000
> @@ -217,12 +217,10 @@ ucom_detach(struct device *self, int fla
>   sc, flags, tp, sc->sc_bulkin_no, sc->sc_bulkout_no));
>  
>   if (sc->sc_bulkin_pipe != NULL) {
> - usbd_abort_pipe(sc->sc_bulkin_pipe);
>   usbd_close_pipe(sc->sc_bulkin_pipe);
>   sc->sc_bulkin_pipe = NULL;
>   }
>   if (sc->sc_bulkout_pipe != NULL) {
> - usbd_abort_pipe(sc->sc_bulkout_pipe);
>   usbd_close_pipe(sc->sc_bulkout_pipe);
>   sc->sc_bulkout_pipe = NULL;
>   }
> @@ -1196,12 +1194,10 @@ ucom_cleanup(struct ucom_softc *sc)
>  
>   ucom_shutdown(sc);
>   if (sc->sc_bulkin_pipe != NULL) {
> - usbd_abort_pipe(sc->sc_bulkin_pipe);
>   usbd_close_pipe(sc->sc_bulkin_pipe);
>   sc->sc_bulkin_pipe = NULL;
>   }
>   if (sc->sc_bulkout_pipe != NULL) {
> - usbd_abort_pipe(sc->sc_bulkout_pipe);
>   usbd_close_pipe(sc->sc_bulkout_pipe);
>   sc->sc_bulkout_pipe = NULL;
>   }
> Index: udl.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/udl.c,v
> retrieving revision 1.93
> diff -u -p -u -p -r1.93 udl.c
> --- udl.c 25 May 2020 09:55:49 -0000 1.93
> +++ udl.c 31 Jul 2020 08:26:28 -0000
> @@ -438,10 +438,8 @@ udl_detach(struct device *self, int flag
>   /*
>   * Close bulk TX pipe.
>   */
> - if (sc->sc_tx_pipeh != NULL) {
> - usbd_abort_pipe(sc->sc_tx_pipeh);
> + if (sc->sc_tx_pipeh != NULL)
>   usbd_close_pipe(sc->sc_tx_pipeh);
> - }
>  
>   /*
>   * Free command buffer.
> Index: uhidev.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/uhidev.c,v
> retrieving revision 1.79
> diff -u -p -u -p -r1.79 uhidev.c
> --- uhidev.c 22 Feb 2020 14:01:34 -0000 1.79
> +++ uhidev.c 31 Jul 2020 08:26:28 -0000
> @@ -394,13 +394,11 @@ uhidev_detach(struct device *self, int f
>   DPRINTF(("uhidev_detach: sc=%p flags=%d\n", sc, flags));
>  
>   if (sc->sc_opipe != NULL) {
> - usbd_abort_pipe(sc->sc_opipe);
>   usbd_close_pipe(sc->sc_opipe);
>   sc->sc_opipe = NULL;
>   }
>  
>   if (sc->sc_ipipe != NULL) {
> - usbd_abort_pipe(sc->sc_ipipe);
>   usbd_close_pipe(sc->sc_ipipe);
>   sc->sc_ipipe = NULL;
>   }
> @@ -608,13 +606,11 @@ uhidev_close(struct uhidev *scd)
>  
>   /* Disable interrupts. */
>   if (sc->sc_opipe != NULL) {
> - usbd_abort_pipe(sc->sc_opipe);
>   usbd_close_pipe(sc->sc_opipe);
>   sc->sc_opipe = NULL;
>   }
>  
>   if (sc->sc_ipipe != NULL) {
> - usbd_abort_pipe(sc->sc_ipipe);
>   usbd_close_pipe(sc->sc_ipipe);
>   sc->sc_ipipe = NULL;
>   }
> Index: uhub.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/uhub.c,v
> retrieving revision 1.94
> diff -u -p -u -p -r1.94 uhub.c
> --- uhub.c 16 Mar 2020 13:17:17 -0000 1.94
> +++ uhub.c 31 Jul 2020 08:26:28 -0000
> @@ -456,7 +456,6 @@ uhub_detach(struct device *self, int fla
>   if (hub == NULL) /* Must be partially working */
>   return (0);
>  
> - usbd_abort_pipe(sc->sc_ipipe);
>   usbd_close_pipe(sc->sc_ipipe);
>  
>   for (port = 0; port < hub->nports; port++) {
> Index: ulpt.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/ulpt.c,v
> retrieving revision 1.56
> diff -u -p -u -p -r1.56 ulpt.c
> --- ulpt.c 8 Jan 2020 12:57:35 -0000 1.56
> +++ ulpt.c 31 Jul 2020 08:26:28 -0000
> @@ -575,7 +575,6 @@ ulptclose(dev_t dev, int flag, int mode,
>   sc->sc_out_pipe = NULL;
>   }
>   if (sc->sc_in_pipe != NULL) {
> - usbd_abort_pipe(sc->sc_in_pipe);
>   usbd_close_pipe(sc->sc_in_pipe);
>   sc->sc_in_pipe = NULL;
>   if (sc->sc_in_xfer1 != NULL) {
> Index: umbg.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/umbg.c,v
> retrieving revision 1.26
> diff -u -p -u -p -r1.26 umbg.c
> --- umbg.c 22 Mar 2019 12:04:25 -0000 1.26
> +++ umbg.c 31 Jul 2020 08:26:28 -0000
> @@ -299,7 +299,6 @@ umbg_detach(struct device *self, int fla
>   usb_rem_task(sc->sc_udev, &sc->sc_task);
>  
>   if (sc->sc_bulkin_pipe != NULL) {
> - usbd_abort_pipe(sc->sc_bulkin_pipe);
>   err = usbd_close_pipe(sc->sc_bulkin_pipe);
>   if (err)
>   printf("%s: close rx pipe failed: %s\n",
> @@ -307,7 +306,6 @@ umbg_detach(struct device *self, int fla
>   sc->sc_bulkin_pipe = NULL;
>   }
>   if (sc->sc_bulkout_pipe != NULL) {
> - usbd_abort_pipe(sc->sc_bulkout_pipe);
>   err = usbd_close_pipe(sc->sc_bulkout_pipe);
>   if (err)
>   printf("%s: close tx pipe failed: %s\n",
> Index: umcs.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/umcs.c,v
> retrieving revision 1.7
> diff -u -p -u -p -r1.7 umcs.c
> --- umcs.c 17 Mar 2020 09:34:52 -0000 1.7
> +++ umcs.c 31 Jul 2020 08:26:28 -0000
> @@ -471,7 +471,6 @@ umcs_detach(struct device *self, int fla
>   task_del(systq, &sc->sc_status_task);
>  
>   if (sc->sc_ipipe != NULL) {
> - usbd_abort_pipe(sc->sc_ipipe);
>   usbd_close_pipe(sc->sc_ipipe);
>   sc->sc_ipipe = NULL;
>   }
> Index: umct.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/umct.c,v
> retrieving revision 1.47
> diff -u -p -u -p -r1.47 umct.c
> --- umct.c 30 Dec 2017 20:47:00 -0000 1.47
> +++ umct.c 31 Jul 2020 08:26:28 -0000
> @@ -295,7 +295,6 @@ umct_detach(struct device *self, int fla
>   DPRINTF(("umct_detach: sc=%p flags=%d\n", sc, flags));
>  
>           if (sc->sc_intr_pipe != NULL) {
> -                usbd_abort_pipe(sc->sc_intr_pipe);
>                   usbd_close_pipe(sc->sc_intr_pipe);
>   free(sc->sc_intr_buf, M_USBDEV, sc->sc_isize);
>                   sc->sc_intr_pipe = NULL;
> @@ -552,7 +551,6 @@ umct_close(void *addr, int portno)
>   DPRINTF(("umct_close: close\n"));
>  
>   if (sc->sc_intr_pipe != NULL) {
> - usbd_abort_pipe(sc->sc_intr_pipe);
>   err = usbd_close_pipe(sc->sc_intr_pipe);
>   if (err)
>   printf("%s: close interrupt pipe failed: %s\n",
> Index: umidi.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/umidi.c,v
> retrieving revision 1.53
> diff -u -p -u -p -r1.53 umidi.c
> --- umidi.c 16 Mar 2020 16:12:43 -0000 1.53
> +++ umidi.c 31 Jul 2020 08:26:28 -0000
> @@ -367,7 +367,6 @@ static void
>   free_pipe(struct umidi_endpoint *ep)
>   {
>   DPRINTF(("%s: %s %p\n", ep->sc->sc_dev.dv_xname, __func__,
> ep));
> - usbd_abort_pipe(ep->pipe);
>   usbd_close_pipe(ep->pipe);
>   usbd_free_xfer(ep->xfer);
>   }
> Index: umodem.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/umodem.c,v
> retrieving revision 1.65
> diff -u -p -u -p -r1.65 umodem.c
> --- umodem.c 22 Feb 2020 14:01:35 -0000 1.65
> +++ umodem.c 31 Jul 2020 08:26:28 -0000
> @@ -424,7 +424,6 @@ umodem_close(void *addr, int portno)
>   DPRINTF(("umodem_close: sc=%p\n", sc));
>  
>   if (sc->sc_notify_pipe != NULL) {
> - usbd_abort_pipe(sc->sc_notify_pipe);
>   err = usbd_close_pipe(sc->sc_notify_pipe);
>   if (err)
>   printf("%s: close notify pipe failed: %s\n",
> @@ -702,7 +701,6 @@ umodem_detach(struct device *self, int f
>   DPRINTF(("umodem_detach: sc=%p flags=%d\n", sc, flags));
>  
>   if (sc->sc_notify_pipe != NULL) {
> - usbd_abort_pipe(sc->sc_notify_pipe);
>   usbd_close_pipe(sc->sc_notify_pipe);
>   sc->sc_notify_pipe = NULL;
>   }
> Index: umsm.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/umsm.c,v
> retrieving revision 1.117
> diff -u -p -u -p -r1.117 umsm.c
> --- umsm.c 5 Feb 2020 16:01:32 -0000 1.117
> +++ umsm.c 31 Jul 2020 08:26:29 -0000
> @@ -440,7 +440,6 @@ umsm_detach(struct device *self, int fla
>  
>   /* close the interrupt endpoint if that is opened */
>   if (sc->sc_intr_pipe != NULL) {
> - usbd_abort_pipe(sc->sc_intr_pipe);
>   usbd_close_pipe(sc->sc_intr_pipe);
>   free(sc->sc_intr_buf, M_USBDEV, sc->sc_isize);
>   sc->sc_intr_pipe = NULL;
> @@ -496,7 +495,6 @@ umsm_close(void *addr, int portno)
>   return;
>  
>   if (sc->sc_intr_pipe != NULL) {
> - usbd_abort_pipe(sc->sc_intr_pipe);
>   err = usbd_close_pipe(sc->sc_intr_pipe);
>   if (err)
>   printf("%s: close interrupt pipe failed: %s\n",
> Index: uow.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/uow.c,v
> retrieving revision 1.36
> diff -u -p -u -p -r1.36 uow.c
> --- uow.c 4 Jan 2020 11:36:05 -0000 1.36
> +++ uow.c 31 Jul 2020 08:26:29 -0000
> @@ -245,18 +245,12 @@ uow_detach(struct device *self, int flag
>  
>   s = splusb();
>  
> - if (sc->sc_ph_ibulk != NULL) {
> - usbd_abort_pipe(sc->sc_ph_ibulk);
> + if (sc->sc_ph_ibulk != NULL)
>   usbd_close_pipe(sc->sc_ph_ibulk);
> - }
> - if (sc->sc_ph_obulk != NULL) {
> - usbd_abort_pipe(sc->sc_ph_obulk);
> + if (sc->sc_ph_obulk != NULL)
>   usbd_close_pipe(sc->sc_ph_obulk);
> - }
> - if (sc->sc_ph_intr != NULL) {
> - usbd_abort_pipe(sc->sc_ph_intr);
> + if (sc->sc_ph_intr != NULL)
>   usbd_close_pipe(sc->sc_ph_intr);
> - }
>  
>   if (sc->sc_xfer_in != NULL)
>   usbd_free_xfer(sc->sc_xfer_in);
> Index: uplcom.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/uplcom.c,v
> retrieving revision 1.74
> diff -u -p -u -p -r1.74 uplcom.c
> --- uplcom.c 11 Mar 2020 13:04:02 -0000 1.74
> +++ uplcom.c 31 Jul 2020 08:26:29 -0000
> @@ -399,7 +399,6 @@ uplcom_detach(struct device *self, int f
>   DPRINTF(("uplcom_detach: sc=%p flags=%d\n", sc, flags));
>  
>   if (sc->sc_intr_pipe != NULL) {
> - usbd_abort_pipe(sc->sc_intr_pipe);
>   usbd_close_pipe(sc->sc_intr_pipe);
>   free(sc->sc_intr_buf, M_USBDEV, sc->sc_isize);
>   sc->sc_intr_pipe = NULL;
> @@ -708,7 +707,6 @@ uplcom_close(void *addr, int portno)
>   DPRINTF(("uplcom_close: close\n"));
>  
>   if (sc->sc_intr_pipe != NULL) {
> - usbd_abort_pipe(sc->sc_intr_pipe);
>   err = usbd_close_pipe(sc->sc_intr_pipe);
>   if (err)
>   printf("%s: close interrupt pipe failed: %s\n",
> Index: usb_subr.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/usb_subr.c,v
> retrieving revision 1.150
> diff -u -p -u -p -r1.150 usb_subr.c
> --- usb_subr.c 6 Oct 2019 17:11:51 -0000 1.150
> +++ usb_subr.c 31 Jul 2020 08:26:29 -0000
> @@ -1403,10 +1403,8 @@ usb_free_device(struct usbd_device *dev)
>  
>   DPRINTF(("%s: %p\n", __func__, dev));
>  
> - if (dev->default_pipe != NULL) {
> - usbd_abort_pipe(dev->default_pipe);
> + if (dev->default_pipe != NULL)
>   usbd_close_pipe(dev->default_pipe);
> - }
>   if (dev->ifaces != NULL) {
>   nifc = dev->cdesc->bNumInterface;
>   for (ifcidx = 0; ifcidx < nifc; ifcidx++)
> Index: usps.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/usps.c,v
> retrieving revision 1.9
> diff -u -p -u -p -r1.9 usps.c
> --- usps.c 8 Apr 2017 02:57:25 -0000 1.9
> +++ usps.c 31 Jul 2020 08:26:29 -0000
> @@ -297,7 +297,6 @@ usps_detach(struct device *self, int fla
>  
>   s = splusb();
>   if (sc->sc_ipipe != NULL) {
> - usbd_abort_pipe(sc->sc_ipipe);
>   usbd_close_pipe(sc->sc_ipipe);
>   if (sc->sc_intrbuf != NULL)
>   free(sc->sc_intrbuf, M_USBDEV, sc->sc_isize);
> Index: uticom.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/uticom.c,v
> retrieving revision 1.33
> diff -u -p -u -p -r1.33 uticom.c
> --- uticom.c 15 Mar 2018 00:42:41 -0000 1.33
> +++ uticom.c 31 Jul 2020 08:26:29 -0000
> @@ -453,7 +453,6 @@ uticom_detach(struct device *self, int f
>   }
>  
>   if (sc->sc_intr_pipe != NULL) {
> - usbd_abort_pipe(sc->sc_intr_pipe);
>   usbd_close_pipe(sc->sc_intr_pipe);
>   free(sc->sc_intr_buf, M_USBDEV, sc->sc_isize);
>   sc->sc_intr_pipe = NULL;
> @@ -750,7 +749,6 @@ uticom_close(void *addr, int portno)
>   DPRINTF(("%s: uticom_close: close\n", sc->sc_dev.dv_xname));
>  
>   if (sc->sc_intr_pipe != NULL) {
> - usbd_abort_pipe(sc->sc_intr_pipe);
>   err = usbd_close_pipe(sc->sc_intr_pipe);
>   if (err)
>   printf("%s: close interrupt pipe failed: %s\n",
> @@ -912,7 +910,6 @@ finish:
>   usbd_free_buffer(oxfer);
>   usbd_free_xfer(oxfer);
>   oxfer = NULL;
> - usbd_abort_pipe(pipe);
>   usbd_close_pipe(pipe);
>   free(buffer, M_USBDEV, buffer_size);
>   return err;
> Index: uts.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/uts.c,v
> retrieving revision 1.42
> diff -u -p -u -p -r1.42 uts.c
> --- uts.c 6 Nov 2019 20:25:14 -0000 1.42
> +++ uts.c 31 Jul 2020 08:26:29 -0000
> @@ -216,7 +216,6 @@ uts_detach(struct device *self, int flag
>   int rv = 0;
>  
>   if (sc->sc_intr_pipe != NULL) {
> - usbd_abort_pipe(sc->sc_intr_pipe);
>   usbd_close_pipe(sc->sc_intr_pipe);
>   sc->sc_intr_pipe = NULL;
>   }
> @@ -288,7 +287,6 @@ uts_disable(void *v)
>  
>   /* Disable interrupts. */
>   if (sc->sc_intr_pipe != NULL) {
> - usbd_abort_pipe(sc->sc_intr_pipe);
>   usbd_close_pipe(sc->sc_intr_pipe);
>   sc->sc_intr_pipe = NULL;
>   }
> Index: utvfu.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/utvfu.c,v
> retrieving revision 1.10
> diff -u -p -u -p -r1.10 utvfu.c
> --- utvfu.c 14 Oct 2019 09:20:48 -0000 1.10
> +++ utvfu.c 31 Jul 2020 08:26:29 -0000
> @@ -1164,7 +1164,6 @@ void
>   utvfu_vs_close(struct utvfu_softc *sc)
>   {
>   if (sc->sc_iface.pipeh != NULL) {
> - usbd_abort_pipe(sc->sc_iface.pipeh);
>   usbd_close_pipe(sc->sc_iface.pipeh);
>   sc->sc_iface.pipeh = NULL;
>   }
> Index: uvideo.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/uvideo.c,v
> retrieving revision 1.208
> diff -u -p -u -p -r1.208 uvideo.c
> --- uvideo.c 5 Jul 2020 11:47:50 -0000 1.208
> +++ uvideo.c 31 Jul 2020 08:26:29 -0000
> @@ -1970,7 +1970,6 @@ uvideo_vs_close(struct uvideo_softc *sc)
>   }
>  
>   if (sc->sc_vs_cur->pipeh) {
> - usbd_abort_pipe(sc->sc_vs_cur->pipeh);
>   usbd_close_pipe(sc->sc_vs_cur->pipeh);
>   sc->sc_vs_cur->pipeh = NULL;
>   }
> Index: uvscom.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/uvscom.c,v
> retrieving revision 1.38
> diff -u -p -u -p -r1.38 uvscom.c
> --- uvscom.c 12 Nov 2019 07:47:30 -0000 1.38
> +++ uvscom.c 31 Jul 2020 08:26:29 -0000
> @@ -351,7 +351,6 @@ uvscom_detach(struct device *self, int f
>   DPRINTF(("uvscom_detach: sc = %p\n", sc));
>  
>   if (sc->sc_intr_pipe != NULL) {
> - usbd_abort_pipe(sc->sc_intr_pipe);
>   usbd_close_pipe(sc->sc_intr_pipe);
>   free(sc->sc_intr_buf, M_USBDEV, sc->sc_isize);
>   sc->sc_intr_pipe = NULL;
> @@ -741,7 +740,6 @@ uvscom_close(void *addr, int portno)
>   uvscom_shutdown(sc);
>  
>   if (sc->sc_intr_pipe != NULL) {
> - usbd_abort_pipe(sc->sc_intr_pipe);
>   err = usbd_close_pipe(sc->sc_intr_pipe);
>   if (err)
>   printf("%s: close interrupt pipe failed: %s\n",
> Index: uxrcom.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/uxrcom.c,v
> retrieving revision 1.1
> diff -u -p -u -p -r1.1 uxrcom.c
> --- uxrcom.c 27 Mar 2019 22:08:51 -0000 1.1
> +++ uxrcom.c 31 Jul 2020 08:26:29 -0000
> @@ -208,7 +208,6 @@ uxrcom_detach(struct device *self, int f
>   int rv = 0;
>  
>   if (sc->sc_intr_pipe != NULL) {
> - usbd_abort_pipe(sc->sc_intr_pipe);
>   usbd_close_pipe(sc->sc_intr_pipe);
>   sc->sc_intr_pipe = NULL;
>   }
> @@ -247,7 +246,6 @@ uxrcom_close(void *vsc, int portno)
>   return;
>  
>   if (sc->sc_intr_pipe != NULL) {
> - usbd_abort_pipe(sc->sc_intr_pipe);
>   err = usbd_close_pipe(sc->sc_intr_pipe);
>   if (err)
>   printf("%s: close intr pipe failed: %s\n",
>

Reply | Threaded
Open this post in threaded view
|

Re: usbd_abort_pipe(); usbd_close_pipe; dance

Marcus Glocker
On Fri, 31 Jul 2020 11:59:45 +0200
Gerhard Roth <[hidden email]> wrote:

> Hi Marcus,
>
> On 2020-07-31 11:22, Marcus Glocker wrote:
> > Maybe I'm missing something here.
> >
> > But is there any specific reason why the most of our USB drivers are
> > calling usbd_abort_pipe() right before usbd_close_pipe()?  Since
> > usbd_close_pipe() already will call usbd_abort_pipe() if the pipe
> > isn't empty, as documented in the man page:
> >
> > DESCRIPTION
> >       The usbd_abort_pipe() function aborts any transfers queued on
> > pipe.
> >
> >       The usbd_close_pipe() function aborts any transfers queued on
> > pipe then deletes it.
> >
> > In case this happened because of an inherited copy/paste chain, can
> > we nuke the superfluous usbd_abort_pipe() calls?  
>
> I was asking myself the same question before ;)
>
> Apparently, the call to usbd_abort_pipe() inside of usbd_close_pipe()
> wasn't there right from the start. It was added by mpi@ with rev 1.57
> of usbdi.c abort 7 years ago. Hence drivers written before that
> needed the the usbd_abort_pipe(). But that is no longer the case.

Ah right, that explains it then - Thanks!

> ok gerhard@
>
>
>
>
> >
> >
> > Index: if_atu.c
> > ===================================================================
> > RCS file: /cvs/src/sys/dev/usb/if_atu.c,v
> > retrieving revision 1.131
> > diff -u -p -u -p -r1.131 if_atu.c
> > --- if_atu.c 10 Jul 2020 13:26:40 -0000 1.131
> > +++ if_atu.c 31 Jul 2020 08:26:24 -0000
> > @@ -2252,7 +2252,6 @@ atu_stop(struct ifnet *ifp, int disable)
> >  
> >   /* Stop transfers. */
> >   if (sc->atu_ep[ATU_ENDPT_RX] != NULL) {
> > - usbd_abort_pipe(sc->atu_ep[ATU_ENDPT_RX]);
> >   err = usbd_close_pipe(sc->atu_ep[ATU_ENDPT_RX]);
> >   if (err) {
> >   DPRINTF(("%s: close rx pipe failed: %s\n",
> > @@ -2262,7 +2261,6 @@ atu_stop(struct ifnet *ifp, int disable)
> >   }
> >  
> >   if (sc->atu_ep[ATU_ENDPT_TX] != NULL) {
> > - usbd_abort_pipe(sc->atu_ep[ATU_ENDPT_TX]);
> >   err = usbd_close_pipe(sc->atu_ep[ATU_ENDPT_TX]);
> >   if (err) {
> >   DPRINTF(("%s: close tx pipe failed: %s\n",
> > Index: if_aue.c
> > ===================================================================
> > RCS file: /cvs/src/sys/dev/usb/if_aue.c,v
> > retrieving revision 1.110
> > diff -u -p -u -p -r1.110 if_aue.c
> > --- if_aue.c 10 Jul 2020 13:26:40 -0000 1.110
> > +++ if_aue.c 31 Jul 2020 08:26:25 -0000
> > @@ -1518,7 +1518,6 @@ aue_stop(struct aue_softc *sc)
> >  
> >   /* Stop transfers. */
> >   if (sc->aue_ep[AUE_ENDPT_RX] != NULL) {
> > - usbd_abort_pipe(sc->aue_ep[AUE_ENDPT_RX]);
> >   err = usbd_close_pipe(sc->aue_ep[AUE_ENDPT_RX]);
> >   if (err) {
> >   printf("%s: close rx pipe failed: %s\n",
> > @@ -1528,7 +1527,6 @@ aue_stop(struct aue_softc *sc)
> >   }
> >  
> >   if (sc->aue_ep[AUE_ENDPT_TX] != NULL) {
> > - usbd_abort_pipe(sc->aue_ep[AUE_ENDPT_TX]);
> >   err = usbd_close_pipe(sc->aue_ep[AUE_ENDPT_TX]);
> >   if (err) {
> >   printf("%s: close tx pipe failed: %s\n",
> > @@ -1538,7 +1536,6 @@ aue_stop(struct aue_softc *sc)
> >   }
> >  
> >   if (sc->aue_ep[AUE_ENDPT_INTR] != NULL) {
> > - usbd_abort_pipe(sc->aue_ep[AUE_ENDPT_INTR]);
> >   err = usbd_close_pipe(sc->aue_ep[AUE_ENDPT_INTR]);
> >   if (err) {
> >   printf("%s: close intr pipe failed: %s\n",
> > Index: if_axe.c
> > ===================================================================
> > RCS file: /cvs/src/sys/dev/usb/if_axe.c,v
> > retrieving revision 1.141
> > diff -u -p -u -p -r1.141 if_axe.c
> > --- if_axe.c 10 Jul 2020 13:26:40 -0000 1.141
> > +++ if_axe.c 31 Jul 2020 08:26:25 -0000
> > @@ -1473,7 +1473,6 @@ axe_stop(struct axe_softc *sc)
> >  
> >   /* Stop transfers. */
> >   if (sc->axe_ep[AXE_ENDPT_RX] != NULL) {
> > - usbd_abort_pipe(sc->axe_ep[AXE_ENDPT_RX]);
> >   err = usbd_close_pipe(sc->axe_ep[AXE_ENDPT_RX]);
> >   if (err) {
> >   printf("axe%d: close rx pipe failed:
> > %s\n", @@ -1483,7 +1482,6 @@ axe_stop(struct axe_softc *sc)
> >   }
> >  
> >   if (sc->axe_ep[AXE_ENDPT_TX] != NULL) {
> > - usbd_abort_pipe(sc->axe_ep[AXE_ENDPT_TX]);
> >   err = usbd_close_pipe(sc->axe_ep[AXE_ENDPT_TX]);
> >   if (err) {
> >   printf("axe%d: close tx pipe failed:
> > %s\n", @@ -1493,7 +1491,6 @@ axe_stop(struct axe_softc *sc)
> >   }
> >  
> >   if (sc->axe_ep[AXE_ENDPT_INTR] != NULL) {
> > - usbd_abort_pipe(sc->axe_ep[AXE_ENDPT_INTR]);
> >   err = usbd_close_pipe(sc->axe_ep[AXE_ENDPT_INTR]);
> >   if (err) {
> >   printf("axe%d: close intr pipe failed:
> > %s\n", Index: if_axen.c
> > ===================================================================
> > RCS file: /cvs/src/sys/dev/usb/if_axen.c,v
> > retrieving revision 1.29
> > diff -u -p -u -p -r1.29 if_axen.c
> > --- if_axen.c 10 Jul 2020 13:26:40 -0000 1.29
> > +++ if_axen.c 31 Jul 2020 08:26:25 -0000
> > @@ -1426,7 +1426,6 @@ axen_stop(struct axen_softc *sc)
> >  
> >   /* Stop transfers. */
> >   if (sc->axen_ep[AXEN_ENDPT_RX] != NULL) {
> > - usbd_abort_pipe(sc->axen_ep[AXEN_ENDPT_RX]);
> >   err = usbd_close_pipe(sc->axen_ep[AXEN_ENDPT_RX]);
> >   if (err) {
> >   printf("axen%d: close rx pipe failed:
> > %s\n", @@ -1436,7 +1435,6 @@ axen_stop(struct axen_softc *sc)
> >   }
> >  
> >   if (sc->axen_ep[AXEN_ENDPT_TX] != NULL) {
> > - usbd_abort_pipe(sc->axen_ep[AXEN_ENDPT_TX]);
> >   err = usbd_close_pipe(sc->axen_ep[AXEN_ENDPT_TX]);
> >   if (err) {
> >   printf("axen%d: close tx pipe failed:
> > %s\n", @@ -1446,7 +1444,6 @@ axen_stop(struct axen_softc *sc)
> >   }
> >  
> >   if (sc->axen_ep[AXEN_ENDPT_INTR] != NULL) {
> > - usbd_abort_pipe(sc->axen_ep[AXEN_ENDPT_INTR]);
> >   err =
> > usbd_close_pipe(sc->axen_ep[AXEN_ENDPT_INTR]); if (err) {
> >   printf("axen%d: close intr pipe failed:
> > %s\n", Index: if_bwfm_usb.c
> > ===================================================================
> > RCS file: /cvs/src/sys/dev/usb/if_bwfm_usb.c,v
> > retrieving revision 1.18
> > diff -u -p -u -p -r1.18 if_bwfm_usb.c
> > --- if_bwfm_usb.c 25 Feb 2020 14:24:58 -0000 1.18
> > +++ if_bwfm_usb.c 31 Jul 2020 08:26:25 -0000
> > @@ -414,12 +414,10 @@ bwfm_usb_preinit(struct bwfm_softc *bwfm
> >  
> >   cleanup:
> >   if (sc->sc_rx_pipeh) {
> > - usbd_abort_pipe(sc->sc_rx_pipeh);
> >   usbd_close_pipe(sc->sc_rx_pipeh);
> >   sc->sc_rx_pipeh = NULL;
> >   }
> >   if (sc->sc_tx_pipeh) {
> > - usbd_abort_pipe(sc->sc_tx_pipeh);
> >   usbd_close_pipe(sc->sc_tx_pipeh);
> >   sc->sc_tx_pipeh = NULL;
> >   }
> > @@ -626,14 +624,10 @@ bwfm_usb_detach(struct device *self, int
> >  
> >   bwfm_detach(&sc->sc_sc, flags);
> >  
> > - if (sc->sc_rx_pipeh != NULL) {
> > - usbd_abort_pipe(sc->sc_rx_pipeh);
> > + if (sc->sc_rx_pipeh != NULL)
> >   usbd_close_pipe(sc->sc_rx_pipeh);
> > - }
> > - if (sc->sc_tx_pipeh != NULL) {
> > - usbd_abort_pipe(sc->sc_tx_pipeh);
> > + if (sc->sc_tx_pipeh != NULL)
> >   usbd_close_pipe(sc->sc_tx_pipeh);
> > - }
> >  
> >   bwfm_usb_free_rx_list(sc);
> >   bwfm_usb_free_tx_list(sc);
> > @@ -743,7 +737,6 @@ bwfm_usb_load_microcode(struct bwfm_usb_
> >   return 0;
> >   err:
> >   if (sc->sc_tx_pipeh != NULL) {
> > - usbd_abort_pipe(sc->sc_tx_pipeh);
> >   usbd_close_pipe(sc->sc_tx_pipeh);
> >   sc->sc_tx_pipeh = NULL;
> >   }
> > Index: if_cdce.c
> > ===================================================================
> > RCS file: /cvs/src/sys/dev/usb/if_cdce.c,v
> > retrieving revision 1.78
> > diff -u -p -u -p -r1.78 if_cdce.c
> > --- if_cdce.c 10 Jul 2020 13:26:40 -0000 1.78
> > +++ if_cdce.c 31 Jul 2020 08:26:25 -0000
> > @@ -442,7 +442,6 @@ cdce_stop(struct cdce_softc *sc)
> >   ifq_clr_oactive(&ifp->if_snd);
> >  
> >   if (sc->cdce_bulkin_pipe != NULL) {
> > - usbd_abort_pipe(sc->cdce_bulkin_pipe);
> >   err = usbd_close_pipe(sc->cdce_bulkin_pipe);
> >   if (err)
> >   printf("%s: close rx pipe failed: %s\n",
> > @@ -451,7 +450,6 @@ cdce_stop(struct cdce_softc *sc)
> >   }
> >  
> >   if (sc->cdce_bulkout_pipe != NULL) {
> > - usbd_abort_pipe(sc->cdce_bulkout_pipe);
> >   err = usbd_close_pipe(sc->cdce_bulkout_pipe);
> >   if (err)
> >   printf("%s: close tx pipe failed: %s\n",
> > @@ -460,7 +458,6 @@ cdce_stop(struct cdce_softc *sc)
> >   }
> >  
> >   if (sc->cdce_intr_pipe != NULL) {
> > - usbd_abort_pipe(sc->cdce_intr_pipe);
> >   err = usbd_close_pipe(sc->cdce_intr_pipe);
> >   if (err)
> >   printf("%s: close interrupt pipe failed:
> > %s\n", Index: if_cue.c
> > ===================================================================
> > RCS file: /cvs/src/sys/dev/usb/if_cue.c,v
> > retrieving revision 1.79
> > diff -u -p -u -p -r1.79 if_cue.c
> > --- if_cue.c 10 Jul 2020 13:26:40 -0000 1.79
> > +++ if_cue.c 31 Jul 2020 08:26:25 -0000
> > @@ -1129,7 +1129,6 @@ cue_stop(struct cue_softc *sc)
> >  
> >   /* Stop transfers. */
> >   if (sc->cue_ep[CUE_ENDPT_RX] != NULL) {
> > - usbd_abort_pipe(sc->cue_ep[CUE_ENDPT_RX]);
> >   err = usbd_close_pipe(sc->cue_ep[CUE_ENDPT_RX]);
> >   if (err) {
> >   printf("%s: close rx pipe failed: %s\n",
> > @@ -1139,7 +1138,6 @@ cue_stop(struct cue_softc *sc)
> >   }
> >  
> >   if (sc->cue_ep[CUE_ENDPT_TX] != NULL) {
> > - usbd_abort_pipe(sc->cue_ep[CUE_ENDPT_TX]);
> >   err = usbd_close_pipe(sc->cue_ep[CUE_ENDPT_TX]);
> >   if (err) {
> >   printf("%s: close tx pipe failed: %s\n",
> > @@ -1149,7 +1147,6 @@ cue_stop(struct cue_softc *sc)
> >   }
> >  
> >   if (sc->cue_ep[CUE_ENDPT_INTR] != NULL) {
> > - usbd_abort_pipe(sc->cue_ep[CUE_ENDPT_INTR]);
> >   err = usbd_close_pipe(sc->cue_ep[CUE_ENDPT_INTR]);
> >   if (err) {
> >   printf("%s: close intr pipe failed: %s\n",
> > Index: if_kue.c
> > ===================================================================
> > RCS file: /cvs/src/sys/dev/usb/if_kue.c,v
> > retrieving revision 1.91
> > diff -u -p -u -p -r1.91 if_kue.c
> > --- if_kue.c 10 Jul 2020 13:26:40 -0000 1.91
> > +++ if_kue.c 31 Jul 2020 08:26:25 -0000
> > @@ -1098,7 +1098,6 @@ kue_stop(struct kue_softc *sc)
> >  
> >   /* Stop transfers. */
> >   if (sc->kue_ep[KUE_ENDPT_RX] != NULL) {
> > - usbd_abort_pipe(sc->kue_ep[KUE_ENDPT_RX]);
> >   err = usbd_close_pipe(sc->kue_ep[KUE_ENDPT_RX]);
> >   if (err) {
> >   printf("%s: close rx pipe failed: %s\n",
> > @@ -1108,7 +1107,6 @@ kue_stop(struct kue_softc *sc)
> >   }
> >  
> >   if (sc->kue_ep[KUE_ENDPT_TX] != NULL) {
> > - usbd_abort_pipe(sc->kue_ep[KUE_ENDPT_TX]);
> >   err = usbd_close_pipe(sc->kue_ep[KUE_ENDPT_TX]);
> >   if (err) {
> >   printf("%s: close tx pipe failed: %s\n",
> > @@ -1118,7 +1116,6 @@ kue_stop(struct kue_softc *sc)
> >   }
> >  
> >   if (sc->kue_ep[KUE_ENDPT_INTR] != NULL) {
> > - usbd_abort_pipe(sc->kue_ep[KUE_ENDPT_INTR]);
> >   err = usbd_close_pipe(sc->kue_ep[KUE_ENDPT_INTR]);
> >   if (err) {
> >   printf("%s: close intr pipe failed: %s\n",
> > Index: if_mos.c
> > ===================================================================
> > RCS file: /cvs/src/sys/dev/usb/if_mos.c,v
> > retrieving revision 1.42
> > diff -u -p -u -p -r1.42 if_mos.c
> > --- if_mos.c 10 Jul 2020 13:26:40 -0000 1.42
> > +++ if_mos.c 31 Jul 2020 08:26:25 -0000
> > @@ -1334,7 +1334,6 @@ mos_stop(struct mos_softc *sc)
> >  
> >   /* Stop transfers. */
> >   if (sc->mos_ep[MOS_ENDPT_RX] != NULL) {
> > - usbd_abort_pipe(sc->mos_ep[MOS_ENDPT_RX]);
> >   err = usbd_close_pipe(sc->mos_ep[MOS_ENDPT_RX]);
> >   if (err) {
> >   printf("%s: close rx pipe failed: %s\n",
> > @@ -1344,7 +1343,6 @@ mos_stop(struct mos_softc *sc)
> >   }
> >  
> >   if (sc->mos_ep[MOS_ENDPT_TX] != NULL) {
> > - usbd_abort_pipe(sc->mos_ep[MOS_ENDPT_TX]);
> >   err = usbd_close_pipe(sc->mos_ep[MOS_ENDPT_TX]);
> >   if (err) {
> >   printf("%s: close tx pipe failed: %s\n",
> > @@ -1354,7 +1352,6 @@ mos_stop(struct mos_softc *sc)
> >   }
> >  
> >   if (sc->mos_ep[MOS_ENDPT_INTR] != NULL) {
> > - usbd_abort_pipe(sc->mos_ep[MOS_ENDPT_INTR]);
> >   err = usbd_close_pipe(sc->mos_ep[MOS_ENDPT_INTR]);
> >   if (err) {
> >   printf("%s: close intr pipe failed: %s\n",
> > Index: if_mue.c
> > ===================================================================
> > RCS file: /cvs/src/sys/dev/usb/if_mue.c,v
> > retrieving revision 1.9
> > diff -u -p -u -p -r1.9 if_mue.c
> > --- if_mue.c 10 Jul 2020 13:26:40 -0000 1.9
> > +++ if_mue.c 31 Jul 2020 08:26:25 -0000
> > @@ -1347,7 +1347,6 @@ mue_stop(struct mue_softc *sc)
> >  
> >   /* Stop transfers. */
> >   if (sc->mue_ep[MUE_ENDPT_RX] != NULL) {
> > - usbd_abort_pipe(sc->mue_ep[MUE_ENDPT_RX]);
> >   err = usbd_close_pipe(sc->mue_ep[MUE_ENDPT_RX]);
> >   if (err) {
> >   printf("%s: close rx pipe failed: %s\n",
> > @@ -1357,7 +1356,6 @@ mue_stop(struct mue_softc *sc)
> >   }
> >  
> >   if (sc->mue_ep[MUE_ENDPT_TX] != NULL) {
> > - usbd_abort_pipe(sc->mue_ep[MUE_ENDPT_TX]);
> >   err = usbd_close_pipe(sc->mue_ep[MUE_ENDPT_TX]);
> >   if (err) {
> >   printf("%s: close tx pipe failed: %s\n",
> > @@ -1367,7 +1365,6 @@ mue_stop(struct mue_softc *sc)
> >   }
> >  
> >   if (sc->mue_ep[MUE_ENDPT_INTR] != NULL) {
> > - usbd_abort_pipe(sc->mue_ep[MUE_ENDPT_INTR]);
> >   err = usbd_close_pipe(sc->mue_ep[MUE_ENDPT_INTR]);
> >   if (err) {
> >   printf("%s: close intr pipe failed: %s\n",
> > Index: if_otus.c
> > ===================================================================
> > RCS file: /cvs/src/sys/dev/usb/if_otus.c,v
> > retrieving revision 1.66
> > diff -u -p -u -p -r1.66 if_otus.c
> > --- if_otus.c 10 Jul 2020 13:22:21 -0000 1.66
> > +++ if_otus.c 31 Jul 2020 08:26:26 -0000
> > @@ -555,10 +555,8 @@ otus_close_pipes(struct otus_softc *sc)
> >  
> >   if (sc->data_rx_pipe != NULL)
> >   usbd_close_pipe(sc->data_rx_pipe);
> > - if (sc->cmd_rx_pipe != NULL) {
> > - usbd_abort_pipe(sc->cmd_rx_pipe);
> > + if (sc->cmd_rx_pipe != NULL)
> >   usbd_close_pipe(sc->cmd_rx_pipe);
> > - }
> >   if (sc->ibuf != NULL)
> >   free(sc->ibuf, M_USBDEV, sc->ibuflen);
> >   if (sc->data_tx_pipe != NULL)
> > Index: if_ral.c
> > ===================================================================
> > RCS file: /cvs/src/sys/dev/usb/if_ral.c,v
> > retrieving revision 1.147
> > diff -u -p -u -p -r1.147 if_ral.c
> > --- if_ral.c 10 Jul 2020 13:22:21 -0000 1.147
> > +++ if_ral.c 31 Jul 2020 08:26:26 -0000
> > @@ -348,15 +348,11 @@ ural_detach(struct device *self, int fla
> >   sc->amrr_xfer = NULL;
> >   }
> >  
> > - if (sc->sc_rx_pipeh != NULL) {
> > - usbd_abort_pipe(sc->sc_rx_pipeh);
> > + if (sc->sc_rx_pipeh != NULL)
> >   usbd_close_pipe(sc->sc_rx_pipeh);
> > - }
> >  
> > - if (sc->sc_tx_pipeh != NULL) {
> > - usbd_abort_pipe(sc->sc_tx_pipeh);
> > + if (sc->sc_tx_pipeh != NULL)
> >   usbd_close_pipe(sc->sc_tx_pipeh);
> > - }
> >  
> >   ural_free_rx_list(sc);
> >   ural_free_tx_list(sc);
> > @@ -2067,12 +2063,10 @@ ural_stop(struct ifnet *ifp, int disable
> >   sc->amrr_xfer = NULL;
> >   }
> >   if (sc->sc_rx_pipeh != NULL) {
> > - usbd_abort_pipe(sc->sc_rx_pipeh);
> >   usbd_close_pipe(sc->sc_rx_pipeh);
> >   sc->sc_rx_pipeh = NULL;
> >   }
> >   if (sc->sc_tx_pipeh != NULL) {
> > - usbd_abort_pipe(sc->sc_tx_pipeh);
> >   usbd_close_pipe(sc->sc_tx_pipeh);
> >   sc->sc_tx_pipeh = NULL;
> >   }
> > Index: if_rsu.c
> > ===================================================================
> > RCS file: /cvs/src/sys/dev/usb/if_rsu.c,v
> > retrieving revision 1.46
> > diff -u -p -u -p -r1.46 if_rsu.c
> > --- if_rsu.c 10 Jul 2020 13:22:21 -0000 1.46
> > +++ if_rsu.c 31 Jul 2020 08:26:26 -0000
> > @@ -381,7 +381,6 @@ rsu_close_pipes(struct rsu_softc *sc)
> >   for (i = 0; i < sc->npipes; i++) {
> >   if (sc->pipe[i] == NULL)
> >   continue;
> > - usbd_abort_pipe(sc->pipe[i]);
> >   usbd_close_pipe(sc->pipe[i]);
> >   }
> >   }
> > Index: if_rum.c
> > ===================================================================
> > RCS file: /cvs/src/sys/dev/usb/if_rum.c,v
> > retrieving revision 1.125
> > diff -u -p -u -p -r1.125 if_rum.c
> > --- if_rum.c 10 Jul 2020 13:22:21 -0000 1.125
> > +++ if_rum.c 31 Jul 2020 08:26:26 -0000
> > @@ -441,14 +441,10 @@ rum_detach(struct device *self, int flag
> >   usbd_free_xfer(sc->amrr_xfer);
> >   sc->amrr_xfer = NULL;
> >   }
> > - if (sc->sc_rx_pipeh != NULL) {
> > - usbd_abort_pipe(sc->sc_rx_pipeh);
> > + if (sc->sc_rx_pipeh != NULL)
> >   usbd_close_pipe(sc->sc_rx_pipeh);
> > - }
> > - if (sc->sc_tx_pipeh != NULL) {
> > - usbd_abort_pipe(sc->sc_tx_pipeh);
> > + if (sc->sc_tx_pipeh != NULL)
> >   usbd_close_pipe(sc->sc_tx_pipeh);
> > - }
> >  
> >   rum_free_rx_list(sc);
> >   rum_free_tx_list(sc);
> > @@ -2091,12 +2087,10 @@ rum_stop(struct ifnet *ifp, int disable)
> >   sc->amrr_xfer = NULL;
> >   }
> >   if (sc->sc_rx_pipeh != NULL) {
> > - usbd_abort_pipe(sc->sc_rx_pipeh);
> >   usbd_close_pipe(sc->sc_rx_pipeh);
> >   sc->sc_rx_pipeh = NULL;
> >   }
> >   if (sc->sc_tx_pipeh != NULL) {
> > - usbd_abort_pipe(sc->sc_tx_pipeh);
> >   usbd_close_pipe(sc->sc_tx_pipeh);
> >   sc->sc_tx_pipeh = NULL;
> >   }
> > Index: if_run.c
> > ===================================================================
> > RCS file: /cvs/src/sys/dev/usb/if_run.c,v
> > retrieving revision 1.129
> > diff -u -p -u -p -r1.129 if_run.c
> > --- if_run.c 10 Jul 2020 13:22:21 -0000 1.129
> > +++ if_run.c 31 Jul 2020 08:26:27 -0000
> > @@ -750,7 +750,6 @@ run_free_rx_ring(struct run_softc *sc)
> >   int i;
> >  
> >   if (rxq->pipeh != NULL) {
> > - usbd_abort_pipe(rxq->pipeh);
> >   usbd_close_pipe(rxq->pipeh);
> >   rxq->pipeh = NULL;
> >   }
> > @@ -809,7 +808,6 @@ run_free_tx_ring(struct run_softc *sc, i
> >   int i;
> >  
> >   if (txq->pipeh != NULL) {
> > - usbd_abort_pipe(txq->pipeh);
> >   usbd_close_pipe(txq->pipeh);
> >   txq->pipeh = NULL;
> >   }
> > Index: if_smsc.c
> > ===================================================================
> > RCS file: /cvs/src/sys/dev/usb/if_smsc.c,v
> > retrieving revision 1.36
> > diff -u -p -u -p -r1.36 if_smsc.c
> > --- if_smsc.c 10 Jul 2020 13:26:40 -0000 1.36
> > +++ if_smsc.c 31 Jul 2020 08:26:27 -0000
> > @@ -698,7 +698,6 @@ smsc_stop(struct smsc_softc *sc)
> >  
> >   /* Stop transfers. */
> >   if (sc->sc_ep[SMSC_ENDPT_RX] != NULL) {
> > - usbd_abort_pipe(sc->sc_ep[SMSC_ENDPT_RX]);
> >   err = usbd_close_pipe(sc->sc_ep[SMSC_ENDPT_RX]);
> >   if (err) {
> >   printf("%s: close rx pipe failed: %s\n",
> > @@ -708,7 +707,6 @@ smsc_stop(struct smsc_softc *sc)
> >   }
> >  
> >   if (sc->sc_ep[SMSC_ENDPT_TX] != NULL) {
> > - usbd_abort_pipe(sc->sc_ep[SMSC_ENDPT_TX]);
> >   err = usbd_close_pipe(sc->sc_ep[SMSC_ENDPT_TX]);
> >   if (err) {
> >   printf("%s: close tx pipe failed: %s\n",
> > @@ -718,7 +716,6 @@ smsc_stop(struct smsc_softc *sc)
> >   }
> >  
> >   if (sc->sc_ep[SMSC_ENDPT_INTR] != NULL) {
> > - usbd_abort_pipe(sc->sc_ep[SMSC_ENDPT_INTR]);
> >   err = usbd_close_pipe(sc->sc_ep[SMSC_ENDPT_INTR]);
> >   if (err) {
> >   printf("%s: close intr pipe failed: %s\n",
> > Index: if_udav.c
> > ===================================================================
> > RCS file: /cvs/src/sys/dev/usb/if_udav.c,v
> > retrieving revision 1.83
> > diff -u -p -u -p -r1.83 if_udav.c
> > --- if_udav.c 10 Jul 2020 13:26:41 -0000 1.83
> > +++ if_udav.c 31 Jul 2020 08:26:27 -0000
> > @@ -1226,7 +1226,6 @@ udav_stop(struct ifnet *ifp, int disable
> >   /* Stop transfers */
> >   /* RX endpoint */
> >   if (sc->sc_pipe_rx != NULL) {
> > - usbd_abort_pipe(sc->sc_pipe_rx);
> >   err = usbd_close_pipe(sc->sc_pipe_rx);
> >   if (err)
> >   printf("%s: close rx pipe failed: %s\n",
> > @@ -1236,7 +1235,6 @@ udav_stop(struct ifnet *ifp, int disable
> >  
> >   /* TX endpoint */
> >   if (sc->sc_pipe_tx != NULL) {
> > - usbd_abort_pipe(sc->sc_pipe_tx);
> >   err = usbd_close_pipe(sc->sc_pipe_tx);
> >   if (err)
> >   printf("%s: close tx pipe failed: %s\n",
> > @@ -1248,7 +1246,6 @@ udav_stop(struct ifnet *ifp, int disable
> >   /* XXX: Interrupt endpoint is not yet supported!! */
> >   /* Interrupt endpoint */
> >   if (sc->sc_pipe_intr != NULL) {
> > - usbd_abort_pipe(sc->sc_pipe_intr);
> >   err = usbd_close_pipe(sc->sc_pipe_intr);
> >   if (err)
> >   printf("%s: close intr pipe failed: %s\n",
> > Index: if_ugl.c
> > ===================================================================
> > RCS file: /cvs/src/sys/dev/usb/if_ugl.c,v
> > retrieving revision 1.25
> > diff -u -p -u -p -r1.25 if_ugl.c
> > --- if_ugl.c 10 Jul 2020 13:26:41 -0000 1.25
> > +++ if_ugl.c 31 Jul 2020 08:26:27 -0000
> > @@ -817,19 +817,16 @@ ugl_stop(struct ugl_softc *sc)
> >  
> >   /* Stop transfers. */
> >   if (sc->sc_ep[UGL_ENDPT_RX] != NULL) {
> > - usbd_abort_pipe(sc->sc_ep[UGL_ENDPT_RX]);
> >   usbd_close_pipe(sc->sc_ep[UGL_ENDPT_RX]);
> >   sc->sc_ep[UGL_ENDPT_RX] = NULL;
> >   }
> >  
> >   if (sc->sc_ep[UGL_ENDPT_TX] != NULL) {
> > - usbd_abort_pipe(sc->sc_ep[UGL_ENDPT_TX]);
> >   usbd_close_pipe(sc->sc_ep[UGL_ENDPT_TX]);
> >   sc->sc_ep[UGL_ENDPT_TX] = NULL;
> >   }
> >  
> >   if (sc->sc_ep[UGL_ENDPT_INTR] != NULL) {
> > - usbd_abort_pipe(sc->sc_ep[UGL_ENDPT_INTR]);
> >   usbd_close_pipe(sc->sc_ep[UGL_ENDPT_INTR]);
> >   sc->sc_ep[UGL_ENDPT_INTR] = NULL;
> >   }
> > Index: if_upgt.c
> > ===================================================================
> > RCS file: /cvs/src/sys/dev/usb/if_upgt.c,v
> > retrieving revision 1.86
> > diff -u -p -u -p -r1.86 if_upgt.c
> > --- if_upgt.c 10 Jul 2020 13:22:21 -0000 1.86
> > +++ if_upgt.c 31 Jul 2020 08:26:27 -0000
> > @@ -447,14 +447,10 @@ upgt_detach(struct device *self, int fla
> >   s = splusb();
> >  
> >   /* abort and close TX / RX pipes */
> > - if (sc->sc_tx_pipeh != NULL) {
> > - usbd_abort_pipe(sc->sc_tx_pipeh);
> > + if (sc->sc_tx_pipeh != NULL)
> >   usbd_close_pipe(sc->sc_tx_pipeh);
> > - }
> > - if (sc->sc_rx_pipeh != NULL) {
> > - usbd_abort_pipe(sc->sc_rx_pipeh);
> > + if (sc->sc_rx_pipeh != NULL)
> >   usbd_close_pipe(sc->sc_rx_pipeh);
> > - }
> >  
> >   /* remove tasks and timeouts */
> >   usb_rem_task(sc->sc_udev, &sc->sc_task_newstate);
> > Index: if_upl.c
> > ===================================================================
> > RCS file: /cvs/src/sys/dev/usb/if_upl.c,v
> > retrieving revision 1.77
> > diff -u -p -u -p -r1.77 if_upl.c
> > --- if_upl.c 10 Jul 2020 13:26:41 -0000 1.77
> > +++ if_upl.c 31 Jul 2020 08:26:27 -0000
> > @@ -819,7 +819,6 @@ upl_stop(struct upl_softc *sc)
> >  
> >   /* Stop transfers. */
> >   if (sc->sc_ep[UPL_ENDPT_RX] != NULL) {
> > - usbd_abort_pipe(sc->sc_ep[UPL_ENDPT_RX]);
> >   err = usbd_close_pipe(sc->sc_ep[UPL_ENDPT_RX]);
> >   if (err) {
> >   printf("%s: close rx pipe failed: %s\n",
> > @@ -829,7 +828,6 @@ upl_stop(struct upl_softc *sc)
> >   }
> >  
> >   if (sc->sc_ep[UPL_ENDPT_TX] != NULL) {
> > - usbd_abort_pipe(sc->sc_ep[UPL_ENDPT_TX]);
> >   err = usbd_close_pipe(sc->sc_ep[UPL_ENDPT_TX]);
> >   if (err) {
> >   printf("%s: close tx pipe failed: %s\n",
> > @@ -839,7 +837,6 @@ upl_stop(struct upl_softc *sc)
> >   }
> >  
> >   if (sc->sc_ep[UPL_ENDPT_INTR] != NULL) {
> > - usbd_abort_pipe(sc->sc_ep[UPL_ENDPT_INTR]);
> >   err = usbd_close_pipe(sc->sc_ep[UPL_ENDPT_INTR]);
> >   if (err) {
> >   printf("%s: close intr pipe failed: %s\n",
> > Index: if_ure.c
> > ===================================================================
> > RCS file: /cvs/src/sys/dev/usb/if_ure.c,v
> > retrieving revision 1.16
> > diff -u -p -u -p -r1.16 if_ure.c
> > --- if_ure.c 10 Jul 2020 13:26:41 -0000 1.16
> > +++ if_ure.c 31 Jul 2020 08:26:27 -0000
> > @@ -825,7 +825,6 @@ ure_stop(struct ure_softc *sc)
> >   sc->ure_flags &= ~URE_FLAG_LINK;
> >  
> >   if (sc->ure_ep[URE_ENDPT_RX] != NULL) {
> > - usbd_abort_pipe(sc->ure_ep[URE_ENDPT_RX]);
> >   err = usbd_close_pipe(sc->ure_ep[URE_ENDPT_RX]);
> >   if (err) {
> >   printf("%s: close rx pipe failed: %s\n",
> > @@ -835,7 +834,6 @@ ure_stop(struct ure_softc *sc)
> >   }
> >  
> >   if (sc->ure_ep[URE_ENDPT_TX] != NULL) {
> > - usbd_abort_pipe(sc->ure_ep[URE_ENDPT_TX]);
> >   err = usbd_close_pipe(sc->ure_ep[URE_ENDPT_TX]);
> >   if (err) {
> >   printf("%s: close tx pipe failed: %s\n",
> > Index: if_url.c
> > ===================================================================
> > RCS file: /cvs/src/sys/dev/usb/if_url.c,v
> > retrieving revision 1.87
> > diff -u -p -u -p -r1.87 if_url.c
> > --- if_url.c 10 Jul 2020 13:26:41 -0000 1.87
> > +++ if_url.c 31 Jul 2020 08:26:27 -0000
> > @@ -1086,7 +1086,6 @@ url_stop(struct ifnet *ifp, int disable)
> >   /* Stop transfers */
> >   /* RX endpoint */
> >   if (sc->sc_pipe_rx != NULL) {
> > - usbd_abort_pipe(sc->sc_pipe_rx);
> >   err = usbd_close_pipe(sc->sc_pipe_rx);
> >   if (err)
> >   printf("%s: close rx pipe failed: %s\n",
> > @@ -1096,7 +1095,6 @@ url_stop(struct ifnet *ifp, int disable)
> >  
> >   /* TX endpoint */
> >   if (sc->sc_pipe_tx != NULL) {
> > - usbd_abort_pipe(sc->sc_pipe_tx);
> >   err = usbd_close_pipe(sc->sc_pipe_tx);
> >   if (err)
> >   printf("%s: close tx pipe failed: %s\n",
> > @@ -1108,7 +1106,6 @@ url_stop(struct ifnet *ifp, int disable)
> >   /* XXX: Interrupt endpoint is not yet supported!! */
> >   /* Interrupt endpoint */
> >   if (sc->sc_pipe_intr != NULL) {
> > - usbd_abort_pipe(sc->sc_pipe_intr);
> >   err = usbd_close_pipe(sc->sc_pipe_intr);
> >   if (err)
> >   printf("%s: close intr pipe failed: %s\n",
> > Index: if_urndis.c
> > ===================================================================
> > RCS file: /cvs/src/sys/dev/usb/if_urndis.c,v
> > retrieving revision 1.71
> > diff -u -p -u -p -r1.71 if_urndis.c
> > --- if_urndis.c 10 Jul 2020 13:26:41 -0000 1.71
> > +++ if_urndis.c 31 Jul 2020 08:26:27 -0000
> > @@ -1140,7 +1140,6 @@ urndis_stop(struct urndis_softc *sc)
> >   ifq_clr_oactive(&ifp->if_snd);
> >  
> >   if (sc->sc_bulkin_pipe != NULL) {
> > - usbd_abort_pipe(sc->sc_bulkin_pipe);
> >   err = usbd_close_pipe(sc->sc_bulkin_pipe);
> >   if (err)
> >   printf("%s: close rx pipe failed: %s\n",
> > @@ -1149,7 +1148,6 @@ urndis_stop(struct urndis_softc *sc)
> >   }
> >  
> >   if (sc->sc_bulkout_pipe != NULL) {
> > - usbd_abort_pipe(sc->sc_bulkout_pipe);
> >   err = usbd_close_pipe(sc->sc_bulkout_pipe);
> >   if (err)
> >   printf("%s: close tx pipe failed: %s\n",
> > Index: if_urtwn.c
> > ===================================================================
> > RCS file: /cvs/src/sys/dev/usb/if_urtwn.c,v
> > retrieving revision 1.92
> > diff -u -p -u -p -r1.92 if_urtwn.c
> > --- if_urtwn.c 6 Jul 2020 10:38:54 -0000 1.92
> > +++ if_urtwn.c 31 Jul 2020 08:26:28 -0000
> > @@ -615,15 +615,12 @@ urtwn_close_pipes(struct urtwn_softc *sc
> >   int i;
> >  
> >   /* Close Rx pipe. */
> > - if (sc->rx_pipe != NULL) {
> > - usbd_abort_pipe(sc->rx_pipe);
> > + if (sc->rx_pipe != NULL)
> >   usbd_close_pipe(sc->rx_pipe);
> > - }
> >   /* Close Tx pipes. */
> >   for (i = 0; i < R92C_MAX_EPOUT; i++) {
> >   if (sc->tx_pipe[i] == NULL)
> >   continue;
> > - usbd_abort_pipe(sc->tx_pipe[i]);
> >   usbd_close_pipe(sc->tx_pipe[i]);
> >   }
> >   }
> > Index: if_wi_usb.c
> > ===================================================================
> > RCS file: /cvs/src/sys/dev/usb/if_wi_usb.c,v
> > retrieving revision 1.72
> > diff -u -p -u -p -r1.72 if_wi_usb.c
> > --- if_wi_usb.c 10 Jul 2020 13:26:41 -0000 1.72
> > +++ if_wi_usb.c 31 Jul 2020 08:26:28 -0000
> > @@ -416,7 +416,6 @@ wi_usb_detach(struct device *self, int f
> >   }
> >  
> >   if (sc->wi_usb_ep[WI_USB_ENDPT_INTR] != NULL) {
> > - usbd_abort_pipe(sc->wi_usb_ep[WI_USB_ENDPT_INTR]);
> >   err =
> > usbd_close_pipe(sc->wi_usb_ep[WI_USB_ENDPT_INTR]); if (err) {
> >   printf("%s: close intr pipe failed: %s\n",
> > @@ -425,7 +424,6 @@ wi_usb_detach(struct device *self, int f
> >   sc->wi_usb_ep[WI_USB_ENDPT_INTR] = NULL;
> >   }
> >   if (sc->wi_usb_ep[WI_USB_ENDPT_TX] != NULL) {
> > - usbd_abort_pipe(sc->wi_usb_ep[WI_USB_ENDPT_TX]);
> >   err =
> > usbd_close_pipe(sc->wi_usb_ep[WI_USB_ENDPT_TX]); if (err) {
> >   printf("%s: close tx pipe failed: %s\n",
> > @@ -434,7 +432,6 @@ wi_usb_detach(struct device *self, int f
> >   sc->wi_usb_ep[WI_USB_ENDPT_TX] = NULL;
> >   }
> >   if (sc->wi_usb_ep[WI_USB_ENDPT_RX] != NULL) {
> > - usbd_abort_pipe(sc->wi_usb_ep[WI_USB_ENDPT_RX]);
> >   err =
> > usbd_close_pipe(sc->wi_usb_ep[WI_USB_ENDPT_RX]); if (err) {
> >   printf("%s: close rx pipe failed: %s\n",
> > Index: if_zyd.c
> > ===================================================================
> > RCS file: /cvs/src/sys/dev/usb/if_zyd.c,v
> > retrieving revision 1.124
> > diff -u -p -u -p -r1.124 if_zyd.c
> > --- if_zyd.c 10 Jul 2020 13:22:21 -0000 1.124
> > +++ if_zyd.c 31 Jul 2020 08:26:28 -0000
> > @@ -518,7 +518,6 @@ zyd_close_pipes(struct zyd_softc *sc)
> >  
> >   for (i = 0; i < ZYD_ENDPT_CNT; i++) {
> >   if (sc->zyd_ep[i] != NULL) {
> > - usbd_abort_pipe(sc->zyd_ep[i]);
> >   usbd_close_pipe(sc->zyd_ep[i]);
> >   sc->zyd_ep[i] = NULL;
> >   }
> > Index: ubcmtp.c
> > ===================================================================
> > RCS file: /cvs/src/sys/dev/usb/ubcmtp.c,v
> > retrieving revision 1.20
> > diff -u -p -u -p -r1.20 ubcmtp.c
> > --- ubcmtp.c 27 May 2019 15:50:26 -0000 1.20
> > +++ ubcmtp.c 31 Jul 2020 08:26:28 -0000
> > @@ -583,12 +583,10 @@ ubcmtp_disable(void *v)
> >   ubcmtp_raw_mode(sc, 0);
> >  
> >   if (sc->sc_tp_pipe != NULL) {
> > - usbd_abort_pipe(sc->sc_tp_pipe);
> >   usbd_close_pipe(sc->sc_tp_pipe);
> >   sc->sc_tp_pipe = NULL;
> >   }
> >   if (sc->sc_bt_pipe != NULL) {
> > - usbd_abort_pipe(sc->sc_bt_pipe);
> >   usbd_close_pipe(sc->sc_bt_pipe);
> >   sc->sc_bt_pipe = NULL;
> >   }
> > @@ -773,17 +771,13 @@ ubcmtp_setup_pipes(struct ubcmtp_softc *
> >   return (0);
> >  
> >   fail2:
> > - if (sc->sc_tp_pipe != NULL) {
> > - usbd_abort_pipe(sc->sc_tp_pipe);
> > + if (sc->sc_tp_pipe != NULL)
> >   usbd_close_pipe(sc->sc_tp_pipe);
> > - }
> >   if (sc->tp_pkt != NULL)
> >   free(sc->tp_pkt, M_USBDEV, sc->tp_maxlen);
> >   fail1:
> > - if (sc->sc_bt_pipe != NULL) {
> > - usbd_abort_pipe(sc->sc_bt_pipe);
> > + if (sc->sc_bt_pipe != NULL)
> >   usbd_close_pipe(sc->sc_bt_pipe);
> > - }
> >   if (sc->bt_pkt != NULL)
> >   free(sc->bt_pkt, M_USBDEV, sc->bt_maxlen);
> >  
> > Index: ubsa.c
> > ===================================================================
> > RCS file: /cvs/src/sys/dev/usb/ubsa.c,v
> > retrieving revision 1.66
> > diff -u -p -u -p -r1.66 ubsa.c
> > --- ubsa.c 27 Apr 2018 08:08:06 -0000 1.66
> > +++ ubsa.c 31 Jul 2020 08:26:28 -0000
> > @@ -367,7 +367,6 @@ ubsa_detach(struct device *self, int fla
> >   DPRINTF(("ubsa_detach: sc = %p\n", sc));
> >  
> >   if (sc->sc_intr_pipe != NULL) {
> > - usbd_abort_pipe(sc->sc_intr_pipe);
> >   usbd_close_pipe(sc->sc_intr_pipe);
> >   free(sc->sc_intr_buf, M_USBDEV, sc->sc_isize);
> >   sc->sc_intr_pipe = NULL;
> > @@ -621,7 +620,6 @@ ubsa_close(void *addr, int portno)
> >   DPRINTF(("ubsa_close: close\n"));
> >  
> >   if (sc->sc_intr_pipe != NULL) {
> > - usbd_abort_pipe(sc->sc_intr_pipe);
> >   err = usbd_close_pipe(sc->sc_intr_pipe);
> >   if (err)
> >   printf("%s: close interrupt pipe failed:
> > %s\n", Index: uchcom.c
> > ===================================================================
> > RCS file: /cvs/src/sys/dev/usb/uchcom.c,v
> > retrieving revision 1.27
> > diff -u -p -u -p -r1.27 uchcom.c
> > --- uchcom.c 8 Apr 2017 02:57:25 -0000 1.27
> > +++ uchcom.c 31 Jul 2020 08:26:28 -0000
> > @@ -794,7 +794,6 @@ uchcom_close_intr_pipe(struct uchcom_sof
> >   usbd_status err;
> >  
> >   if (sc->sc_intr_pipe != NULL) {
> > - usbd_abort_pipe(sc->sc_intr_pipe);
> >   err = usbd_close_pipe(sc->sc_intr_pipe);
> >   if (err)
> >   printf("%s: close interrupt pipe failed:
> > %s\n", Index: ucom.c
> > ===================================================================
> > RCS file: /cvs/src/sys/dev/usb/ucom.c,v
> > retrieving revision 1.70
> > diff -u -p -u -p -r1.70 ucom.c
> > --- ucom.c 8 Mar 2020 19:24:15 -0000 1.70
> > +++ ucom.c 31 Jul 2020 08:26:28 -0000
> > @@ -217,12 +217,10 @@ ucom_detach(struct device *self, int fla
> >   sc, flags, tp, sc->sc_bulkin_no,
> > sc->sc_bulkout_no));
> >   if (sc->sc_bulkin_pipe != NULL) {
> > - usbd_abort_pipe(sc->sc_bulkin_pipe);
> >   usbd_close_pipe(sc->sc_bulkin_pipe);
> >   sc->sc_bulkin_pipe = NULL;
> >   }
> >   if (sc->sc_bulkout_pipe != NULL) {
> > - usbd_abort_pipe(sc->sc_bulkout_pipe);
> >   usbd_close_pipe(sc->sc_bulkout_pipe);
> >   sc->sc_bulkout_pipe = NULL;
> >   }
> > @@ -1196,12 +1194,10 @@ ucom_cleanup(struct ucom_softc *sc)
> >  
> >   ucom_shutdown(sc);
> >   if (sc->sc_bulkin_pipe != NULL) {
> > - usbd_abort_pipe(sc->sc_bulkin_pipe);
> >   usbd_close_pipe(sc->sc_bulkin_pipe);
> >   sc->sc_bulkin_pipe = NULL;
> >   }
> >   if (sc->sc_bulkout_pipe != NULL) {
> > - usbd_abort_pipe(sc->sc_bulkout_pipe);
> >   usbd_close_pipe(sc->sc_bulkout_pipe);
> >   sc->sc_bulkout_pipe = NULL;
> >   }
> > Index: udl.c
> > ===================================================================
> > RCS file: /cvs/src/sys/dev/usb/udl.c,v
> > retrieving revision 1.93
> > diff -u -p -u -p -r1.93 udl.c
> > --- udl.c 25 May 2020 09:55:49 -0000 1.93
> > +++ udl.c 31 Jul 2020 08:26:28 -0000
> > @@ -438,10 +438,8 @@ udl_detach(struct device *self, int flag
> >   /*
> >   * Close bulk TX pipe.
> >   */
> > - if (sc->sc_tx_pipeh != NULL) {
> > - usbd_abort_pipe(sc->sc_tx_pipeh);
> > + if (sc->sc_tx_pipeh != NULL)
> >   usbd_close_pipe(sc->sc_tx_pipeh);
> > - }
> >  
> >   /*
> >   * Free command buffer.
> > Index: uhidev.c
> > ===================================================================
> > RCS file: /cvs/src/sys/dev/usb/uhidev.c,v
> > retrieving revision 1.79
> > diff -u -p -u -p -r1.79 uhidev.c
> > --- uhidev.c 22 Feb 2020 14:01:34 -0000 1.79
> > +++ uhidev.c 31 Jul 2020 08:26:28 -0000
> > @@ -394,13 +394,11 @@ uhidev_detach(struct device *self, int f
> >   DPRINTF(("uhidev_detach: sc=%p flags=%d\n", sc, flags));
> >  
> >   if (sc->sc_opipe != NULL) {
> > - usbd_abort_pipe(sc->sc_opipe);
> >   usbd_close_pipe(sc->sc_opipe);
> >   sc->sc_opipe = NULL;
> >   }
> >  
> >   if (sc->sc_ipipe != NULL) {
> > - usbd_abort_pipe(sc->sc_ipipe);
> >   usbd_close_pipe(sc->sc_ipipe);
> >   sc->sc_ipipe = NULL;
> >   }
> > @@ -608,13 +606,11 @@ uhidev_close(struct uhidev *scd)
> >  
> >   /* Disable interrupts. */
> >   if (sc->sc_opipe != NULL) {
> > - usbd_abort_pipe(sc->sc_opipe);
> >   usbd_close_pipe(sc->sc_opipe);
> >   sc->sc_opipe = NULL;
> >   }
> >  
> >   if (sc->sc_ipipe != NULL) {
> > - usbd_abort_pipe(sc->sc_ipipe);
> >   usbd_close_pipe(sc->sc_ipipe);
> >   sc->sc_ipipe = NULL;
> >   }
> > Index: uhub.c
> > ===================================================================
> > RCS file: /cvs/src/sys/dev/usb/uhub.c,v
> > retrieving revision 1.94
> > diff -u -p -u -p -r1.94 uhub.c
> > --- uhub.c 16 Mar 2020 13:17:17 -0000 1.94
> > +++ uhub.c 31 Jul 2020 08:26:28 -0000
> > @@ -456,7 +456,6 @@ uhub_detach(struct device *self, int fla
> >   if (hub == NULL) /* Must be partially
> > working */ return (0);
> >  
> > - usbd_abort_pipe(sc->sc_ipipe);
> >   usbd_close_pipe(sc->sc_ipipe);
> >  
> >   for (port = 0; port < hub->nports; port++) {
> > Index: ulpt.c
> > ===================================================================
> > RCS file: /cvs/src/sys/dev/usb/ulpt.c,v
> > retrieving revision 1.56
> > diff -u -p -u -p -r1.56 ulpt.c
> > --- ulpt.c 8 Jan 2020 12:57:35 -0000 1.56
> > +++ ulpt.c 31 Jul 2020 08:26:28 -0000
> > @@ -575,7 +575,6 @@ ulptclose(dev_t dev, int flag, int mode,
> >   sc->sc_out_pipe = NULL;
> >   }
> >   if (sc->sc_in_pipe != NULL) {
> > - usbd_abort_pipe(sc->sc_in_pipe);
> >   usbd_close_pipe(sc->sc_in_pipe);
> >   sc->sc_in_pipe = NULL;
> >   if (sc->sc_in_xfer1 != NULL) {
> > Index: umbg.c
> > ===================================================================
> > RCS file: /cvs/src/sys/dev/usb/umbg.c,v
> > retrieving revision 1.26
> > diff -u -p -u -p -r1.26 umbg.c
> > --- umbg.c 22 Mar 2019 12:04:25 -0000 1.26
> > +++ umbg.c 31 Jul 2020 08:26:28 -0000
> > @@ -299,7 +299,6 @@ umbg_detach(struct device *self, int fla
> >   usb_rem_task(sc->sc_udev, &sc->sc_task);
> >  
> >   if (sc->sc_bulkin_pipe != NULL) {
> > - usbd_abort_pipe(sc->sc_bulkin_pipe);
> >   err = usbd_close_pipe(sc->sc_bulkin_pipe);
> >   if (err)
> >   printf("%s: close rx pipe failed: %s\n",
> > @@ -307,7 +306,6 @@ umbg_detach(struct device *self, int fla
> >   sc->sc_bulkin_pipe = NULL;
> >   }
> >   if (sc->sc_bulkout_pipe != NULL) {
> > - usbd_abort_pipe(sc->sc_bulkout_pipe);
> >   err = usbd_close_pipe(sc->sc_bulkout_pipe);
> >   if (err)
> >   printf("%s: close tx pipe failed: %s\n",
> > Index: umcs.c
> > ===================================================================
> > RCS file: /cvs/src/sys/dev/usb/umcs.c,v
> > retrieving revision 1.7
> > diff -u -p -u -p -r1.7 umcs.c
> > --- umcs.c 17 Mar 2020 09:34:52 -0000 1.7
> > +++ umcs.c 31 Jul 2020 08:26:28 -0000
> > @@ -471,7 +471,6 @@ umcs_detach(struct device *self, int fla
> >   task_del(systq, &sc->sc_status_task);
> >  
> >   if (sc->sc_ipipe != NULL) {
> > - usbd_abort_pipe(sc->sc_ipipe);
> >   usbd_close_pipe(sc->sc_ipipe);
> >   sc->sc_ipipe = NULL;
> >   }
> > Index: umct.c
> > ===================================================================
> > RCS file: /cvs/src/sys/dev/usb/umct.c,v
> > retrieving revision 1.47
> > diff -u -p -u -p -r1.47 umct.c
> > --- umct.c 30 Dec 2017 20:47:00 -0000 1.47
> > +++ umct.c 31 Jul 2020 08:26:28 -0000
> > @@ -295,7 +295,6 @@ umct_detach(struct device *self, int fla
> >   DPRINTF(("umct_detach: sc=%p flags=%d\n", sc, flags));
> >  
> >           if (sc->sc_intr_pipe != NULL) {
> > -                usbd_abort_pipe(sc->sc_intr_pipe);
> >                   usbd_close_pipe(sc->sc_intr_pipe);
> >   free(sc->sc_intr_buf, M_USBDEV, sc->sc_isize);
> >                   sc->sc_intr_pipe = NULL;
> > @@ -552,7 +551,6 @@ umct_close(void *addr, int portno)
> >   DPRINTF(("umct_close: close\n"));
> >  
> >   if (sc->sc_intr_pipe != NULL) {
> > - usbd_abort_pipe(sc->sc_intr_pipe);
> >   err = usbd_close_pipe(sc->sc_intr_pipe);
> >   if (err)
> >   printf("%s: close interrupt pipe failed:
> > %s\n", Index: umidi.c
> > ===================================================================
> > RCS file: /cvs/src/sys/dev/usb/umidi.c,v
> > retrieving revision 1.53
> > diff -u -p -u -p -r1.53 umidi.c
> > --- umidi.c 16 Mar 2020 16:12:43 -0000 1.53
> > +++ umidi.c 31 Jul 2020 08:26:28 -0000
> > @@ -367,7 +367,6 @@ static void
> >   free_pipe(struct umidi_endpoint *ep)
> >   {
> >   DPRINTF(("%s: %s %p\n", ep->sc->sc_dev.dv_xname, __func__,
> > ep));
> > - usbd_abort_pipe(ep->pipe);
> >   usbd_close_pipe(ep->pipe);
> >   usbd_free_xfer(ep->xfer);
> >   }
> > Index: umodem.c
> > ===================================================================
> > RCS file: /cvs/src/sys/dev/usb/umodem.c,v
> > retrieving revision 1.65
> > diff -u -p -u -p -r1.65 umodem.c
> > --- umodem.c 22 Feb 2020 14:01:35 -0000 1.65
> > +++ umodem.c 31 Jul 2020 08:26:28 -0000
> > @@ -424,7 +424,6 @@ umodem_close(void *addr, int portno)
> >   DPRINTF(("umodem_close: sc=%p\n", sc));
> >  
> >   if (sc->sc_notify_pipe != NULL) {
> > - usbd_abort_pipe(sc->sc_notify_pipe);
> >   err = usbd_close_pipe(sc->sc_notify_pipe);
> >   if (err)
> >   printf("%s: close notify pipe failed:
> > %s\n", @@ -702,7 +701,6 @@ umodem_detach(struct device *self, int f
> >   DPRINTF(("umodem_detach: sc=%p flags=%d\n", sc, flags));
> >  
> >   if (sc->sc_notify_pipe != NULL) {
> > - usbd_abort_pipe(sc->sc_notify_pipe);
> >   usbd_close_pipe(sc->sc_notify_pipe);
> >   sc->sc_notify_pipe = NULL;
> >   }
> > Index: umsm.c
> > ===================================================================
> > RCS file: /cvs/src/sys/dev/usb/umsm.c,v
> > retrieving revision 1.117
> > diff -u -p -u -p -r1.117 umsm.c
> > --- umsm.c 5 Feb 2020 16:01:32 -0000 1.117
> > +++ umsm.c 31 Jul 2020 08:26:29 -0000
> > @@ -440,7 +440,6 @@ umsm_detach(struct device *self, int fla
> >  
> >   /* close the interrupt endpoint if that is opened */
> >   if (sc->sc_intr_pipe != NULL) {
> > - usbd_abort_pipe(sc->sc_intr_pipe);
> >   usbd_close_pipe(sc->sc_intr_pipe);
> >   free(sc->sc_intr_buf, M_USBDEV, sc->sc_isize);
> >   sc->sc_intr_pipe = NULL;
> > @@ -496,7 +495,6 @@ umsm_close(void *addr, int portno)
> >   return;
> >  
> >   if (sc->sc_intr_pipe != NULL) {
> > - usbd_abort_pipe(sc->sc_intr_pipe);
> >   err = usbd_close_pipe(sc->sc_intr_pipe);
> >   if (err)
> >   printf("%s: close interrupt pipe failed:
> > %s\n", Index: uow.c
> > ===================================================================
> > RCS file: /cvs/src/sys/dev/usb/uow.c,v
> > retrieving revision 1.36
> > diff -u -p -u -p -r1.36 uow.c
> > --- uow.c 4 Jan 2020 11:36:05 -0000 1.36
> > +++ uow.c 31 Jul 2020 08:26:29 -0000
> > @@ -245,18 +245,12 @@ uow_detach(struct device *self, int flag
> >  
> >   s = splusb();
> >  
> > - if (sc->sc_ph_ibulk != NULL) {
> > - usbd_abort_pipe(sc->sc_ph_ibulk);
> > + if (sc->sc_ph_ibulk != NULL)
> >   usbd_close_pipe(sc->sc_ph_ibulk);
> > - }
> > - if (sc->sc_ph_obulk != NULL) {
> > - usbd_abort_pipe(sc->sc_ph_obulk);
> > + if (sc->sc_ph_obulk != NULL)
> >   usbd_close_pipe(sc->sc_ph_obulk);
> > - }
> > - if (sc->sc_ph_intr != NULL) {
> > - usbd_abort_pipe(sc->sc_ph_intr);
> > + if (sc->sc_ph_intr != NULL)
> >   usbd_close_pipe(sc->sc_ph_intr);
> > - }
> >  
> >   if (sc->sc_xfer_in != NULL)
> >   usbd_free_xfer(sc->sc_xfer_in);
> > Index: uplcom.c
> > ===================================================================
> > RCS file: /cvs/src/sys/dev/usb/uplcom.c,v
> > retrieving revision 1.74
> > diff -u -p -u -p -r1.74 uplcom.c
> > --- uplcom.c 11 Mar 2020 13:04:02 -0000 1.74
> > +++ uplcom.c 31 Jul 2020 08:26:29 -0000
> > @@ -399,7 +399,6 @@ uplcom_detach(struct device *self, int f
> >   DPRINTF(("uplcom_detach: sc=%p flags=%d\n", sc, flags));
> >  
> >   if (sc->sc_intr_pipe != NULL) {
> > - usbd_abort_pipe(sc->sc_intr_pipe);
> >   usbd_close_pipe(sc->sc_intr_pipe);
> >   free(sc->sc_intr_buf, M_USBDEV, sc->sc_isize);
> >   sc->sc_intr_pipe = NULL;
> > @@ -708,7 +707,6 @@ uplcom_close(void *addr, int portno)
> >   DPRINTF(("uplcom_close: close\n"));
> >  
> >   if (sc->sc_intr_pipe != NULL) {
> > - usbd_abort_pipe(sc->sc_intr_pipe);
> >   err = usbd_close_pipe(sc->sc_intr_pipe);
> >   if (err)
> >   printf("%s: close interrupt pipe failed:
> > %s\n", Index: usb_subr.c
> > ===================================================================
> > RCS file: /cvs/src/sys/dev/usb/usb_subr.c,v
> > retrieving revision 1.150
> > diff -u -p -u -p -r1.150 usb_subr.c
> > --- usb_subr.c 6 Oct 2019 17:11:51 -0000 1.150
> > +++ usb_subr.c 31 Jul 2020 08:26:29 -0000
> > @@ -1403,10 +1403,8 @@ usb_free_device(struct usbd_device *dev)
> >  
> >   DPRINTF(("%s: %p\n", __func__, dev));
> >  
> > - if (dev->default_pipe != NULL) {
> > - usbd_abort_pipe(dev->default_pipe);
> > + if (dev->default_pipe != NULL)
> >   usbd_close_pipe(dev->default_pipe);
> > - }
> >   if (dev->ifaces != NULL) {
> >   nifc = dev->cdesc->bNumInterface;
> >   for (ifcidx = 0; ifcidx < nifc; ifcidx++)
> > Index: usps.c
> > ===================================================================
> > RCS file: /cvs/src/sys/dev/usb/usps.c,v
> > retrieving revision 1.9
> > diff -u -p -u -p -r1.9 usps.c
> > --- usps.c 8 Apr 2017 02:57:25 -0000 1.9
> > +++ usps.c 31 Jul 2020 08:26:29 -0000
> > @@ -297,7 +297,6 @@ usps_detach(struct device *self, int fla
> >  
> >   s = splusb();
> >   if (sc->sc_ipipe != NULL) {
> > - usbd_abort_pipe(sc->sc_ipipe);
> >   usbd_close_pipe(sc->sc_ipipe);
> >   if (sc->sc_intrbuf != NULL)
> >   free(sc->sc_intrbuf, M_USBDEV,
> > sc->sc_isize); Index: uticom.c
> > ===================================================================
> > RCS file: /cvs/src/sys/dev/usb/uticom.c,v
> > retrieving revision 1.33
> > diff -u -p -u -p -r1.33 uticom.c
> > --- uticom.c 15 Mar 2018 00:42:41 -0000 1.33
> > +++ uticom.c 31 Jul 2020 08:26:29 -0000
> > @@ -453,7 +453,6 @@ uticom_detach(struct device *self, int f
> >   }
> >  
> >   if (sc->sc_intr_pipe != NULL) {
> > - usbd_abort_pipe(sc->sc_intr_pipe);
> >   usbd_close_pipe(sc->sc_intr_pipe);
> >   free(sc->sc_intr_buf, M_USBDEV, sc->sc_isize);
> >   sc->sc_intr_pipe = NULL;
> > @@ -750,7 +749,6 @@ uticom_close(void *addr, int portno)
> >   DPRINTF(("%s: uticom_close: close\n",
> > sc->sc_dev.dv_xname));
> >   if (sc->sc_intr_pipe != NULL) {
> > - usbd_abort_pipe(sc->sc_intr_pipe);
> >   err = usbd_close_pipe(sc->sc_intr_pipe);
> >   if (err)
> >   printf("%s: close interrupt pipe failed:
> > %s\n", @@ -912,7 +910,6 @@ finish:
> >   usbd_free_buffer(oxfer);
> >   usbd_free_xfer(oxfer);
> >   oxfer = NULL;
> > - usbd_abort_pipe(pipe);
> >   usbd_close_pipe(pipe);
> >   free(buffer, M_USBDEV, buffer_size);
> >   return err;
> > Index: uts.c
> > ===================================================================
> > RCS file: /cvs/src/sys/dev/usb/uts.c,v
> > retrieving revision 1.42
> > diff -u -p -u -p -r1.42 uts.c
> > --- uts.c 6 Nov 2019 20:25:14 -0000 1.42
> > +++ uts.c 31 Jul 2020 08:26:29 -0000
> > @@ -216,7 +216,6 @@ uts_detach(struct device *self, int flag
> >   int rv = 0;
> >  
> >   if (sc->sc_intr_pipe != NULL) {
> > - usbd_abort_pipe(sc->sc_intr_pipe);
> >   usbd_close_pipe(sc->sc_intr_pipe);
> >   sc->sc_intr_pipe = NULL;
> >   }
> > @@ -288,7 +287,6 @@ uts_disable(void *v)
> >  
> >   /* Disable interrupts. */
> >   if (sc->sc_intr_pipe != NULL) {
> > - usbd_abort_pipe(sc->sc_intr_pipe);
> >   usbd_close_pipe(sc->sc_intr_pipe);
> >   sc->sc_intr_pipe = NULL;
> >   }
> > Index: utvfu.c
> > ===================================================================
> > RCS file: /cvs/src/sys/dev/usb/utvfu.c,v
> > retrieving revision 1.10
> > diff -u -p -u -p -r1.10 utvfu.c
> > --- utvfu.c 14 Oct 2019 09:20:48 -0000 1.10
> > +++ utvfu.c 31 Jul 2020 08:26:29 -0000
> > @@ -1164,7 +1164,6 @@ void
> >   utvfu_vs_close(struct utvfu_softc *sc)
> >   {
> >   if (sc->sc_iface.pipeh != NULL) {
> > - usbd_abort_pipe(sc->sc_iface.pipeh);
> >   usbd_close_pipe(sc->sc_iface.pipeh);
> >   sc->sc_iface.pipeh = NULL;
> >   }
> > Index: uvideo.c
> > ===================================================================
> > RCS file: /cvs/src/sys/dev/usb/uvideo.c,v
> > retrieving revision 1.208
> > diff -u -p -u -p -r1.208 uvideo.c
> > --- uvideo.c 5 Jul 2020 11:47:50 -0000 1.208
> > +++ uvideo.c 31 Jul 2020 08:26:29 -0000
> > @@ -1970,7 +1970,6 @@ uvideo_vs_close(struct uvideo_softc *sc)
> >   }
> >  
> >   if (sc->sc_vs_cur->pipeh) {
> > - usbd_abort_pipe(sc->sc_vs_cur->pipeh);
> >   usbd_close_pipe(sc->sc_vs_cur->pipeh);
> >   sc->sc_vs_cur->pipeh = NULL;
> >   }
> > Index: uvscom.c
> > ===================================================================
> > RCS file: /cvs/src/sys/dev/usb/uvscom.c,v
> > retrieving revision 1.38
> > diff -u -p -u -p -r1.38 uvscom.c
> > --- uvscom.c 12 Nov 2019 07:47:30 -0000 1.38
> > +++ uvscom.c 31 Jul 2020 08:26:29 -0000
> > @@ -351,7 +351,6 @@ uvscom_detach(struct device *self, int f
> >   DPRINTF(("uvscom_detach: sc = %p\n", sc));
> >  
> >   if (sc->sc_intr_pipe != NULL) {
> > - usbd_abort_pipe(sc->sc_intr_pipe);
> >   usbd_close_pipe(sc->sc_intr_pipe);
> >   free(sc->sc_intr_buf, M_USBDEV, sc->sc_isize);
> >   sc->sc_intr_pipe = NULL;
> > @@ -741,7 +740,6 @@ uvscom_close(void *addr, int portno)
> >   uvscom_shutdown(sc);
> >  
> >   if (sc->sc_intr_pipe != NULL) {
> > - usbd_abort_pipe(sc->sc_intr_pipe);
> >   err = usbd_close_pipe(sc->sc_intr_pipe);
> >   if (err)
> >   printf("%s: close interrupt pipe failed:
> > %s\n", Index: uxrcom.c
> > ===================================================================
> > RCS file: /cvs/src/sys/dev/usb/uxrcom.c,v
> > retrieving revision 1.1
> > diff -u -p -u -p -r1.1 uxrcom.c
> > --- uxrcom.c 27 Mar 2019 22:08:51 -0000 1.1
> > +++ uxrcom.c 31 Jul 2020 08:26:29 -0000
> > @@ -208,7 +208,6 @@ uxrcom_detach(struct device *self, int f
> >   int rv = 0;
> >  
> >   if (sc->sc_intr_pipe != NULL) {
> > - usbd_abort_pipe(sc->sc_intr_pipe);
> >   usbd_close_pipe(sc->sc_intr_pipe);
> >   sc->sc_intr_pipe = NULL;
> >   }
> > @@ -247,7 +246,6 @@ uxrcom_close(void *vsc, int portno)
> >   return;
> >  
> >   if (sc->sc_intr_pipe != NULL) {
> > - usbd_abort_pipe(sc->sc_intr_pipe);
> >   err = usbd_close_pipe(sc->sc_intr_pipe);
> >   if (err)
> >   printf("%s: close intr pipe failed: %s\n",
> >  
>

Reply | Threaded
Open this post in threaded view
|

Re: usbd_abort_pipe(); usbd_close_pipe; dance

Martin Pieuchot
In reply to this post by Marcus Glocker
On 31/07/20(Fri) 11:22, Marcus Glocker wrote:
> Maybe I'm missing something here.

You aren't.  Historically usbd_close_pipe() wasn't aborting transfers.
We changed it to do so as it happened to be the easiest fix to some
issues that had been copy/pasted.

It's just that nobody took the time to do the cleanup you're now
suggesting, thanks!

> But is there any specific reason why the most of our USB drivers are
> calling usbd_abort_pipe() right before usbd_close_pipe()?  Since
> usbd_close_pipe() already will call usbd_abort_pipe() if the pipe isn't
> empty, as documented in the man page:
>
> DESCRIPTION
>      The usbd_abort_pipe() function aborts any transfers queued on pipe.
>
>      The usbd_close_pipe() function aborts any transfers queued on pipe
>      then deletes it.
>
> In case this happened because of an inherited copy/paste chain, can we
> nuke the superfluous usbd_abort_pipe() calls?

Yes please, ok mpi@

> Index: if_atu.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/if_atu.c,v
> retrieving revision 1.131
> diff -u -p -u -p -r1.131 if_atu.c
> --- if_atu.c 10 Jul 2020 13:26:40 -0000 1.131
> +++ if_atu.c 31 Jul 2020 08:26:24 -0000
> @@ -2252,7 +2252,6 @@ atu_stop(struct ifnet *ifp, int disable)
>  
>   /* Stop transfers. */
>   if (sc->atu_ep[ATU_ENDPT_RX] != NULL) {
> - usbd_abort_pipe(sc->atu_ep[ATU_ENDPT_RX]);
>   err = usbd_close_pipe(sc->atu_ep[ATU_ENDPT_RX]);
>   if (err) {
>   DPRINTF(("%s: close rx pipe failed: %s\n",
> @@ -2262,7 +2261,6 @@ atu_stop(struct ifnet *ifp, int disable)
>   }
>  
>   if (sc->atu_ep[ATU_ENDPT_TX] != NULL) {
> - usbd_abort_pipe(sc->atu_ep[ATU_ENDPT_TX]);
>   err = usbd_close_pipe(sc->atu_ep[ATU_ENDPT_TX]);
>   if (err) {
>   DPRINTF(("%s: close tx pipe failed: %s\n",
> Index: if_aue.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/if_aue.c,v
> retrieving revision 1.110
> diff -u -p -u -p -r1.110 if_aue.c
> --- if_aue.c 10 Jul 2020 13:26:40 -0000 1.110
> +++ if_aue.c 31 Jul 2020 08:26:25 -0000
> @@ -1518,7 +1518,6 @@ aue_stop(struct aue_softc *sc)
>  
>   /* Stop transfers. */
>   if (sc->aue_ep[AUE_ENDPT_RX] != NULL) {
> - usbd_abort_pipe(sc->aue_ep[AUE_ENDPT_RX]);
>   err = usbd_close_pipe(sc->aue_ep[AUE_ENDPT_RX]);
>   if (err) {
>   printf("%s: close rx pipe failed: %s\n",
> @@ -1528,7 +1527,6 @@ aue_stop(struct aue_softc *sc)
>   }
>  
>   if (sc->aue_ep[AUE_ENDPT_TX] != NULL) {
> - usbd_abort_pipe(sc->aue_ep[AUE_ENDPT_TX]);
>   err = usbd_close_pipe(sc->aue_ep[AUE_ENDPT_TX]);
>   if (err) {
>   printf("%s: close tx pipe failed: %s\n",
> @@ -1538,7 +1536,6 @@ aue_stop(struct aue_softc *sc)
>   }
>  
>   if (sc->aue_ep[AUE_ENDPT_INTR] != NULL) {
> - usbd_abort_pipe(sc->aue_ep[AUE_ENDPT_INTR]);
>   err = usbd_close_pipe(sc->aue_ep[AUE_ENDPT_INTR]);
>   if (err) {
>   printf("%s: close intr pipe failed: %s\n",
> Index: if_axe.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/if_axe.c,v
> retrieving revision 1.141
> diff -u -p -u -p -r1.141 if_axe.c
> --- if_axe.c 10 Jul 2020 13:26:40 -0000 1.141
> +++ if_axe.c 31 Jul 2020 08:26:25 -0000
> @@ -1473,7 +1473,6 @@ axe_stop(struct axe_softc *sc)
>  
>   /* Stop transfers. */
>   if (sc->axe_ep[AXE_ENDPT_RX] != NULL) {
> - usbd_abort_pipe(sc->axe_ep[AXE_ENDPT_RX]);
>   err = usbd_close_pipe(sc->axe_ep[AXE_ENDPT_RX]);
>   if (err) {
>   printf("axe%d: close rx pipe failed: %s\n",
> @@ -1483,7 +1482,6 @@ axe_stop(struct axe_softc *sc)
>   }
>  
>   if (sc->axe_ep[AXE_ENDPT_TX] != NULL) {
> - usbd_abort_pipe(sc->axe_ep[AXE_ENDPT_TX]);
>   err = usbd_close_pipe(sc->axe_ep[AXE_ENDPT_TX]);
>   if (err) {
>   printf("axe%d: close tx pipe failed: %s\n",
> @@ -1493,7 +1491,6 @@ axe_stop(struct axe_softc *sc)
>   }
>  
>   if (sc->axe_ep[AXE_ENDPT_INTR] != NULL) {
> - usbd_abort_pipe(sc->axe_ep[AXE_ENDPT_INTR]);
>   err = usbd_close_pipe(sc->axe_ep[AXE_ENDPT_INTR]);
>   if (err) {
>   printf("axe%d: close intr pipe failed: %s\n",
> Index: if_axen.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/if_axen.c,v
> retrieving revision 1.29
> diff -u -p -u -p -r1.29 if_axen.c
> --- if_axen.c 10 Jul 2020 13:26:40 -0000 1.29
> +++ if_axen.c 31 Jul 2020 08:26:25 -0000
> @@ -1426,7 +1426,6 @@ axen_stop(struct axen_softc *sc)
>  
>   /* Stop transfers. */
>   if (sc->axen_ep[AXEN_ENDPT_RX] != NULL) {
> - usbd_abort_pipe(sc->axen_ep[AXEN_ENDPT_RX]);
>   err = usbd_close_pipe(sc->axen_ep[AXEN_ENDPT_RX]);
>   if (err) {
>   printf("axen%d: close rx pipe failed: %s\n",
> @@ -1436,7 +1435,6 @@ axen_stop(struct axen_softc *sc)
>   }
>  
>   if (sc->axen_ep[AXEN_ENDPT_TX] != NULL) {
> - usbd_abort_pipe(sc->axen_ep[AXEN_ENDPT_TX]);
>   err = usbd_close_pipe(sc->axen_ep[AXEN_ENDPT_TX]);
>   if (err) {
>   printf("axen%d: close tx pipe failed: %s\n",
> @@ -1446,7 +1444,6 @@ axen_stop(struct axen_softc *sc)
>   }
>  
>   if (sc->axen_ep[AXEN_ENDPT_INTR] != NULL) {
> - usbd_abort_pipe(sc->axen_ep[AXEN_ENDPT_INTR]);
>   err = usbd_close_pipe(sc->axen_ep[AXEN_ENDPT_INTR]);
>   if (err) {
>   printf("axen%d: close intr pipe failed: %s\n",
> Index: if_bwfm_usb.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/if_bwfm_usb.c,v
> retrieving revision 1.18
> diff -u -p -u -p -r1.18 if_bwfm_usb.c
> --- if_bwfm_usb.c 25 Feb 2020 14:24:58 -0000 1.18
> +++ if_bwfm_usb.c 31 Jul 2020 08:26:25 -0000
> @@ -414,12 +414,10 @@ bwfm_usb_preinit(struct bwfm_softc *bwfm
>  
>  cleanup:
>   if (sc->sc_rx_pipeh) {
> - usbd_abort_pipe(sc->sc_rx_pipeh);
>   usbd_close_pipe(sc->sc_rx_pipeh);
>   sc->sc_rx_pipeh = NULL;
>   }
>   if (sc->sc_tx_pipeh) {
> - usbd_abort_pipe(sc->sc_tx_pipeh);
>   usbd_close_pipe(sc->sc_tx_pipeh);
>   sc->sc_tx_pipeh = NULL;
>   }
> @@ -626,14 +624,10 @@ bwfm_usb_detach(struct device *self, int
>  
>   bwfm_detach(&sc->sc_sc, flags);
>  
> - if (sc->sc_rx_pipeh != NULL) {
> - usbd_abort_pipe(sc->sc_rx_pipeh);
> + if (sc->sc_rx_pipeh != NULL)
>   usbd_close_pipe(sc->sc_rx_pipeh);
> - }
> - if (sc->sc_tx_pipeh != NULL) {
> - usbd_abort_pipe(sc->sc_tx_pipeh);
> + if (sc->sc_tx_pipeh != NULL)
>   usbd_close_pipe(sc->sc_tx_pipeh);
> - }
>  
>   bwfm_usb_free_rx_list(sc);
>   bwfm_usb_free_tx_list(sc);
> @@ -743,7 +737,6 @@ bwfm_usb_load_microcode(struct bwfm_usb_
>   return 0;
>  err:
>   if (sc->sc_tx_pipeh != NULL) {
> - usbd_abort_pipe(sc->sc_tx_pipeh);
>   usbd_close_pipe(sc->sc_tx_pipeh);
>   sc->sc_tx_pipeh = NULL;
>   }
> Index: if_cdce.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/if_cdce.c,v
> retrieving revision 1.78
> diff -u -p -u -p -r1.78 if_cdce.c
> --- if_cdce.c 10 Jul 2020 13:26:40 -0000 1.78
> +++ if_cdce.c 31 Jul 2020 08:26:25 -0000
> @@ -442,7 +442,6 @@ cdce_stop(struct cdce_softc *sc)
>   ifq_clr_oactive(&ifp->if_snd);
>  
>   if (sc->cdce_bulkin_pipe != NULL) {
> - usbd_abort_pipe(sc->cdce_bulkin_pipe);
>   err = usbd_close_pipe(sc->cdce_bulkin_pipe);
>   if (err)
>   printf("%s: close rx pipe failed: %s\n",
> @@ -451,7 +450,6 @@ cdce_stop(struct cdce_softc *sc)
>   }
>  
>   if (sc->cdce_bulkout_pipe != NULL) {
> - usbd_abort_pipe(sc->cdce_bulkout_pipe);
>   err = usbd_close_pipe(sc->cdce_bulkout_pipe);
>   if (err)
>   printf("%s: close tx pipe failed: %s\n",
> @@ -460,7 +458,6 @@ cdce_stop(struct cdce_softc *sc)
>   }
>  
>   if (sc->cdce_intr_pipe != NULL) {
> - usbd_abort_pipe(sc->cdce_intr_pipe);
>   err = usbd_close_pipe(sc->cdce_intr_pipe);
>   if (err)
>   printf("%s: close interrupt pipe failed: %s\n",
> Index: if_cue.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/if_cue.c,v
> retrieving revision 1.79
> diff -u -p -u -p -r1.79 if_cue.c
> --- if_cue.c 10 Jul 2020 13:26:40 -0000 1.79
> +++ if_cue.c 31 Jul 2020 08:26:25 -0000
> @@ -1129,7 +1129,6 @@ cue_stop(struct cue_softc *sc)
>  
>   /* Stop transfers. */
>   if (sc->cue_ep[CUE_ENDPT_RX] != NULL) {
> - usbd_abort_pipe(sc->cue_ep[CUE_ENDPT_RX]);
>   err = usbd_close_pipe(sc->cue_ep[CUE_ENDPT_RX]);
>   if (err) {
>   printf("%s: close rx pipe failed: %s\n",
> @@ -1139,7 +1138,6 @@ cue_stop(struct cue_softc *sc)
>   }
>  
>   if (sc->cue_ep[CUE_ENDPT_TX] != NULL) {
> - usbd_abort_pipe(sc->cue_ep[CUE_ENDPT_TX]);
>   err = usbd_close_pipe(sc->cue_ep[CUE_ENDPT_TX]);
>   if (err) {
>   printf("%s: close tx pipe failed: %s\n",
> @@ -1149,7 +1147,6 @@ cue_stop(struct cue_softc *sc)
>   }
>  
>   if (sc->cue_ep[CUE_ENDPT_INTR] != NULL) {
> - usbd_abort_pipe(sc->cue_ep[CUE_ENDPT_INTR]);
>   err = usbd_close_pipe(sc->cue_ep[CUE_ENDPT_INTR]);
>   if (err) {
>   printf("%s: close intr pipe failed: %s\n",
> Index: if_kue.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/if_kue.c,v
> retrieving revision 1.91
> diff -u -p -u -p -r1.91 if_kue.c
> --- if_kue.c 10 Jul 2020 13:26:40 -0000 1.91
> +++ if_kue.c 31 Jul 2020 08:26:25 -0000
> @@ -1098,7 +1098,6 @@ kue_stop(struct kue_softc *sc)
>  
>   /* Stop transfers. */
>   if (sc->kue_ep[KUE_ENDPT_RX] != NULL) {
> - usbd_abort_pipe(sc->kue_ep[KUE_ENDPT_RX]);
>   err = usbd_close_pipe(sc->kue_ep[KUE_ENDPT_RX]);
>   if (err) {
>   printf("%s: close rx pipe failed: %s\n",
> @@ -1108,7 +1107,6 @@ kue_stop(struct kue_softc *sc)
>   }
>  
>   if (sc->kue_ep[KUE_ENDPT_TX] != NULL) {
> - usbd_abort_pipe(sc->kue_ep[KUE_ENDPT_TX]);
>   err = usbd_close_pipe(sc->kue_ep[KUE_ENDPT_TX]);
>   if (err) {
>   printf("%s: close tx pipe failed: %s\n",
> @@ -1118,7 +1116,6 @@ kue_stop(struct kue_softc *sc)
>   }
>  
>   if (sc->kue_ep[KUE_ENDPT_INTR] != NULL) {
> - usbd_abort_pipe(sc->kue_ep[KUE_ENDPT_INTR]);
>   err = usbd_close_pipe(sc->kue_ep[KUE_ENDPT_INTR]);
>   if (err) {
>   printf("%s: close intr pipe failed: %s\n",
> Index: if_mos.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/if_mos.c,v
> retrieving revision 1.42
> diff -u -p -u -p -r1.42 if_mos.c
> --- if_mos.c 10 Jul 2020 13:26:40 -0000 1.42
> +++ if_mos.c 31 Jul 2020 08:26:25 -0000
> @@ -1334,7 +1334,6 @@ mos_stop(struct mos_softc *sc)
>  
>   /* Stop transfers. */
>   if (sc->mos_ep[MOS_ENDPT_RX] != NULL) {
> - usbd_abort_pipe(sc->mos_ep[MOS_ENDPT_RX]);
>   err = usbd_close_pipe(sc->mos_ep[MOS_ENDPT_RX]);
>   if (err) {
>   printf("%s: close rx pipe failed: %s\n",
> @@ -1344,7 +1343,6 @@ mos_stop(struct mos_softc *sc)
>   }
>  
>   if (sc->mos_ep[MOS_ENDPT_TX] != NULL) {
> - usbd_abort_pipe(sc->mos_ep[MOS_ENDPT_TX]);
>   err = usbd_close_pipe(sc->mos_ep[MOS_ENDPT_TX]);
>   if (err) {
>   printf("%s: close tx pipe failed: %s\n",
> @@ -1354,7 +1352,6 @@ mos_stop(struct mos_softc *sc)
>   }
>  
>   if (sc->mos_ep[MOS_ENDPT_INTR] != NULL) {
> - usbd_abort_pipe(sc->mos_ep[MOS_ENDPT_INTR]);
>   err = usbd_close_pipe(sc->mos_ep[MOS_ENDPT_INTR]);
>   if (err) {
>   printf("%s: close intr pipe failed: %s\n",
> Index: if_mue.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/if_mue.c,v
> retrieving revision 1.9
> diff -u -p -u -p -r1.9 if_mue.c
> --- if_mue.c 10 Jul 2020 13:26:40 -0000 1.9
> +++ if_mue.c 31 Jul 2020 08:26:25 -0000
> @@ -1347,7 +1347,6 @@ mue_stop(struct mue_softc *sc)
>  
>   /* Stop transfers. */
>   if (sc->mue_ep[MUE_ENDPT_RX] != NULL) {
> - usbd_abort_pipe(sc->mue_ep[MUE_ENDPT_RX]);
>   err = usbd_close_pipe(sc->mue_ep[MUE_ENDPT_RX]);
>   if (err) {
>   printf("%s: close rx pipe failed: %s\n",
> @@ -1357,7 +1356,6 @@ mue_stop(struct mue_softc *sc)
>   }
>  
>   if (sc->mue_ep[MUE_ENDPT_TX] != NULL) {
> - usbd_abort_pipe(sc->mue_ep[MUE_ENDPT_TX]);
>   err = usbd_close_pipe(sc->mue_ep[MUE_ENDPT_TX]);
>   if (err) {
>   printf("%s: close tx pipe failed: %s\n",
> @@ -1367,7 +1365,6 @@ mue_stop(struct mue_softc *sc)
>   }
>  
>   if (sc->mue_ep[MUE_ENDPT_INTR] != NULL) {
> - usbd_abort_pipe(sc->mue_ep[MUE_ENDPT_INTR]);
>   err = usbd_close_pipe(sc->mue_ep[MUE_ENDPT_INTR]);
>   if (err) {
>   printf("%s: close intr pipe failed: %s\n",
> Index: if_otus.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/if_otus.c,v
> retrieving revision 1.66
> diff -u -p -u -p -r1.66 if_otus.c
> --- if_otus.c 10 Jul 2020 13:22:21 -0000 1.66
> +++ if_otus.c 31 Jul 2020 08:26:26 -0000
> @@ -555,10 +555,8 @@ otus_close_pipes(struct otus_softc *sc)
>  
>   if (sc->data_rx_pipe != NULL)
>   usbd_close_pipe(sc->data_rx_pipe);
> - if (sc->cmd_rx_pipe != NULL) {
> - usbd_abort_pipe(sc->cmd_rx_pipe);
> + if (sc->cmd_rx_pipe != NULL)
>   usbd_close_pipe(sc->cmd_rx_pipe);
> - }
>   if (sc->ibuf != NULL)
>   free(sc->ibuf, M_USBDEV, sc->ibuflen);
>   if (sc->data_tx_pipe != NULL)
> Index: if_ral.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/if_ral.c,v
> retrieving revision 1.147
> diff -u -p -u -p -r1.147 if_ral.c
> --- if_ral.c 10 Jul 2020 13:22:21 -0000 1.147
> +++ if_ral.c 31 Jul 2020 08:26:26 -0000
> @@ -348,15 +348,11 @@ ural_detach(struct device *self, int fla
>   sc->amrr_xfer = NULL;
>   }
>  
> - if (sc->sc_rx_pipeh != NULL) {
> - usbd_abort_pipe(sc->sc_rx_pipeh);
> + if (sc->sc_rx_pipeh != NULL)
>   usbd_close_pipe(sc->sc_rx_pipeh);
> - }
>  
> - if (sc->sc_tx_pipeh != NULL) {
> - usbd_abort_pipe(sc->sc_tx_pipeh);
> + if (sc->sc_tx_pipeh != NULL)
>   usbd_close_pipe(sc->sc_tx_pipeh);
> - }
>  
>   ural_free_rx_list(sc);
>   ural_free_tx_list(sc);
> @@ -2067,12 +2063,10 @@ ural_stop(struct ifnet *ifp, int disable
>   sc->amrr_xfer = NULL;
>   }
>   if (sc->sc_rx_pipeh != NULL) {
> - usbd_abort_pipe(sc->sc_rx_pipeh);
>   usbd_close_pipe(sc->sc_rx_pipeh);
>   sc->sc_rx_pipeh = NULL;
>   }
>   if (sc->sc_tx_pipeh != NULL) {
> - usbd_abort_pipe(sc->sc_tx_pipeh);
>   usbd_close_pipe(sc->sc_tx_pipeh);
>   sc->sc_tx_pipeh = NULL;
>   }
> Index: if_rsu.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/if_rsu.c,v
> retrieving revision 1.46
> diff -u -p -u -p -r1.46 if_rsu.c
> --- if_rsu.c 10 Jul 2020 13:22:21 -0000 1.46
> +++ if_rsu.c 31 Jul 2020 08:26:26 -0000
> @@ -381,7 +381,6 @@ rsu_close_pipes(struct rsu_softc *sc)
>   for (i = 0; i < sc->npipes; i++) {
>   if (sc->pipe[i] == NULL)
>   continue;
> - usbd_abort_pipe(sc->pipe[i]);
>   usbd_close_pipe(sc->pipe[i]);
>   }
>  }
> Index: if_rum.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/if_rum.c,v
> retrieving revision 1.125
> diff -u -p -u -p -r1.125 if_rum.c
> --- if_rum.c 10 Jul 2020 13:22:21 -0000 1.125
> +++ if_rum.c 31 Jul 2020 08:26:26 -0000
> @@ -441,14 +441,10 @@ rum_detach(struct device *self, int flag
>   usbd_free_xfer(sc->amrr_xfer);
>   sc->amrr_xfer = NULL;
>   }
> - if (sc->sc_rx_pipeh != NULL) {
> - usbd_abort_pipe(sc->sc_rx_pipeh);
> + if (sc->sc_rx_pipeh != NULL)
>   usbd_close_pipe(sc->sc_rx_pipeh);
> - }
> - if (sc->sc_tx_pipeh != NULL) {
> - usbd_abort_pipe(sc->sc_tx_pipeh);
> + if (sc->sc_tx_pipeh != NULL)
>   usbd_close_pipe(sc->sc_tx_pipeh);
> - }
>  
>   rum_free_rx_list(sc);
>   rum_free_tx_list(sc);
> @@ -2091,12 +2087,10 @@ rum_stop(struct ifnet *ifp, int disable)
>   sc->amrr_xfer = NULL;
>   }
>   if (sc->sc_rx_pipeh != NULL) {
> - usbd_abort_pipe(sc->sc_rx_pipeh);
>   usbd_close_pipe(sc->sc_rx_pipeh);
>   sc->sc_rx_pipeh = NULL;
>   }
>   if (sc->sc_tx_pipeh != NULL) {
> - usbd_abort_pipe(sc->sc_tx_pipeh);
>   usbd_close_pipe(sc->sc_tx_pipeh);
>   sc->sc_tx_pipeh = NULL;
>   }
> Index: if_run.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/if_run.c,v
> retrieving revision 1.129
> diff -u -p -u -p -r1.129 if_run.c
> --- if_run.c 10 Jul 2020 13:22:21 -0000 1.129
> +++ if_run.c 31 Jul 2020 08:26:27 -0000
> @@ -750,7 +750,6 @@ run_free_rx_ring(struct run_softc *sc)
>   int i;
>  
>   if (rxq->pipeh != NULL) {
> - usbd_abort_pipe(rxq->pipeh);
>   usbd_close_pipe(rxq->pipeh);
>   rxq->pipeh = NULL;
>   }
> @@ -809,7 +808,6 @@ run_free_tx_ring(struct run_softc *sc, i
>   int i;
>  
>   if (txq->pipeh != NULL) {
> - usbd_abort_pipe(txq->pipeh);
>   usbd_close_pipe(txq->pipeh);
>   txq->pipeh = NULL;
>   }
> Index: if_smsc.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/if_smsc.c,v
> retrieving revision 1.36
> diff -u -p -u -p -r1.36 if_smsc.c
> --- if_smsc.c 10 Jul 2020 13:26:40 -0000 1.36
> +++ if_smsc.c 31 Jul 2020 08:26:27 -0000
> @@ -698,7 +698,6 @@ smsc_stop(struct smsc_softc *sc)
>  
>   /* Stop transfers. */
>   if (sc->sc_ep[SMSC_ENDPT_RX] != NULL) {
> - usbd_abort_pipe(sc->sc_ep[SMSC_ENDPT_RX]);
>   err = usbd_close_pipe(sc->sc_ep[SMSC_ENDPT_RX]);
>   if (err) {
>   printf("%s: close rx pipe failed: %s\n",
> @@ -708,7 +707,6 @@ smsc_stop(struct smsc_softc *sc)
>   }
>  
>   if (sc->sc_ep[SMSC_ENDPT_TX] != NULL) {
> - usbd_abort_pipe(sc->sc_ep[SMSC_ENDPT_TX]);
>   err = usbd_close_pipe(sc->sc_ep[SMSC_ENDPT_TX]);
>   if (err) {
>   printf("%s: close tx pipe failed: %s\n",
> @@ -718,7 +716,6 @@ smsc_stop(struct smsc_softc *sc)
>   }
>  
>   if (sc->sc_ep[SMSC_ENDPT_INTR] != NULL) {
> - usbd_abort_pipe(sc->sc_ep[SMSC_ENDPT_INTR]);
>   err = usbd_close_pipe(sc->sc_ep[SMSC_ENDPT_INTR]);
>   if (err) {
>   printf("%s: close intr pipe failed: %s\n",
> Index: if_udav.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/if_udav.c,v
> retrieving revision 1.83
> diff -u -p -u -p -r1.83 if_udav.c
> --- if_udav.c 10 Jul 2020 13:26:41 -0000 1.83
> +++ if_udav.c 31 Jul 2020 08:26:27 -0000
> @@ -1226,7 +1226,6 @@ udav_stop(struct ifnet *ifp, int disable
>   /* Stop transfers */
>   /* RX endpoint */
>   if (sc->sc_pipe_rx != NULL) {
> - usbd_abort_pipe(sc->sc_pipe_rx);
>   err = usbd_close_pipe(sc->sc_pipe_rx);
>   if (err)
>   printf("%s: close rx pipe failed: %s\n",
> @@ -1236,7 +1235,6 @@ udav_stop(struct ifnet *ifp, int disable
>  
>   /* TX endpoint */
>   if (sc->sc_pipe_tx != NULL) {
> - usbd_abort_pipe(sc->sc_pipe_tx);
>   err = usbd_close_pipe(sc->sc_pipe_tx);
>   if (err)
>   printf("%s: close tx pipe failed: %s\n",
> @@ -1248,7 +1246,6 @@ udav_stop(struct ifnet *ifp, int disable
>   /* XXX: Interrupt endpoint is not yet supported!! */
>   /* Interrupt endpoint */
>   if (sc->sc_pipe_intr != NULL) {
> - usbd_abort_pipe(sc->sc_pipe_intr);
>   err = usbd_close_pipe(sc->sc_pipe_intr);
>   if (err)
>   printf("%s: close intr pipe failed: %s\n",
> Index: if_ugl.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/if_ugl.c,v
> retrieving revision 1.25
> diff -u -p -u -p -r1.25 if_ugl.c
> --- if_ugl.c 10 Jul 2020 13:26:41 -0000 1.25
> +++ if_ugl.c 31 Jul 2020 08:26:27 -0000
> @@ -817,19 +817,16 @@ ugl_stop(struct ugl_softc *sc)
>  
>   /* Stop transfers. */
>   if (sc->sc_ep[UGL_ENDPT_RX] != NULL) {
> - usbd_abort_pipe(sc->sc_ep[UGL_ENDPT_RX]);
>   usbd_close_pipe(sc->sc_ep[UGL_ENDPT_RX]);
>   sc->sc_ep[UGL_ENDPT_RX] = NULL;
>   }
>  
>   if (sc->sc_ep[UGL_ENDPT_TX] != NULL) {
> - usbd_abort_pipe(sc->sc_ep[UGL_ENDPT_TX]);
>   usbd_close_pipe(sc->sc_ep[UGL_ENDPT_TX]);
>   sc->sc_ep[UGL_ENDPT_TX] = NULL;
>   }
>  
>   if (sc->sc_ep[UGL_ENDPT_INTR] != NULL) {
> - usbd_abort_pipe(sc->sc_ep[UGL_ENDPT_INTR]);
>   usbd_close_pipe(sc->sc_ep[UGL_ENDPT_INTR]);
>   sc->sc_ep[UGL_ENDPT_INTR] = NULL;
>   }
> Index: if_upgt.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/if_upgt.c,v
> retrieving revision 1.86
> diff -u -p -u -p -r1.86 if_upgt.c
> --- if_upgt.c 10 Jul 2020 13:22:21 -0000 1.86
> +++ if_upgt.c 31 Jul 2020 08:26:27 -0000
> @@ -447,14 +447,10 @@ upgt_detach(struct device *self, int fla
>   s = splusb();
>  
>   /* abort and close TX / RX pipes */
> - if (sc->sc_tx_pipeh != NULL) {
> - usbd_abort_pipe(sc->sc_tx_pipeh);
> + if (sc->sc_tx_pipeh != NULL)
>   usbd_close_pipe(sc->sc_tx_pipeh);
> - }
> - if (sc->sc_rx_pipeh != NULL) {
> - usbd_abort_pipe(sc->sc_rx_pipeh);
> + if (sc->sc_rx_pipeh != NULL)
>   usbd_close_pipe(sc->sc_rx_pipeh);
> - }
>  
>   /* remove tasks and timeouts */
>   usb_rem_task(sc->sc_udev, &sc->sc_task_newstate);
> Index: if_upl.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/if_upl.c,v
> retrieving revision 1.77
> diff -u -p -u -p -r1.77 if_upl.c
> --- if_upl.c 10 Jul 2020 13:26:41 -0000 1.77
> +++ if_upl.c 31 Jul 2020 08:26:27 -0000
> @@ -819,7 +819,6 @@ upl_stop(struct upl_softc *sc)
>  
>   /* Stop transfers. */
>   if (sc->sc_ep[UPL_ENDPT_RX] != NULL) {
> - usbd_abort_pipe(sc->sc_ep[UPL_ENDPT_RX]);
>   err = usbd_close_pipe(sc->sc_ep[UPL_ENDPT_RX]);
>   if (err) {
>   printf("%s: close rx pipe failed: %s\n",
> @@ -829,7 +828,6 @@ upl_stop(struct upl_softc *sc)
>   }
>  
>   if (sc->sc_ep[UPL_ENDPT_TX] != NULL) {
> - usbd_abort_pipe(sc->sc_ep[UPL_ENDPT_TX]);
>   err = usbd_close_pipe(sc->sc_ep[UPL_ENDPT_TX]);
>   if (err) {
>   printf("%s: close tx pipe failed: %s\n",
> @@ -839,7 +837,6 @@ upl_stop(struct upl_softc *sc)
>   }
>  
>   if (sc->sc_ep[UPL_ENDPT_INTR] != NULL) {
> - usbd_abort_pipe(sc->sc_ep[UPL_ENDPT_INTR]);
>   err = usbd_close_pipe(sc->sc_ep[UPL_ENDPT_INTR]);
>   if (err) {
>   printf("%s: close intr pipe failed: %s\n",
> Index: if_ure.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/if_ure.c,v
> retrieving revision 1.16
> diff -u -p -u -p -r1.16 if_ure.c
> --- if_ure.c 10 Jul 2020 13:26:41 -0000 1.16
> +++ if_ure.c 31 Jul 2020 08:26:27 -0000
> @@ -825,7 +825,6 @@ ure_stop(struct ure_softc *sc)
>   sc->ure_flags &= ~URE_FLAG_LINK;
>  
>   if (sc->ure_ep[URE_ENDPT_RX] != NULL) {
> - usbd_abort_pipe(sc->ure_ep[URE_ENDPT_RX]);
>   err = usbd_close_pipe(sc->ure_ep[URE_ENDPT_RX]);
>   if (err) {
>   printf("%s: close rx pipe failed: %s\n",
> @@ -835,7 +834,6 @@ ure_stop(struct ure_softc *sc)
>   }
>  
>   if (sc->ure_ep[URE_ENDPT_TX] != NULL) {
> - usbd_abort_pipe(sc->ure_ep[URE_ENDPT_TX]);
>   err = usbd_close_pipe(sc->ure_ep[URE_ENDPT_TX]);
>   if (err) {
>   printf("%s: close tx pipe failed: %s\n",
> Index: if_url.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/if_url.c,v
> retrieving revision 1.87
> diff -u -p -u -p -r1.87 if_url.c
> --- if_url.c 10 Jul 2020 13:26:41 -0000 1.87
> +++ if_url.c 31 Jul 2020 08:26:27 -0000
> @@ -1086,7 +1086,6 @@ url_stop(struct ifnet *ifp, int disable)
>   /* Stop transfers */
>   /* RX endpoint */
>   if (sc->sc_pipe_rx != NULL) {
> - usbd_abort_pipe(sc->sc_pipe_rx);
>   err = usbd_close_pipe(sc->sc_pipe_rx);
>   if (err)
>   printf("%s: close rx pipe failed: %s\n",
> @@ -1096,7 +1095,6 @@ url_stop(struct ifnet *ifp, int disable)
>  
>   /* TX endpoint */
>   if (sc->sc_pipe_tx != NULL) {
> - usbd_abort_pipe(sc->sc_pipe_tx);
>   err = usbd_close_pipe(sc->sc_pipe_tx);
>   if (err)
>   printf("%s: close tx pipe failed: %s\n",
> @@ -1108,7 +1106,6 @@ url_stop(struct ifnet *ifp, int disable)
>   /* XXX: Interrupt endpoint is not yet supported!! */
>   /* Interrupt endpoint */
>   if (sc->sc_pipe_intr != NULL) {
> - usbd_abort_pipe(sc->sc_pipe_intr);
>   err = usbd_close_pipe(sc->sc_pipe_intr);
>   if (err)
>   printf("%s: close intr pipe failed: %s\n",
> Index: if_urndis.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/if_urndis.c,v
> retrieving revision 1.71
> diff -u -p -u -p -r1.71 if_urndis.c
> --- if_urndis.c 10 Jul 2020 13:26:41 -0000 1.71
> +++ if_urndis.c 31 Jul 2020 08:26:27 -0000
> @@ -1140,7 +1140,6 @@ urndis_stop(struct urndis_softc *sc)
>   ifq_clr_oactive(&ifp->if_snd);
>  
>   if (sc->sc_bulkin_pipe != NULL) {
> - usbd_abort_pipe(sc->sc_bulkin_pipe);
>   err = usbd_close_pipe(sc->sc_bulkin_pipe);
>   if (err)
>   printf("%s: close rx pipe failed: %s\n",
> @@ -1149,7 +1148,6 @@ urndis_stop(struct urndis_softc *sc)
>   }
>  
>   if (sc->sc_bulkout_pipe != NULL) {
> - usbd_abort_pipe(sc->sc_bulkout_pipe);
>   err = usbd_close_pipe(sc->sc_bulkout_pipe);
>   if (err)
>   printf("%s: close tx pipe failed: %s\n",
> Index: if_urtwn.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/if_urtwn.c,v
> retrieving revision 1.92
> diff -u -p -u -p -r1.92 if_urtwn.c
> --- if_urtwn.c 6 Jul 2020 10:38:54 -0000 1.92
> +++ if_urtwn.c 31 Jul 2020 08:26:28 -0000
> @@ -615,15 +615,12 @@ urtwn_close_pipes(struct urtwn_softc *sc
>   int i;
>  
>   /* Close Rx pipe. */
> - if (sc->rx_pipe != NULL) {
> - usbd_abort_pipe(sc->rx_pipe);
> + if (sc->rx_pipe != NULL)
>   usbd_close_pipe(sc->rx_pipe);
> - }
>   /* Close Tx pipes. */
>   for (i = 0; i < R92C_MAX_EPOUT; i++) {
>   if (sc->tx_pipe[i] == NULL)
>   continue;
> - usbd_abort_pipe(sc->tx_pipe[i]);
>   usbd_close_pipe(sc->tx_pipe[i]);
>   }
>  }
> Index: if_wi_usb.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/if_wi_usb.c,v
> retrieving revision 1.72
> diff -u -p -u -p -r1.72 if_wi_usb.c
> --- if_wi_usb.c 10 Jul 2020 13:26:41 -0000 1.72
> +++ if_wi_usb.c 31 Jul 2020 08:26:28 -0000
> @@ -416,7 +416,6 @@ wi_usb_detach(struct device *self, int f
>   }
>  
>   if (sc->wi_usb_ep[WI_USB_ENDPT_INTR] != NULL) {
> - usbd_abort_pipe(sc->wi_usb_ep[WI_USB_ENDPT_INTR]);
>   err =
> usbd_close_pipe(sc->wi_usb_ep[WI_USB_ENDPT_INTR]); if (err) {
>   printf("%s: close intr pipe failed: %s\n",
> @@ -425,7 +424,6 @@ wi_usb_detach(struct device *self, int f
>   sc->wi_usb_ep[WI_USB_ENDPT_INTR] = NULL;
>   }
>   if (sc->wi_usb_ep[WI_USB_ENDPT_TX] != NULL) {
> - usbd_abort_pipe(sc->wi_usb_ep[WI_USB_ENDPT_TX]);
>   err = usbd_close_pipe(sc->wi_usb_ep[WI_USB_ENDPT_TX]);
>   if (err) {
>   printf("%s: close tx pipe failed: %s\n",
> @@ -434,7 +432,6 @@ wi_usb_detach(struct device *self, int f
>   sc->wi_usb_ep[WI_USB_ENDPT_TX] = NULL;
>   }
>   if (sc->wi_usb_ep[WI_USB_ENDPT_RX] != NULL) {
> - usbd_abort_pipe(sc->wi_usb_ep[WI_USB_ENDPT_RX]);
>   err = usbd_close_pipe(sc->wi_usb_ep[WI_USB_ENDPT_RX]);
>   if (err) {
>   printf("%s: close rx pipe failed: %s\n",
> Index: if_zyd.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/if_zyd.c,v
> retrieving revision 1.124
> diff -u -p -u -p -r1.124 if_zyd.c
> --- if_zyd.c 10 Jul 2020 13:22:21 -0000 1.124
> +++ if_zyd.c 31 Jul 2020 08:26:28 -0000
> @@ -518,7 +518,6 @@ zyd_close_pipes(struct zyd_softc *sc)
>  
>   for (i = 0; i < ZYD_ENDPT_CNT; i++) {
>   if (sc->zyd_ep[i] != NULL) {
> - usbd_abort_pipe(sc->zyd_ep[i]);
>   usbd_close_pipe(sc->zyd_ep[i]);
>   sc->zyd_ep[i] = NULL;
>   }
> Index: ubcmtp.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/ubcmtp.c,v
> retrieving revision 1.20
> diff -u -p -u -p -r1.20 ubcmtp.c
> --- ubcmtp.c 27 May 2019 15:50:26 -0000 1.20
> +++ ubcmtp.c 31 Jul 2020 08:26:28 -0000
> @@ -583,12 +583,10 @@ ubcmtp_disable(void *v)
>   ubcmtp_raw_mode(sc, 0);
>  
>   if (sc->sc_tp_pipe != NULL) {
> - usbd_abort_pipe(sc->sc_tp_pipe);
>   usbd_close_pipe(sc->sc_tp_pipe);
>   sc->sc_tp_pipe = NULL;
>   }
>   if (sc->sc_bt_pipe != NULL) {
> - usbd_abort_pipe(sc->sc_bt_pipe);
>   usbd_close_pipe(sc->sc_bt_pipe);
>   sc->sc_bt_pipe = NULL;
>   }
> @@ -773,17 +771,13 @@ ubcmtp_setup_pipes(struct ubcmtp_softc *
>   return (0);
>  
>  fail2:
> - if (sc->sc_tp_pipe != NULL) {
> - usbd_abort_pipe(sc->sc_tp_pipe);
> + if (sc->sc_tp_pipe != NULL)
>   usbd_close_pipe(sc->sc_tp_pipe);
> - }
>   if (sc->tp_pkt != NULL)
>   free(sc->tp_pkt, M_USBDEV, sc->tp_maxlen);
>  fail1:
> - if (sc->sc_bt_pipe != NULL) {
> - usbd_abort_pipe(sc->sc_bt_pipe);
> + if (sc->sc_bt_pipe != NULL)
>   usbd_close_pipe(sc->sc_bt_pipe);
> - }
>   if (sc->bt_pkt != NULL)
>   free(sc->bt_pkt, M_USBDEV, sc->bt_maxlen);
>  
> Index: ubsa.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/ubsa.c,v
> retrieving revision 1.66
> diff -u -p -u -p -r1.66 ubsa.c
> --- ubsa.c 27 Apr 2018 08:08:06 -0000 1.66
> +++ ubsa.c 31 Jul 2020 08:26:28 -0000
> @@ -367,7 +367,6 @@ ubsa_detach(struct device *self, int fla
>   DPRINTF(("ubsa_detach: sc = %p\n", sc));
>  
>   if (sc->sc_intr_pipe != NULL) {
> - usbd_abort_pipe(sc->sc_intr_pipe);
>   usbd_close_pipe(sc->sc_intr_pipe);
>   free(sc->sc_intr_buf, M_USBDEV, sc->sc_isize);
>   sc->sc_intr_pipe = NULL;
> @@ -621,7 +620,6 @@ ubsa_close(void *addr, int portno)
>   DPRINTF(("ubsa_close: close\n"));
>  
>   if (sc->sc_intr_pipe != NULL) {
> - usbd_abort_pipe(sc->sc_intr_pipe);
>   err = usbd_close_pipe(sc->sc_intr_pipe);
>   if (err)
>   printf("%s: close interrupt pipe failed: %s\n",
> Index: uchcom.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/uchcom.c,v
> retrieving revision 1.27
> diff -u -p -u -p -r1.27 uchcom.c
> --- uchcom.c 8 Apr 2017 02:57:25 -0000 1.27
> +++ uchcom.c 31 Jul 2020 08:26:28 -0000
> @@ -794,7 +794,6 @@ uchcom_close_intr_pipe(struct uchcom_sof
>   usbd_status err;
>  
>   if (sc->sc_intr_pipe != NULL) {
> - usbd_abort_pipe(sc->sc_intr_pipe);
>   err = usbd_close_pipe(sc->sc_intr_pipe);
>   if (err)
>   printf("%s: close interrupt pipe failed: %s\n",
> Index: ucom.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/ucom.c,v
> retrieving revision 1.70
> diff -u -p -u -p -r1.70 ucom.c
> --- ucom.c 8 Mar 2020 19:24:15 -0000 1.70
> +++ ucom.c 31 Jul 2020 08:26:28 -0000
> @@ -217,12 +217,10 @@ ucom_detach(struct device *self, int fla
>   sc, flags, tp, sc->sc_bulkin_no, sc->sc_bulkout_no));
>  
>   if (sc->sc_bulkin_pipe != NULL) {
> - usbd_abort_pipe(sc->sc_bulkin_pipe);
>   usbd_close_pipe(sc->sc_bulkin_pipe);
>   sc->sc_bulkin_pipe = NULL;
>   }
>   if (sc->sc_bulkout_pipe != NULL) {
> - usbd_abort_pipe(sc->sc_bulkout_pipe);
>   usbd_close_pipe(sc->sc_bulkout_pipe);
>   sc->sc_bulkout_pipe = NULL;
>   }
> @@ -1196,12 +1194,10 @@ ucom_cleanup(struct ucom_softc *sc)
>  
>   ucom_shutdown(sc);
>   if (sc->sc_bulkin_pipe != NULL) {
> - usbd_abort_pipe(sc->sc_bulkin_pipe);
>   usbd_close_pipe(sc->sc_bulkin_pipe);
>   sc->sc_bulkin_pipe = NULL;
>   }
>   if (sc->sc_bulkout_pipe != NULL) {
> - usbd_abort_pipe(sc->sc_bulkout_pipe);
>   usbd_close_pipe(sc->sc_bulkout_pipe);
>   sc->sc_bulkout_pipe = NULL;
>   }
> Index: udl.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/udl.c,v
> retrieving revision 1.93
> diff -u -p -u -p -r1.93 udl.c
> --- udl.c 25 May 2020 09:55:49 -0000 1.93
> +++ udl.c 31 Jul 2020 08:26:28 -0000
> @@ -438,10 +438,8 @@ udl_detach(struct device *self, int flag
>   /*
>   * Close bulk TX pipe.
>   */
> - if (sc->sc_tx_pipeh != NULL) {
> - usbd_abort_pipe(sc->sc_tx_pipeh);
> + if (sc->sc_tx_pipeh != NULL)
>   usbd_close_pipe(sc->sc_tx_pipeh);
> - }
>  
>   /*
>   * Free command buffer.
> Index: uhidev.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/uhidev.c,v
> retrieving revision 1.79
> diff -u -p -u -p -r1.79 uhidev.c
> --- uhidev.c 22 Feb 2020 14:01:34 -0000 1.79
> +++ uhidev.c 31 Jul 2020 08:26:28 -0000
> @@ -394,13 +394,11 @@ uhidev_detach(struct device *self, int f
>   DPRINTF(("uhidev_detach: sc=%p flags=%d\n", sc, flags));
>  
>   if (sc->sc_opipe != NULL) {
> - usbd_abort_pipe(sc->sc_opipe);
>   usbd_close_pipe(sc->sc_opipe);
>   sc->sc_opipe = NULL;
>   }
>  
>   if (sc->sc_ipipe != NULL) {
> - usbd_abort_pipe(sc->sc_ipipe);
>   usbd_close_pipe(sc->sc_ipipe);
>   sc->sc_ipipe = NULL;
>   }
> @@ -608,13 +606,11 @@ uhidev_close(struct uhidev *scd)
>  
>   /* Disable interrupts. */
>   if (sc->sc_opipe != NULL) {
> - usbd_abort_pipe(sc->sc_opipe);
>   usbd_close_pipe(sc->sc_opipe);
>   sc->sc_opipe = NULL;
>   }
>  
>   if (sc->sc_ipipe != NULL) {
> - usbd_abort_pipe(sc->sc_ipipe);
>   usbd_close_pipe(sc->sc_ipipe);
>   sc->sc_ipipe = NULL;
>   }
> Index: uhub.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/uhub.c,v
> retrieving revision 1.94
> diff -u -p -u -p -r1.94 uhub.c
> --- uhub.c 16 Mar 2020 13:17:17 -0000 1.94
> +++ uhub.c 31 Jul 2020 08:26:28 -0000
> @@ -456,7 +456,6 @@ uhub_detach(struct device *self, int fla
>   if (hub == NULL) /* Must be partially working */
>   return (0);
>  
> - usbd_abort_pipe(sc->sc_ipipe);
>   usbd_close_pipe(sc->sc_ipipe);
>  
>   for (port = 0; port < hub->nports; port++) {
> Index: ulpt.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/ulpt.c,v
> retrieving revision 1.56
> diff -u -p -u -p -r1.56 ulpt.c
> --- ulpt.c 8 Jan 2020 12:57:35 -0000 1.56
> +++ ulpt.c 31 Jul 2020 08:26:28 -0000
> @@ -575,7 +575,6 @@ ulptclose(dev_t dev, int flag, int mode,
>   sc->sc_out_pipe = NULL;
>   }
>   if (sc->sc_in_pipe != NULL) {
> - usbd_abort_pipe(sc->sc_in_pipe);
>   usbd_close_pipe(sc->sc_in_pipe);
>   sc->sc_in_pipe = NULL;
>   if (sc->sc_in_xfer1 != NULL) {
> Index: umbg.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/umbg.c,v
> retrieving revision 1.26
> diff -u -p -u -p -r1.26 umbg.c
> --- umbg.c 22 Mar 2019 12:04:25 -0000 1.26
> +++ umbg.c 31 Jul 2020 08:26:28 -0000
> @@ -299,7 +299,6 @@ umbg_detach(struct device *self, int fla
>   usb_rem_task(sc->sc_udev, &sc->sc_task);
>  
>   if (sc->sc_bulkin_pipe != NULL) {
> - usbd_abort_pipe(sc->sc_bulkin_pipe);
>   err = usbd_close_pipe(sc->sc_bulkin_pipe);
>   if (err)
>   printf("%s: close rx pipe failed: %s\n",
> @@ -307,7 +306,6 @@ umbg_detach(struct device *self, int fla
>   sc->sc_bulkin_pipe = NULL;
>   }
>   if (sc->sc_bulkout_pipe != NULL) {
> - usbd_abort_pipe(sc->sc_bulkout_pipe);
>   err = usbd_close_pipe(sc->sc_bulkout_pipe);
>   if (err)
>   printf("%s: close tx pipe failed: %s\n",
> Index: umcs.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/umcs.c,v
> retrieving revision 1.7
> diff -u -p -u -p -r1.7 umcs.c
> --- umcs.c 17 Mar 2020 09:34:52 -0000 1.7
> +++ umcs.c 31 Jul 2020 08:26:28 -0000
> @@ -471,7 +471,6 @@ umcs_detach(struct device *self, int fla
>   task_del(systq, &sc->sc_status_task);
>  
>   if (sc->sc_ipipe != NULL) {
> - usbd_abort_pipe(sc->sc_ipipe);
>   usbd_close_pipe(sc->sc_ipipe);
>   sc->sc_ipipe = NULL;
>   }
> Index: umct.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/umct.c,v
> retrieving revision 1.47
> diff -u -p -u -p -r1.47 umct.c
> --- umct.c 30 Dec 2017 20:47:00 -0000 1.47
> +++ umct.c 31 Jul 2020 08:26:28 -0000
> @@ -295,7 +295,6 @@ umct_detach(struct device *self, int fla
>   DPRINTF(("umct_detach: sc=%p flags=%d\n", sc, flags));
>  
>          if (sc->sc_intr_pipe != NULL) {
> -                usbd_abort_pipe(sc->sc_intr_pipe);
>                  usbd_close_pipe(sc->sc_intr_pipe);
>   free(sc->sc_intr_buf, M_USBDEV, sc->sc_isize);
>                  sc->sc_intr_pipe = NULL;
> @@ -552,7 +551,6 @@ umct_close(void *addr, int portno)
>   DPRINTF(("umct_close: close\n"));
>  
>   if (sc->sc_intr_pipe != NULL) {
> - usbd_abort_pipe(sc->sc_intr_pipe);
>   err = usbd_close_pipe(sc->sc_intr_pipe);
>   if (err)
>   printf("%s: close interrupt pipe failed: %s\n",
> Index: umidi.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/umidi.c,v
> retrieving revision 1.53
> diff -u -p -u -p -r1.53 umidi.c
> --- umidi.c 16 Mar 2020 16:12:43 -0000 1.53
> +++ umidi.c 31 Jul 2020 08:26:28 -0000
> @@ -367,7 +367,6 @@ static void
>  free_pipe(struct umidi_endpoint *ep)
>  {
>   DPRINTF(("%s: %s %p\n", ep->sc->sc_dev.dv_xname, __func__,
> ep));
> - usbd_abort_pipe(ep->pipe);
>   usbd_close_pipe(ep->pipe);
>   usbd_free_xfer(ep->xfer);
>  }
> Index: umodem.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/umodem.c,v
> retrieving revision 1.65
> diff -u -p -u -p -r1.65 umodem.c
> --- umodem.c 22 Feb 2020 14:01:35 -0000 1.65
> +++ umodem.c 31 Jul 2020 08:26:28 -0000
> @@ -424,7 +424,6 @@ umodem_close(void *addr, int portno)
>   DPRINTF(("umodem_close: sc=%p\n", sc));
>  
>   if (sc->sc_notify_pipe != NULL) {
> - usbd_abort_pipe(sc->sc_notify_pipe);
>   err = usbd_close_pipe(sc->sc_notify_pipe);
>   if (err)
>   printf("%s: close notify pipe failed: %s\n",
> @@ -702,7 +701,6 @@ umodem_detach(struct device *self, int f
>   DPRINTF(("umodem_detach: sc=%p flags=%d\n", sc, flags));
>  
>   if (sc->sc_notify_pipe != NULL) {
> - usbd_abort_pipe(sc->sc_notify_pipe);
>   usbd_close_pipe(sc->sc_notify_pipe);
>   sc->sc_notify_pipe = NULL;
>   }
> Index: umsm.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/umsm.c,v
> retrieving revision 1.117
> diff -u -p -u -p -r1.117 umsm.c
> --- umsm.c 5 Feb 2020 16:01:32 -0000 1.117
> +++ umsm.c 31 Jul 2020 08:26:29 -0000
> @@ -440,7 +440,6 @@ umsm_detach(struct device *self, int fla
>  
>   /* close the interrupt endpoint if that is opened */
>   if (sc->sc_intr_pipe != NULL) {
> - usbd_abort_pipe(sc->sc_intr_pipe);
>   usbd_close_pipe(sc->sc_intr_pipe);
>   free(sc->sc_intr_buf, M_USBDEV, sc->sc_isize);
>   sc->sc_intr_pipe = NULL;
> @@ -496,7 +495,6 @@ umsm_close(void *addr, int portno)
>   return;
>  
>   if (sc->sc_intr_pipe != NULL) {
> - usbd_abort_pipe(sc->sc_intr_pipe);
>   err = usbd_close_pipe(sc->sc_intr_pipe);
>   if (err)
>   printf("%s: close interrupt pipe failed: %s\n",
> Index: uow.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/uow.c,v
> retrieving revision 1.36
> diff -u -p -u -p -r1.36 uow.c
> --- uow.c 4 Jan 2020 11:36:05 -0000 1.36
> +++ uow.c 31 Jul 2020 08:26:29 -0000
> @@ -245,18 +245,12 @@ uow_detach(struct device *self, int flag
>  
>   s = splusb();
>  
> - if (sc->sc_ph_ibulk != NULL) {
> - usbd_abort_pipe(sc->sc_ph_ibulk);
> + if (sc->sc_ph_ibulk != NULL)
>   usbd_close_pipe(sc->sc_ph_ibulk);
> - }
> - if (sc->sc_ph_obulk != NULL) {
> - usbd_abort_pipe(sc->sc_ph_obulk);
> + if (sc->sc_ph_obulk != NULL)
>   usbd_close_pipe(sc->sc_ph_obulk);
> - }
> - if (sc->sc_ph_intr != NULL) {
> - usbd_abort_pipe(sc->sc_ph_intr);
> + if (sc->sc_ph_intr != NULL)
>   usbd_close_pipe(sc->sc_ph_intr);
> - }
>  
>   if (sc->sc_xfer_in != NULL)
>   usbd_free_xfer(sc->sc_xfer_in);
> Index: uplcom.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/uplcom.c,v
> retrieving revision 1.74
> diff -u -p -u -p -r1.74 uplcom.c
> --- uplcom.c 11 Mar 2020 13:04:02 -0000 1.74
> +++ uplcom.c 31 Jul 2020 08:26:29 -0000
> @@ -399,7 +399,6 @@ uplcom_detach(struct device *self, int f
>   DPRINTF(("uplcom_detach: sc=%p flags=%d\n", sc, flags));
>  
>   if (sc->sc_intr_pipe != NULL) {
> - usbd_abort_pipe(sc->sc_intr_pipe);
>   usbd_close_pipe(sc->sc_intr_pipe);
>   free(sc->sc_intr_buf, M_USBDEV, sc->sc_isize);
>   sc->sc_intr_pipe = NULL;
> @@ -708,7 +707,6 @@ uplcom_close(void *addr, int portno)
>   DPRINTF(("uplcom_close: close\n"));
>  
>   if (sc->sc_intr_pipe != NULL) {
> - usbd_abort_pipe(sc->sc_intr_pipe);
>   err = usbd_close_pipe(sc->sc_intr_pipe);
>   if (err)
>   printf("%s: close interrupt pipe failed: %s\n",
> Index: usb_subr.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/usb_subr.c,v
> retrieving revision 1.150
> diff -u -p -u -p -r1.150 usb_subr.c
> --- usb_subr.c 6 Oct 2019 17:11:51 -0000 1.150
> +++ usb_subr.c 31 Jul 2020 08:26:29 -0000
> @@ -1403,10 +1403,8 @@ usb_free_device(struct usbd_device *dev)
>  
>   DPRINTF(("%s: %p\n", __func__, dev));
>  
> - if (dev->default_pipe != NULL) {
> - usbd_abort_pipe(dev->default_pipe);
> + if (dev->default_pipe != NULL)
>   usbd_close_pipe(dev->default_pipe);
> - }
>   if (dev->ifaces != NULL) {
>   nifc = dev->cdesc->bNumInterface;
>   for (ifcidx = 0; ifcidx < nifc; ifcidx++)
> Index: usps.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/usps.c,v
> retrieving revision 1.9
> diff -u -p -u -p -r1.9 usps.c
> --- usps.c 8 Apr 2017 02:57:25 -0000 1.9
> +++ usps.c 31 Jul 2020 08:26:29 -0000
> @@ -297,7 +297,6 @@ usps_detach(struct device *self, int fla
>  
>   s = splusb();
>   if (sc->sc_ipipe != NULL) {
> - usbd_abort_pipe(sc->sc_ipipe);
>   usbd_close_pipe(sc->sc_ipipe);
>   if (sc->sc_intrbuf != NULL)
>   free(sc->sc_intrbuf, M_USBDEV, sc->sc_isize);
> Index: uticom.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/uticom.c,v
> retrieving revision 1.33
> diff -u -p -u -p -r1.33 uticom.c
> --- uticom.c 15 Mar 2018 00:42:41 -0000 1.33
> +++ uticom.c 31 Jul 2020 08:26:29 -0000
> @@ -453,7 +453,6 @@ uticom_detach(struct device *self, int f
>   }
>  
>   if (sc->sc_intr_pipe != NULL) {
> - usbd_abort_pipe(sc->sc_intr_pipe);
>   usbd_close_pipe(sc->sc_intr_pipe);
>   free(sc->sc_intr_buf, M_USBDEV, sc->sc_isize);
>   sc->sc_intr_pipe = NULL;
> @@ -750,7 +749,6 @@ uticom_close(void *addr, int portno)
>   DPRINTF(("%s: uticom_close: close\n", sc->sc_dev.dv_xname));
>  
>   if (sc->sc_intr_pipe != NULL) {
> - usbd_abort_pipe(sc->sc_intr_pipe);
>   err = usbd_close_pipe(sc->sc_intr_pipe);
>   if (err)
>   printf("%s: close interrupt pipe failed: %s\n",
> @@ -912,7 +910,6 @@ finish:
>   usbd_free_buffer(oxfer);
>   usbd_free_xfer(oxfer);
>   oxfer = NULL;
> - usbd_abort_pipe(pipe);
>   usbd_close_pipe(pipe);
>   free(buffer, M_USBDEV, buffer_size);
>   return err;
> Index: uts.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/uts.c,v
> retrieving revision 1.42
> diff -u -p -u -p -r1.42 uts.c
> --- uts.c 6 Nov 2019 20:25:14 -0000 1.42
> +++ uts.c 31 Jul 2020 08:26:29 -0000
> @@ -216,7 +216,6 @@ uts_detach(struct device *self, int flag
>   int rv = 0;
>  
>   if (sc->sc_intr_pipe != NULL) {
> - usbd_abort_pipe(sc->sc_intr_pipe);
>   usbd_close_pipe(sc->sc_intr_pipe);
>   sc->sc_intr_pipe = NULL;
>   }
> @@ -288,7 +287,6 @@ uts_disable(void *v)
>  
>   /* Disable interrupts. */
>   if (sc->sc_intr_pipe != NULL) {
> - usbd_abort_pipe(sc->sc_intr_pipe);
>   usbd_close_pipe(sc->sc_intr_pipe);
>   sc->sc_intr_pipe = NULL;
>   }
> Index: utvfu.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/utvfu.c,v
> retrieving revision 1.10
> diff -u -p -u -p -r1.10 utvfu.c
> --- utvfu.c 14 Oct 2019 09:20:48 -0000 1.10
> +++ utvfu.c 31 Jul 2020 08:26:29 -0000
> @@ -1164,7 +1164,6 @@ void
>  utvfu_vs_close(struct utvfu_softc *sc)
>  {
>   if (sc->sc_iface.pipeh != NULL) {
> - usbd_abort_pipe(sc->sc_iface.pipeh);
>   usbd_close_pipe(sc->sc_iface.pipeh);
>   sc->sc_iface.pipeh = NULL;
>   }
> Index: uvideo.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/uvideo.c,v
> retrieving revision 1.208
> diff -u -p -u -p -r1.208 uvideo.c
> --- uvideo.c 5 Jul 2020 11:47:50 -0000 1.208
> +++ uvideo.c 31 Jul 2020 08:26:29 -0000
> @@ -1970,7 +1970,6 @@ uvideo_vs_close(struct uvideo_softc *sc)
>   }
>  
>   if (sc->sc_vs_cur->pipeh) {
> - usbd_abort_pipe(sc->sc_vs_cur->pipeh);
>   usbd_close_pipe(sc->sc_vs_cur->pipeh);
>   sc->sc_vs_cur->pipeh = NULL;
>   }
> Index: uvscom.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/uvscom.c,v
> retrieving revision 1.38
> diff -u -p -u -p -r1.38 uvscom.c
> --- uvscom.c 12 Nov 2019 07:47:30 -0000 1.38
> +++ uvscom.c 31 Jul 2020 08:26:29 -0000
> @@ -351,7 +351,6 @@ uvscom_detach(struct device *self, int f
>   DPRINTF(("uvscom_detach: sc = %p\n", sc));
>  
>   if (sc->sc_intr_pipe != NULL) {
> - usbd_abort_pipe(sc->sc_intr_pipe);
>   usbd_close_pipe(sc->sc_intr_pipe);
>   free(sc->sc_intr_buf, M_USBDEV, sc->sc_isize);
>   sc->sc_intr_pipe = NULL;
> @@ -741,7 +740,6 @@ uvscom_close(void *addr, int portno)
>   uvscom_shutdown(sc);
>  
>   if (sc->sc_intr_pipe != NULL) {
> - usbd_abort_pipe(sc->sc_intr_pipe);
>   err = usbd_close_pipe(sc->sc_intr_pipe);
>   if (err)
>   printf("%s: close interrupt pipe failed: %s\n",
> Index: uxrcom.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/uxrcom.c,v
> retrieving revision 1.1
> diff -u -p -u -p -r1.1 uxrcom.c
> --- uxrcom.c 27 Mar 2019 22:08:51 -0000 1.1
> +++ uxrcom.c 31 Jul 2020 08:26:29 -0000
> @@ -208,7 +208,6 @@ uxrcom_detach(struct device *self, int f
>   int rv = 0;
>  
>   if (sc->sc_intr_pipe != NULL) {
> - usbd_abort_pipe(sc->sc_intr_pipe);
>   usbd_close_pipe(sc->sc_intr_pipe);
>   sc->sc_intr_pipe = NULL;
>   }
> @@ -247,7 +246,6 @@ uxrcom_close(void *vsc, int portno)
>   return;
>  
>   if (sc->sc_intr_pipe != NULL) {
> - usbd_abort_pipe(sc->sc_intr_pipe);
>   err = usbd_close_pipe(sc->sc_intr_pipe);
>   if (err)
>   printf("%s: close intr pipe failed: %s\n",
>