diff options
author | 2020-02-22 14:01:34 +0000 | |
---|---|---|
committer | 2020-02-22 14:01:34 +0000 | |
commit | f74c7769a68bba41fa7e7e634d34d8293035557a (patch) | |
tree | 1a46f4d33110a2ad8096b99d4ada6d44acdac8c5 | |
parent | regen (diff) | |
download | wireguard-openbsd-f74c7769a68bba41fa7e7e634d34d8293035557a.tar.xz wireguard-openbsd-f74c7769a68bba41fa7e7e634d34d8293035557a.zip |
use the UE_GET_XFERTYPE macro where applicable
ok mpi@
-rw-r--r-- | sys/dev/usb/ehci.c | 6 | ||||
-rw-r--r-- | sys/dev/usb/if_udav.c | 8 | ||||
-rw-r--r-- | sys/dev/usb/if_url.c | 8 | ||||
-rw-r--r-- | sys/dev/usb/ohci.c | 4 | ||||
-rw-r--r-- | sys/dev/usb/uftdi.c | 4 | ||||
-rw-r--r-- | sys/dev/usb/ugen.c | 16 | ||||
-rw-r--r-- | sys/dev/usb/uhci.c | 4 | ||||
-rw-r--r-- | sys/dev/usb/uhidev.c | 8 | ||||
-rw-r--r-- | sys/dev/usb/uhub.c | 4 | ||||
-rw-r--r-- | sys/dev/usb/uipaq.c | 6 | ||||
-rw-r--r-- | sys/dev/usb/umass.c | 8 | ||||
-rw-r--r-- | sys/dev/usb/umodem.c | 8 | ||||
-rw-r--r-- | sys/dev/usb/usbdi.c | 4 | ||||
-rw-r--r-- | sys/dev/usb/uvisor.c | 4 | ||||
-rw-r--r-- | sys/dev/usb/xhci.c | 4 |
15 files changed, 48 insertions, 48 deletions
diff --git a/sys/dev/usb/ehci.c b/sys/dev/usb/ehci.c index a142c638b33..ddde2796409 100644 --- a/sys/dev/usb/ehci.c +++ b/sys/dev/usb/ehci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ehci.c,v 1.205 2019/10/08 11:07:16 mpi Exp $ */ +/* $OpenBSD: ehci.c,v 1.206 2020/02/22 14:01:34 jasper Exp $ */ /* $NetBSD: ehci.c,v 1.66 2004/06/30 03:11:56 mycroft Exp $ */ /* @@ -1354,7 +1354,7 @@ ehci_open(struct usbd_pipe *pipe) struct ehci_softc *sc = (struct ehci_softc *)dev->bus; usb_endpoint_descriptor_t *ed = pipe->endpoint->edesc; u_int8_t addr = dev->address; - u_int8_t xfertype = ed->bmAttributes & UE_XFERTYPE; + u_int8_t xfertype = UE_GET_XFERTYPE(ed->bmAttributes); struct ehci_pipe *epipe = (struct ehci_pipe *)pipe; struct ehci_soft_qh *sqh; usbd_status err; @@ -2356,7 +2356,7 @@ ehci_alloc_sqtd_chain(struct ehci_softc *sc, u_int alen, struct usbd_xfer *xfer, DPRINTFN(alen<4*4096,("ehci_alloc_sqtd_chain: start len=%d\n", alen)); len = alen; - iscontrol = (xfer->pipe->endpoint->edesc->bmAttributes & UE_XFERTYPE) == + iscontrol = UE_GET_XFERTYPE(xfer->pipe->endpoint->edesc->bmAttributes) == UE_CONTROL; dataphys = DMAADDR(dma, 0); diff --git a/sys/dev/usb/if_udav.c b/sys/dev/usb/if_udav.c index 941e81870ec..85623a64bc9 100644 --- a/sys/dev/usb/if_udav.c +++ b/sys/dev/usb/if_udav.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_udav.c,v 1.81 2018/10/02 19:49:10 stsp Exp $ */ +/* $OpenBSD: if_udav.c,v 1.82 2020/02/22 14:01:34 jasper Exp $ */ /* $NetBSD: if_udav.c,v 1.3 2004/04/23 17:25:25 itojun Exp $ */ /* $nabe: if_udav.c,v 1.3 2003/08/21 16:57:19 nabe Exp $ */ /* @@ -213,13 +213,13 @@ udav_attach(struct device *parent, struct device *self, void *aux) printf("couldn't get endpoint %d\n", i); goto bad; } - if ((ed->bmAttributes & UE_XFERTYPE) == UE_BULK && + if (UE_GET_XFERTYPE(ed->bmAttributes) == UE_BULK && UE_GET_DIR(ed->bEndpointAddress) == UE_DIR_IN) sc->sc_bulkin_no = ed->bEndpointAddress; /* RX */ - else if ((ed->bmAttributes & UE_XFERTYPE) == UE_BULK && + else if (UE_GET_XFERTYPE(ed->bmAttributes) == UE_BULK && UE_GET_DIR(ed->bEndpointAddress) == UE_DIR_OUT) sc->sc_bulkout_no = ed->bEndpointAddress; /* TX */ - else if ((ed->bmAttributes & UE_XFERTYPE) == UE_INTERRUPT && + else if (UE_GET_XFERTYPE(ed->bmAttributes) == UE_INTERRUPT && UE_GET_DIR(ed->bEndpointAddress) == UE_DIR_IN) sc->sc_intrin_no = ed->bEndpointAddress; /* Status */ } diff --git a/sys/dev/usb/if_url.c b/sys/dev/usb/if_url.c index 4e5bad338ee..26e7d618148 100644 --- a/sys/dev/usb/if_url.c +++ b/sys/dev/usb/if_url.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_url.c,v 1.85 2020/01/05 08:58:25 jsg Exp $ */ +/* $OpenBSD: if_url.c,v 1.86 2020/02/22 14:01:34 jasper Exp $ */ /* $NetBSD: if_url.c,v 1.6 2002/09/29 10:19:21 martin Exp $ */ /* * Copyright (c) 2001, 2002 @@ -215,13 +215,13 @@ url_attach(struct device *parent, struct device *self, void *aux) printf("%s: couldn't get endpoint %d\n", devname, i); goto bad; } - if ((ed->bmAttributes & UE_XFERTYPE) == UE_BULK && + if (UE_GET_XFERTYPE(ed->bmAttributes) == UE_BULK && UE_GET_DIR(ed->bEndpointAddress) == UE_DIR_IN) sc->sc_bulkin_no = ed->bEndpointAddress; /* RX */ - else if ((ed->bmAttributes & UE_XFERTYPE) == UE_BULK && + else if (UE_GET_XFERTYPE(ed->bmAttributes) == UE_BULK && UE_GET_DIR(ed->bEndpointAddress) == UE_DIR_OUT) sc->sc_bulkout_no = ed->bEndpointAddress; /* TX */ - else if ((ed->bmAttributes & UE_XFERTYPE) == UE_INTERRUPT && + else if (UE_GET_XFERTYPE(ed->bmAttributes) == UE_INTERRUPT && UE_GET_DIR(ed->bEndpointAddress) == UE_DIR_IN) sc->sc_intrin_no = ed->bEndpointAddress; /* Status */ } diff --git a/sys/dev/usb/ohci.c b/sys/dev/usb/ohci.c index 5f2d14937f9..ad3a9811a9c 100644 --- a/sys/dev/usb/ohci.c +++ b/sys/dev/usb/ohci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ohci.c,v 1.157 2019/11/27 11:16:59 mpi Exp $ */ +/* $OpenBSD: ohci.c,v 1.158 2020/02/22 14:01:34 jasper Exp $ */ /* $NetBSD: ohci.c,v 1.139 2003/02/22 05:24:16 tsutsui Exp $ */ /* $FreeBSD: src/sys/dev/usb/ohci.c,v 1.22 1999/11/17 22:33:40 n_hibma Exp $ */ @@ -1866,7 +1866,7 @@ ohci_open(struct usbd_pipe *pipe) struct ohci_softc *sc = (struct ohci_softc *)pipe->device->bus; usb_endpoint_descriptor_t *ed = pipe->endpoint->edesc; struct ohci_pipe *opipe = (struct ohci_pipe *)pipe; - u_int8_t xfertype = ed->bmAttributes & UE_XFERTYPE; + u_int8_t xfertype = UE_GET_XFERTYPE(ed->bmAttributes); struct ohci_soft_ed *sed = NULL; struct ohci_soft_td *std = NULL; struct ohci_soft_itd *sitd; diff --git a/sys/dev/usb/uftdi.c b/sys/dev/usb/uftdi.c index d6f4dab9c6c..fb7b8ae8621 100644 --- a/sys/dev/usb/uftdi.c +++ b/sys/dev/usb/uftdi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uftdi.c,v 1.75 2016/12/12 04:35:04 jsg Exp $ */ +/* $OpenBSD: uftdi.c,v 1.76 2020/02/22 14:01:34 jasper Exp $ */ /* $NetBSD: uftdi.c,v 1.14 2003/02/23 04:20:07 simonb Exp $ */ /* @@ -793,7 +793,7 @@ uftdi_attach(struct device *parent, struct device *self, void *aux) addr = ed->bEndpointAddress; dir = UE_GET_DIR(ed->bEndpointAddress); - attr = ed->bmAttributes & UE_XFERTYPE; + attr = UE_GET_XFERTYPE(ed->bmAttributes); if (dir == UE_DIR_IN && attr == UE_BULK) { uca.bulkin = addr; uca.ibufsize = (UGETW(ed->wMaxPacketSize) > 0) ? diff --git a/sys/dev/usb/ugen.c b/sys/dev/usb/ugen.c index 40b151483c9..d15215af6c1 100644 --- a/sys/dev/usb/ugen.c +++ b/sys/dev/usb/ugen.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ugen.c,v 1.102 2020/02/20 16:56:52 visa Exp $ */ +/* $OpenBSD: ugen.c,v 1.103 2020/02/22 14:01:34 jasper Exp $ */ /* $NetBSD: ugen.c,v 1.63 2002/11/26 18:49:48 christos Exp $ */ /* $FreeBSD: src/sys/dev/usb/ugen.c,v 1.26 1999/11/17 22:33:41 n_hibma Exp $ */ @@ -302,7 +302,7 @@ ugenopen(dev_t dev, int flag, int mode, struct proc *p) DPRINTFN(5, ("ugenopen: sc=%p, endpt=%d, dir=%d, sce=%p\n", sc, endpt, dir, sce)); edesc = sce->edesc; - switch (edesc->bmAttributes & UE_XFERTYPE) { + switch (UE_GET_XFERTYPE(edesc->bmAttributes)) { case UE_INTERRUPT: if (dir == OUT) { err = usbd_open_pipe(sce->iface, @@ -444,7 +444,7 @@ ugen_do_close(struct ugen_softc *sc, int endpt, int flag) usbd_close_pipe(sce->pipeh); sce->pipeh = NULL; - switch (sce->edesc->bmAttributes & UE_XFERTYPE) { + switch (UE_GET_XFERTYPE(sce->edesc->bmAttributes)) { case UE_INTERRUPT: ndflush(&sce->q, sce->q.c_cc); clfree(&sce->q); @@ -499,7 +499,7 @@ ugen_do_read(struct ugen_softc *sc, int endpt, struct uio *uio, int flag) } #endif - switch (sce->edesc->bmAttributes & UE_XFERTYPE) { + switch (UE_GET_XFERTYPE(sce->edesc->bmAttributes)) { case UE_INTERRUPT: /* Block until activity occurred. */ s = splusb(); @@ -670,7 +670,7 @@ ugen_do_write(struct ugen_softc *sc, int endpt, struct uio *uio, int flag) if (sce->timeout == 0) flags |= USBD_CATCH; - switch (sce->edesc->bmAttributes & UE_XFERTYPE) { + switch (UE_GET_XFERTYPE(sce->edesc->bmAttributes)) { case UE_BULK: xfer = usbd_alloc_xfer(sc->sc_udev); if (xfer == 0) @@ -1253,7 +1253,7 @@ ugenpoll(dev_t dev, int events, struct proc *p) } #endif s = splusb(); - switch (sce->edesc->bmAttributes & UE_XFERTYPE) { + switch (UE_GET_XFERTYPE(sce->edesc->bmAttributes)) { case UE_INTERRUPT: if (events & (POLLIN | POLLRDNORM)) { if (sce->q.c_cc > 0) @@ -1370,7 +1370,7 @@ ugenkqfilter(dev_t dev, struct knote *kn) switch (kn->kn_filter) { case EVFILT_READ: klist = &sce->rsel.si_note; - switch (sce->edesc->bmAttributes & UE_XFERTYPE) { + switch (UE_GET_XFERTYPE(sce->edesc->bmAttributes)) { case UE_INTERRUPT: kn->kn_fop = &ugenread_intr_filtops; break; @@ -1392,7 +1392,7 @@ ugenkqfilter(dev_t dev, struct knote *kn) case EVFILT_WRITE: klist = &sce->rsel.si_note; - switch (sce->edesc->bmAttributes & UE_XFERTYPE) { + switch (UE_GET_XFERTYPE(sce->edesc->bmAttributes)) { case UE_INTERRUPT: case UE_ISOCHRONOUS: /* XXX poll doesn't support this */ diff --git a/sys/dev/usb/uhci.c b/sys/dev/usb/uhci.c index 61afda02715..47e6d1678c0 100644 --- a/sys/dev/usb/uhci.c +++ b/sys/dev/usb/uhci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uhci.c,v 1.148 2019/11/27 11:16:59 mpi Exp $ */ +/* $OpenBSD: uhci.c,v 1.149 2020/02/22 14:01:34 jasper Exp $ */ /* $NetBSD: uhci.c,v 1.172 2003/02/23 04:19:26 simonb Exp $ */ /* $FreeBSD: src/sys/dev/usb/uhci.c,v 1.33 1999/11/17 22:33:41 n_hibma Exp $ */ @@ -2633,7 +2633,7 @@ uhci_open(struct usbd_pipe *pipe) return (USBD_INVAL); } } else { - switch (ed->bmAttributes & UE_XFERTYPE) { + switch (UE_GET_XFERTYPE(ed->bmAttributes)) { case UE_CONTROL: pipe->methods = &uhci_device_ctrl_methods; upipe->u.ctl.sqh = uhci_alloc_sqh(sc); diff --git a/sys/dev/usb/uhidev.c b/sys/dev/usb/uhidev.c index c4cac47ba37..ae11059e38b 100644 --- a/sys/dev/usb/uhidev.c +++ b/sys/dev/usb/uhidev.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uhidev.c,v 1.78 2020/01/04 11:40:56 mpi Exp $ */ +/* $OpenBSD: uhidev.c,v 1.79 2020/02/22 14:01:34 jasper Exp $ */ /* $NetBSD: uhidev.c,v 1.14 2003/03/11 16:44:00 augustss Exp $ */ /* @@ -168,14 +168,14 @@ uhidev_attach(struct device *parent, struct device *self, void *aux) ed->bLength, ed->bDescriptorType, ed->bEndpointAddress & UE_ADDR, UE_GET_DIR(ed->bEndpointAddress)==UE_DIR_IN? "in" : "out", - ed->bmAttributes & UE_XFERTYPE, + UE_GET_XFERTYPE(ed->bmAttributes), UGETW(ed->wMaxPacketSize), ed->bInterval)); if (UE_GET_DIR(ed->bEndpointAddress) == UE_DIR_IN && - (ed->bmAttributes & UE_XFERTYPE) == UE_INTERRUPT) { + UE_GET_XFERTYPE(ed->bmAttributes) == UE_INTERRUPT) { sc->sc_iep_addr = ed->bEndpointAddress; } else if (UE_GET_DIR(ed->bEndpointAddress) == UE_DIR_OUT && - (ed->bmAttributes & UE_XFERTYPE) == UE_INTERRUPT) { + UE_GET_XFERTYPE(ed->bmAttributes) == UE_INTERRUPT) { sc->sc_oep_addr = ed->bEndpointAddress; } else { printf("%s: unexpected endpoint\n", DEVNAME(sc)); diff --git a/sys/dev/usb/uhub.c b/sys/dev/usb/uhub.c index 272569798c9..4c116d7cd04 100644 --- a/sys/dev/usb/uhub.c +++ b/sys/dev/usb/uhub.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uhub.c,v 1.92 2019/01/07 14:24:22 mpi Exp $ */ +/* $OpenBSD: uhub.c,v 1.93 2020/02/22 14:01:34 jasper Exp $ */ /* $NetBSD: uhub.c,v 1.64 2003/02/08 03:32:51 ichiro Exp $ */ /* $FreeBSD: src/sys/dev/usb/uhub.c,v 1.18 1999/11/17 22:33:43 n_hibma Exp $ */ @@ -238,7 +238,7 @@ uhub_attach(struct device *parent, struct device *self, void *aux) printf("%s: no endpoint descriptor\n", sc->sc_dev.dv_xname); goto bad; } - if ((ed->bmAttributes & UE_XFERTYPE) != UE_INTERRUPT) { + if (UE_GET_XFERTYPE(ed->bmAttributes) != UE_INTERRUPT) { printf("%s: bad interrupt endpoint\n", sc->sc_dev.dv_xname); goto bad; } diff --git a/sys/dev/usb/uipaq.c b/sys/dev/usb/uipaq.c index d52f15c6e64..7ab16eb894e 100644 --- a/sys/dev/usb/uipaq.c +++ b/sys/dev/usb/uipaq.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uipaq.c,v 1.26 2016/11/06 12:58:01 mpi Exp $ */ +/* $OpenBSD: uipaq.c,v 1.27 2020/02/22 14:01:34 jasper Exp $ */ /* * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -206,10 +206,10 @@ uipaq_attach(struct device *parent, struct device *self, void *aux) goto bad; } if (UE_GET_DIR(ed->bEndpointAddress) == UE_DIR_IN && - (ed->bmAttributes & UE_XFERTYPE) == UE_BULK) { + UE_GET_XFERTYPE(ed->bmAttributes) == UE_BULK) { uca.bulkin = ed->bEndpointAddress; } else if (UE_GET_DIR(ed->bEndpointAddress) == UE_DIR_OUT && - (ed->bmAttributes & UE_XFERTYPE) == UE_BULK) { + UE_GET_XFERTYPE(ed->bmAttributes) == UE_BULK) { uca.bulkout = ed->bEndpointAddress; } } diff --git a/sys/dev/usb/umass.c b/sys/dev/usb/umass.c index 9384a59354c..53d783ff396 100644 --- a/sys/dev/usb/umass.c +++ b/sys/dev/usb/umass.c @@ -1,4 +1,4 @@ -/* $OpenBSD: umass.c,v 1.75 2020/01/22 03:43:13 krw Exp $ */ +/* $OpenBSD: umass.c,v 1.76 2020/02/22 14:01:34 jasper Exp $ */ /* $NetBSD: umass.c,v 1.116 2004/06/30 05:53:46 mycroft Exp $ */ /* @@ -441,14 +441,14 @@ umass_attach(struct device *parent, struct device *self, void *aux) return; } if (UE_GET_DIR(ed->bEndpointAddress) == UE_DIR_IN - && (ed->bmAttributes & UE_XFERTYPE) == UE_BULK) { + && UE_GET_XFERTYPE(ed->bmAttributes) == UE_BULK) { sc->sc_epaddr[UMASS_BULKIN] = ed->bEndpointAddress; } else if (UE_GET_DIR(ed->bEndpointAddress) == UE_DIR_OUT - && (ed->bmAttributes & UE_XFERTYPE) == UE_BULK) { + && UE_GET_XFERTYPE(ed->bmAttributes) == UE_BULK) { sc->sc_epaddr[UMASS_BULKOUT] = ed->bEndpointAddress; } else if (sc->sc_wire == UMASS_WPROTO_CBI_I && UE_GET_DIR(ed->bEndpointAddress) == UE_DIR_IN - && (ed->bmAttributes & UE_XFERTYPE) == UE_INTERRUPT) { + && UE_GET_XFERTYPE(ed->bmAttributes) == UE_INTERRUPT) { sc->sc_epaddr[UMASS_INTRIN] = ed->bEndpointAddress; #ifdef UMASS_DEBUG if (UGETW(ed->wMaxPacketSize) > 2) { diff --git a/sys/dev/usb/umodem.c b/sys/dev/usb/umodem.c index f8fbc707f5e..25a1fa25f74 100644 --- a/sys/dev/usb/umodem.c +++ b/sys/dev/usb/umodem.c @@ -1,4 +1,4 @@ -/* $OpenBSD: umodem.c,v 1.64 2018/08/29 20:18:14 kettenis Exp $ */ +/* $OpenBSD: umodem.c,v 1.65 2020/02/22 14:01:35 jasper Exp $ */ /* $NetBSD: umodem.c,v 1.45 2002/09/23 05:51:23 simonb Exp $ */ /* @@ -306,10 +306,10 @@ umodem_attach(struct device *parent, struct device *self, void *aux) goto bad; } if (UE_GET_DIR(ed->bEndpointAddress) == UE_DIR_IN && - (ed->bmAttributes & UE_XFERTYPE) == UE_BULK) { + UE_GET_XFERTYPE(ed->bmAttributes) == UE_BULK) { uca.bulkin = ed->bEndpointAddress; } else if (UE_GET_DIR(ed->bEndpointAddress) == UE_DIR_OUT && - (ed->bmAttributes & UE_XFERTYPE) == UE_BULK) { + UE_GET_XFERTYPE(ed->bmAttributes) == UE_BULK) { uca.bulkout = ed->bEndpointAddress; } } @@ -361,7 +361,7 @@ umodem_attach(struct device *parent, struct device *self, void *aux) continue; if (UE_GET_DIR(ed->bEndpointAddress) == UE_DIR_IN && - (ed->bmAttributes & UE_XFERTYPE) == UE_INTERRUPT) { + UE_GET_XFERTYPE(ed->bmAttributes) == UE_INTERRUPT) { printf("%s: status change notification available\n", sc->sc_dev.dv_xname); sc->sc_ctl_notify = ed->bEndpointAddress; diff --git a/sys/dev/usb/usbdi.c b/sys/dev/usb/usbdi.c index 3aaeeda087d..aba1220103f 100644 --- a/sys/dev/usb/usbdi.c +++ b/sys/dev/usb/usbdi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: usbdi.c,v 1.102 2019/10/21 10:02:41 mpi Exp $ */ +/* $OpenBSD: usbdi.c,v 1.103 2020/02/22 14:01:35 jasper Exp $ */ /* $NetBSD: usbdi.c,v 1.103 2002/09/27 15:37:38 provos Exp $ */ /* $FreeBSD: src/sys/dev/usb/usbdi.c,v 1.28 1999/11/17 22:33:49 n_hibma Exp $ */ @@ -782,7 +782,7 @@ usb_transfer_complete(struct usbd_xfer *xfer) /* Count completed transfers. */ ++bus->stats.uds_requests - [pipe->endpoint->edesc->bmAttributes & UE_XFERTYPE]; + [UE_GET_XFERTYPE(pipe->endpoint->edesc->bmAttributes)]; xfer->done = 1; if (!xfer->status && xfer->actlen < xfer->length && diff --git a/sys/dev/usb/uvisor.c b/sys/dev/usb/uvisor.c index 85ea1ba273d..9d704d88bc4 100644 --- a/sys/dev/usb/uvisor.c +++ b/sys/dev/usb/uvisor.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvisor.c,v 1.51 2016/09/02 09:14:59 mpi Exp $ */ +/* $OpenBSD: uvisor.c,v 1.52 2020/02/22 14:01:35 jasper Exp $ */ /* $NetBSD: uvisor.c,v 1.21 2003/08/03 21:59:26 nathanw Exp $ */ /* @@ -308,7 +308,7 @@ uvisor_attach(struct device *parent, struct device *self, void *aux) if (ed == NULL) break; if (UE_GET_ADDR(ed->bEndpointAddress) == port && - (ed->bmAttributes & UE_XFERTYPE) == UE_BULK) { + UE_GET_XFERTYPE(ed->bmAttributes) == UE_BULK) { if (UE_GET_DIR(ed->bEndpointAddress) == UE_DIR_IN) hasin++; diff --git a/sys/dev/usb/xhci.c b/sys/dev/usb/xhci.c index d6b62b1f997..09f669cc122 100644 --- a/sys/dev/usb/xhci.c +++ b/sys/dev/usb/xhci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xhci.c,v 1.111 2020/01/22 02:25:11 krw Exp $ */ +/* $OpenBSD: xhci.c,v 1.112 2020/02/22 14:01:35 jasper Exp $ */ /* * Copyright (c) 2014-2015 Martin Pieuchot @@ -1225,7 +1225,7 @@ xhci_get_txinfo(struct xhci_softc *sc, struct usbd_pipe *pipe) usb_endpoint_descriptor_t *ed = pipe->endpoint->edesc; uint32_t mep, atl, mps = UGETW(ed->wMaxPacketSize); - switch (ed->bmAttributes & UE_XFERTYPE) { + switch (UE_GET_XFERTYPE(ed->bmAttributes)) { case UE_CONTROL: mep = 0; atl = 8; |