summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/agp/agp.c2
-rw-r--r--sys/dev/agp/agp_i810.c2
-rw-r--r--sys/dev/amr/amr.c4
-rw-r--r--sys/dev/an/if_an.c10
-rw-r--r--sys/dev/ar/if_ar.c6
-rw-r--r--sys/dev/asr/asr.c38
-rw-r--r--sys/dev/ata/atapi-cam.c2
-rw-r--r--sys/dev/awi/awi.c20
-rw-r--r--sys/dev/awi/awi_wep.c10
-rw-r--r--sys/dev/bge/if_bge.c6
-rw-r--r--sys/dev/cardbus/cardbus.c2
-rw-r--r--sys/dev/cardbus/cardbus_cis.c6
-rw-r--r--sys/dev/ccd/ccd.c20
-rw-r--r--sys/dev/ciss/ciss.c4
-rw-r--r--sys/dev/cm/smc90cx6.c4
-rw-r--r--sys/dev/cnw/if_cnw.c6
-rw-r--r--sys/dev/cs/if_cs.c4
-rw-r--r--sys/dev/dc/if_dc.c8
-rw-r--r--sys/dev/de/if_de.c16
-rw-r--r--sys/dev/digi/digi.c14
-rw-r--r--sys/dev/dpt/dpt_scsi.c4
-rw-r--r--sys/dev/drm/drm_drv.h2
-rw-r--r--sys/dev/drm/drm_memory.h2
-rw-r--r--sys/dev/ed/if_ed.c4
-rw-r--r--sys/dev/em/if_em.c4
-rw-r--r--sys/dev/en/midway.c14
-rw-r--r--sys/dev/ep/if_ep.c8
-rw-r--r--sys/dev/ex/if_ex.c6
-rw-r--r--sys/dev/fb/fb.c6
-rw-r--r--sys/dev/fb/vga.c4
-rw-r--r--sys/dev/fe/if_fe.c4
-rw-r--r--sys/dev/firewire/if_fwe.c4
-rw-r--r--sys/dev/firewire/sbp.c6
-rw-r--r--sys/dev/fxp/if_fxp.c6
-rw-r--r--sys/dev/gem/if_gem.c2
-rw-r--r--sys/dev/gx/if_gx.c4
-rw-r--r--sys/dev/hifn/hifn7751.c12
-rw-r--r--sys/dev/hme/if_hme.c2
-rw-r--r--sys/dev/idt/idt.c8
-rw-r--r--sys/dev/ie/if_ie.c6
-rw-r--r--sys/dev/iicbus/if_ic.c4
-rw-r--r--sys/dev/isp/isp_pci.c6
-rw-r--r--sys/dev/isp/isp_sbus.c4
-rw-r--r--sys/dev/kbd/kbd.c2
-rw-r--r--sys/dev/lge/if_lge.c2
-rw-r--r--sys/dev/lmc/if_lmc.c14
-rw-r--r--sys/dev/lnc/if_lnc.c14
-rw-r--r--sys/dev/md/md.c4
-rw-r--r--sys/dev/mlx/mlx.c2
-rw-r--r--sys/dev/mly/mly.c2
-rw-r--r--sys/dev/mpt/mpt_pci.c4
-rw-r--r--sys/dev/musycc/musycc.c20
-rw-r--r--sys/dev/my/if_my.c8
-rw-r--r--sys/dev/nge/if_nge.c2
-rw-r--r--sys/dev/nmdm/nmdm.c2
-rw-r--r--sys/dev/null/null.c2
-rw-r--r--sys/dev/ofw/openfirm.c4
-rw-r--r--sys/dev/ofw/openfirmio.c4
-rw-r--r--sys/dev/pccard/pccard.c2
-rw-r--r--sys/dev/pci/pci.c2
-rw-r--r--sys/dev/pci/pci_user.c2
-rw-r--r--sys/dev/pdq/pdq_freebsd.h4
-rw-r--r--sys/dev/pdq/pdq_ifsubr.c4
-rw-r--r--sys/dev/pdq/pdqvar.h4
-rw-r--r--sys/dev/ppbus/if_plip.c2
-rw-r--r--sys/dev/ppbus/lpt.c4
-rw-r--r--sys/dev/ppbus/vpo.c2
-rw-r--r--sys/dev/puc/puc.c2
-rw-r--r--sys/dev/raidframe/rf_freebsdkintf.c14
-rw-r--r--sys/dev/raidframe/rf_shutdown.c2
-rw-r--r--sys/dev/random/randomdev.c4
-rw-r--r--sys/dev/ray/if_ray.c6
-rw-r--r--sys/dev/sbni/if_sbni.c4
-rw-r--r--sys/dev/sf/if_sf.c8
-rw-r--r--sys/dev/sk/if_sk.c2
-rw-r--r--sys/dev/sn/if_sn.c4
-rw-r--r--sys/dev/snc/dp83932.c6
-rw-r--r--sys/dev/snp/snp.c8
-rw-r--r--sys/dev/sound/midi/midi.c6
-rw-r--r--sys/dev/sound/midi/midibuf.c2
-rw-r--r--sys/dev/sound/midi/sequencer.c6
-rw-r--r--sys/dev/sound/midi/timer.c4
-rw-r--r--sys/dev/sound/pci/ds1.c2
-rw-r--r--sys/dev/sound/pci/emu10k1.c2
-rw-r--r--sys/dev/sound/pcm/ac97.c2
-rw-r--r--sys/dev/sound/pcm/buffer.c2
-rw-r--r--sys/dev/sound/pcm/fake.c4
-rw-r--r--sys/dev/sound/pcm/feeder.c4
-rw-r--r--sys/dev/sound/pcm/mixer.c2
-rw-r--r--sys/dev/sound/pcm/sndstat.c2
-rw-r--r--sys/dev/sound/pcm/sound.c8
-rw-r--r--sys/dev/sound/pcm/vchan.c4
-rw-r--r--sys/dev/speaker/spkr.c2
-rw-r--r--sys/dev/sr/if_sr.c6
-rw-r--r--sys/dev/streams/streams.c2
-rw-r--r--sys/dev/syscons/daemon/daemon_saver.c2
-rw-r--r--sys/dev/syscons/schistory.c2
-rw-r--r--sys/dev/syscons/scmouse.c2
-rw-r--r--sys/dev/syscons/scvtb.c2
-rw-r--r--sys/dev/syscons/snake/snake_saver.c4
-rw-r--r--sys/dev/syscons/syscons.c12
-rw-r--r--sys/dev/ti/if_ti.c16
-rw-r--r--sys/dev/trm/trm.c4
-rw-r--r--sys/dev/twe/twe.c4
-rw-r--r--sys/dev/tx/if_tx.c8
-rw-r--r--sys/dev/tx/if_txvar.h4
-rw-r--r--sys/dev/txp/if_txp.c12
-rw-r--r--sys/dev/ubsec/ubsec.c12
-rw-r--r--sys/dev/usb/hid.c4
-rw-r--r--sys/dev/usb/if_aue.c4
-rw-r--r--sys/dev/usb/if_cue.c4
-rw-r--r--sys/dev/usb/if_kue.c4
-rw-r--r--sys/dev/usb/ubsa.c4
-rw-r--r--sys/dev/usb/udbp.c4
-rw-r--r--sys/dev/usb/uftdi.c2
-rw-r--r--sys/dev/usb/ugen.c10
-rw-r--r--sys/dev/usb/uhci.c4
-rw-r--r--sys/dev/usb/uhid.c4
-rw-r--r--sys/dev/usb/umass.c2
-rw-r--r--sys/dev/usb/umodem.c2
-rw-r--r--sys/dev/usb/uplcom.c4
-rw-r--r--sys/dev/usb/urio.c2
-rw-r--r--sys/dev/usb/usb.c4
-rw-r--r--sys/dev/usb/uscanner.c4
-rw-r--r--sys/dev/usb/uvisor.c2
-rw-r--r--sys/dev/usb/uvscom.c4
-rw-r--r--sys/dev/vinum/vinumext.h2
-rw-r--r--sys/dev/vinum/vinummemory.c2
-rw-r--r--sys/dev/vr/if_vr.c8
-rw-r--r--sys/dev/vx/if_vx.c8
-rw-r--r--sys/dev/wi/if_wi.c12
-rw-r--r--sys/dev/wl/if_wl.c2
-rw-r--r--sys/dev/xe/if_xe.c4
133 files changed, 364 insertions, 364 deletions
diff --git a/sys/dev/agp/agp.c b/sys/dev/agp/agp.c
index 2281334..ddd29b9 100644
--- a/sys/dev/agp/agp.c
+++ b/sys/dev/agp/agp.c
@@ -351,7 +351,7 @@ agp_generic_alloc_memory(device_t dev, int type, vm_size_t size)
return 0;
}
- mem = malloc(sizeof *mem, M_AGP, M_WAITOK);
+ mem = malloc(sizeof *mem, M_AGP, 0);
mem->am_id = sc->as_nextid++;
mem->am_size = size;
mem->am_type = 0;
diff --git a/sys/dev/agp/agp_i810.c b/sys/dev/agp/agp_i810.c
index dba76a9..d7c42f4 100644
--- a/sys/dev/agp/agp_i810.c
+++ b/sys/dev/agp/agp_i810.c
@@ -500,7 +500,7 @@ agp_i810_alloc_memory(device_t dev, int type, vm_size_t size)
return 0;
}
- mem = malloc(sizeof *mem, M_AGP, M_WAITOK);
+ mem = malloc(sizeof *mem, M_AGP, 0);
mem->am_id = sc->agp.as_nextid++;
mem->am_size = size;
mem->am_type = type;
diff --git a/sys/dev/amr/amr.c b/sys/dev/amr/amr.c
index e75c2af..e763c6c 100644
--- a/sys/dev/amr/amr.c
+++ b/sys/dev/amr/amr.c
@@ -433,7 +433,7 @@ amr_ioctl(dev_t dev, u_long cmd, caddr_t addr, int32_t flag, d_thread_t *td)
debug(1, "AMR_IO_COMMAND 0x%x", au->au_cmd[0]);
/* handle inbound data buffer */
if (au->au_length != 0) {
- if ((dp = malloc(au->au_length, M_DEVBUF, M_WAITOK)) == NULL) {
+ if ((dp = malloc(au->au_length, M_DEVBUF, 0)) == NULL) {
error = ENOMEM;
break;
}
@@ -449,7 +449,7 @@ amr_ioctl(dev_t dev, u_long cmd, caddr_t addr, int32_t flag, d_thread_t *td)
/* handle SCSI passthrough command */
if (au->au_cmd[0] == AMR_CMD_PASS) {
- if ((ap = malloc(sizeof(*ap), M_DEVBUF, M_WAITOK | M_ZERO)) == NULL) {
+ if ((ap = malloc(sizeof(*ap), M_DEVBUF, M_ZERO)) == NULL) {
error = ENOMEM;
break;
}
diff --git a/sys/dev/an/if_an.c b/sys/dev/an/if_an.c
index 0a87b3c..70fb414 100644
--- a/sys/dev/an/if_an.c
+++ b/sys/dev/an/if_an.c
@@ -922,12 +922,12 @@ an_rxeof(sc)
/* dump raw 802.11 packet to bpf and skip ip stack */
BPF_TAP(ifp, bpf_buf, len);
} else {
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL) {
ifp->if_ierrors++;
return;
}
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
if (!(m->m_flags & M_EXT)) {
m_freem(m);
ifp->if_ierrors++;
@@ -1007,12 +1007,12 @@ an_rxeof(sc)
if (an_rx_desc.an_done && !an_rx_desc.an_valid) {
buf = sc->an_rx_buffer[count].an_dma_vaddr;
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL) {
ifp->if_ierrors++;
return;
}
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
if (!(m->m_flags & M_EXT)) {
m_freem(m);
ifp->if_ierrors++;
@@ -3580,7 +3580,7 @@ flashcard(ifp, l_ioctl)
free(sc->an_flash_buffer, M_DEVBUF);
sc->an_flash_buffer = NULL;
}
- sc->an_flash_buffer = malloc(FLASH_SIZE, M_DEVBUF, M_WAITOK);
+ sc->an_flash_buffer = malloc(FLASH_SIZE, M_DEVBUF, 0);
if (sc->an_flash_buffer)
return setflashmode(ifp);
else
diff --git a/sys/dev/ar/if_ar.c b/sys/dev/ar/if_ar.c
index 0c09885..14561f7 100644
--- a/sys/dev/ar/if_ar.c
+++ b/sys/dev/ar/if_ar.c
@@ -1078,7 +1078,7 @@ arc_init(struct ar_hardc *hc)
u_char isr, mar;
MALLOC(sc, struct ar_softc *, hc->numports * sizeof(struct ar_softc),
- M_DEVBUF, M_WAITOK | M_ZERO);
+ M_DEVBUF, M_ZERO);
if (sc == NULL)
return;
hc->sc = sc;
@@ -1678,7 +1678,7 @@ ar_get_packets(struct ar_softc *sc)
while(ar_packet_avail(sc, &len, &rxstat)) {
TRC(printf("apa: len %d, rxstat %x\n", len, rxstat));
if(((rxstat & SCA_DESC_ERRORS) == 0) && (len < MCLBYTES)) {
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if(m == NULL) {
/* eat packet if get mbuf fail!! */
ar_eat_packet(sc, 1);
@@ -1693,7 +1693,7 @@ ar_get_packets(struct ar_softc *sc)
#endif /* NETGRAPH */
m->m_pkthdr.len = m->m_len = len;
if(len > MHLEN) {
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
if((m->m_flags & M_EXT) == 0) {
m_freem(m);
ar_eat_packet(sc, 1);
diff --git a/sys/dev/asr/asr.c b/sys/dev/asr/asr.c
index 4e1c284..c377c9d 100644
--- a/sys/dev/asr/asr.c
+++ b/sys/dev/asr/asr.c
@@ -911,7 +911,7 @@ asr_alloc_ccb (
OUT union asr_ccb * new_ccb;
if ((new_ccb = (union asr_ccb *)malloc(sizeof(*new_ccb),
- M_DEVBUF, M_WAITOK | M_ZERO)) != (union asr_ccb *)NULL) {
+ M_DEVBUF, M_ZERO)) != (union asr_ccb *)NULL) {
new_ccb->ccb_h.pinfo.priority = 1;
new_ccb->ccb_h.pinfo.index = CAM_UNQUEUED_INDEX;
new_ccb->ccb_h.spriv_ptr0 = sc;
@@ -1205,7 +1205,7 @@ ASR_getTidAddress(
if ((new_entry == FALSE)
|| ((sc->ha_targets[bus] = bus_ptr = (target2lun_t *)malloc (
sizeof(*bus_ptr) + (sizeof(bus_ptr->LUN) * new_size),
- M_TEMP, M_WAITOK | M_ZERO))
+ M_TEMP, M_ZERO))
== (target2lun_t *)NULL)) {
debug_asr_printf("failed to allocate bus list\n");
return ((tid_t *)NULL);
@@ -1222,7 +1222,7 @@ ASR_getTidAddress(
if ((new_entry == FALSE)
|| ((new_bus_ptr = (target2lun_t *)malloc (
sizeof(*bus_ptr) + (sizeof(bus_ptr->LUN) * new_size),
- M_TEMP, M_WAITOK | M_ZERO))
+ M_TEMP, M_ZERO))
== (target2lun_t *)NULL)) {
debug_asr_printf("failed to reallocate bus list\n");
return ((tid_t *)NULL);
@@ -1258,7 +1258,7 @@ ASR_getTidAddress(
if ((new_entry == FALSE)
|| ((bus_ptr->LUN[target] = target_ptr = (lun2tid_t *)malloc (
sizeof(*target_ptr) + (sizeof(target_ptr->TID) * new_size),
- M_TEMP, M_WAITOK | M_ZERO))
+ M_TEMP, M_ZERO))
== (lun2tid_t *)NULL)) {
debug_asr_printf("failed to allocate target list\n");
return ((tid_t *)NULL);
@@ -1275,7 +1275,7 @@ ASR_getTidAddress(
if ((new_entry == FALSE)
|| ((new_target_ptr = (lun2tid_t *)malloc (
sizeof(*target_ptr) + (sizeof(target_ptr->TID) * new_size),
- M_TEMP, M_WAITOK | M_ZERO))
+ M_TEMP, M_ZERO))
== (lun2tid_t *)NULL)) {
debug_asr_printf("failed to reallocate target list\n");
return ((tid_t *)NULL);
@@ -1808,7 +1808,7 @@ ASR_acquireLct (
MessageSizeInBytes = sizeof(I2O_EXEC_LCT_NOTIFY_MESSAGE)
- sizeof(I2O_SG_ELEMENT) + sizeof(I2O_SGE_SIMPLE_ELEMENT);
if ((Message_Ptr = (PI2O_EXEC_LCT_NOTIFY_MESSAGE)malloc (
- MessageSizeInBytes, M_TEMP, M_WAITOK))
+ MessageSizeInBytes, M_TEMP, 0))
== (PI2O_EXEC_LCT_NOTIFY_MESSAGE)NULL) {
return (ENOMEM);
}
@@ -1852,7 +1852,7 @@ ASR_acquireLct (
free (Message_Ptr, M_TEMP);
return (EINVAL);
}
- if ((sc->ha_LCT = (PI2O_LCT)malloc (len, M_TEMP, M_WAITOK))
+ if ((sc->ha_LCT = (PI2O_LCT)malloc (len, M_TEMP, 0))
== (PI2O_LCT)NULL) {
free (Message_Ptr, M_TEMP);
return (ENOMEM);
@@ -1921,7 +1921,7 @@ ASR_acquireLct (
PI2O_EXEC_LCT_NOTIFY_MESSAGE NewMessage_Ptr;
if ((NewMessage_Ptr = (PI2O_EXEC_LCT_NOTIFY_MESSAGE)
- malloc (MessageSizeInBytes, M_TEMP, M_WAITOK))
+ malloc (MessageSizeInBytes, M_TEMP, 0))
== (PI2O_EXEC_LCT_NOTIFY_MESSAGE)NULL) {
free (sc->ha_LCT, M_TEMP);
sc->ha_LCT = (PI2O_LCT)NULL;
@@ -2262,7 +2262,7 @@ ASR_initOutBound (
* initialization time.
*/
if ((sc->ha_Msgs = (PI2O_SCSI_ERROR_REPLY_MESSAGE_FRAME)
- contigmalloc (size, M_DEVBUF, M_WAITOK, 0ul,
+ contigmalloc (size, M_DEVBUF, 0, 0ul,
0xFFFFFFFFul, (u_long)sizeof(U32), 0ul))
!= (PI2O_SCSI_ERROR_REPLY_MESSAGE_FRAME)NULL) {
(void)bzero ((char *)sc->ha_Msgs, size);
@@ -2296,7 +2296,7 @@ ASR_setSysTab(
int retVal;
if ((SystemTable = (PI2O_SET_SYSTAB_HEADER)malloc (
- sizeof(I2O_SET_SYSTAB_HEADER), M_TEMP, M_WAITOK | M_ZERO))
+ sizeof(I2O_SET_SYSTAB_HEADER), M_TEMP, M_ZERO))
== (PI2O_SET_SYSTAB_HEADER)NULL) {
return (ENOMEM);
}
@@ -2306,7 +2306,7 @@ ASR_setSysTab(
if ((Message_Ptr = (PI2O_EXEC_SYS_TAB_SET_MESSAGE)malloc (
sizeof(I2O_EXEC_SYS_TAB_SET_MESSAGE) - sizeof(I2O_SG_ELEMENT)
+ ((3+SystemTable->NumberEntries) * sizeof(I2O_SGE_SIMPLE_ELEMENT)),
- M_TEMP, M_WAITOK)) == (PI2O_EXEC_SYS_TAB_SET_MESSAGE)NULL) {
+ M_TEMP, 0)) == (PI2O_EXEC_SYS_TAB_SET_MESSAGE)NULL) {
free (SystemTable, M_TEMP);
return (ENOMEM);
}
@@ -2918,7 +2918,7 @@ asr_attach (ATTACH_ARGS)
/* Check if the device is there? */
if ((ASR_resetIOP(sc->ha_Virt, sc->ha_Fvirt) == 0)
|| ((status = (PI2O_EXEC_STATUS_GET_REPLY)malloc (
- sizeof(I2O_EXEC_STATUS_GET_REPLY), M_TEMP, M_WAITOK))
+ sizeof(I2O_EXEC_STATUS_GET_REPLY), M_TEMP, 0))
== (PI2O_EXEC_STATUS_GET_REPLY)NULL)
|| (ASR_getStatus(sc->ha_Virt, sc->ha_Fvirt, status) == NULL)) {
printf ("asr%d: could not initialize hardware\n", unit);
@@ -3037,7 +3037,7 @@ asr_attach (ATTACH_ARGS)
printf ("asr%d:", unit);
if ((iq = (struct scsi_inquiry_data *)malloc (
- sizeof(struct scsi_inquiry_data), M_TEMP, M_WAITOK | M_ZERO))
+ sizeof(struct scsi_inquiry_data), M_TEMP, M_ZERO))
!= (struct scsi_inquiry_data *)NULL) {
defAlignLong(PRIVATE_SCSI_SCB_EXECUTE_MESSAGE,Message);
PPRIVATE_SCSI_SCB_EXECUTE_MESSAGE Message_Ptr;
@@ -3947,7 +3947,7 @@ ASR_queue_i(
}
/* Copy in the message into a local allocation */
if ((Message_Ptr = (PI2O_MESSAGE_FRAME)malloc (
- sizeof(I2O_MESSAGE_FRAME), M_TEMP, M_WAITOK))
+ sizeof(I2O_MESSAGE_FRAME), M_TEMP, 0))
== (PI2O_MESSAGE_FRAME)NULL) {
debug_usr_cmd_printf (
"Failed to acquire I2O_MESSAGE_FRAME memory\n");
@@ -4014,7 +4014,7 @@ ASR_queue_i(
}
if ((Message_Ptr = (PI2O_MESSAGE_FRAME)malloc (MessageSizeInBytes,
- M_TEMP, M_WAITOK)) == (PI2O_MESSAGE_FRAME)NULL) {
+ M_TEMP, 0)) == (PI2O_MESSAGE_FRAME)NULL) {
debug_usr_cmd_printf ("Failed to acquire frame[%d] memory\n",
MessageSizeInBytes);
return (ENOMEM);
@@ -4030,7 +4030,7 @@ ASR_queue_i(
/* Check the size of the reply frame, and start constructing */
if ((Reply_Ptr = (PI2O_SCSI_ERROR_REPLY_MESSAGE_FRAME)malloc (
- sizeof(I2O_MESSAGE_FRAME), M_TEMP, M_WAITOK))
+ sizeof(I2O_MESSAGE_FRAME), M_TEMP, 0))
== (PI2O_SCSI_ERROR_REPLY_MESSAGE_FRAME)NULL) {
free (Message_Ptr, M_TEMP);
debug_usr_cmd_printf (
@@ -4061,7 +4061,7 @@ ASR_queue_i(
((ReplySizeInBytes > sizeof(I2O_SCSI_ERROR_REPLY_MESSAGE_FRAME))
? ReplySizeInBytes
: sizeof(I2O_SCSI_ERROR_REPLY_MESSAGE_FRAME)),
- M_TEMP, M_WAITOK)) == (PI2O_SCSI_ERROR_REPLY_MESSAGE_FRAME)NULL) {
+ M_TEMP, 0)) == (PI2O_SCSI_ERROR_REPLY_MESSAGE_FRAME)NULL) {
free (Message_Ptr, M_TEMP);
debug_usr_cmd_printf ("Failed to acquire frame[%d] memory\n",
ReplySizeInBytes);
@@ -4130,7 +4130,7 @@ ASR_queue_i(
if ((elm = (struct ioctlSgList_S *)malloc (
sizeof(*elm) - sizeof(elm->KernelSpace) + len,
- M_TEMP, M_WAITOK))
+ M_TEMP, 0))
== (struct ioctlSgList_S *)NULL) {
debug_usr_cmd_printf (
"Failed to allocate SG[%d]\n", len);
@@ -4219,7 +4219,7 @@ ASR_queue_i(
if ((NewMessage_Ptr
= (PI2O_MESSAGE_FRAME)
malloc (MessageSizeInBytes,
- M_TEMP, M_WAITOK))
+ M_TEMP, 0))
== (PI2O_MESSAGE_FRAME)NULL) {
debug_usr_cmd_printf (
"Failed to acquire frame[%d] memory\n",
diff --git a/sys/dev/ata/atapi-cam.c b/sys/dev/ata/atapi-cam.c
index 02e234b..b6329a6 100644
--- a/sys/dev/ata/atapi-cam.c
+++ b/sys/dev/ata/atapi-cam.c
@@ -624,7 +624,7 @@ static void
cam_rescan(struct cam_sim *sim)
{
struct cam_path *path;
- union ccb *ccb = malloc(sizeof(union ccb), M_ATACAM, M_WAITOK | M_ZERO);
+ union ccb *ccb = malloc(sizeof(union ccb), M_ATACAM, M_ZERO);
if (xpt_create_path(&path, xpt_periph, cam_sim_path(sim),
CAM_TARGET_WILDCARD, CAM_LUN_WILDCARD) != CAM_REQ_CMP)
diff --git a/sys/dev/awi/awi.c b/sys/dev/awi/awi.c
index e77fae6..1eeaf78 100644
--- a/sys/dev/awi/awi.c
+++ b/sys/dev/awi/awi.c
@@ -1243,7 +1243,7 @@ awi_fix_txhdr(sc, m0)
llc->llc_snap.org_code[2] = 0;
llc->llc_snap.ether_type = eh.ether_type;
}
- M_PREPEND(m0, sizeof(struct ieee80211_frame), M_DONTWAIT);
+ M_PREPEND(m0, sizeof(struct ieee80211_frame), M_NOWAIT);
if (m0 == NULL)
return NULL;
wh = mtod(m0, struct ieee80211_frame *);
@@ -1321,7 +1321,7 @@ awi_fix_rxhdr(sc, m0)
off = 0;
while (m0->m_pkthdr.len > off) {
if (n0 == NULL) {
- MGETHDR(n, M_DONTWAIT, MT_DATA);
+ MGETHDR(n, M_NOWAIT, MT_DATA);
if (n == NULL) {
m_freem(m0);
return NULL;
@@ -1329,7 +1329,7 @@ awi_fix_rxhdr(sc, m0)
M_MOVE_PKTHDR(n, m0);
n->m_len = MHLEN;
} else {
- MGET(n, M_DONTWAIT, MT_DATA);
+ MGET(n, M_NOWAIT, MT_DATA);
if (n == NULL) {
m_freem(m0);
m_freem(n0);
@@ -1338,7 +1338,7 @@ awi_fix_rxhdr(sc, m0)
n->m_len = MLEN;
}
if (m0->m_pkthdr.len - off >= MINCLSIZE) {
- MCLGET(n, M_DONTWAIT);
+ MCLGET(n, M_NOWAIT);
if (n->m_flags & M_EXT)
n->m_len = n->m_ext.ext_size;
}
@@ -1549,14 +1549,14 @@ awi_devget(sc, off, len)
while (len > 0) {
if (top == NULL) {
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL)
return NULL;
m->m_pkthdr.rcvif = sc->sc_ifp;
m->m_pkthdr.len = len;
m->m_len = MHLEN;
} else {
- MGET(m, M_DONTWAIT, MT_DATA);
+ MGET(m, M_NOWAIT, MT_DATA);
if (m == NULL) {
m_freem(top);
return NULL;
@@ -1564,7 +1564,7 @@ awi_devget(sc, off, len)
m->m_len = MLEN;
}
if (len >= MINCLSIZE) {
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
if (m->m_flags & M_EXT)
m->m_len = m->m_ext.ext_size;
}
@@ -2232,7 +2232,7 @@ awi_send_deauth(sc)
struct ieee80211_frame *wh;
u_int8_t *deauth;
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL)
return;
if (ifp->if_flags & IFF_DEBUG)
@@ -2269,7 +2269,7 @@ awi_send_auth(sc, seq)
struct ieee80211_frame *wh;
u_int8_t *auth;
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL)
return;
sc->sc_status = AWI_ST_AUTH;
@@ -2370,7 +2370,7 @@ awi_send_asreq(sc, reassoc)
u_int16_t capinfo, lintval;
u_int8_t *asreq;
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL)
return;
sc->sc_status = AWI_ST_ASSOC;
diff --git a/sys/dev/awi/awi_wep.c b/sys/dev/awi/awi_wep.c
index ecaf548..1eec023 100644
--- a/sys/dev/awi/awi_wep.c
+++ b/sys/dev/awi/awi_wep.c
@@ -319,7 +319,7 @@ awi_wep_encrypt(sc, m0, txflag)
ctx = sc->sc_wep_ctx;
m = m0;
left = m->m_pkthdr.len;
- MGET(n, M_DONTWAIT, m->m_type);
+ MGET(n, M_NOWAIT, m->m_type);
n0 = n;
if (n == NULL)
goto fail;
@@ -333,7 +333,7 @@ awi_wep_encrypt(sc, m0, txflag)
}
n->m_len = MHLEN;
if (n->m_pkthdr.len >= MINCLSIZE) {
- MCLGET(n, M_DONTWAIT);
+ MCLGET(n, M_NOWAIT);
if (n->m_flags & M_EXT)
n->m_len = n->m_ext.ext_size;
}
@@ -382,13 +382,13 @@ awi_wep_encrypt(sc, m0, txflag)
if (len > n->m_len - noff) {
len = n->m_len - noff;
if (len == 0) {
- MGET(n->m_next, M_DONTWAIT, n->m_type);
+ MGET(n->m_next, M_NOWAIT, n->m_type);
if (n->m_next == NULL)
goto fail;
n = n->m_next;
n->m_len = MLEN;
if (left >= MINCLSIZE) {
- MCLGET(n, M_DONTWAIT);
+ MCLGET(n, M_NOWAIT);
if (n->m_flags & M_EXT)
n->m_len = n->m_ext.ext_size;
}
@@ -418,7 +418,7 @@ awi_wep_encrypt(sc, m0, txflag)
n->m_len = noff + sizeof(crcbuf);
else {
n->m_len = noff;
- MGET(n->m_next, M_DONTWAIT, n->m_type);
+ MGET(n->m_next, M_NOWAIT, n->m_type);
if (n->m_next == NULL)
goto fail;
n = n->m_next;
diff --git a/sys/dev/bge/if_bge.c b/sys/dev/bge/if_bge.c
index 99523c3..da701fc 100644
--- a/sys/dev/bge/if_bge.c
+++ b/sys/dev/bge/if_bge.c
@@ -719,12 +719,12 @@ bge_newbuf_std(sc, i, m)
struct bge_rx_bd *r;
if (m == NULL) {
- MGETHDR(m_new, M_DONTWAIT, MT_DATA);
+ MGETHDR(m_new, M_NOWAIT, MT_DATA);
if (m_new == NULL) {
return(ENOBUFS);
}
- MCLGET(m_new, M_DONTWAIT);
+ MCLGET(m_new, M_NOWAIT);
if (!(m_new->m_flags & M_EXT)) {
m_freem(m_new);
return(ENOBUFS);
@@ -765,7 +765,7 @@ bge_newbuf_jumbo(sc, i, m)
caddr_t *buf = NULL;
/* Allocate the mbuf. */
- MGETHDR(m_new, M_DONTWAIT, MT_DATA);
+ MGETHDR(m_new, M_NOWAIT, MT_DATA);
if (m_new == NULL) {
return(ENOBUFS);
}
diff --git a/sys/dev/cardbus/cardbus.c b/sys/dev/cardbus/cardbus.c
index ff162dd..b87e7a8 100644
--- a/sys/dev/cardbus/cardbus.c
+++ b/sys/dev/cardbus/cardbus.c
@@ -424,7 +424,7 @@ cardbus_read_device(device_t brdev, int b, int s, int f)
if (REG(PCIR_DEVVENDOR, 4) != 0xffffffff) {
devlist_entry = malloc(sizeof(struct cardbus_devinfo),
- M_DEVBUF, M_WAITOK | M_ZERO);
+ M_DEVBUF, M_ZERO);
if (devlist_entry == NULL)
return (NULL);
diff --git a/sys/dev/cardbus/cardbus_cis.c b/sys/dev/cardbus/cardbus_cis.c
index 7c7712a..9bee096 100644
--- a/sys/dev/cardbus/cardbus_cis.c
+++ b/sys/dev/cardbus/cardbus_cis.c
@@ -168,7 +168,7 @@ DECODE_PROTOTYPE(copy)
struct cis_tupleinfo *tmpbuf;
tmpbuf = malloc(sizeof(struct cis_tupleinfo) * (ncisread_buf+1),
- M_DEVBUF, M_WAITOK);
+ M_DEVBUF, 0);
if (ncisread_buf > 0) {
memcpy(tmpbuf, cisread_buf,
sizeof(struct cis_tupleinfo) * ncisread_buf);
@@ -178,7 +178,7 @@ DECODE_PROTOTYPE(copy)
cisread_buf[ncisread_buf].id = id;
cisread_buf[ncisread_buf].len = len;
- cisread_buf[ncisread_buf].data = malloc(len, M_DEVBUF, M_WAITOK);
+ cisread_buf[ncisread_buf].data = malloc(len, M_DEVBUF, 0);
memcpy(cisread_buf[ncisread_buf].data, tupledata, len);
ncisread_buf++;
return (0);
@@ -705,7 +705,7 @@ cardbus_alloc_resources(device_t cbdev, device_t child)
if (count == 0)
return (0);
barlist = malloc(sizeof(struct resource_list_entry*) * count, M_DEVBUF,
- M_WAITOK);
+ 0);
count = 0;
SLIST_FOREACH(rle, &dinfo->pci.resources, link) {
barlist[count] = rle;
diff --git a/sys/dev/ccd/ccd.c b/sys/dev/ccd/ccd.c
index 103a54b..7569420 100644
--- a/sys/dev/ccd/ccd.c
+++ b/sys/dev/ccd/ccd.c
@@ -206,7 +206,7 @@ ccdnew(int unit)
if (IS_ALLOCATED(unit) || unit > 32)
return (NULL);
- MALLOC(sc, struct ccd_s *, sizeof(*sc), M_CCD, M_WAITOK | M_ZERO);
+ MALLOC(sc, struct ccd_s *, sizeof(*sc), M_CCD, M_ZERO);
sc->sc_unit = unit;
LIST_INSERT_HEAD(&ccd_softc_list, sc, list);
/* XXX: UNLOCK(unique unit numbers) */
@@ -283,7 +283,7 @@ ccdinit(struct ccd_s *cs, char **cpaths, struct thread *td)
/* Allocate space for the component info. */
cs->sc_cinfo = malloc(cs->sc_nccdisks * sizeof(struct ccdcinfo),
- M_CCD, M_WAITOK);
+ M_CCD, 0);
/*
* Verify that each component piece exists and record
@@ -291,7 +291,7 @@ ccdinit(struct ccd_s *cs, char **cpaths, struct thread *td)
*/
maxsecsize = 0;
minsize = 0;
- tmppath = malloc(MAXPATHLEN, M_CCD, M_WAITOK);
+ tmppath = malloc(MAXPATHLEN, M_CCD, 0);
for (ix = 0; ix < cs->sc_nccdisks; ix++) {
vp = cs->sc_vpp[ix];
ci = &cs->sc_cinfo[ix];
@@ -304,7 +304,7 @@ ccdinit(struct ccd_s *cs, char **cpaths, struct thread *td)
MAXPATHLEN, &ci->ci_pathlen)) != 0) {
goto fail;
}
- ci->ci_path = malloc(ci->ci_pathlen, M_CCD, M_WAITOK);
+ ci->ci_path = malloc(ci->ci_pathlen, M_CCD, 0);
bcopy(tmppath, ci->ci_path, ci->ci_pathlen);
ci->ci_dev = vn_todev(vp);
@@ -459,7 +459,7 @@ ccdinterleave(struct ccd_s *cs, int unit)
*/
size = (cs->sc_nccdisks + 1) * sizeof(struct ccdiinfo);
cs->sc_itable = (struct ccdiinfo *)malloc(size, M_CCD,
- M_WAITOK | M_ZERO);
+ M_ZERO);
/*
* Trivial case: no interleave (actually interleave of disk size).
@@ -473,7 +473,7 @@ ccdinterleave(struct ccd_s *cs, int unit)
for (ix = 0; ix < cs->sc_nccdisks; ix++) {
/* Allocate space for ii_index. */
- ii->ii_index = malloc(sizeof(int), M_CCD, M_WAITOK);
+ ii->ii_index = malloc(sizeof(int), M_CCD, 0);
ii->ii_ndisk = 1;
ii->ii_startblk = bn;
ii->ii_startoff = 0;
@@ -496,7 +496,7 @@ ccdinterleave(struct ccd_s *cs, int unit)
* we use.
*/
ii->ii_index = malloc((sizeof(int) * cs->sc_nccdisks),
- M_CCD, M_WAITOK);
+ M_CCD, 0);
/*
* Locate the smallest of the remaining components
@@ -1107,9 +1107,9 @@ ccdioctltoo(int unit, u_long cmd, caddr_t data, int flag, struct thread *td)
* componet pathnames and device numbers.
*/
cpp = malloc(ccio->ccio_ndisks * sizeof(char *),
- M_CCD, M_WAITOK);
+ M_CCD, 0);
vpp = malloc(ccio->ccio_ndisks * sizeof(struct vnode *),
- M_CCD, M_WAITOK);
+ M_CCD, 0);
error = copyin((caddr_t)ccio->ccio_disks, (caddr_t)cpp,
ccio->ccio_ndisks * sizeof(char **));
@@ -1164,7 +1164,7 @@ ccdioctltoo(int unit, u_long cmd, caddr_t data, int flag, struct thread *td)
*/
ccio->ccio_unit = unit;
ccio->ccio_size = cs->sc_size;
- cs->sc_disk = malloc(sizeof(struct disk), M_CCD, M_WAITOK);
+ cs->sc_disk = malloc(sizeof(struct disk), M_CCD, 0);
cs->sc_dev = disk_create(unit, cs->sc_disk, 0,
&ccd_cdevsw, &ccddisk_cdevsw);
cs->sc_dev->si_drv1 = cs;
diff --git a/sys/dev/ciss/ciss.c b/sys/dev/ciss/ciss.c
index 6479929..dbf025b 100644
--- a/sys/dev/ciss/ciss.c
+++ b/sys/dev/ciss/ciss.c
@@ -1859,7 +1859,7 @@ ciss_user_command(struct ciss_softc *sc, IOCTL_Command_struct *ioc)
*/
cr->cr_length = ioc->buf_size;
if (ioc->buf_size > 0) {
- if ((cr->cr_data = malloc(ioc->buf_size, CISS_MALLOC_CLASS, M_WAITOK)) == NULL) {
+ if ((cr->cr_data = malloc(ioc->buf_size, CISS_MALLOC_CLASS, 0)) == NULL) {
error = ENOMEM;
goto out;
}
@@ -2038,7 +2038,7 @@ ciss_cam_rescan_target(struct ciss_softc *sc, int target)
debug_called(1);
- if ((ccb = malloc(sizeof(union ccb), M_TEMP, M_WAITOK | M_ZERO)) == NULL) {
+ if ((ccb = malloc(sizeof(union ccb), M_TEMP, M_ZERO)) == NULL) {
ciss_printf(sc, "rescan failed (can't allocate CCB)\n");
return;
}
diff --git a/sys/dev/cm/smc90cx6.c b/sys/dev/cm/smc90cx6.c
index 73f0523..56f10b2 100644
--- a/sys/dev/cm/smc90cx6.c
+++ b/sys/dev/cm/smc90cx6.c
@@ -644,7 +644,7 @@ cm_srint(vsc)
splx(s);
/* Allocate header mbuf */
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == 0) {
/*
@@ -681,7 +681,7 @@ cm_srint(vsc)
*/
if ((len + 2 + 2) > MHLEN) {
/* attach an mbuf cluster */
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
/* Insist on getting a cluster */
if ((m->m_flags & M_EXT) == 0) {
diff --git a/sys/dev/cnw/if_cnw.c b/sys/dev/cnw/if_cnw.c
index 84bdced..7043fff 100644
--- a/sys/dev/cnw/if_cnw.c
+++ b/sys/dev/cnw/if_cnw.c
@@ -941,7 +941,7 @@ cnw_read(sc)
bufbytes = 0;
bufptr = 0; /* XXX make gcc happy */
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == 0)
return (0);
#if !defined(__FreeBSD__)
@@ -956,7 +956,7 @@ cnw_read(sc)
while (totbytes > 0) {
if (top) {
- MGET(m, M_DONTWAIT, MT_DATA);
+ MGET(m, M_NOWAIT, MT_DATA);
if (m == 0) {
m_freem(top);
return (0);
@@ -964,7 +964,7 @@ cnw_read(sc)
mbytes = MLEN;
}
if (totbytes >= MINCLSIZE) {
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
if ((m->m_flags & M_EXT) == 0) {
m_free(m);
m_freem(top);
diff --git a/sys/dev/cs/if_cs.c b/sys/dev/cs/if_cs.c
index bffccf9..94643f0 100644
--- a/sys/dev/cs/if_cs.c
+++ b/sys/dev/cs/if_cs.c
@@ -780,12 +780,12 @@ cs_get_packet(struct cs_softc *sc)
return -1;
}
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m==NULL)
return -1;
if (length > MHLEN) {
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
if (!(m->m_flags & M_EXT)) {
m_freem(m);
return -1;
diff --git a/sys/dev/dc/if_dc.c b/sys/dev/dc/if_dc.c
index a9e599e..2aa4e33 100644
--- a/sys/dev/dc/if_dc.c
+++ b/sys/dev/dc/if_dc.c
@@ -2423,11 +2423,11 @@ dc_newbuf(sc, i, m)
c = &sc->dc_ldata->dc_rx_list[i];
if (m == NULL) {
- MGETHDR(m_new, M_DONTWAIT, MT_DATA);
+ MGETHDR(m_new, M_NOWAIT, MT_DATA);
if (m_new == NULL)
return(ENOBUFS);
- MCLGET(m_new, M_DONTWAIT);
+ MCLGET(m_new, M_NOWAIT);
if (!(m_new->m_flags & M_EXT)) {
m_freem(m_new);
return(ENOBUFS);
@@ -3186,11 +3186,11 @@ dc_coal(sc, m_head)
struct mbuf *m_new, *m;
m = *m_head;
- MGETHDR(m_new, M_DONTWAIT, MT_DATA);
+ MGETHDR(m_new, M_NOWAIT, MT_DATA);
if (m_new == NULL)
return(ENOBUFS);
if (m->m_pkthdr.len > MHLEN) {
- MCLGET(m_new, M_DONTWAIT);
+ MCLGET(m_new, M_NOWAIT);
if (!(m_new->m_flags & M_EXT)) {
m_freem(m_new);
return(ENOBUFS);
diff --git a/sys/dev/de/if_de.c b/sys/dev/de/if_de.c
index d186586..9e1e319 100644
--- a/sys/dev/de/if_de.c
+++ b/sys/dev/de/if_de.c
@@ -195,7 +195,7 @@ tulip_txprobe(
* either is connected so the transmit is the only way
* to verify the connectivity.
*/
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL)
return 0;
/*
@@ -3545,12 +3545,12 @@ tulip_rx_intr(
*/
if (accept || ms == NULL) {
struct mbuf *m0;
- MGETHDR(m0, M_DONTWAIT, MT_DATA);
+ MGETHDR(m0, M_NOWAIT, MT_DATA);
if (m0 != NULL) {
#if defined(TULIP_COPY_RXDATA)
if (!accept || total_len >= (MHLEN - 2)) {
#endif
- MCLGET(m0, M_DONTWAIT);
+ MCLGET(m0, M_NOWAIT);
if ((m0->m_flags & M_EXT) == 0) {
m_freem(m0);
m0 = NULL;
@@ -4061,10 +4061,10 @@ tulip_mbuf_compress(
{
struct mbuf *m0;
#if MCLBYTES >= ETHERMTU + 18 && !defined(BIG_PACKET)
- MGETHDR(m0, M_DONTWAIT, MT_DATA);
+ MGETHDR(m0, M_NOWAIT, MT_DATA);
if (m0 != NULL) {
if (m->m_pkthdr.len > MHLEN) {
- MCLGET(m0, M_DONTWAIT);
+ MCLGET(m0, M_NOWAIT);
if ((m0->m_flags & M_EXT) == 0) {
m_freem(m);
m_freem(m0);
@@ -4081,9 +4081,9 @@ tulip_mbuf_compress(
while (len > 0) {
if (mlen == MHLEN) {
- MGETHDR(*mp, M_DONTWAIT, MT_DATA);
+ MGETHDR(*mp, M_NOWAIT, MT_DATA);
} else {
- MGET(*mp, M_DONTWAIT, MT_DATA);
+ MGET(*mp, M_NOWAIT, MT_DATA);
}
if (*mp == NULL) {
m_freem(m0);
@@ -4091,7 +4091,7 @@ tulip_mbuf_compress(
break;
}
if (len > MLEN) {
- MCLGET(*mp, M_DONTWAIT);
+ MCLGET(*mp, M_NOWAIT);
if (((*mp)->m_flags & M_EXT) == 0) {
m_freem(m0);
m0 = NULL;
diff --git a/sys/dev/digi/digi.c b/sys/dev/digi/digi.c
index 57f6022..cde3b98 100644
--- a/sys/dev/digi/digi.c
+++ b/sys/dev/digi/digi.c
@@ -546,12 +546,12 @@ digi_init(struct digi_softc *sc)
if (sc->ports)
free(sc->ports, M_TTYS);
sc->ports = malloc(sizeof(struct digi_p) * sc->numports,
- M_TTYS, M_WAITOK | M_ZERO);
+ M_TTYS, M_ZERO);
if (sc->ttys)
free(sc->ttys, M_TTYS);
sc->ttys = malloc(sizeof(struct tty) * sc->numports,
- M_TTYS, M_WAITOK | M_ZERO);
+ M_TTYS, M_ZERO);
/*
* XXX Should read port 0xc90 for an array of 2byte values, 1 per
@@ -1035,7 +1035,7 @@ digi_loadmoduledata(struct digi_softc *sc)
KASSERT(sc->module != NULL, ("Uninitialised module name"));
modlen = strlen(sc->module);
- modfile = malloc(modlen + 6, M_TEMP, M_WAITOK);
+ modfile = malloc(modlen + 6, M_TEMP, 0);
snprintf(modfile, modlen + 6, "digi_%s", sc->module);
if ((res = linker_reference_module(modfile, NULL, &lf)) != 0) {
if (res == ENOENT && rootdev == NODEV)
@@ -1049,7 +1049,7 @@ digi_loadmoduledata(struct digi_softc *sc)
if (res != 0)
return (res);
- sym = malloc(modlen + 10, M_TEMP, M_WAITOK);
+ sym = malloc(modlen + 10, M_TEMP, 0);
snprintf(sym, modlen + 10, "digi_mod_%s", sc->module);
if ((symptr = linker_file_lookup_symbol(lf, sym, 0)) == NULL)
printf("digi_%s.ko: Symbol `%s' not found\n", sc->module, sym);
@@ -1065,19 +1065,19 @@ digi_loadmoduledata(struct digi_softc *sc)
sc->bios.size = digi_mod->dm_bios.size;
if (sc->bios.size != 0 && digi_mod->dm_bios.data != NULL) {
- sc->bios.data = malloc(sc->bios.size, M_TTYS, M_WAITOK);
+ sc->bios.data = malloc(sc->bios.size, M_TTYS, 0);
bcopy(digi_mod->dm_bios.data, sc->bios.data, sc->bios.size);
}
sc->fep.size = digi_mod->dm_fep.size;
if (sc->fep.size != 0 && digi_mod->dm_fep.data != NULL) {
- sc->fep.data = malloc(sc->fep.size, M_TTYS, M_WAITOK);
+ sc->fep.data = malloc(sc->fep.size, M_TTYS, 0);
bcopy(digi_mod->dm_fep.data, sc->fep.data, sc->fep.size);
}
sc->link.size = digi_mod->dm_link.size;
if (sc->link.size != 0 && digi_mod->dm_link.data != NULL) {
- sc->link.data = malloc(sc->link.size, M_TTYS, M_WAITOK);
+ sc->link.data = malloc(sc->link.size, M_TTYS, 0);
bcopy(digi_mod->dm_link.data, sc->link.data, sc->link.size);
}
diff --git a/sys/dev/dpt/dpt_scsi.c b/sys/dev/dpt/dpt_scsi.c
index f035a8c..9186c96 100644
--- a/sys/dev/dpt/dpt_scsi.c
+++ b/sys/dev/dpt/dpt_scsi.c
@@ -2321,12 +2321,12 @@ dpt_user_cmd(dpt_softc_t * dpt, eata_pt_t * user_cmd,
/* Data I/O is involved in this command. Alocate buffer */
if (ccb->eata_ccb.cp_datalen > PAGE_SIZE) {
data = contigmalloc(ccb->eata_ccb.cp_datalen,
- M_TEMP, M_WAITOK, 0, ~0,
+ M_TEMP, 0, 0, ~0,
ccb->eata_ccb.cp_datalen,
0x10000);
} else {
data = malloc(ccb->eata_ccb.cp_datalen, M_TEMP,
- M_WAITOK);
+ 0);
}
if (data == NULL) {
diff --git a/sys/dev/drm/drm_drv.h b/sys/dev/drm/drm_drv.h
index 729b2f9..1425859 100644
--- a/sys/dev/drm/drm_drv.h
+++ b/sys/dev/drm/drm_drv.h
@@ -1451,7 +1451,7 @@ DRM(linux_ioctl)(DRM_OS_STRUCTPROC *p, struct linux_ioctl_args* args)
if ( size > STK_PARAMS ) {
if ( size > IOCPARM_MAX )
return EINVAL;
- memp = malloc( (u_long)size, DRM(M_DRM), M_WAITOK );
+ memp = malloc( (u_long)size, DRM(M_DRM), 0 );
data = memp;
} else {
data = ubuf.stkbuf;
diff --git a/sys/dev/drm/drm_memory.h b/sys/dev/drm/drm_memory.h
index 81fa561..c6f319c 100644
--- a/sys/dev/drm/drm_memory.h
+++ b/sys/dev/drm/drm_memory.h
@@ -288,7 +288,7 @@ unsigned long DRM(alloc_pages)(int order, int area)
address = __get_free_pages(GFP_KERNEL, order);
#endif /* __linux__ */
#ifdef __FreeBSD__
- address = (vm_offset_t) contigmalloc(bytes, DRM(M_DRM), M_WAITOK, 0, ~0, 1, 0);
+ address = (vm_offset_t) contigmalloc(bytes, DRM(M_DRM), 0, 0, ~0, 1, 0);
#endif /* __FreeBSD__ */
if (!address) {
DRM_OS_SPINLOCK(&DRM(mem_lock));
diff --git a/sys/dev/ed/if_ed.c b/sys/dev/ed/if_ed.c
index 8d1c849..e5040a5 100644
--- a/sys/dev/ed/if_ed.c
+++ b/sys/dev/ed/if_ed.c
@@ -2679,7 +2679,7 @@ ed_get_packet(sc, buf, len)
struct mbuf *m;
/* Allocate a header mbuf */
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL)
return;
m->m_pkthdr.rcvif = ifp;
@@ -2693,7 +2693,7 @@ ed_get_packet(sc, buf, len)
*/
if ((len + 2) > MHLEN) {
/* Attach an mbuf cluster */
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
/* Insist on getting a cluster */
if ((m->m_flags & M_EXT) == 0) {
diff --git a/sys/dev/em/if_em.c b/sys/dev/em/if_em.c
index 1503ea2..9f8b609 100644
--- a/sys/dev/em/if_em.c
+++ b/sys/dev/em/if_em.c
@@ -1802,12 +1802,12 @@ em_get_buf(int i, struct adapter *adapter,
ifp = &adapter->interface_data.ac_if;
if (mp == NULL) {
- MGETHDR(mp, M_DONTWAIT, MT_DATA);
+ MGETHDR(mp, M_NOWAIT, MT_DATA);
if (mp == NULL) {
adapter->mbuf_alloc_failed++;
return(ENOBUFS);
}
- MCLGET(mp, M_DONTWAIT);
+ MCLGET(mp, M_NOWAIT);
if ((mp->m_flags & M_EXT) == 0) {
m_freem(mp);
adapter->mbuf_cluster_failed++;
diff --git a/sys/dev/en/midway.c b/sys/dev/en/midway.c
index ffcc6c9..3e5d3f3 100644
--- a/sys/dev/en/midway.c
+++ b/sys/dev/en/midway.c
@@ -601,7 +601,7 @@ u_int totlen, *drqneed;
struct mbuf *top, **mp;
*drqneed = 0;
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL)
return(NULL);
m->m_pkthdr.rcvif = &sc->enif;
@@ -613,7 +613,7 @@ u_int totlen, *drqneed;
/* if (top != NULL) then we've already got 1 mbuf on the chain */
while (totlen > 0) {
if (top) {
- MGET(m, M_DONTWAIT, MT_DATA);
+ MGET(m, M_NOWAIT, MT_DATA);
if (!m) {
m_freem(top);
return(NULL); /* out of mbufs */
@@ -621,7 +621,7 @@ u_int totlen, *drqneed;
m->m_len = MLEN;
}
if (totlen >= MINCLSIZE) {
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
if ((m->m_flags & M_EXT) == 0) {
m_free(m);
m_freem(top);
@@ -1770,12 +1770,12 @@ struct mbuf **mm, *prev;
m->m_data = (caddr_t)d;
} else {
/* can't write to an M_EXT mbuf since it may be shared */
- MGET(new, M_DONTWAIT, MT_DATA);
+ MGET(new, M_NOWAIT, MT_DATA);
if (!new) {
EN_COUNT(sc->mfixfail);
return(0);
}
- MCLGET(new, M_DONTWAIT);
+ MCLGET(new, M_NOWAIT);
if ((new->m_flags & M_EXT) == 0) {
m_free(new);
EN_COUNT(sc->mfixfail);
@@ -1837,14 +1837,14 @@ STATIC int en_makeexclusive(sc, mm, prev)
if (MEXT_IS_REF(m)) {
/* make a real copy of the M_EXT mbuf since it is shared */
- MGET(new, M_DONTWAIT, MT_DATA);
+ MGET(new, M_NOWAIT, MT_DATA);
if (!new) {
EN_COUNT(sc->mfixfail);
return(0);
}
if (m->m_flags & M_PKTHDR)
M_MOVE_PKTHDR(new, m);
- MCLGET(new, M_DONTWAIT);
+ MCLGET(new, M_NOWAIT);
if ((new->m_flags & M_EXT) == 0) {
m_free(new);
EN_COUNT(sc->mfixfail);
diff --git a/sys/dev/ep/if_ep.c b/sys/dev/ep/if_ep.c
index 749fa58..5e0dc5d 100644
--- a/sys/dev/ep/if_ep.c
+++ b/sys/dev/ep/if_ep.c
@@ -686,11 +686,11 @@ read_again:
rx_fifo = rx_fifo2 = status & RX_BYTES_MASK;
if (EP_FTST(sc, F_RX_FIRST)) {
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (!m)
goto out;
if (rx_fifo >= MINCLSIZE)
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
sc->top = sc->mcur = top = m;
#define EROUND ((sizeof(struct ether_header) + 3) & ~3)
#define EOFF (EROUND - sizeof(struct ether_header))
@@ -714,11 +714,11 @@ read_again:
lenthisone = min(rx_fifo, M_TRAILINGSPACE(m));
if (lenthisone == 0) { /* no room in this one */
mcur = m;
- MGET(m, M_DONTWAIT, MT_DATA);
+ MGET(m, M_NOWAIT, MT_DATA);
if (!m)
goto out;
if (rx_fifo >= MINCLSIZE)
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
m->m_len = 0;
mcur->m_next = m;
lenthisone = min(rx_fifo, M_TRAILINGSPACE(m));
diff --git a/sys/dev/ex/if_ex.c b/sys/dev/ex/if_ex.c
index f7458af..d948af2 100644
--- a/sys/dev/ex/if_ex.c
+++ b/sys/dev/ex/if_ex.c
@@ -695,7 +695,7 @@ ex_rx_intr(struct ex_softc *sc)
QQQ = pkt_len = inw(iobase + IO_PORT_REG);
if (rx_status & RCV_OK_bit) {
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
ipkt = m;
if (ipkt == NULL) {
ifp->if_iqdrops++;
@@ -706,7 +706,7 @@ ex_rx_intr(struct ex_softc *sc)
while (pkt_len > 0) {
if (pkt_len > MINCLSIZE) {
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
if (m->m_flags & M_EXT) {
m->m_len = MCLBYTES;
} else {
@@ -731,7 +731,7 @@ ex_rx_intr(struct ex_softc *sc)
pkt_len -= m->m_len;
if (pkt_len > 0) {
- MGET(m->m_next, M_DONTWAIT, MT_DATA);
+ MGET(m->m_next, M_NOWAIT, MT_DATA);
if (m->m_next == NULL) {
m_freem(ipkt);
ifp->if_iqdrops++;
diff --git a/sys/dev/fb/fb.c b/sys/dev/fb/fb.c
index 0dbb73b..edfc64e 100644
--- a/sys/dev/fb/fb.c
+++ b/sys/dev/fb/fb.c
@@ -86,12 +86,12 @@ vid_realloc_array(void)
s = spltty();
newsize = ((adapters + ARRAY_DELTA)/ARRAY_DELTA)*ARRAY_DELTA;
- new_adp = malloc(sizeof(*new_adp)*newsize, M_DEVBUF, M_WAITOK | M_ZERO);
+ new_adp = malloc(sizeof(*new_adp)*newsize, M_DEVBUF, M_ZERO);
new_vidsw = malloc(sizeof(*new_vidsw)*newsize, M_DEVBUF,
- M_WAITOK | M_ZERO);
+ M_ZERO);
#ifdef FB_INSTALL_CDEV
new_cdevsw = malloc(sizeof(*new_cdevsw)*newsize, M_DEVBUF,
- M_WAITOK | M_ZERO);
+ M_ZERO);
#endif
bcopy(adapter, new_adp, sizeof(*adapter)*adapters);
bcopy(vidsw, new_vidsw, sizeof(*vidsw)*adapters);
diff --git a/sys/dev/fb/vga.c b/sys/dev/fb/vga.c
index 56e015b..0f3cda1 100644
--- a/sys/dev/fb/vga.c
+++ b/sys/dev/fb/vga.c
@@ -2848,7 +2848,7 @@ get_palette(video_adapter_t *adp, int base, int count,
if ((base < 0) || (base >= 256) || (base + count > 256))
return EINVAL;
- r = malloc(count*3, M_DEVBUF, M_WAITOK);
+ r = malloc(count*3, M_DEVBUF, 0);
g = r + count;
b = g + count;
if (vga_save_palette2(adp, base, count, r, g, b)) {
@@ -2879,7 +2879,7 @@ set_palette(video_adapter_t *adp, int base, int count,
if ((base < 0) || (base >= 256) || (base + count > 256))
return EINVAL;
- r = malloc(count*3, M_DEVBUF, M_WAITOK);
+ r = malloc(count*3, M_DEVBUF, 0);
g = r + count;
b = g + count;
copyin(red, r, count);
diff --git a/sys/dev/fe/if_fe.c b/sys/dev/fe/if_fe.c
index b6ad14c..81e4865 100644
--- a/sys/dev/fe/if_fe.c
+++ b/sys/dev/fe/if_fe.c
@@ -1847,13 +1847,13 @@ fe_get_packet (struct fe_softc * sc, u_short len)
*/
/* Allocate an mbuf with packet header info. */
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL)
return -1;
/* Attach a cluster if this packet doesn't fit in a normal mbuf. */
if (len > MHLEN - NFS_MAGIC_OFFSET) {
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
if (!(m->m_flags & M_EXT)) {
m_freem(m);
return -1;
diff --git a/sys/dev/firewire/if_fwe.c b/sys/dev/firewire/if_fwe.c
index 49722fe..5c77705 100644
--- a/sys/dev/firewire/if_fwe.c
+++ b/sys/dev/firewire/if_fwe.c
@@ -466,7 +466,7 @@ fwe_as_output(struct fwe_softc *fwe, struct ifnet *ifp)
xfer->act.hand = fwe_output_callback;
/* keep ip packet alignment for alpha */
- M_PREPEND(m, ALIGN_PAD, M_DONTWAIT);
+ M_PREPEND(m, ALIGN_PAD, M_NOWAIT);
fp = (struct fw_pkt *)&xfer->dst; /* XXX */
xfer->dst = *((int32_t *)&fwe->pkt_hdr);
fp->mode.stream.len = htons(m->m_pkthdr.len);
@@ -544,7 +544,7 @@ fwe_as_input(struct fw_xferq *xferq)
while ((xfer = STAILQ_FIRST(&xferq->q)) != NULL) {
STAILQ_REMOVE_HEAD(&xferq->q, link);
xferq->queued --;
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL) {
printf("MGETHDR failed\n");
fw_xfer_free(xfer);
diff --git a/sys/dev/firewire/sbp.c b/sys/dev/firewire/sbp.c
index a8ed494..43da1cd 100644
--- a/sys/dev/firewire/sbp.c
+++ b/sys/dev/firewire/sbp.c
@@ -763,7 +763,7 @@ END_DEBUG
static void
sbp_cam_scan_lun(struct sbp_dev *sdev)
{
- union ccb *ccb = malloc(sizeof(union ccb), M_SBP, M_WAITOK | M_ZERO);
+ union ccb *ccb = malloc(sizeof(union ccb), M_SBP, M_ZERO);
SBP_DEBUG(0)
sbp_show_sdev_info(sdev, 2);
@@ -822,9 +822,9 @@ sbp_ping_unit(struct sbp_dev *sdev)
union ccb *ccb;
struct scsi_inquiry_data *inq_buf;
- ccb = malloc(sizeof(union ccb), M_SBP, M_WAITOK | M_ZERO);
+ ccb = malloc(sizeof(union ccb), M_SBP, M_ZERO);
inq_buf = (struct scsi_inquiry_data *)
- malloc(sizeof(*inq_buf), M_SBP, M_WAITOK);
+ malloc(sizeof(*inq_buf), M_SBP, 0);
SBP_DEBUG(1)
sbp_show_sdev_info(sdev, 2);
diff --git a/sys/dev/fxp/if_fxp.c b/sys/dev/fxp/if_fxp.c
index 5b7e249..34f1e98 100644
--- a/sys/dev/fxp/if_fxp.c
+++ b/sys/dev/fxp/if_fxp.c
@@ -1068,13 +1068,13 @@ tbdinit:
* mbuf chain first. Bail out if we can't get the
* new buffers.
*/
- MGETHDR(mn, M_DONTWAIT, MT_DATA);
+ MGETHDR(mn, M_NOWAIT, MT_DATA);
if (mn == NULL) {
m_freem(mb_head);
break;
}
if (mb_head->m_pkthdr.len > MHLEN) {
- MCLGET(mn, M_DONTWAIT);
+ MCLGET(mn, M_NOWAIT);
if ((mn->m_flags & M_EXT) == 0) {
m_freem(mn);
m_freem(mb_head);
@@ -1872,7 +1872,7 @@ fxp_add_rfabuf(struct fxp_softc *sc, struct mbuf *oldm)
struct mbuf *m;
struct fxp_rfa *rfa, *p_rfa;
- m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (m == NULL) { /* try to recycle the old mbuf instead */
if (oldm == NULL)
return 1;
diff --git a/sys/dev/gem/if_gem.c b/sys/dev/gem/if_gem.c
index 635bd27..b6fc4a7 100644
--- a/sys/dev/gem/if_gem.c
+++ b/sys/dev/gem/if_gem.c
@@ -1425,7 +1425,7 @@ gem_add_rxbuf(sc, idx)
struct mbuf *m;
int error;
- m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (m == NULL)
return (ENOBUFS);
m->m_len = m->m_pkthdr.len = m->m_ext.ext_size;
diff --git a/sys/dev/gx/if_gx.c b/sys/dev/gx/if_gx.c
index 8d59cd6..8dec6b2 100644
--- a/sys/dev/gx/if_gx.c
+++ b/sys/dev/gx/if_gx.c
@@ -1068,13 +1068,13 @@ gx_newbuf(struct gx_softc *gx, int idx, struct mbuf *m)
struct gx_rx_desc *r;
if (m == NULL) {
- MGETHDR(m_new, M_DONTWAIT, MT_DATA);
+ MGETHDR(m_new, M_NOWAIT, MT_DATA);
if (m_new == NULL) {
device_printf(gx->gx_dev,
"mbuf allocation failed -- packet dropped\n");
return (ENOBUFS);
}
- MCLGET(m_new, M_DONTWAIT);
+ MCLGET(m_new, M_NOWAIT);
if ((m_new->m_flags & M_EXT) == 0) {
device_printf(gx->gx_dev,
"cluster allocation failed -- packet dropped\n");
diff --git a/sys/dev/hifn/hifn7751.c b/sys/dev/hifn/hifn7751.c
index 723f19f..81762a8 100644
--- a/sys/dev/hifn/hifn7751.c
+++ b/sys/dev/hifn/hifn7751.c
@@ -1669,14 +1669,14 @@ hifn_crypto(
totlen = cmd->src_mapsize;
if (cmd->src_m->m_flags & M_PKTHDR) {
len = MHLEN;
- MGETHDR(m0, M_DONTWAIT, MT_DATA);
- if (m0 && !m_dup_pkthdr(m0, cmd->src_m, M_DONTWAIT)) {
+ MGETHDR(m0, M_NOWAIT, MT_DATA);
+ if (m0 && !m_dup_pkthdr(m0, cmd->src_m, M_NOWAIT)) {
m_free(m0);
m0 = NULL;
}
} else {
len = MLEN;
- MGET(m0, M_DONTWAIT, MT_DATA);
+ MGET(m0, M_NOWAIT, MT_DATA);
}
if (m0 == NULL) {
hifnstats.hst_nomem_mbuf++;
@@ -1684,7 +1684,7 @@ hifn_crypto(
goto err_srcmap;
}
if (totlen >= MINCLSIZE) {
- MCLGET(m0, M_DONTWAIT);
+ MCLGET(m0, M_NOWAIT);
if ((m0->m_flags & M_EXT) == 0) {
hifnstats.hst_nomem_mcl++;
err = dma->cmdu ? ERESTART : ENOMEM;
@@ -1698,7 +1698,7 @@ hifn_crypto(
mlast = m0;
while (totlen > 0) {
- MGET(m, M_DONTWAIT, MT_DATA);
+ MGET(m, M_NOWAIT, MT_DATA);
if (m == NULL) {
hifnstats.hst_nomem_mbuf++;
err = dma->cmdu ? ERESTART : ENOMEM;
@@ -1707,7 +1707,7 @@ hifn_crypto(
}
len = MLEN;
if (totlen >= MINCLSIZE) {
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
if ((m->m_flags & M_EXT) == 0) {
hifnstats.hst_nomem_mcl++;
err = dma->cmdu ? ERESTART : ENOMEM;
diff --git a/sys/dev/hme/if_hme.c b/sys/dev/hme/if_hme.c
index 779141b6..9db0856 100644
--- a/sys/dev/hme/if_hme.c
+++ b/sys/dev/hme/if_hme.c
@@ -493,7 +493,7 @@ hme_add_rxbuf(struct hme_softc *sc, unsigned int ri, int keepold)
hme_discard_rxbuf(sc, ri, 0);
return (0);
}
- if ((m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR)) == NULL)
+ if ((m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR)) == NULL)
return (ENOBUFS);
m->m_len = m->m_pkthdr.len = m->m_ext.ext_size;
b = mtod(m, uintptr_t);
diff --git a/sys/dev/idt/idt.c b/sys/dev/idt/idt.c
index dd08b75..3971e08 100644
--- a/sys/dev/idt/idt.c
+++ b/sys/dev/idt/idt.c
@@ -1171,10 +1171,10 @@ nicstar_ld_rcv_buf(IDT * idt)
idt_sysctl_buflarge = 10;
while (card_small < idt_sysctl_bufsmall) { /* 05/25/2001 from fixed */
- MGETHDR(m1, M_DONTWAIT, MT_DATA);
+ MGETHDR(m1, M_NOWAIT, MT_DATA);
if (m1 == NULL)
break;
- MGETHDR(m2, M_DONTWAIT, MT_DATA);
+ MGETHDR(m2, M_NOWAIT, MT_DATA);
if (m2 == NULL) {
m_free(m1);
break;
@@ -2006,11 +2006,11 @@ idt_mbufcl_get(void)
{
struct mbuf *m;
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL)
return (NULL);
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
if (m->m_flags & M_EXT)
return (m);
diff --git a/sys/dev/ie/if_ie.c b/sys/dev/ie/if_ie.c
index b3e844c6..088f122 100644
--- a/sys/dev/ie/if_ie.c
+++ b/sys/dev/ie/if_ie.c
@@ -1133,7 +1133,7 @@ ieget(int unit, struct ie_softc *ie, struct mbuf **mp)
if (totlen <= 0)
return (-1);
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (!m) {
ie_drop_packet_buffer(unit, ie);
/* XXXX if_ierrors++; */
@@ -1188,7 +1188,7 @@ ieget(int unit, struct ie_softc *ie, struct mbuf **mp)
* single mbuf which may or may not be big enough. Got that?
*/
if (top) {
- MGET(m, M_DONTWAIT, MT_DATA);
+ MGET(m, M_NOWAIT, MT_DATA);
if (!m) {
m_freem(top);
ie_drop_packet_buffer(unit, ie);
@@ -1197,7 +1197,7 @@ ieget(int unit, struct ie_softc *ie, struct mbuf **mp)
m->m_len = MLEN;
}
if (resid >= MINCLSIZE) {
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
if (m->m_flags & M_EXT)
m->m_len = min(resid, MCLBYTES);
} else {
diff --git a/sys/dev/iicbus/if_ic.c b/sys/dev/iicbus/if_ic.c
index a6660b7..84d7b2f 100644
--- a/sys/dev/iicbus/if_ic.c
+++ b/sys/dev/iicbus/if_ic.c
@@ -192,14 +192,14 @@ icioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
return (error);
sc->ic_obuf = malloc(sc->ic_if.if_mtu + ICHDRLEN,
- M_DEVBUF, M_WAITOK);
+ M_DEVBUF, 0);
if (!sc->ic_obuf) {
iicbus_release_bus(parent, icdev);
return ENOBUFS;
}
sc->ic_ifbuf = malloc(sc->ic_if.if_mtu + ICHDRLEN,
- M_DEVBUF, M_WAITOK);
+ M_DEVBUF, 0);
if (!sc->ic_ifbuf) {
iicbus_release_bus(parent, icdev);
return ENOBUFS;
diff --git a/sys/dev/isp/isp_pci.c b/sys/dev/isp/isp_pci.c
index 9636a7f..449fa14 100644
--- a/sys/dev/isp/isp_pci.c
+++ b/sys/dev/isp/isp_pci.c
@@ -624,7 +624,7 @@ isp_pci_attach(device_t dev)
}
if (amt) {
FCPARAM(isp)->isp_dump_data =
- malloc(amt, M_DEVBUF, M_WAITOK | M_ZERO);
+ malloc(amt, M_DEVBUF, M_ZERO);
} else {
device_printf(dev,
"f/w crash dumps not supported for this model\n");
@@ -1105,14 +1105,14 @@ isp_pci_mbxdma(struct ispsoftc *isp)
len = sizeof (XS_T **) * isp->isp_maxcmds;
- isp->isp_xflist = (XS_T **) malloc(len, M_DEVBUF, M_WAITOK | M_ZERO);
+ isp->isp_xflist = (XS_T **) malloc(len, M_DEVBUF, M_ZERO);
if (isp->isp_xflist == NULL) {
isp_prt(isp, ISP_LOGERR, "cannot alloc xflist array");
ISP_LOCK(isp);
return (1);
}
len = sizeof (bus_dmamap_t) * isp->isp_maxcmds;
- pcs->dmaps = (bus_dmamap_t *) malloc(len, M_DEVBUF, M_WAITOK);
+ pcs->dmaps = (bus_dmamap_t *) malloc(len, M_DEVBUF, 0);
if (pcs->dmaps == NULL) {
isp_prt(isp, ISP_LOGERR, "can't alloc dma map storage");
free(isp->isp_xflist, M_DEVBUF);
diff --git a/sys/dev/isp/isp_sbus.c b/sys/dev/isp/isp_sbus.c
index d2af1a5..829ee8e 100644
--- a/sys/dev/isp/isp_sbus.c
+++ b/sys/dev/isp/isp_sbus.c
@@ -498,14 +498,14 @@ isp_sbus_mbxdma(struct ispsoftc *isp)
}
len = sizeof (XS_T **) * isp->isp_maxcmds;
- isp->isp_xflist = (XS_T **) malloc(len, M_DEVBUF, M_WAITOK | M_ZERO);
+ isp->isp_xflist = (XS_T **) malloc(len, M_DEVBUF, M_ZERO);
if (isp->isp_xflist == NULL) {
isp_prt(isp, ISP_LOGERR, "cannot alloc xflist array");
ISP_LOCK(isp);
return (1);
}
len = sizeof (bus_dmamap_t) * isp->isp_maxcmds;
- sbs->dmaps = (bus_dmamap_t *) malloc(len, M_DEVBUF, M_WAITOK);
+ sbs->dmaps = (bus_dmamap_t *) malloc(len, M_DEVBUF, 0);
if (sbs->dmaps == NULL) {
isp_prt(isp, ISP_LOGERR, "can't alloc dma map storage");
free(isp->isp_xflist, M_DEVBUF);
diff --git a/sys/dev/kbd/kbd.c b/sys/dev/kbd/kbd.c
index 6eef728..035813a 100644
--- a/sys/dev/kbd/kbd.c
+++ b/sys/dev/kbd/kbd.c
@@ -454,7 +454,7 @@ kbd_attach(keyboard_t *kbd)
"kbd%r", kbd->kb_index);
if (dev->si_drv1 == NULL)
dev->si_drv1 = malloc(sizeof(genkbd_softc_t), M_DEVBUF,
- M_WAITOK);
+ 0);
bzero(dev->si_drv1, sizeof(genkbd_softc_t));
printf("kbd%d at %s%d\n", kbd->kb_index, kbd->kb_name, kbd->kb_unit);
diff --git a/sys/dev/lge/if_lge.c b/sys/dev/lge/if_lge.c
index 9efa94da..81d1041 100644
--- a/sys/dev/lge/if_lge.c
+++ b/sys/dev/lge/if_lge.c
@@ -784,7 +784,7 @@ lge_newbuf(sc, c, m)
caddr_t *buf = NULL;
if (m == NULL) {
- MGETHDR(m_new, M_DONTWAIT, MT_DATA);
+ MGETHDR(m_new, M_NOWAIT, MT_DATA);
if (m_new == NULL) {
printf("lge%d: no memory for rx list "
"-- packet dropped!\n", sc->lge_unit);
diff --git a/sys/dev/lmc/if_lmc.c b/sys/dev/lmc/if_lmc.c
index 83250cf..68fce90 100644
--- a/sys/dev/lmc/if_lmc.c
+++ b/sys/dev/lmc/if_lmc.c
@@ -621,9 +621,9 @@ lmc_rx_intr(lmc_softc_t * const sc)
*/
if (accept || ms == NULL) {
struct mbuf *m0;
- MGETHDR(m0, M_DONTWAIT, MT_DATA);
+ MGETHDR(m0, M_NOWAIT, MT_DATA);
if (m0 != NULL) {
- MCLGET(m0, M_DONTWAIT);
+ MCLGET(m0, M_NOWAIT);
if ((m0->m_flags & M_EXT) == 0) {
m_freem(m0);
m0 = NULL;
@@ -830,10 +830,10 @@ lmc_mbuf_compress(struct mbuf *m)
{
struct mbuf *m0;
#if MCLBYTES >= LMC_MTU + PPP_HEADER_LEN && !defined(BIG_PACKET)
- MGETHDR(m0, M_DONTWAIT, MT_DATA);
+ MGETHDR(m0, M_NOWAIT, MT_DATA);
if (m0 != NULL) {
if (m->m_pkthdr.len > MHLEN) {
- MCLGET(m0, M_DONTWAIT);
+ MCLGET(m0, M_NOWAIT);
if ((m0->m_flags & M_EXT) == 0) {
m_freem(m);
m_freem(m0);
@@ -850,9 +850,9 @@ lmc_mbuf_compress(struct mbuf *m)
while (len > 0) {
if (mlen == MHLEN) {
- MGETHDR(*mp, M_DONTWAIT, MT_DATA);
+ MGETHDR(*mp, M_NOWAIT, MT_DATA);
} else {
- MGET(*mp, M_DONTWAIT, MT_DATA);
+ MGET(*mp, M_NOWAIT, MT_DATA);
}
if (*mp == NULL) {
m_freem(m0);
@@ -860,7 +860,7 @@ lmc_mbuf_compress(struct mbuf *m)
break;
}
if (len > MLEN) {
- MCLGET(*mp, M_DONTWAIT);
+ MCLGET(*mp, M_NOWAIT);
if (((*mp)->m_flags & M_EXT) == 0) {
m_freem(m0);
m0 = NULL;
diff --git a/sys/dev/lnc/if_lnc.c b/sys/dev/lnc/if_lnc.c
index eeb678a..c1d63f1 100644
--- a/sys/dev/lnc/if_lnc.c
+++ b/sys/dev/lnc/if_lnc.c
@@ -314,10 +314,10 @@ alloc_mbuf_cluster(struct lnc_softc *sc, struct host_ring_entry *desc)
sc->mbufs = m->m_next;
/* XXX m->m_data = m->m_ext.ext_buf;*/
} else {
- MGET(m, M_DONTWAIT, MT_DATA);
+ MGET(m, M_NOWAIT, MT_DATA);
if (!m)
return(1);
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
if (!m->m_ext.ext_buf) {
m_free(m);
return(1);
@@ -379,7 +379,7 @@ mbuf_packet(struct lnc_softc *sc, int start_of_packet, int pkt_len)
int amount;
/* Get a pkthdr mbuf for the start of packet */
- MGETHDR(head, M_DONTWAIT, MT_DATA);
+ MGETHDR(head, M_NOWAIT, MT_DATA);
if (!head) {
LNCSTATS(drop_packet)
return(0);
@@ -409,13 +409,13 @@ mbuf_packet(struct lnc_softc *sc, int start_of_packet, int pkt_len)
if (amount == 0) {
/* mbuf must be empty */
m_prev = m;
- MGET(m, M_DONTWAIT, MT_DATA);
+ MGET(m, M_NOWAIT, MT_DATA);
if (!m) {
m_freem(head);
return(0);
}
if (pkt_len >= MINCLSIZE)
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
m->m_len = 0;
m_prev->m_next = m;
amount = min(blen, M_TRAILINGSPACE(m));
@@ -1218,9 +1218,9 @@ chain_to_cluster(struct mbuf *m)
{
struct mbuf *new;
- MGET(new, M_DONTWAIT, MT_DATA);
+ MGET(new, M_NOWAIT, MT_DATA);
if (new) {
- MCLGET(new, M_DONTWAIT);
+ MCLGET(new, M_NOWAIT);
if (new->m_ext.ext_buf) {
new->m_len = mbuf_to_buffer(m, new->m_data);
m_freem(m);
diff --git a/sys/dev/md/md.c b/sys/dev/md/md.c
index b9f3c52..4befee3 100644
--- a/sys/dev/md/md.c
+++ b/sys/dev/md/md.c
@@ -759,7 +759,7 @@ mdnew(int unit)
unit = max + 1;
if (unit > 255)
return (NULL);
- sc = (struct md_s *)malloc(sizeof *sc, M_MD, M_WAITOK | M_ZERO);
+ sc = (struct md_s *)malloc(sizeof *sc, M_MD, M_ZERO);
sc->unit = unit;
bioq_init(&sc->bio_queue);
mtx_init(&sc->queue_mtx, "md bio queue", NULL, MTX_DEF);
@@ -918,7 +918,7 @@ mdsetcred(struct md_s *sc, struct ucred *cred)
struct uio auio;
struct iovec aiov;
- tmpbuf = malloc(sc->secsize, M_TEMP, M_WAITOK);
+ tmpbuf = malloc(sc->secsize, M_TEMP, 0);
bzero(&auio, sizeof(auio));
aiov.iov_base = tmpbuf;
diff --git a/sys/dev/mlx/mlx.c b/sys/dev/mlx/mlx.c
index aecd9dc..61e1c8b 100644
--- a/sys/dev/mlx/mlx.c
+++ b/sys/dev/mlx/mlx.c
@@ -1880,7 +1880,7 @@ mlx_user_command(struct mlx_softc *sc, struct mlx_usercommand *mu)
if (mu->mu_datasize > 0) {
if (mu->mu_datasize > MAXPHYS)
return (EINVAL);
- if (((kbuf = malloc(mu->mu_datasize, M_DEVBUF, M_WAITOK)) == NULL) ||
+ if (((kbuf = malloc(mu->mu_datasize, M_DEVBUF, 0)) == NULL) ||
(error = copyin(mu->mu_buf, kbuf, mu->mu_datasize)))
goto out;
debug(0, "got kernel buffer");
diff --git a/sys/dev/mly/mly.c b/sys/dev/mly/mly.c
index 65f1a5d..50b81ac 100644
--- a/sys/dev/mly/mly.c
+++ b/sys/dev/mly/mly.c
@@ -2008,7 +2008,7 @@ mly_cam_rescan_btl(struct mly_softc *sc, int bus, int target)
debug_called(1);
- if ((ccb = malloc(sizeof(union ccb), M_TEMP, M_WAITOK | M_ZERO)) == NULL) {
+ if ((ccb = malloc(sizeof(union ccb), M_TEMP, M_ZERO)) == NULL) {
mly_printf(sc, "rescan failed (can't allocate CCB)\n");
return;
}
diff --git a/sys/dev/mpt/mpt_pci.c b/sys/dev/mpt/mpt_pci.c
index 9a0a5ba..7f9a145 100644
--- a/sys/dev/mpt/mpt_pci.c
+++ b/sys/dev/mpt/mpt_pci.c
@@ -478,7 +478,7 @@ mpt_dma_mem_alloc(mpt_softc_t *mpt)
len = sizeof (request_t *) * MPT_REQ_MEM_SIZE(mpt);
#ifdef RELENG_4
- mpt->request_pool = (request_t *) malloc(len, M_DEVBUF, M_WAITOK);
+ mpt->request_pool = (request_t *) malloc(len, M_DEVBUF, 0);
if (mpt->request_pool == NULL) {
device_printf(dev, "cannot allocate request pool\n");
return (1);
@@ -486,7 +486,7 @@ mpt_dma_mem_alloc(mpt_softc_t *mpt)
bzero(mpt->request_pool, len);
#else
mpt->request_pool = (request_t *)
- malloc(len, M_DEVBUF, M_WAITOK | M_ZERO);
+ malloc(len, M_DEVBUF, M_ZERO);
if (mpt->request_pool == NULL) {
device_printf(dev, "cannot allocate request pool\n");
return (1);
diff --git a/sys/dev/musycc/musycc.c b/sys/dev/musycc/musycc.c
index 3fb7834..48504db 100644
--- a/sys/dev/musycc/musycc.c
+++ b/sys/dev/musycc/musycc.c
@@ -696,9 +696,9 @@ musycc_intr0_rx_eom(struct softc *sc, int ch)
m->m_len = m->m_pkthdr.len = status & 0x3fff;
error = (status >> 16) & 0xf;
if (error == 0) {
- MGETHDR(m2, M_DONTWAIT, MT_DATA);
+ MGETHDR(m2, M_NOWAIT, MT_DATA);
if (m2 != NULL) {
- MCLGET(m2, M_DONTWAIT);
+ MCLGET(m2, M_NOWAIT);
if((m2->m_flags & M_EXT) != 0) {
/* Substitute the mbuf+cluster. */
md->m = m2;
@@ -1069,7 +1069,7 @@ musycc_newhook(node_p node, hook_p hook, const char *name)
return (EINVAL);
if (sc->chan[chan] == NULL) {
- MALLOC(sch, struct schan *, sizeof(*sch), M_MUSYCC, M_WAITOK | M_ZERO);
+ MALLOC(sch, struct schan *, sizeof(*sch), M_MUSYCC, M_ZERO);
sch->sc = sc;
sch->state = DOWN;
sch->chan = chan;
@@ -1268,9 +1268,9 @@ musycc_connect(hook_p hook)
sch->nmd = nmd = 200 + nts * 4;
sch->rx_last_md = 0;
MALLOC(sc->mdt[ch], struct mdesc *,
- sizeof(struct mdesc) * nmd, M_MUSYCC, M_WAITOK);
+ sizeof(struct mdesc) * nmd, M_MUSYCC, 0);
MALLOC(sc->mdr[ch], struct mdesc *,
- sizeof(struct mdesc) * nmd, M_MUSYCC, M_WAITOK);
+ sizeof(struct mdesc) * nmd, M_MUSYCC, 0);
for (i = 0; i < nmd; i++) {
if (i == nmd - 1) {
sc->mdt[ch][i].snext = &sc->mdt[ch][0];
@@ -1287,13 +1287,13 @@ musycc_connect(hook_p hook)
sc->mdt[ch][i].m = NULL;
sc->mdt[ch][i].data = 0;
- MGETHDR(m, M_TRYWAIT, MT_DATA);
+ MGETHDR(m, 0, MT_DATA);
if (m == NULL)
goto errfree;
- MCLGET(m, M_TRYWAIT);
+ MCLGET(m, 0);
if ((m->m_flags & M_EXT) == 0) {
/* We've waited mbuf_wait and still got nothing.
- We're calling with M_TRYWAIT anyway - a little
+ We're calling with 0 anyway - a little
defensive programming costs us very little - if
anything at all in the case of error. */
m_free(m);
@@ -1455,7 +1455,7 @@ musycc_attach(device_t self)
f = pci_get_function(self);
/* For function zero allocate a csoftc */
if (f == 0) {
- MALLOC(csc, struct csoftc *, sizeof(*csc), M_MUSYCC, M_WAITOK | M_ZERO);
+ MALLOC(csc, struct csoftc *, sizeof(*csc), M_MUSYCC, M_ZERO);
csc->bus = pci_get_bus(self);
csc->slot = pci_get_slot(self);
LIST_INSERT_HEAD(&sc_list, csc, list);
@@ -1529,7 +1529,7 @@ musycc_attach(device_t self)
sc->reg = (struct globalr *)
(csc->virbase[0] + i * 0x800);
MALLOC(sc->mycg, struct mycg *,
- sizeof(struct mycg), M_MUSYCC, M_WAITOK | M_ZERO);
+ sizeof(struct mycg), M_MUSYCC, M_ZERO);
sc->ram = &sc->mycg->cg;
error = ng_make_node_common(&ngtypestruct, &sc->node);
diff --git a/sys/dev/my/if_my.c b/sys/dev/my/if_my.c
index 9f7a930..70ac950 100644
--- a/sys/dev/my/if_my.c
+++ b/sys/dev/my/if_my.c
@@ -1179,14 +1179,14 @@ my_newbuf(struct my_softc * sc, struct my_chain_onefrag * c)
struct mbuf *m_new = NULL;
MY_LOCK(sc);
- MGETHDR(m_new, M_DONTWAIT, MT_DATA);
+ MGETHDR(m_new, M_NOWAIT, MT_DATA);
if (m_new == NULL) {
printf("my%d: no memory for rx list -- packet dropped!\n",
sc->my_unit);
MY_UNLOCK(sc);
return (ENOBUFS);
}
- MCLGET(m_new, M_DONTWAIT);
+ MCLGET(m_new, M_NOWAIT);
if (!(m_new->m_flags & M_EXT)) {
printf("my%d: no memory for rx list -- packet dropped!\n",
sc->my_unit);
@@ -1451,14 +1451,14 @@ my_encap(struct my_softc * sc, struct my_chain * c, struct mbuf * m_head)
* chain.
*/
m = m_head;
- MGETHDR(m_new, M_DONTWAIT, MT_DATA);
+ MGETHDR(m_new, M_NOWAIT, MT_DATA);
if (m_new == NULL) {
printf("my%d: no memory for tx list", sc->my_unit);
MY_UNLOCK(sc);
return (1);
}
if (m_head->m_pkthdr.len > MHLEN) {
- MCLGET(m_new, M_DONTWAIT);
+ MCLGET(m_new, M_NOWAIT);
if (!(m_new->m_flags & M_EXT)) {
m_freem(m_new);
printf("my%d: no memory for tx list", sc->my_unit);
diff --git a/sys/dev/nge/if_nge.c b/sys/dev/nge/if_nge.c
index d498ebb..e591ea7 100644
--- a/sys/dev/nge/if_nge.c
+++ b/sys/dev/nge/if_nge.c
@@ -1162,7 +1162,7 @@ nge_newbuf(sc, c, m)
caddr_t *buf = NULL;
if (m == NULL) {
- MGETHDR(m_new, M_DONTWAIT, MT_DATA);
+ MGETHDR(m_new, M_NOWAIT, MT_DATA);
if (m_new == NULL) {
printf("nge%d: no memory for rx list "
"-- packet dropped!\n", sc->nge_unit);
diff --git a/sys/dev/nmdm/nmdm.c b/sys/dev/nmdm/nmdm.c
index 6037451..2c69998 100644
--- a/sys/dev/nmdm/nmdm.c
+++ b/sys/dev/nmdm/nmdm.c
@@ -133,7 +133,7 @@ nmdminit(n)
if (n & ~0xff)
return;
- pt = malloc(sizeof(*pt), M_NLMDM, M_WAITOK);
+ pt = malloc(sizeof(*pt), M_NLMDM, 0);
bzero(pt, sizeof(*pt));
pt->part1.dev = dev1 = make_dev(&nmdm_cdevsw, n+n,
0, 0, 0666, "nmdm%dA", n);
diff --git a/sys/dev/null/null.c b/sys/dev/null/null.c
index 908e533..7a3ae8b 100644
--- a/sys/dev/null/null.c
+++ b/sys/dev/null/null.c
@@ -127,7 +127,7 @@ null_modevent(module_t mod, int type, void *data)
case MOD_LOAD:
if (bootverbose)
printf("null: <null device, zero device>\n");
- zbuf = (void *)malloc(PAGE_SIZE, M_TEMP, M_WAITOK | M_ZERO);
+ zbuf = (void *)malloc(PAGE_SIZE, M_TEMP, M_ZERO);
zero_dev = make_dev(&zero_cdevsw, ZERO_MINOR, UID_ROOT,
GID_WHEEL, 0666, "zero");
null_dev = make_dev(&null_cdevsw, NULL_MINOR, UID_ROOT,
diff --git a/sys/dev/ofw/openfirm.c b/sys/dev/ofw/openfirm.c
index 7704109..9ea97d3 100644
--- a/sys/dev/ofw/openfirm.c
+++ b/sys/dev/ofw/openfirm.c
@@ -292,7 +292,7 @@ OF_getprop(phandle_t package, char *propname, void *buf, int buflen)
/*
* Store the value of a property of a package into newly allocated memory (using
- * the M_OFWPROP malloc pool and M_WAITOK). elsz is the size of a single element,
+ * the M_OFWPROP malloc pool and 0). elsz is the size of a single element,
* the number of elements is return in number.
*/
int
@@ -305,7 +305,7 @@ OF_getprop_alloc(phandle_t package, char *propname, int elsz, void **buf)
len % elsz != 0)
return (-1);
- *buf = malloc(len, M_OFWPROP, M_WAITOK);
+ *buf = malloc(len, M_OFWPROP, 0);
if (OF_getprop(package, propname, *buf, len) == -1) {
free(*buf, M_OFWPROP);
*buf = NULL;
diff --git a/sys/dev/ofw/openfirmio.c b/sys/dev/ofw/openfirmio.c
index 6f40619..8bd5c04 100644
--- a/sys/dev/ofw/openfirmio.c
+++ b/sys/dev/ofw/openfirmio.c
@@ -115,7 +115,7 @@ openfirm_getstr(int len, const char *user, char **cpp)
if ((u_int)len > OFW_NAME_MAX)
return (ENAMETOOLONG);
- *cpp = cp = malloc(len + 1, M_TEMP, M_WAITOK);
+ *cpp = cp = malloc(len + 1, M_TEMP, 0);
if (cp == NULL)
return (ENOMEM);
error = copyin(user, cp, len);
@@ -183,7 +183,7 @@ openfirm_ioctl(dev_t dev, u_long cmd, caddr_t data, int flags,
/* -1 means no entry; 0 means no value */
if (len <= 0)
break;
- value = malloc(len, M_TEMP, M_WAITOK);
+ value = malloc(len, M_TEMP, 0);
if (value == NULL) {
error = ENOMEM;
break;
diff --git a/sys/dev/pccard/pccard.c b/sys/dev/pccard/pccard.c
index 6c82632..2cf04a2 100644
--- a/sys/dev/pccard/pccard.c
+++ b/sys/dev/pccard/pccard.c
@@ -224,7 +224,7 @@ pccard_attach_card(device_t dev)
* can be on at a time.
*/
ivar = malloc(sizeof(struct pccard_ivar), M_DEVBUF,
- M_WAITOK | M_ZERO);
+ M_ZERO);
child = device_add_child(dev, NULL, -1);
device_set_ivars(child, ivar);
ivar->fcn = pf;
diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c
index 2c5e7a4..ecdcba0 100644
--- a/sys/dev/pci/pci.c
+++ b/sys/dev/pci/pci.c
@@ -333,7 +333,7 @@ pci_read_device(device_t pcib, int b, int s, int f, size_t size)
devlist_entry = NULL;
if (PCIB_READ_CONFIG(pcib, b, s, f, PCIR_DEVVENDOR, 4) != -1) {
- devlist_entry = malloc(size, M_DEVBUF, M_WAITOK | M_ZERO);
+ devlist_entry = malloc(size, M_DEVBUF, M_ZERO);
if (devlist_entry == NULL)
return (NULL);
diff --git a/sys/dev/pci/pci_user.c b/sys/dev/pci/pci_user.c
index 83b63b3..d39b026 100644
--- a/sys/dev/pci/pci_user.c
+++ b/sys/dev/pci/pci_user.c
@@ -307,7 +307,7 @@ pci_ioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td)
* Allocate a buffer to hold the patterns.
*/
pattern_buf = malloc(cio->pat_buf_len, M_TEMP,
- M_WAITOK);
+ 0);
error = copyin(cio->patterns, pattern_buf,
cio->pat_buf_len);
if (error != 0)
diff --git a/sys/dev/pdq/pdq_freebsd.h b/sys/dev/pdq/pdq_freebsd.h
index bd94900..5db50c8 100644
--- a/sys/dev/pdq/pdq_freebsd.h
+++ b/sys/dev/pdq/pdq_freebsd.h
@@ -186,9 +186,9 @@ typedef struct _pdq_os_ctx_t {
#define PDQ_OS_DATABUF_ALLOC(pdq, b) do { \
PDQ_OS_DATABUF_T *x_m0; \
- MGETHDR(x_m0, M_DONTWAIT, MT_DATA); \
+ MGETHDR(x_m0, M_NOWAIT, MT_DATA); \
if (x_m0 != NULL) { \
- MCLGET(x_m0, M_DONTWAIT); \
+ MCLGET(x_m0, M_NOWAIT); \
if ((x_m0->m_flags & M_EXT) == 0) { \
m_free(x_m0); \
(b) = NULL; \
diff --git a/sys/dev/pdq/pdq_ifsubr.c b/sys/dev/pdq/pdq_ifsubr.c
index 064bb68..5af7884 100644
--- a/sys/dev/pdq/pdq_ifsubr.c
+++ b/sys/dev/pdq/pdq_ifsubr.c
@@ -703,12 +703,12 @@ pdq_os_databuf_alloc(
struct mbuf *m;
bus_dmamap_t map;
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL) {
printf("%s: can't alloc small buf\n", sc->sc_dev.dv_xname);
return NULL;
}
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
if ((m->m_flags & M_EXT) == 0) {
printf("%s: can't alloc cluster\n", sc->sc_dev.dv_xname);
m_free(m);
diff --git a/sys/dev/pdq/pdqvar.h b/sys/dev/pdq/pdqvar.h
index 09358d8..825a2b9 100644
--- a/sys/dev/pdq/pdqvar.h
+++ b/sys/dev/pdq/pdqvar.h
@@ -401,9 +401,9 @@ typedef struct mbuf PDQ_OS_DATABUF_T;
#ifndef PDQ_OS_DATABUF_ALLOC
#define PDQ_OS_DATABUF_ALLOC(pdq, b) do { \
PDQ_OS_DATABUF_T *x_m0; \
- MGETHDR(x_m0, M_DONTWAIT, MT_DATA); \
+ MGETHDR(x_m0, M_NOWAIT, MT_DATA); \
if (x_m0 != NULL) { \
- MCLGET(x_m0, M_DONTWAIT); \
+ MCLGET(x_m0, M_NOWAIT); \
if ((x_m0->m_flags & M_EXT) == 0) { \
m_free(x_m0); \
(b) = NULL; \
diff --git a/sys/dev/ppbus/if_plip.c b/sys/dev/ppbus/if_plip.c
index 5ba4dc3..24a18ec 100644
--- a/sys/dev/ppbus/if_plip.c
+++ b/sys/dev/ppbus/if_plip.c
@@ -343,7 +343,7 @@ lpioctl (struct ifnet *ifp, u_long cmd, caddr_t data)
}
sc->sc_ifbuf = malloc(sc->sc_if.if_mtu + MLPIPHDRLEN,
- M_DEVBUF, M_WAITOK);
+ M_DEVBUF, 0);
if (!sc->sc_ifbuf) {
ppb_release_bus(ppbus, dev);
return ENOBUFS;
diff --git a/sys/dev/ppbus/lpt.c b/sys/dev/ppbus/lpt.c
index 9364c50..abc9e95 100644
--- a/sys/dev/ppbus/lpt.c
+++ b/sys/dev/ppbus/lpt.c
@@ -548,8 +548,8 @@ lptopen(dev_t dev, int flags, int fmt, struct thread *td)
ppb_wctr(ppbus, sc->sc_control);
sc->sc_state = OPEN;
- sc->sc_inbuf = malloc(BUFSIZE, M_DEVBUF, M_WAITOK);
- sc->sc_statbuf = malloc(BUFSTATSIZE, M_DEVBUF, M_WAITOK);
+ sc->sc_inbuf = malloc(BUFSIZE, M_DEVBUF, 0);
+ sc->sc_statbuf = malloc(BUFSTATSIZE, M_DEVBUF, 0);
sc->sc_xfercnt = 0;
splx(s);
diff --git a/sys/dev/ppbus/vpo.c b/sys/dev/ppbus/vpo.c
index ad83e2f..09208b6 100644
--- a/sys/dev/ppbus/vpo.c
+++ b/sys/dev/ppbus/vpo.c
@@ -186,7 +186,7 @@ static void
vpo_cam_rescan(struct vpo_data *vpo)
{
struct cam_path *path;
- union ccb *ccb = malloc(sizeof(union ccb), M_TEMP, M_WAITOK | M_ZERO);
+ union ccb *ccb = malloc(sizeof(union ccb), M_TEMP, M_ZERO);
if (xpt_create_path(&path, xpt_periph, cam_sim_path(vpo->sim), 0, 0)
!= CAM_REQ_CMP) {
diff --git a/sys/dev/puc/puc.c b/sys/dev/puc/puc.c
index 18d2fba..4cba354 100644
--- a/sys/dev/puc/puc.c
+++ b/sys/dev/puc/puc.c
@@ -248,7 +248,7 @@ puc_attach(device_t dev, const struct puc_device_description *desc)
rle->res = sc->sc_bar_mappings[bidx].res;
} else {
rle->res = malloc(sizeof(struct resource), M_DEVBUF,
- M_WAITOK | M_ZERO);
+ M_ZERO);
if (rle->res == NULL) {
free(pdev, M_DEVBUF);
return (ENOMEM);
diff --git a/sys/dev/raidframe/rf_freebsdkintf.c b/sys/dev/raidframe/rf_freebsdkintf.c
index e2b2508..144cda6 100644
--- a/sys/dev/raidframe/rf_freebsdkintf.c
+++ b/sys/dev/raidframe/rf_freebsdkintf.c
@@ -917,7 +917,7 @@ raidioctl(dev, cmd, data, flag, td)
case RAIDFRAME_INIT_LABELS:
MALLOC(ci_label, RF_ComponentLabel_t *,
sizeof(RF_ComponentLabel_t), M_RAIDFRAME,
- M_WAITOK | M_ZERO);
+ M_ZERO);
clabel = (RF_ComponentLabel_t *) data;
/*
we only want the serial number from
@@ -984,7 +984,7 @@ raidioctl(dev, cmd, data, flag, td)
case RAIDFRAME_ADD_HOT_SPARE:
MALLOC(hot_spare, RF_SingleComponent_t *,
sizeof(RF_SingleComponent_t), M_RAIDFRAME,
- M_WAITOK | M_ZERO);
+ M_ZERO);
sparePtr = (RF_SingleComponent_t *) data;
memcpy( hot_spare, sparePtr, sizeof(RF_SingleComponent_t));
retcode = rf_add_hot_spare(raidPtr, hot_spare);
@@ -997,7 +997,7 @@ raidioctl(dev, cmd, data, flag, td)
case RAIDFRAME_DELETE_COMPONENT:
MALLOC(component, RF_SingleComponent_t *,
sizeof(RF_SingleComponent_t), M_RAIDFRAME,
- M_WAITOK | M_ZERO);
+ M_ZERO);
componentPtr = (RF_SingleComponent_t *)data;
memcpy( component, componentPtr,
sizeof(RF_SingleComponent_t));
@@ -1008,7 +1008,7 @@ raidioctl(dev, cmd, data, flag, td)
case RAIDFRAME_INCORPORATE_HOT_SPARE:
MALLOC(component, RF_SingleComponent_t *,
sizeof(RF_SingleComponent_t), M_RAIDFRAME,
- M_WAITOK | M_ZERO);
+ M_ZERO);
componentPtr = (RF_SingleComponent_t *)data;
memcpy( component, componentPtr,
sizeof(RF_SingleComponent_t));
@@ -1020,7 +1020,7 @@ raidioctl(dev, cmd, data, flag, td)
MALLOC(component, RF_SingleComponent_t *,
sizeof(RF_SingleComponent_t), M_RAIDFRAME,
- M_WAITOK | M_ZERO);
+ M_ZERO);
if (raidPtr->Layout.map->faultsTolerated == 0) {
/* Can't do this on a RAID 0!! */
FREE(component, M_RAIDFRAME);
@@ -2894,7 +2894,7 @@ rf_set_autoconfig(raidPtr, new_value)
int row, column;
MALLOC(clabel, RF_ComponentLabel_t *, sizeof(RF_ComponentLabel_t),
- M_RAIDFRAME, M_WAITOK | M_ZERO);
+ M_RAIDFRAME, M_ZERO);
raidPtr->autoconfigure = new_value;
for(row=0; row<raidPtr->numRow; row++) {
@@ -2924,7 +2924,7 @@ rf_set_rootpartition(raidPtr, new_value)
int row, column;
MALLOC(clabel, RF_ComponentLabel_t *, sizeof(RF_ComponentLabel_t),
- M_RAIDFRAME, M_WAITOK | M_ZERO);
+ M_RAIDFRAME, M_ZERO);
raidPtr->root_partition = new_value;
for(row=0; row<raidPtr->numRow; row++) {
diff --git a/sys/dev/raidframe/rf_shutdown.c b/sys/dev/raidframe/rf_shutdown.c
index 7db93e9..9dc6255 100644
--- a/sys/dev/raidframe/rf_shutdown.c
+++ b/sys/dev/raidframe/rf_shutdown.c
@@ -61,7 +61,7 @@ _rf_ShutdownCreate(
* and shutdown after RAIDframe internal allocation system.
*/
/* ent = (RF_ShutdownList_t *) malloc(sizeof(RF_ShutdownList_t),
- M_RAIDFRAME, M_WAITOK); */
+ M_RAIDFRAME, 0); */
ent = (RF_ShutdownList_t *) malloc(sizeof(RF_ShutdownList_t),
M_RAIDFRAME, M_NOWAIT);
if (ent == NULL)
diff --git a/sys/dev/random/randomdev.c b/sys/dev/random/randomdev.c
index d965cbc..6256ae2 100644
--- a/sys/dev/random/randomdev.c
+++ b/sys/dev/random/randomdev.c
@@ -187,7 +187,7 @@ random_read(dev_t dev __unused, struct uio *uio, int flag)
return error;
}
c = uio->uio_resid < PAGE_SIZE ? uio->uio_resid : PAGE_SIZE;
- random_buf = (void *)malloc((u_long)c, M_TEMP, M_WAITOK);
+ random_buf = (void *)malloc((u_long)c, M_TEMP, 0);
while (uio->uio_resid > 0 && error == 0) {
ret = read_random_real(random_buf, c);
error = uiomove(random_buf, ret, uio);
@@ -205,7 +205,7 @@ random_write(dev_t dev __unused, struct uio *uio, int flag __unused)
void *random_buf;
error = 0;
- random_buf = (void *)malloc(PAGE_SIZE, M_TEMP, M_WAITOK);
+ random_buf = (void *)malloc(PAGE_SIZE, M_TEMP, 0);
while (uio->uio_resid > 0) {
c = (int)(uio->uio_resid < PAGE_SIZE
? uio->uio_resid
diff --git a/sys/dev/ray/if_ray.c b/sys/dev/ray/if_ray.c
index 1c92d50..7cd9b87 100644
--- a/sys/dev/ray/if_ray.c
+++ b/sys/dev/ray/if_ray.c
@@ -1782,14 +1782,14 @@ ray_rx(struct ray_softc *sc, size_t rcs)
goto skip_read;
}
- MGETHDR(m0, M_DONTWAIT, MT_DATA);
+ MGETHDR(m0, M_NOWAIT, MT_DATA);
if (m0 == NULL) {
RAY_RECERR(sc, "MGETHDR failed");
ifp->if_ierrors++;
goto skip_read;
}
if (pktlen > MHLEN) {
- MCLGET(m0, M_DONTWAIT);
+ MCLGET(m0, M_NOWAIT);
if (!(m0->m_flags & M_EXT)) {
RAY_RECERR(sc, "MCLGET failed");
ifp->if_ierrors++;
@@ -3155,7 +3155,7 @@ ray_com_malloc(ray_comqfn_t function, int flags, char *mesg)
struct ray_comq_entry *com;
MALLOC(com, struct ray_comq_entry *,
- sizeof(struct ray_comq_entry), M_RAYCOM, M_WAITOK);
+ sizeof(struct ray_comq_entry), M_RAYCOM, 0);
return (ray_com_init(com, function, flags, mesg));
}
diff --git a/sys/dev/sbni/if_sbni.c b/sys/dev/sbni/if_sbni.c
index e5d5417..d99882f 100644
--- a/sys/dev/sbni/if_sbni.c
+++ b/sys/dev/sbni/if_sbni.c
@@ -814,7 +814,7 @@ get_rx_buf(struct sbni_softc *sc)
{
struct mbuf *m;
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL) {
if_printf(&sc->arpcom.ac_if, "cannot allocate header mbuf\n");
return (0);
@@ -828,7 +828,7 @@ get_rx_buf(struct sbni_softc *sc)
*/
if (ETHER_MAX_LEN + 2 > MHLEN) {
/* Attach an mbuf cluster */
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
if ((m->m_flags & M_EXT) == 0) {
m_freem(m);
return (0);
diff --git a/sys/dev/sf/if_sf.c b/sys/dev/sf/if_sf.c
index a148ba5..7b63a01 100644
--- a/sys/dev/sf/if_sf.c
+++ b/sys/dev/sf/if_sf.c
@@ -924,11 +924,11 @@ sf_newbuf(sc, c, 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)
return(ENOBUFS);
- MCLGET(m_new, M_DONTWAIT);
+ MCLGET(m_new, M_NOWAIT);
if (!(m_new->m_flags & M_EXT)) {
m_freem(m_new);
return(ENOBUFS);
@@ -1304,14 +1304,14 @@ sf_encap(sc, c, m_head)
if (m != NULL) {
struct mbuf *m_new = NULL;
- MGETHDR(m_new, M_DONTWAIT, MT_DATA);
+ MGETHDR(m_new, M_NOWAIT, MT_DATA);
if (m_new == NULL) {
printf("sf%d: no memory for tx list\n", sc->sf_unit);
return(1);
}
if (m_head->m_pkthdr.len > MHLEN) {
- MCLGET(m_new, M_DONTWAIT);
+ MCLGET(m_new, M_NOWAIT);
if (!(m_new->m_flags & M_EXT)) {
m_freem(m_new);
printf("sf%d: no memory for tx list\n",
diff --git a/sys/dev/sk/if_sk.c b/sys/dev/sk/if_sk.c
index e58d1c4..3aa40e7 100644
--- a/sys/dev/sk/if_sk.c
+++ b/sys/dev/sk/if_sk.c
@@ -688,7 +688,7 @@ sk_newbuf(sc_if, c, m)
if (m == NULL) {
caddr_t *buf = NULL;
- MGETHDR(m_new, M_DONTWAIT, MT_DATA);
+ MGETHDR(m_new, M_NOWAIT, MT_DATA);
if (m_new == NULL)
return(ENOBUFS);
diff --git a/sys/dev/sn/if_sn.c b/sys/dev/sn/if_sn.c
index 46011cb..18ca1cc 100644
--- a/sys/dev/sn/if_sn.c
+++ b/sys/dev/sn/if_sn.c
@@ -1057,7 +1057,7 @@ read_another:
/*
* Allocate a header mbuf from the kernel.
*/
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL)
goto out;
@@ -1067,7 +1067,7 @@ read_another:
/*
* Attach an mbuf cluster
*/
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
/*
* Insist on getting a cluster
diff --git a/sys/dev/snc/dp83932.c b/sys/dev/snc/dp83932.c
index 991bb99..0721853 100644
--- a/sys/dev/snc/dp83932.c
+++ b/sys/dev/snc/dp83932.c
@@ -1121,7 +1121,7 @@ sonic_get(sc, pkt, datalen)
* Our sonic_read() and sonic_get() require it.
*/
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == 0)
return (0);
m->m_pkthdr.rcvif = &sc->sc_if;
@@ -1132,7 +1132,7 @@ sonic_get(sc, pkt, datalen)
while (datalen > 0) {
if (top) {
- MGET(m, M_DONTWAIT, MT_DATA);
+ MGET(m, M_NOWAIT, MT_DATA);
if (m == 0) {
m_freem(top);
return (0);
@@ -1140,7 +1140,7 @@ sonic_get(sc, pkt, datalen)
len = MLEN;
}
if (datalen >= MINCLSIZE) {
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
if ((m->m_flags & M_EXT) == 0) {
if (top) m_freem(top);
return (0);
diff --git a/sys/dev/snp/snp.c b/sys/dev/snp/snp.c
index 34e3e29..8158343 100644
--- a/sys/dev/snp/snp.c
+++ b/sys/dev/snp/snp.c
@@ -150,7 +150,7 @@ snplwrite(tp, uio, flag)
snp = tp->t_sc;
while (uio->uio_resid > 0) {
ilen = imin(512, uio->uio_resid);
- ibuf = malloc(ilen, M_SNP, M_WAITOK);
+ ibuf = malloc(ilen, M_SNP, 0);
error = uiomove(ibuf, ilen, uio);
if (error != 0)
break;
@@ -391,7 +391,7 @@ snpopen(dev, flag, mode, td)
make_dev(&snp_cdevsw, minor(dev), UID_ROOT, GID_WHEEL,
0600, "snp%d", dev2unit(dev));
dev->si_drv1 = snp = malloc(sizeof(*snp), M_SNP,
- M_WAITOK | M_ZERO);
+ M_ZERO);
snp->snp_unit = dev2unit(dev);
} else
return (EBUSY);
@@ -402,7 +402,7 @@ snpopen(dev, flag, mode, td)
*/
snp->snp_flags = SNOOP_OPEN;
- snp->snp_buf = malloc(SNOOP_MINLEN, M_SNP, M_WAITOK);
+ snp->snp_buf = malloc(SNOOP_MINLEN, M_SNP, 0);
snp->snp_blen = SNOOP_MINLEN;
snp->snp_base = 0;
snp->snp_len = 0;
@@ -480,7 +480,7 @@ snp_down(snp)
if (snp->snp_blen != SNOOP_MINLEN) {
free(snp->snp_buf, M_SNP);
- snp->snp_buf = malloc(SNOOP_MINLEN, M_SNP, M_WAITOK);
+ snp->snp_buf = malloc(SNOOP_MINLEN, M_SNP, 0);
snp->snp_blen = SNOOP_MINLEN;
}
snp->snp_flags |= SNOOP_DOWN;
diff --git a/sys/dev/sound/midi/midi.c b/sys/dev/sound/midi/midi.c
index 07d2660..6e2de52 100644
--- a/sys/dev/sound/midi/midi.c
+++ b/sys/dev/sound/midi/midi.c
@@ -282,7 +282,7 @@ create_mididev_info_unit(int type, mididev_info *mdinf, synthdev_info *syninf)
}
/* As malloc(9) might block, allocate mididev_info now. */
- mdnew = malloc(sizeof(mididev_info), M_DEVBUF, M_WAITOK | M_ZERO);
+ mdnew = malloc(sizeof(mididev_info), M_DEVBUF, M_ZERO);
if (mdnew == NULL)
return NULL;
bcopy(mdinf, mdnew, sizeof(mididev_info));
@@ -607,7 +607,7 @@ midi_read(dev_t i_dev, struct uio * buf, int flag)
len = buf->uio_resid;
lenr = 0;
- uiobuf = (u_char *)malloc(len, M_DEVBUF, M_WAITOK | M_ZERO);
+ uiobuf = (u_char *)malloc(len, M_DEVBUF, M_ZERO);
if (uiobuf == NULL)
return (ENOMEM);
@@ -659,7 +659,7 @@ midi_write(dev_t i_dev, struct uio * buf, int flag)
len = buf->uio_resid;
lenw = 0;
- uiobuf = (u_char *)malloc(len, M_DEVBUF, M_WAITOK | M_ZERO);
+ uiobuf = (u_char *)malloc(len, M_DEVBUF, M_ZERO);
if (uiobuf == NULL)
return (ENOMEM);
diff --git a/sys/dev/sound/midi/midibuf.c b/sys/dev/sound/midi/midibuf.c
index 8b4eda7..41ea4dd 100644
--- a/sys/dev/sound/midi/midibuf.c
+++ b/sys/dev/sound/midi/midibuf.c
@@ -55,7 +55,7 @@ int
midibuf_init(midi_dbuf *dbuf)
{
if (dbuf->buf == NULL) {
- dbuf->buf = malloc(MIDI_BUFFSIZE, M_DEVBUF, M_WAITOK | M_ZERO);
+ dbuf->buf = malloc(MIDI_BUFFSIZE, M_DEVBUF, M_ZERO);
cv_init(&dbuf->cv_in, "midi queue in");
cv_init(&dbuf->cv_out, "midi queue out");
}
diff --git a/sys/dev/sound/midi/sequencer.c b/sys/dev/sound/midi/sequencer.c
index 5115cc9..7d0b6e2 100644
--- a/sys/dev/sound/midi/sequencer.c
+++ b/sys/dev/sound/midi/sequencer.c
@@ -322,7 +322,7 @@ seq_initunit(int unit)
dev_t seqdev, musicdev;
/* Allocate the softc. */
- scp = malloc(sizeof(*scp), M_DEVBUF, M_WAITOK | M_ZERO);
+ scp = malloc(sizeof(*scp), M_DEVBUF, M_ZERO);
if (scp == (sc_p)NULL) {
printf("seq_initunit: unit %d, softc allocation failed.\n", unit);
return (1);
@@ -544,7 +544,7 @@ seq_read(dev_t i_dev, struct uio *buf, int flag)
len = buf->uio_resid;
lenr = 0;
- uiobuf = (u_char *)malloc(len, M_DEVBUF, M_WAITOK | M_ZERO);
+ uiobuf = (u_char *)malloc(len, M_DEVBUF, M_ZERO);
if (uiobuf == NULL)
return (ENOMEM);
@@ -2364,7 +2364,7 @@ create_seqdev_info_unit(int unit, seqdev_info *seq)
seqdev_info *sd, *sdnew;
/* As malloc(9) might block, allocate seqdev_info now. */
- sdnew = malloc(sizeof(seqdev_info), M_DEVBUF, M_WAITOK | M_ZERO);
+ sdnew = malloc(sizeof(seqdev_info), M_DEVBUF, M_ZERO);
if (sdnew == NULL)
return NULL;
bcopy(seq, sdnew, sizeof(seqdev_info));
diff --git a/sys/dev/sound/midi/timer.c b/sys/dev/sound/midi/timer.c
index ba4bce0..b5c75cf 100644
--- a/sys/dev/sound/midi/timer.c
+++ b/sys/dev/sound/midi/timer.c
@@ -97,7 +97,7 @@ timerdev_install(void)
tmd = NULL;
scp = NULL;
- scp = malloc(sizeof(*scp), M_DEVBUF, M_WAITOK | M_ZERO);
+ scp = malloc(sizeof(*scp), M_DEVBUF, M_ZERO);
if (scp == NULL) {
ret = ENOMEM;
goto fail;
@@ -146,7 +146,7 @@ create_timerdev_info_unit(timerdev_info *tmdinf)
}
/* As malloc(9) might block, allocate timerdev_info now. */
- tmdnew = malloc(sizeof(timerdev_info), M_DEVBUF, M_WAITOK | M_ZERO);
+ tmdnew = malloc(sizeof(timerdev_info), M_DEVBUF, M_ZERO);
if (tmdnew == NULL)
return NULL;
bcopy(tmdinf, tmdnew, sizeof(timerdev_info));
diff --git a/sys/dev/sound/pci/ds1.c b/sys/dev/sound/pci/ds1.c
index 896a8af..dfffd8d 100644
--- a/sys/dev/sound/pci/ds1.c
+++ b/sys/dev/sound/pci/ds1.c
@@ -934,7 +934,7 @@ ds_pci_attach(device_t dev)
struct ac97_info *codec = NULL;
char status[SND_STATUSLEN];
- if ((sc = malloc(sizeof(*sc), M_DEVBUF, M_WAITOK | M_ZERO)) == NULL) {
+ if ((sc = malloc(sizeof(*sc), M_DEVBUF, M_ZERO)) == NULL) {
device_printf(dev, "cannot allocate softc\n");
return ENXIO;
}
diff --git a/sys/dev/sound/pci/emu10k1.c b/sys/dev/sound/pci/emu10k1.c
index e9c99cb..52e16bf 100644
--- a/sys/dev/sound/pci/emu10k1.c
+++ b/sys/dev/sound/pci/emu10k1.c
@@ -1455,7 +1455,7 @@ emu_pci_attach(device_t dev)
int i, gotmic;
char status[SND_STATUSLEN];
- if ((sc = malloc(sizeof(*sc), M_DEVBUF, M_WAITOK | M_ZERO)) == NULL) {
+ if ((sc = malloc(sizeof(*sc), M_DEVBUF, M_ZERO)) == NULL) {
device_printf(dev, "cannot allocate softc\n");
return ENXIO;
}
diff --git a/sys/dev/sound/pcm/ac97.c b/sys/dev/sound/pcm/ac97.c
index 0f3c905..c0f8884 100644
--- a/sys/dev/sound/pcm/ac97.c
+++ b/sys/dev/sound/pcm/ac97.c
@@ -540,7 +540,7 @@ ac97_create(device_t dev, void *devinfo, kobj_class_t cls)
snprintf(codec->name, AC97_NAMELEN, "%s:ac97", device_get_nameunit(dev));
codec->lock = snd_mtxcreate(codec->name, "ac97 codec");
- codec->methods = kobj_create(cls, M_AC97, M_WAITOK);
+ codec->methods = kobj_create(cls, M_AC97, 0);
if (codec->methods == NULL) {
snd_mtxlock(codec->lock);
snd_mtxfree(codec->lock);
diff --git a/sys/dev/sound/pcm/buffer.c b/sys/dev/sound/pcm/buffer.c
index d498591..9a49e28 100644
--- a/sys/dev/sound/pcm/buffer.c
+++ b/sys/dev/sound/pcm/buffer.c
@@ -58,7 +58,7 @@ sndbuf_create(device_t dev, char *drv, char *desc)
{
struct snd_dbuf *b;
- b = malloc(sizeof(*b), M_DEVBUF, M_WAITOK | M_ZERO);
+ b = malloc(sizeof(*b), M_DEVBUF, M_ZERO);
snprintf(b->name, SNDBUF_NAMELEN, "%s:%s", drv, desc);
b->dev = dev;
diff --git a/sys/dev/sound/pcm/fake.c b/sys/dev/sound/pcm/fake.c
index 8c4ba77..f1bd33c 100644
--- a/sys/dev/sound/pcm/fake.c
+++ b/sys/dev/sound/pcm/fake.c
@@ -117,8 +117,8 @@ fkchan_setup(device_t dev)
struct snddev_info *d = device_get_softc(dev);
struct pcm_channel *c;
- c = malloc(sizeof(*c), M_DEVBUF, M_WAITOK);
- c->methods = kobj_create(&fkchan_class, M_DEVBUF, M_WAITOK);
+ c = malloc(sizeof(*c), M_DEVBUF, 0);
+ c->methods = kobj_create(&fkchan_class, M_DEVBUF, 0);
c->parentsnddev = d;
snprintf(c->name, CHN_NAMELEN, "%s:fake", device_get_nameunit(dev));
diff --git a/sys/dev/sound/pcm/feeder.c b/sys/dev/sound/pcm/feeder.c
index 424da4d..0edb34f 100644
--- a/sys/dev/sound/pcm/feeder.c
+++ b/sys/dev/sound/pcm/feeder.c
@@ -59,7 +59,7 @@ feeder_register(void *p)
KASSERT(fc->desc == NULL, ("first feeder not root: %s", fc->name));
SLIST_INIT(&feedertab);
- fte = malloc(sizeof(*fte), M_FEEDER, M_WAITOK | M_ZERO);
+ fte = malloc(sizeof(*fte), M_FEEDER, M_ZERO);
if (fte == NULL) {
printf("can't allocate memory for root feeder: %s\n",
fc->name);
@@ -84,7 +84,7 @@ feeder_register(void *p)
i = 0;
while ((feedercnt < MAXFEEDERS) && (fc->desc[i].type > 0)) {
/* printf("adding feeder %s, %x -> %x\n", fc->name, fc->desc[i].in, fc->desc[i].out); */
- fte = malloc(sizeof(*fte), M_FEEDER, M_WAITOK | M_ZERO);
+ fte = malloc(sizeof(*fte), M_FEEDER, M_ZERO);
if (fte == NULL) {
printf("can't allocate memory for feeder '%s', %x -> %x\n", fc->name, fc->desc[i].in, fc->desc[i].out);
diff --git a/sys/dev/sound/pcm/mixer.c b/sys/dev/sound/pcm/mixer.c
index 182d290..2c3c3f4 100644
--- a/sys/dev/sound/pcm/mixer.c
+++ b/sys/dev/sound/pcm/mixer.c
@@ -200,7 +200,7 @@ mixer_init(device_t dev, kobj_class_t cls, void *devinfo)
dev_t pdev;
int i, unit;
- m = (struct snd_mixer *)kobj_create(cls, M_MIXER, M_WAITOK | M_ZERO);
+ m = (struct snd_mixer *)kobj_create(cls, M_MIXER, M_ZERO);
snprintf(m->name, MIXER_NAMELEN, "%s:mixer", device_get_nameunit(dev));
m->lock = snd_mtxcreate(m->name, "pcm mixer");
m->type = cls->name;
diff --git a/sys/dev/sound/pcm/sndstat.c b/sys/dev/sound/pcm/sndstat.c
index bdaff2b..6d2a27a 100644
--- a/sys/dev/sound/pcm/sndstat.c
+++ b/sys/dev/sound/pcm/sndstat.c
@@ -222,7 +222,7 @@ sndstat_register(device_t dev, char *str, sndstat_handler handler)
unit = -1;
}
- ent = malloc(sizeof *ent, M_DEVBUF, M_ZERO | M_WAITOK);
+ ent = malloc(sizeof *ent, M_DEVBUF, M_ZERO | 0);
if (!ent)
return ENOSPC;
diff --git a/sys/dev/sound/pcm/sound.c b/sys/dev/sound/pcm/sound.c
index c184a69..f6d852f 100644
--- a/sys/dev/sound/pcm/sound.c
+++ b/sys/dev/sound/pcm/sound.c
@@ -91,7 +91,7 @@ snd_mtxcreate(const char *desc, const char *type)
#ifdef USING_MUTEX
struct mtx *m;
- m = malloc(sizeof(*m), M_DEVBUF, M_WAITOK | M_ZERO);
+ m = malloc(sizeof(*m), M_DEVBUF, M_ZERO);
if (m == NULL)
return NULL;
mtx_init(m, desc, type, MTX_RECURSE);
@@ -364,11 +364,11 @@ pcm_chn_create(struct snddev_info *d, struct pcm_channel *parent, kobj_class_t c
return NULL;
}
- ch = malloc(sizeof(*ch), M_DEVBUF, M_WAITOK | M_ZERO);
+ ch = malloc(sizeof(*ch), M_DEVBUF, M_ZERO);
if (!ch)
return NULL;
- ch->methods = kobj_create(cls, M_DEVBUF, M_WAITOK);
+ ch->methods = kobj_create(cls, M_DEVBUF, 0);
if (!ch->methods) {
free(ch, M_DEVBUF);
@@ -426,7 +426,7 @@ pcm_chn_add(struct snddev_info *d, struct pcm_channel *ch, int mkdev)
int unit = device_get_unit(d->dev);
int x = -1;
- sce = malloc(sizeof(*sce), M_DEVBUF, M_WAITOK | M_ZERO);
+ sce = malloc(sizeof(*sce), M_DEVBUF, M_ZERO);
if (!sce) {
return ENOMEM;
}
diff --git a/sys/dev/sound/pcm/vchan.c b/sys/dev/sound/pcm/vchan.c
index 8da3c3e..ab04ac3b 100644
--- a/sys/dev/sound/pcm/vchan.c
+++ b/sys/dev/sound/pcm/vchan.c
@@ -124,7 +124,7 @@ vchan_init(kobj_t obj, void *devinfo, struct snd_dbuf *b, struct pcm_channel *c,
struct pcm_channel *parent = devinfo;
KASSERT(dir == PCMDIR_PLAY, ("vchan_init: bad direction"));
- ch = malloc(sizeof(*ch), M_DEVBUF, M_WAITOK | M_ZERO);
+ ch = malloc(sizeof(*ch), M_DEVBUF, M_ZERO);
ch->parent = parent;
ch->channel = c;
ch->fmt = AFMT_U8;
@@ -237,7 +237,7 @@ vchan_create(struct pcm_channel *parent)
struct pcm_channel *child;
int err, first;
- pce = malloc(sizeof(*pce), M_DEVBUF, M_WAITOK | M_ZERO);
+ pce = malloc(sizeof(*pce), M_DEVBUF, M_ZERO);
if (!pce) {
return ENOMEM;
}
diff --git a/sys/dev/speaker/spkr.c b/sys/dev/speaker/spkr.c
index de4c5ca..e6487c1 100644
--- a/sys/dev/speaker/spkr.c
+++ b/sys/dev/speaker/spkr.c
@@ -495,7 +495,7 @@ spkropen(dev, flags, fmt, td)
(void) printf("spkropen: about to perform play initialization\n");
#endif /* DEBUG */
playinit();
- spkr_inbuf = malloc(DEV_BSIZE, M_SPKR, M_WAITOK);
+ spkr_inbuf = malloc(DEV_BSIZE, M_SPKR, 0);
spkr_active = TRUE;
return(0);
}
diff --git a/sys/dev/sr/if_sr.c b/sys/dev/sr/if_sr.c
index 18b5511..dfde40e 100644
--- a/sys/dev/sr/if_sr.c
+++ b/sys/dev/sr/if_sr.c
@@ -311,7 +311,7 @@ sr_attach(device_t device)
hc = (struct sr_hardc *)device_get_softc(device);
MALLOC(sc, struct sr_softc *,
hc->numports * sizeof(struct sr_softc),
- M_DEVBUF, M_WAITOK | M_ZERO);
+ M_DEVBUF, M_ZERO);
if (sc == NULL)
goto errexit;
hc->sc = sc;
@@ -2088,7 +2088,7 @@ sr_get_packets(struct sr_softc *sc)
sc->unit, rxstat, len);
#endif
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL) {
/*
* eat (flush) packet if get mbuf fail!!
@@ -2106,7 +2106,7 @@ sr_get_packets(struct sr_softc *sc)
#endif /* NETGRAPH */
m->m_pkthdr.len = m->m_len = len;
if (len > MHLEN) {
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
if ((m->m_flags & M_EXT) == 0) {
/*
* We couldn't get a big enough
diff --git a/sys/dev/streams/streams.c b/sys/dev/streams/streams.c
index 4347d99..4ee45a2 100644
--- a/sys/dev/streams/streams.c
+++ b/sys/dev/streams/streams.c
@@ -367,7 +367,7 @@ svr4_stream_get(fp)
}
/* Allocate a new one. */
- st = malloc(sizeof(struct svr4_strm), M_TEMP, M_WAITOK);
+ st = malloc(sizeof(struct svr4_strm), M_TEMP, 0);
st->s_family = so->so_proto->pr_domain->dom_family;
st->s_cmd = ~0;
st->s_afd = -1;
diff --git a/sys/dev/syscons/daemon/daemon_saver.c b/sys/dev/syscons/daemon/daemon_saver.c
index 3cd5830..aebeab2 100644
--- a/sys/dev/syscons/daemon/daemon_saver.c
+++ b/sys/dev/syscons/daemon/daemon_saver.c
@@ -383,7 +383,7 @@ daemon_init(video_adapter_t *adp)
{
messagelen = strlen(hostname) + 3 + strlen(ostype) + 1 +
strlen(osrelease);
- message = malloc(messagelen + 1, M_DEVBUF, M_WAITOK);
+ message = malloc(messagelen + 1, M_DEVBUF, 0);
sprintf(message, "%s - %s %s", hostname, ostype, osrelease);
blanked = 0;
return 0;
diff --git a/sys/dev/syscons/schistory.c b/sys/dev/syscons/schistory.c
index 30cbdfd..479add9 100644
--- a/sys/dev/syscons/schistory.c
+++ b/sys/dev/syscons/schistory.c
@@ -124,7 +124,7 @@ sc_alloc_history_buffer(scr_stat *scp, int lines, int prev_ysize, int wait)
/* allocate a new buffer */
history = (sc_vtb_t *)malloc(sizeof(*history),
M_DEVBUF,
- (wait) ? M_WAITOK : M_NOWAIT);
+ (wait) ? 0 : M_NOWAIT);
if (history != NULL) {
if (lines > min_lines)
extra_history_size -= lines - min_lines;
diff --git a/sys/dev/syscons/scmouse.c b/sys/dev/syscons/scmouse.c
index 0c4ba2c..6db469a 100644
--- a/sys/dev/syscons/scmouse.c
+++ b/sys/dev/syscons/scmouse.c
@@ -106,7 +106,7 @@ sc_alloc_cut_buffer(scr_stat *scp, int wait)
free(p, M_DEVBUF);
cut_buffer_size = scp->xsize * scp->ysize + 1;
p = (u_char *)malloc(cut_buffer_size,
- M_DEVBUF, (wait) ? M_WAITOK : M_NOWAIT);
+ M_DEVBUF, (wait) ? 0 : M_NOWAIT);
if (p != NULL)
p[0] = '\0';
cut_buffer = p;
diff --git a/sys/dev/syscons/scvtb.c b/sys/dev/syscons/scvtb.c
index 6712e9b..8a0a24f 100644
--- a/sys/dev/syscons/scvtb.c
+++ b/sys/dev/syscons/scvtb.c
@@ -61,7 +61,7 @@ sc_vtb_init(sc_vtb_t *vtb, int type, int cols, int rows, void *buf, int wait)
vtb->vtb_buffer =
(vm_offset_t)malloc(cols*rows*sizeof(u_int16_t),
M_DEVBUF,
- (wait) ? M_WAITOK : M_NOWAIT);
+ (wait) ? 0 : M_NOWAIT);
if (vtb->vtb_buffer != 0) {
bzero((void *)sc_vtb_pointer(vtb, 0),
cols*rows*sizeof(u_int16_t));
diff --git a/sys/dev/syscons/snake/snake_saver.c b/sys/dev/syscons/snake/snake_saver.c
index ea5651f..5741eea 100644
--- a/sys/dev/syscons/snake/snake_saver.c
+++ b/sys/dev/syscons/snake/snake_saver.c
@@ -131,9 +131,9 @@ static int
snake_init(video_adapter_t *adp)
{
messagelen = strlen(ostype) + 1 + strlen(osrelease);
- message = malloc(messagelen + 1, M_DEVBUF, M_WAITOK);
+ message = malloc(messagelen + 1, M_DEVBUF, 0);
sprintf(message, "%s %s", ostype, osrelease);
- messagep = malloc(messagelen * sizeof *messagep, M_DEVBUF, M_WAITOK);
+ messagep = malloc(messagelen * sizeof *messagep, M_DEVBUF, 0);
return 0;
}
diff --git a/sys/dev/syscons/syscons.c b/sys/dev/syscons/syscons.c
index 6a885c4..38465ab 100644
--- a/sys/dev/syscons/syscons.c
+++ b/sys/dev/syscons/syscons.c
@@ -318,7 +318,7 @@ sc_attach_unit(int unit, int flags)
/* assert(sc_console->ts != NULL); */
kernel_console_ts = sc_console->ts;
sc_console->ts = malloc(sc_console->tsw->te_size,
- M_DEVBUF, M_WAITOK);
+ M_DEVBUF, 0);
bcopy(kernel_console_ts, sc_console->ts, sc_console->tsw->te_size);
(*sc_console->tsw->te_default_attr)(sc_console,
user_default.std_color,
@@ -2674,9 +2674,9 @@ scinit(int unit, int flags)
sc->font_16 = font_16;
} else if (sc->font_8 == NULL) {
/* assert(sc_malloc) */
- sc->font_8 = malloc(sizeof(font_8), M_DEVBUF, M_WAITOK);
- sc->font_14 = malloc(sizeof(font_14), M_DEVBUF, M_WAITOK);
- sc->font_16 = malloc(sizeof(font_16), M_DEVBUF, M_WAITOK);
+ sc->font_8 = malloc(sizeof(font_8), M_DEVBUF, 0);
+ sc->font_14 = malloc(sizeof(font_14), M_DEVBUF, 0);
+ sc->font_16 = malloc(sizeof(font_16), M_DEVBUF, 0);
}
#endif
@@ -2703,7 +2703,7 @@ scinit(int unit, int flags)
kernel_default.rev_color);
} else {
/* assert(sc_malloc) */
- sc->dev = malloc(sizeof(dev_t)*sc->vtys, M_DEVBUF, M_WAITOK|M_ZERO);
+ sc->dev = malloc(sizeof(dev_t)*sc->vtys, M_DEVBUF, M_ZERO);
sc->dev[0] = makedev(CDEV_MAJOR, unit*MAXCONS);
sc->dev[0]->si_tty = ttymalloc(sc->dev[0]->si_tty);
scp = alloc_scp(sc, sc->first_vty);
@@ -2928,7 +2928,7 @@ static scr_stat
/* assert(sc_malloc) */
- scp = (scr_stat *)malloc(sizeof(scr_stat), M_DEVBUF, M_WAITOK);
+ scp = (scr_stat *)malloc(sizeof(scr_stat), M_DEVBUF, 0);
init_scp(sc, vty, scp);
sc_alloc_scr_buffer(scp, TRUE, TRUE);
diff --git a/sys/dev/ti/if_ti.c b/sys/dev/ti/if_ti.c
index a384322..894ac43 100644
--- a/sys/dev/ti/if_ti.c
+++ b/sys/dev/ti/if_ti.c
@@ -1130,11 +1130,11 @@ ti_newbuf_std(sc, i, m)
struct ti_rx_desc *r;
if (m == NULL) {
- MGETHDR(m_new, M_DONTWAIT, MT_DATA);
+ MGETHDR(m_new, M_NOWAIT, MT_DATA);
if (m_new == NULL)
return(ENOBUFS);
- MCLGET(m_new, M_DONTWAIT);
+ MCLGET(m_new, M_NOWAIT);
if (!(m_new->m_flags & M_EXT)) {
m_freem(m_new);
return(ENOBUFS);
@@ -1174,7 +1174,7 @@ ti_newbuf_mini(sc, i, m)
struct ti_rx_desc *r;
if (m == NULL) {
- MGETHDR(m_new, M_DONTWAIT, MT_DATA);
+ MGETHDR(m_new, M_NOWAIT, MT_DATA);
if (m_new == NULL) {
return(ENOBUFS);
}
@@ -1218,7 +1218,7 @@ ti_newbuf_jumbo(sc, i, m)
caddr_t *buf = NULL;
/* Allocate the mbuf. */
- MGETHDR(m_new, M_DONTWAIT, MT_DATA);
+ MGETHDR(m_new, M_NOWAIT, MT_DATA);
if (m_new == NULL) {
return(ENOBUFS);
}
@@ -1300,19 +1300,19 @@ ti_newbuf_jumbo(sc, idx, m_old)
}
} else {
/* Allocate the mbufs. */
- MGETHDR(m_new, M_DONTWAIT, MT_DATA);
+ MGETHDR(m_new, M_NOWAIT, MT_DATA);
if (m_new == NULL) {
printf("ti%d: mbuf allocation failed "
"-- packet dropped!\n", sc->ti_unit);
goto nobufs;
}
- MGET(m[NPAYLOAD], M_DONTWAIT, MT_DATA);
+ MGET(m[NPAYLOAD], M_NOWAIT, MT_DATA);
if (m[NPAYLOAD] == NULL) {
printf("ti%d: cluster mbuf allocation failed "
"-- packet dropped!\n", sc->ti_unit);
goto nobufs;
}
- MCLGET(m[NPAYLOAD], M_DONTWAIT);
+ MCLGET(m[NPAYLOAD], M_NOWAIT);
if ((m[NPAYLOAD]->m_flags & M_EXT) == 0) {
printf("ti%d: mbuf allocation failed "
"-- packet dropped!\n", sc->ti_unit);
@@ -1321,7 +1321,7 @@ ti_newbuf_jumbo(sc, idx, m_old)
m[NPAYLOAD]->m_len = MCLBYTES;
for (i = 0; i < NPAYLOAD; i++){
- MGET(m[i], M_DONTWAIT, MT_DATA);
+ MGET(m[i], M_NOWAIT, MT_DATA);
if (m[i] == NULL) {
printf("ti%d: mbuf allocation failed "
"-- packet dropped!\n", sc->ti_unit);
diff --git a/sys/dev/trm/trm.c b/sys/dev/trm/trm.c
index e157cb1..8391123 100644
--- a/sys/dev/trm/trm.c
+++ b/sys/dev/trm/trm.c
@@ -2887,7 +2887,7 @@ trm_initACB(PACB pACB, u_int16_t unit)
for (j = 0; j < (pACB->max_lun +1); j++) {
pACB->scan_devices[i][j] = 1;
pACB->pDCB[i][j]= (PDCB) malloc (
- sizeof (struct _DCB), M_DEVBUF, M_WAITOK);
+ sizeof (struct _DCB), M_DEVBUF, 0);
trm_initDCB(pACB,
pACB->pDCB[i][j], unit, i, j);
TRM_DPRINTF("pDCB= %8x \n",
@@ -3292,7 +3292,7 @@ trm_attach(device_t pci_config_id)
* of the multi-channel controller.
* trm_action : sim_action_func
* trm_poll : sim_poll_func
- * "trm" : sim_name ,if sim_name = "xpt" ..M_DEVBUF,M_WAITOK
+ * "trm" : sim_name ,if sim_name = "xpt" ..M_DEVBUF,0
* pACB : *softc if sim_name <> "xpt" ..M_DEVBUF,M_NOWAIT
* pACB->unit : unit
* 1 : max_dev_transactions
diff --git a/sys/dev/twe/twe.c b/sys/dev/twe/twe.c
index 43df8e9..4284942 100644
--- a/sys/dev/twe/twe.c
+++ b/sys/dev/twe/twe.c
@@ -476,7 +476,7 @@ twe_ioctl(struct twe_softc *sc, int cmd, void *addr)
/* if there's a data buffer, allocate and copy it in */
tr->tr_length = tu->tu_size;
if (tr->tr_length > 0) {
- if ((tr->tr_data = malloc(tr->tr_length, M_DEVBUF, M_WAITOK)) == NULL) {
+ if ((tr->tr_data = malloc(tr->tr_length, M_DEVBUF, 0)) == NULL) {
error = ENOMEM;
goto cmd_done;
}
@@ -559,7 +559,7 @@ twe_ioctl(struct twe_softc *sc, int cmd, void *addr)
break;
case TWEIO_SET_PARAM:
- if ((data = malloc(tp->tp_size, M_DEVBUF, M_WAITOK)) == NULL) {
+ if ((data = malloc(tp->tp_size, M_DEVBUF, 0)) == NULL) {
error = ENOMEM;
} else {
error = copyin(tp->tp_data, data, tp->tp_size);
diff --git a/sys/dev/tx/if_tx.c b/sys/dev/tx/if_tx.c
index 189a69e..5a68719 100644
--- a/sys/dev/tx/if_tx.c
+++ b/sys/dev/tx/if_tx.c
@@ -577,7 +577,7 @@ epic_ifstart(ifp)
/* If packet was more than EPIC_MAX_FRAGS parts, */
/* recopy packet to new allocated mbuf cluster */
if( NULL != m ){
- m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if( NULL == m ){
m_freem(m0);
ifp->if_oerrors++;
@@ -652,7 +652,7 @@ epic_rx_done(sc)
m = buf->mbuf;
/* Try to get mbuf cluster */
- buf->mbuf = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ buf->mbuf = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if( NULL == buf->mbuf ) {
buf->mbuf = m;
desc->status = 0x8000;
@@ -1415,7 +1415,7 @@ epic_queue_last_packet(sc)
if ((desc->status & 0x8000) || (buf->mbuf != NULL))
return (EBUSY);
- MGETHDR(m0, M_DONTWAIT, MT_DATA);
+ MGETHDR(m0, M_NOWAIT, MT_DATA);
if (NULL == m0)
return (ENOBUFS);
@@ -1556,7 +1556,7 @@ epic_init_rings(sc)
return EFAULT;
}
- buf->mbuf = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ buf->mbuf = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if( NULL == buf->mbuf ) {
epic_free_rings(sc);
return ENOBUFS;
diff --git a/sys/dev/tx/if_txvar.h b/sys/dev/tx/if_txvar.h
index 16dc36d..465727f 100644
--- a/sys/dev/tx/if_txvar.h
+++ b/sys/dev/tx/if_txvar.h
@@ -134,9 +134,9 @@ struct epic_type {
/* Macro to get either mbuf cluster or nothing */
#define EPIC_MGETCLUSTER(m) \
- { MGETHDR((m),M_DONTWAIT,MT_DATA); \
+ { MGETHDR((m),M_NOWAIT,MT_DATA); \
if (m) { \
- MCLGET((m),M_DONTWAIT); \
+ MCLGET((m),M_NOWAIT); \
if( 0 == ((m)->m_flags & M_EXT) ) { \
m_freem(m); \
(m) = NULL; \
diff --git a/sys/dev/txp/if_txp.c b/sys/dev/txp/if_txp.c
index 7c4d74d..385c91d 100644
--- a/sys/dev/txp/if_txp.c
+++ b/sys/dev/txp/if_txp.c
@@ -768,13 +768,13 @@ txp_rx_reclaim(sc, r)
*/
struct mbuf *mnew;
- MGETHDR(mnew, M_DONTWAIT, MT_DATA);
+ MGETHDR(mnew, M_NOWAIT, MT_DATA);
if (mnew == NULL) {
m_freem(m);
goto next;
}
if (m->m_len > (MHLEN - 2)) {
- MCLGET(mnew, M_DONTWAIT);
+ MCLGET(mnew, M_NOWAIT);
if (!(mnew->m_flags & M_EXT)) {
m_freem(mnew);
m_freem(m);
@@ -847,11 +847,11 @@ txp_rxbuf_reclaim(sc)
if (sd->sd_mbuf != NULL)
break;
- MGETHDR(sd->sd_mbuf, M_DONTWAIT, MT_DATA);
+ MGETHDR(sd->sd_mbuf, M_NOWAIT, MT_DATA);
if (sd->sd_mbuf == NULL)
goto err_sd;
- MCLGET(sd->sd_mbuf, M_DONTWAIT);
+ MCLGET(sd->sd_mbuf, M_NOWAIT);
if ((sd->sd_mbuf->m_flags & M_EXT) == 0)
goto err_mbuf;
sd->sd_mbuf->m_pkthdr.rcvif = ifp;
@@ -1142,11 +1142,11 @@ txp_rxring_fill(sc)
for (i = 0; i < RXBUF_ENTRIES; i++) {
sd = sc->sc_rxbufs[i].rb_sd;
- MGETHDR(sd->sd_mbuf, M_DONTWAIT, MT_DATA);
+ MGETHDR(sd->sd_mbuf, M_NOWAIT, MT_DATA);
if (sd->sd_mbuf == NULL)
return(ENOBUFS);
- MCLGET(sd->sd_mbuf, M_DONTWAIT);
+ MCLGET(sd->sd_mbuf, M_NOWAIT);
if ((sd->sd_mbuf->m_flags & M_EXT) == 0) {
m_freem(sd->sd_mbuf);
return(ENOBUFS);
diff --git a/sys/dev/ubsec/ubsec.c b/sys/dev/ubsec/ubsec.c
index 06600ed..b18acfd 100644
--- a/sys/dev/ubsec/ubsec.c
+++ b/sys/dev/ubsec/ubsec.c
@@ -1328,14 +1328,14 @@ ubsec_process(void *arg, struct cryptop *crp, int hint)
totlen = q->q_src_mapsize;
if (q->q_src_m->m_flags & M_PKTHDR) {
len = MHLEN;
- MGETHDR(m, M_DONTWAIT, MT_DATA);
- if (m && !m_dup_pkthdr(m, q->q_src_m, M_DONTWAIT)) {
+ MGETHDR(m, M_NOWAIT, MT_DATA);
+ if (m && !m_dup_pkthdr(m, q->q_src_m, M_NOWAIT)) {
m_free(m);
m = NULL;
}
} else {
len = MLEN;
- MGET(m, M_DONTWAIT, MT_DATA);
+ MGET(m, M_NOWAIT, MT_DATA);
}
if (m == NULL) {
ubsecstats.hst_nombuf++;
@@ -1343,7 +1343,7 @@ ubsec_process(void *arg, struct cryptop *crp, int hint)
goto errout;
}
if (totlen >= MINCLSIZE) {
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
if ((m->m_flags & M_EXT) == 0) {
m_free(m);
ubsecstats.hst_nomcl++;
@@ -1358,7 +1358,7 @@ ubsec_process(void *arg, struct cryptop *crp, int hint)
while (totlen > 0) {
if (top) {
- MGET(m, M_DONTWAIT, MT_DATA);
+ MGET(m, M_NOWAIT, MT_DATA);
if (m == NULL) {
m_freem(top);
ubsecstats.hst_nombuf++;
@@ -1368,7 +1368,7 @@ ubsec_process(void *arg, struct cryptop *crp, int hint)
len = MLEN;
}
if (top && totlen >= MINCLSIZE) {
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
if ((m->m_flags & M_EXT) == 0) {
*mp = m;
m_freem(top);
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,
diff --git a/sys/dev/vinum/vinumext.h b/sys/dev/vinum/vinumext.h
index 3c6bbad..a8af0cd 100644
--- a/sys/dev/vinum/vinumext.h
+++ b/sys/dev/vinum/vinumext.h
@@ -245,7 +245,7 @@ void FFree(void *mem, char *, int);
#define LOCKDRIVE(d) lockdrive (d, __FILE__, __LINE__)
#else
#define Malloc(x) malloc((x), M_DEVBUF, \
- curthread->td_proc->p_intr_nesting_level == 0? M_WAITOK: M_NOWAIT)
+ curthread->td_proc->p_intr_nesting_level == 0? 0: M_NOWAIT)
#define Free(x) free((x), M_DEVBUF)
#define LOCKDRIVE(d) lockdrive (d)
#endif
diff --git a/sys/dev/vinum/vinummemory.c b/sys/dev/vinum/vinummemory.c
index 6936e48..cedcbfb 100644
--- a/sys/dev/vinum/vinummemory.c
+++ b/sys/dev/vinum/vinummemory.c
@@ -152,7 +152,7 @@ MMalloc(int size, char *file, int line)
/* Wait for malloc if we can */
result = malloc(size,
M_DEVBUF,
- curthread->td_intr_nesting_level == 0 ? M_WAITOK : M_NOWAIT);
+ curthread->td_intr_nesting_level == 0 ? 0 : M_NOWAIT);
if (result == NULL)
log(LOG_ERR, "vinum: can't allocate %d bytes from %s:%d\n", size, file, line);
else {
diff --git a/sys/dev/vr/if_vr.c b/sys/dev/vr/if_vr.c
index 407abf1..01b1992 100644
--- a/sys/dev/vr/if_vr.c
+++ b/sys/dev/vr/if_vr.c
@@ -948,11 +948,11 @@ vr_newbuf(sc, c, 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)
return(ENOBUFS);
- MCLGET(m_new, M_DONTWAIT);
+ MCLGET(m_new, M_NOWAIT);
if (!(m_new->m_flags & M_EXT)) {
m_freem(m_new);
return(ENOBUFS);
@@ -1292,13 +1292,13 @@ vr_encap(sc, c, m_head)
if (m != NULL) {
struct mbuf *m_new = NULL;
- MGETHDR(m_new, M_DONTWAIT, MT_DATA);
+ MGETHDR(m_new, M_NOWAIT, MT_DATA);
if (m_new == NULL) {
printf("vr%d: no memory for tx list\n", sc->vr_unit);
return(1);
}
if (m_head->m_pkthdr.len > MHLEN) {
- MCLGET(m_new, M_DONTWAIT);
+ MCLGET(m_new, M_NOWAIT);
if (!(m_new->m_flags & M_EXT)) {
m_freem(m_new);
printf("vr%d: no memory for tx list\n",
diff --git a/sys/dev/vx/if_vx.c b/sys/dev/vx/if_vx.c
index 143a821..d86fab8 100644
--- a/sys/dev/vx/if_vx.c
+++ b/sys/dev/vx/if_vx.c
@@ -761,7 +761,7 @@ vxget(sc, totlen)
m = sc->mb[sc->next_mb];
sc->mb[sc->next_mb] = 0;
if (m == 0) {
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == 0)
return 0;
} else {
@@ -800,7 +800,7 @@ vxget(sc, totlen)
m = sc->mb[sc->next_mb];
sc->mb[sc->next_mb] = 0;
if (m == 0) {
- MGET(m, M_DONTWAIT, MT_DATA);
+ MGET(m, M_NOWAIT, MT_DATA);
if (m == 0) {
splx(sh);
m_freem(top);
@@ -812,7 +812,7 @@ vxget(sc, totlen)
len = MLEN;
}
if (totlen >= MINCLSIZE) {
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
if (m->m_flags & M_EXT)
len = MCLBYTES;
}
@@ -993,7 +993,7 @@ vxmbuffill(sp)
i = sc->last_mb;
do {
if (sc->mb[i] == NULL)
- MGET(sc->mb[i], M_DONTWAIT, MT_DATA);
+ MGET(sc->mb[i], M_NOWAIT, MT_DATA);
if (sc->mb[i] == NULL)
break;
i = (i + 1) % MAX_MBS;
diff --git a/sys/dev/wi/if_wi.c b/sys/dev/wi/if_wi.c
index 5d469a1..fb2a214 100644
--- a/sys/dev/wi/if_wi.c
+++ b/sys/dev/wi/if_wi.c
@@ -915,9 +915,9 @@ wi_start(struct ifnet *ifp)
if (sc->sc_drvbpf) {
struct mbuf *mb;
- MGETHDR(mb, M_DONTWAIT, m0->m_type);
+ MGETHDR(mb, M_NOWAIT, m0->m_type);
if (mb != NULL) {
- (void) m_dup_pkthdr(mb, m0, M_DONTWAIT);
+ (void) m_dup_pkthdr(mb, m0, M_NOWAIT);
mb->m_next = m0;
mb->m_data = (caddr_t)&frmhdr;
mb->m_len = sizeof(frmhdr);
@@ -1344,7 +1344,7 @@ wi_rx_intr(struct wi_softc *sc)
len = le16toh(frmhdr.wi_dat_len);
off = ALIGN(sizeof(struct ieee80211_frame));
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL) {
CSR_WRITE_2(sc, WI_EVENT_ACK, WI_EV_RX);
ifp->if_ierrors++;
@@ -1352,7 +1352,7 @@ wi_rx_intr(struct wi_softc *sc)
return;
}
if (off + len > MHLEN) {
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
if ((m->m_flags & M_EXT) == 0) {
CSR_WRITE_2(sc, WI_EVENT_ACK, WI_EV_RX);
m_freem(m);
@@ -1375,9 +1375,9 @@ wi_rx_intr(struct wi_softc *sc)
if (sc->sc_drvbpf) {
struct mbuf *mb;
- MGETHDR(mb, M_DONTWAIT, m->m_type);
+ MGETHDR(mb, M_NOWAIT, m->m_type);
if (mb != NULL) {
- (void) m_dup_pkthdr(mb, m, M_DONTWAIT);
+ (void) m_dup_pkthdr(mb, m, M_NOWAIT);
mb->m_next = m;
mb->m_data = (caddr_t)&frmhdr;
mb->m_len = sizeof(frmhdr);
diff --git a/sys/dev/wl/if_wl.c b/sys/dev/wl/if_wl.c
index dfaca89..4b44fa3 100644
--- a/sys/dev/wl/if_wl.c
+++ b/sys/dev/wl/if_wl.c
@@ -966,7 +966,7 @@ wlread(int unit, u_short fd_p)
/*
* Allocate a cluster'd mbuf to receive the packet.
*/
- m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (m == NULL) {
if (wlhwrst(unit) != TRUE) {
sc->hacr &= ~HACR_INTRON;
diff --git a/sys/dev/xe/if_xe.c b/sys/dev/xe/if_xe.c
index 6ba4de4..8cd29d1 100644
--- a/sys/dev/xe/if_xe.c
+++ b/sys/dev/xe/if_xe.c
@@ -643,7 +643,7 @@ xe_intr(void *xscp)
if (len & 0x01)
len++;
- MGETHDR(mbp, M_DONTWAIT, MT_DATA); /* Allocate a header mbuf */
+ MGETHDR(mbp, M_NOWAIT, MT_DATA); /* Allocate a header mbuf */
if (mbp != NULL) {
mbp->m_pkthdr.rcvif = ifp;
mbp->m_pkthdr.len = mbp->m_len = len;
@@ -654,7 +654,7 @@ xe_intr(void *xscp)
* alignment hack below.
*/
if (len + 2 > MHLEN) {
- MCLGET(mbp, M_DONTWAIT);
+ MCLGET(mbp, M_NOWAIT);
if ((mbp->m_flags & M_EXT) == 0) {
m_freem(mbp);
mbp = NULL;
OpenPOWER on IntegriCloud