diff options
author | alfred <alfred@FreeBSD.org> | 2003-01-21 08:56:16 +0000 |
---|---|---|
committer | alfred <alfred@FreeBSD.org> | 2003-01-21 08:56:16 +0000 |
commit | bf8e8a6e8f0bd9165109f0a258730dd242299815 (patch) | |
tree | f16a2fb9fa7a7fbc4c19e981d278d5f6eb53234d /sys/dev/usb | |
parent | 2180deee00350fff613a1d1d1328eddc4c0ba9c8 (diff) | |
download | FreeBSD-src-bf8e8a6e8f0bd9165109f0a258730dd242299815.zip FreeBSD-src-bf8e8a6e8f0bd9165109f0a258730dd242299815.tar.gz |
Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.
Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
Diffstat (limited to 'sys/dev/usb')
-rw-r--r-- | sys/dev/usb/hid.c | 4 | ||||
-rw-r--r-- | sys/dev/usb/if_aue.c | 4 | ||||
-rw-r--r-- | sys/dev/usb/if_cue.c | 4 | ||||
-rw-r--r-- | sys/dev/usb/if_kue.c | 4 | ||||
-rw-r--r-- | sys/dev/usb/ubsa.c | 4 | ||||
-rw-r--r-- | sys/dev/usb/udbp.c | 4 | ||||
-rw-r--r-- | sys/dev/usb/uftdi.c | 2 | ||||
-rw-r--r-- | sys/dev/usb/ugen.c | 10 | ||||
-rw-r--r-- | sys/dev/usb/uhci.c | 4 | ||||
-rw-r--r-- | sys/dev/usb/uhid.c | 4 | ||||
-rw-r--r-- | sys/dev/usb/umass.c | 2 | ||||
-rw-r--r-- | sys/dev/usb/umodem.c | 2 | ||||
-rw-r--r-- | sys/dev/usb/uplcom.c | 4 | ||||
-rw-r--r-- | sys/dev/usb/urio.c | 2 | ||||
-rw-r--r-- | sys/dev/usb/usb.c | 4 | ||||
-rw-r--r-- | sys/dev/usb/uscanner.c | 4 | ||||
-rw-r--r-- | sys/dev/usb/uvisor.c | 2 | ||||
-rw-r--r-- | sys/dev/usb/uvscom.c | 4 |
18 files changed, 34 insertions, 34 deletions
diff --git a/sys/dev/usb/hid.c b/sys/dev/usb/hid.c index b37a5d0..d5484a8 100644 --- a/sys/dev/usb/hid.c +++ b/sys/dev/usb/hid.c @@ -96,7 +96,7 @@ hid_start_parse(void *d, int len, int kindset) { struct hid_data *s; - s = malloc(sizeof *s, M_TEMP, M_WAITOK|M_ZERO); + s = malloc(sizeof *s, M_TEMP, M_ZERO); s->start = s->p = d; s->end = (char *)d + len; s->kindset = kindset; @@ -288,7 +288,7 @@ hid_get_item(struct hid_data *s, struct hid_item *h) c->loc.count = dval; break; case 10: /* Push */ - hi = malloc(sizeof *hi, M_TEMP, M_WAITOK); + hi = malloc(sizeof *hi, M_TEMP, 0); *hi = s->cur; c->next = hi; break; diff --git a/sys/dev/usb/if_aue.c b/sys/dev/usb/if_aue.c index fa80dd6..94903c4 100644 --- a/sys/dev/usb/if_aue.c +++ b/sys/dev/usb/if_aue.c @@ -812,14 +812,14 @@ aue_newbuf(struct aue_softc *sc, struct aue_chain *c, struct mbuf *m) struct mbuf *m_new = NULL; if (m == NULL) { - MGETHDR(m_new, M_DONTWAIT, MT_DATA); + MGETHDR(m_new, M_NOWAIT, MT_DATA); if (m_new == NULL) { printf("aue%d: no memory for rx list " "-- packet dropped!\n", sc->aue_unit); return (ENOBUFS); } - MCLGET(m_new, M_DONTWAIT); + MCLGET(m_new, M_NOWAIT); if (!(m_new->m_flags & M_EXT)) { printf("aue%d: no memory for rx list " "-- packet dropped!\n", sc->aue_unit); diff --git a/sys/dev/usb/if_cue.c b/sys/dev/usb/if_cue.c index 8748a83..a669e97 100644 --- a/sys/dev/usb/if_cue.c +++ b/sys/dev/usb/if_cue.c @@ -568,14 +568,14 @@ cue_newbuf(struct cue_softc *sc, struct cue_chain *c, struct mbuf *m) struct mbuf *m_new = NULL; if (m == NULL) { - MGETHDR(m_new, M_DONTWAIT, MT_DATA); + MGETHDR(m_new, M_NOWAIT, MT_DATA); if (m_new == NULL) { printf("cue%d: no memory for rx list " "-- packet dropped!\n", sc->cue_unit); return(ENOBUFS); } - MCLGET(m_new, M_DONTWAIT); + MCLGET(m_new, M_NOWAIT); if (!(m_new->m_flags & M_EXT)) { printf("cue%d: no memory for rx list " "-- packet dropped!\n", sc->cue_unit); diff --git a/sys/dev/usb/if_kue.c b/sys/dev/usb/if_kue.c index 767d6fa..3f51b5a 100644 --- a/sys/dev/usb/if_kue.c +++ b/sys/dev/usb/if_kue.c @@ -542,14 +542,14 @@ kue_newbuf(struct kue_softc *sc, struct kue_chain *c, struct mbuf *m) struct mbuf *m_new = NULL; if (m == NULL) { - MGETHDR(m_new, M_DONTWAIT, MT_DATA); + MGETHDR(m_new, M_NOWAIT, MT_DATA); if (m_new == NULL) { printf("kue%d: no memory for rx list " "-- packet dropped!\n", sc->kue_unit); return(ENOBUFS); } - MCLGET(m_new, M_DONTWAIT); + MCLGET(m_new, M_NOWAIT); if (!(m_new->m_flags & M_EXT)) { printf("kue%d: no memory for rx list " "-- packet dropped!\n", sc->kue_unit); diff --git a/sys/dev/usb/ubsa.c b/sys/dev/usb/ubsa.c index 60ebd4c..81915d3 100644 --- a/sys/dev/usb/ubsa.c +++ b/sys/dev/usb/ubsa.c @@ -278,7 +278,7 @@ USB_ATTACH(ubsa) int i; dev = uaa->device; - devinfo = malloc(1024, M_USBDEV, M_WAITOK); + devinfo = malloc(1024, M_USBDEV, 0); ucom = &sc->sc_ucom; bzero(sc, sizeof (struct ubsa_softc)); @@ -643,7 +643,7 @@ ubsa_open(void *addr, int portno) DPRINTF(("ubsa_open: sc = %p\n", sc)); if (sc->sc_intr_number != -1 && sc->sc_intr_pipe == NULL) { - sc->sc_intr_buf = malloc(sc->sc_isize, M_USBDEV, M_WAITOK); + sc->sc_intr_buf = malloc(sc->sc_isize, M_USBDEV, 0); err = usbd_open_pipe_intr(sc->sc_intr_iface, sc->sc_intr_number, USBD_SHORT_XFER_OK, diff --git a/sys/dev/usb/udbp.c b/sys/dev/usb/udbp.c index a0519da..77f4b1d 100644 --- a/sys/dev/usb/udbp.c +++ b/sys/dev/usb/udbp.c @@ -326,11 +326,11 @@ USB_ATTACH(udbp) if (!sc->sc_bulkout_xfer) { goto bad; } - sc->sc_bulkin_buffer = malloc(UDBP_BUFFERSIZE, M_USBDEV, M_WAITOK); + sc->sc_bulkin_buffer = malloc(UDBP_BUFFERSIZE, M_USBDEV, 0); if (!sc->sc_bulkin_buffer) { goto bad; } - sc->sc_bulkout_buffer = malloc(UDBP_BUFFERSIZE, M_USBDEV, M_WAITOK); + sc->sc_bulkout_buffer = malloc(UDBP_BUFFERSIZE, M_USBDEV, 0); if (!sc->sc_bulkout_xfer || !sc->sc_bulkout_buffer) { goto bad; } diff --git a/sys/dev/usb/uftdi.c b/sys/dev/usb/uftdi.c index d400ff8..fb24459 100644 --- a/sys/dev/usb/uftdi.c +++ b/sys/dev/usb/uftdi.c @@ -171,7 +171,7 @@ USB_ATTACH(uftdi) usbd_status err; struct ucom_softc *ucom = &sc->sc_ucom; DPRINTFN(10,("\nuftdi_attach: sc=%p\n", sc)); - devinfo = malloc(1024, M_USBDEV, M_WAITOK); + devinfo = malloc(1024, M_USBDEV, 0); ucom->sc_dev = self; ucom->sc_udev = dev; diff --git a/sys/dev/usb/ugen.c b/sys/dev/usb/ugen.c index fb2b46a..06bbadd 100644 --- a/sys/dev/usb/ugen.c +++ b/sys/dev/usb/ugen.c @@ -422,7 +422,7 @@ ugenopen(dev_t dev, int flag, int mode, usb_proc_ptr p) isize = UGETW(edesc->wMaxPacketSize); if (isize == 0) /* shouldn't happen */ return (EINVAL); - sce->ibuf = malloc(isize, M_USBDEV, M_WAITOK); + sce->ibuf = malloc(isize, M_USBDEV, 0); DPRINTFN(5, ("ugenopen: intr endpt=%d,isize=%d\n", endpt, isize)); if (clalloc(&sce->q, UGEN_IBSIZE, 0) == -1) @@ -452,7 +452,7 @@ ugenopen(dev_t dev, int flag, int mode, usb_proc_ptr p) if (isize == 0) /* shouldn't happen */ return (EINVAL); sce->ibuf = malloc(isize * UGEN_NISOFRAMES, - M_USBDEV, M_WAITOK); + M_USBDEV, 0); sce->cur = sce->fill = sce->ibuf; sce->limit = sce->ibuf + isize * UGEN_NISOFRAMES; DPRINTFN(5, ("ugenopen: isoc endpt=%d, isize=%d\n", @@ -1042,7 +1042,7 @@ ugen_get_cdesc(struct ugen_softc *sc, int index, int *lenp) len = UGETW(tdesc->wTotalLength); if (lenp) *lenp = len; - cdesc = malloc(len, M_TEMP, M_WAITOK); + cdesc = malloc(len, M_TEMP, 0); memcpy(cdesc, tdesc, len); DPRINTFN(5,("ugen_get_cdesc: current, len=%d\n", len)); } else { @@ -1053,7 +1053,7 @@ ugen_get_cdesc(struct ugen_softc *sc, int index, int *lenp) DPRINTFN(5,("ugen_get_cdesc: index=%d, len=%d\n", index, len)); if (lenp) *lenp = len; - cdesc = malloc(len, M_TEMP, M_WAITOK); + cdesc = malloc(len, M_TEMP, 0); err = usbd_get_config_desc_full(sc->sc_udev, index, cdesc, len); if (err) { free(cdesc, M_TEMP); @@ -1307,7 +1307,7 @@ ugen_do_ioctl(struct ugen_softc *sc, int endpt, u_long cmd, ur->ucr_request.bmRequestType & UT_READ ? UIO_READ : UIO_WRITE; uio.uio_procp = p; - ptr = malloc(len, M_TEMP, M_WAITOK); + ptr = malloc(len, M_TEMP, 0); if (uio.uio_rw == UIO_WRITE) { error = uiomove(ptr, len, &uio); if (error) diff --git a/sys/dev/usb/uhci.c b/sys/dev/usb/uhci.c index 68a8070..228b352 100644 --- a/sys/dev/usb/uhci.c +++ b/sys/dev/usb/uhci.c @@ -2529,7 +2529,7 @@ uhci_setup_isoc(usbd_pipe_handle pipe) iso = &upipe->u.iso; iso->stds = malloc(UHCI_VFRAMELIST_COUNT * sizeof (uhci_soft_td_t *), - M_USBHC, M_WAITOK); + M_USBHC, 0); token = rd ? UHCI_TD_IN (0, endpt, addr, 0) : UHCI_TD_OUT(0, endpt, addr, 0); @@ -2775,7 +2775,7 @@ uhci_device_setintr(uhci_softc_t *sc, struct uhci_pipe *upipe, int ival) upipe->u.intr.npoll = npoll; upipe->u.intr.qhs = - malloc(npoll * sizeof(uhci_soft_qh_t *), M_USBHC, M_WAITOK); + malloc(npoll * sizeof(uhci_soft_qh_t *), M_USBHC, 0); /* * Figure out which offset in the schedule that has most diff --git a/sys/dev/usb/uhid.c b/sys/dev/usb/uhid.c index 2570aa1..ad8862e 100644 --- a/sys/dev/usb/uhid.c +++ b/sys/dev/usb/uhid.c @@ -418,8 +418,8 @@ uhidopen(dev_t dev, int flag, int mode, usb_proc_ptr p) return (ENOMEM); } - sc->sc_ibuf = malloc(sc->sc_isize, M_USBDEV, M_WAITOK); - sc->sc_obuf = malloc(sc->sc_osize, M_USBDEV, M_WAITOK); + sc->sc_ibuf = malloc(sc->sc_isize, M_USBDEV, 0); + sc->sc_obuf = malloc(sc->sc_osize, M_USBDEV, 0); /* Set up interrupt pipe. */ err = usbd_open_pipe_intr(sc->sc_iface, sc->sc_ep_addr, diff --git a/sys/dev/usb/umass.c b/sys/dev/usb/umass.c index 4fce190..1e4d51b 100644 --- a/sys/dev/usb/umass.c +++ b/sys/dev/usb/umass.c @@ -2113,7 +2113,7 @@ umass_cam_rescan(void *addr) struct umass_softc *sc = (struct umass_softc *) addr; #endif struct cam_path *path; - union ccb *ccb = malloc(sizeof(union ccb), M_USBDEV, M_WAITOK); + union ccb *ccb = malloc(sizeof(union ccb), M_USBDEV, 0); memset(ccb, 0, sizeof(union ccb)); diff --git a/sys/dev/usb/umodem.c b/sys/dev/usb/umodem.c index 30e337d..d6bbfc5 100644 --- a/sys/dev/usb/umodem.c +++ b/sys/dev/usb/umodem.c @@ -247,7 +247,7 @@ USB_ATTACH(umodem) int i; struct ucom_softc *ucom; - devinfo = malloc(1024, M_USBDEV, M_WAITOK); + devinfo = malloc(1024, M_USBDEV, 0); usbd_devinfo(dev, 0, devinfo); ucom = &sc->sc_ucom; ucom->sc_dev = self; diff --git a/sys/dev/usb/uplcom.c b/sys/dev/usb/uplcom.c index cc017c8..e576f9c 100644 --- a/sys/dev/usb/uplcom.c +++ b/sys/dev/usb/uplcom.c @@ -260,7 +260,7 @@ USB_ATTACH(uplcom) usbd_status err; int i; - devinfo = malloc(1024, M_USBDEV, M_WAITOK); + devinfo = malloc(1024, M_USBDEV, 0); ucom = &sc->sc_ucom; bzero(sc, sizeof (struct uplcom_softc)); @@ -685,7 +685,7 @@ uplcom_open(void *addr, int portno) if (sc->sc_intr_number != -1 && sc->sc_intr_pipe == NULL) { sc->sc_status = 0; /* clear status bit */ - sc->sc_intr_buf = malloc(sc->sc_isize, M_USBDEV, M_WAITOK); + sc->sc_intr_buf = malloc(sc->sc_isize, M_USBDEV, 0); err = usbd_open_pipe_intr(sc->sc_intr_iface, sc->sc_intr_number, USBD_SHORT_XFER_OK, diff --git a/sys/dev/usb/urio.c b/sys/dev/usb/urio.c index ba9ca84..d0eb1fa 100644 --- a/sys/dev/usb/urio.c +++ b/sys/dev/usb/urio.c @@ -552,7 +552,7 @@ urioioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, usb_proc_ptr p) req.bmRequestType & UT_READ ? UIO_READ : UIO_WRITE; uio.uio_procp = p; - ptr = malloc(len, M_TEMP, M_WAITOK); + ptr = malloc(len, M_TEMP, 0); if (uio.uio_rw == UIO_WRITE) { error = uiomove(ptr, len, &uio); if (error) diff --git a/sys/dev/usb/usb.c b/sys/dev/usb/usb.c index 21127d6..4e9483c 100644 --- a/sys/dev/usb/usb.c +++ b/sys/dev/usb/usb.c @@ -596,7 +596,7 @@ usbioctl(dev_t devt, u_long cmd, caddr_t data, int flag, usb_proc_ptr p) ur->ucr_request.bmRequestType & UT_READ ? UIO_READ : UIO_WRITE; uio.uio_procp = p; - ptr = malloc(len, M_TEMP, M_WAITOK); + ptr = malloc(len, M_TEMP, 0); if (uio.uio_rw == UIO_WRITE) { error = uiomove(ptr, len, &uio); if (error) @@ -774,7 +774,7 @@ usb_add_event(int type, struct usb_event *uep) struct timeval thetime; int s; - ueq = malloc(sizeof *ueq, M_USBDEV, M_WAITOK); + ueq = malloc(sizeof *ueq, M_USBDEV, 0); ueq->ue = *uep; ueq->ue.ue_type = type; microtime(&thetime); diff --git a/sys/dev/usb/uscanner.c b/sys/dev/usb/uscanner.c index 98e2177..545f673 100644 --- a/sys/dev/usb/uscanner.c +++ b/sys/dev/usb/uscanner.c @@ -383,8 +383,8 @@ uscanneropen(dev_t dev, int flag, int mode, usb_proc_ptr p) sc->sc_state |= USCANNER_OPEN; - sc->sc_bulkin_buffer = malloc(USCANNER_BUFFERSIZE, M_USBDEV, M_WAITOK); - sc->sc_bulkout_buffer = malloc(USCANNER_BUFFERSIZE, M_USBDEV, M_WAITOK); + sc->sc_bulkin_buffer = malloc(USCANNER_BUFFERSIZE, M_USBDEV, 0); + sc->sc_bulkout_buffer = malloc(USCANNER_BUFFERSIZE, M_USBDEV, 0); /* No need to check buffers for NULL since we have WAITOK */ sc->sc_bulkin_bufferlen = USCANNER_BUFFERSIZE; diff --git a/sys/dev/usb/uvisor.c b/sys/dev/usb/uvisor.c index 0cffd86..1ea97d9 100644 --- a/sys/dev/usb/uvisor.c +++ b/sys/dev/usb/uvisor.c @@ -233,7 +233,7 @@ USB_ATTACH(uvisor) usbd_status err; struct ucom_softc *ucom; - devinfo = malloc(1024, M_USBDEV, M_WAITOK); + devinfo = malloc(1024, M_USBDEV, 0); ucom = &sc->sc_ucom; bzero(sc, sizeof (struct uvisor_softc)); diff --git a/sys/dev/usb/uvscom.c b/sys/dev/usb/uvscom.c index 2db196a..0c0acd2 100644 --- a/sys/dev/usb/uvscom.c +++ b/sys/dev/usb/uvscom.c @@ -261,7 +261,7 @@ USB_ATTACH(uvscom) usbd_status err; int i; - devinfo = malloc(1024, M_USBDEV, M_WAITOK); + devinfo = malloc(1024, M_USBDEV, 0); ucom = &sc->sc_ucom; bzero(sc, sizeof (struct uvscom_softc)); @@ -724,7 +724,7 @@ uvscom_open(void *addr, int portno) return (ENXIO); } - sc->sc_intr_buf = malloc(sc->sc_isize, M_USBDEV, M_WAITOK); + sc->sc_intr_buf = malloc(sc->sc_isize, M_USBDEV, 0); err = usbd_open_pipe_intr(sc->sc_ucom.sc_iface, sc->sc_intr_number, USBD_SHORT_XFER_OK, |