diff options
author | imp <imp@FreeBSD.org> | 2003-02-19 05:47:46 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2003-02-19 05:47:46 +0000 |
commit | cf874b345d0f766fb64cf4737e1c85ccc78d2bee (patch) | |
tree | 9e20e320fe15ae4bf68f8335fcf9d3e71d3b3614 /sys/dev/usb | |
parent | b72619cecb8265d3efb3781b0acff1380762c173 (diff) | |
download | FreeBSD-src-cf874b345d0f766fb64cf4737e1c85ccc78d2bee.zip FreeBSD-src-cf874b345d0f766fb64cf4737e1c85ccc78d2bee.tar.gz |
Back out M_* changes, per decision of the TRB.
Approved by: trb
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 d5484a8..b37a5d0 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_ZERO); + s = malloc(sizeof *s, M_TEMP, M_WAITOK|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, 0); + hi = malloc(sizeof *hi, M_TEMP, M_WAITOK); *hi = s->cur; c->next = hi; break; diff --git a/sys/dev/usb/if_aue.c b/sys/dev/usb/if_aue.c index 94903c4..fa80dd6 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_NOWAIT, MT_DATA); + MGETHDR(m_new, M_DONTWAIT, 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_NOWAIT); + MCLGET(m_new, M_DONTWAIT); 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 a669e97..8748a83 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_NOWAIT, MT_DATA); + MGETHDR(m_new, M_DONTWAIT, 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_NOWAIT); + MCLGET(m_new, M_DONTWAIT); 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 3f51b5a..767d6fa 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_NOWAIT, MT_DATA); + MGETHDR(m_new, M_DONTWAIT, 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_NOWAIT); + MCLGET(m_new, M_DONTWAIT); 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 81915d3..60ebd4c 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, 0); + devinfo = malloc(1024, M_USBDEV, M_WAITOK); 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, 0); + sc->sc_intr_buf = malloc(sc->sc_isize, M_USBDEV, M_WAITOK); 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 77f4b1d..a0519da 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, 0); + sc->sc_bulkin_buffer = malloc(UDBP_BUFFERSIZE, M_USBDEV, M_WAITOK); if (!sc->sc_bulkin_buffer) { goto bad; } - sc->sc_bulkout_buffer = malloc(UDBP_BUFFERSIZE, M_USBDEV, 0); + sc->sc_bulkout_buffer = malloc(UDBP_BUFFERSIZE, M_USBDEV, M_WAITOK); 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 fb24459..d400ff8 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, 0); + devinfo = malloc(1024, M_USBDEV, M_WAITOK); ucom->sc_dev = self; ucom->sc_udev = dev; diff --git a/sys/dev/usb/ugen.c b/sys/dev/usb/ugen.c index 06bbadd..fb2b46a 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, 0); + sce->ibuf = malloc(isize, M_USBDEV, M_WAITOK); 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, 0); + M_USBDEV, M_WAITOK); 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, 0); + cdesc = malloc(len, M_TEMP, M_WAITOK); 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, 0); + cdesc = malloc(len, M_TEMP, M_WAITOK); 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, 0); + ptr = malloc(len, M_TEMP, M_WAITOK); 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 228b352..68a8070 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, 0); + M_USBHC, M_WAITOK); 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, 0); + malloc(npoll * sizeof(uhci_soft_qh_t *), M_USBHC, M_WAITOK); /* * 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 ad8862e..2570aa1 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, 0); - sc->sc_obuf = malloc(sc->sc_osize, M_USBDEV, 0); + sc->sc_ibuf = malloc(sc->sc_isize, M_USBDEV, M_WAITOK); + sc->sc_obuf = malloc(sc->sc_osize, M_USBDEV, M_WAITOK); /* 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 f1a2e3c..df04e4e 100644 --- a/sys/dev/usb/umass.c +++ b/sys/dev/usb/umass.c @@ -2128,7 +2128,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, 0); + union ccb *ccb = malloc(sizeof(union ccb), M_USBDEV, M_WAITOK); memset(ccb, 0, sizeof(union ccb)); diff --git a/sys/dev/usb/umodem.c b/sys/dev/usb/umodem.c index d6bbfc5..30e337d 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, 0); + devinfo = malloc(1024, M_USBDEV, M_WAITOK); 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 e576f9c..cc017c8 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, 0); + devinfo = malloc(1024, M_USBDEV, M_WAITOK); 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, 0); + sc->sc_intr_buf = malloc(sc->sc_isize, M_USBDEV, M_WAITOK); 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 d0eb1fa..ba9ca84 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, 0); + ptr = malloc(len, M_TEMP, M_WAITOK); 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 4e9483c..21127d6 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, 0); + ptr = malloc(len, M_TEMP, M_WAITOK); 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, 0); + ueq = malloc(sizeof *ueq, M_USBDEV, M_WAITOK); 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 4a793c6..80f79ab 100644 --- a/sys/dev/usb/uscanner.c +++ b/sys/dev/usb/uscanner.c @@ -384,8 +384,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, 0); - sc->sc_bulkout_buffer = malloc(USCANNER_BUFFERSIZE, M_USBDEV, 0); + sc->sc_bulkin_buffer = malloc(USCANNER_BUFFERSIZE, M_USBDEV, M_WAITOK); + sc->sc_bulkout_buffer = malloc(USCANNER_BUFFERSIZE, M_USBDEV, M_WAITOK); /* 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 1ea97d9..0cffd86 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, 0); + devinfo = malloc(1024, M_USBDEV, M_WAITOK); 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 bc9a856..aac4743 100644 --- a/sys/dev/usb/uvscom.c +++ b/sys/dev/usb/uvscom.c @@ -265,7 +265,7 @@ USB_ATTACH(uvscom) usbd_status err; int i; - devinfo = malloc(1024, M_USBDEV, 0); + devinfo = malloc(1024, M_USBDEV, M_WAITOK); ucom = &sc->sc_ucom; bzero(sc, sizeof (struct uvscom_softc)); @@ -728,7 +728,7 @@ uvscom_open(void *addr, int portno) return (ENXIO); } - sc->sc_intr_buf = malloc(sc->sc_isize, M_USBDEV, 0); + sc->sc_intr_buf = malloc(sc->sc_isize, M_USBDEV, M_WAITOK); err = usbd_open_pipe_intr(sc->sc_ucom.sc_iface, sc->sc_intr_number, USBD_SHORT_XFER_OK, |