diff options
Diffstat (limited to 'sys/cam')
-rw-r--r-- | sys/cam/cam_periph.c | 2 | ||||
-rw-r--r-- | sys/cam/cam_sim.c | 2 | ||||
-rw-r--r-- | sys/cam/cam_xpt.c | 4 | ||||
-rw-r--r-- | sys/cam/scsi/scsi_cd.c | 44 | ||||
-rw-r--r-- | sys/cam/scsi/scsi_ch.c | 6 | ||||
-rw-r--r-- | sys/cam/scsi/scsi_da.c | 2 | ||||
-rw-r--r-- | sys/cam/scsi/scsi_low.c | 2 | ||||
-rw-r--r-- | sys/cam/scsi/scsi_sa.c | 8 | ||||
-rw-r--r-- | sys/cam/scsi/scsi_target.c | 6 |
9 files changed, 38 insertions, 38 deletions
diff --git a/sys/cam/cam_periph.c b/sys/cam/cam_periph.c index 247ebb8..591d765 100644 --- a/sys/cam/cam_periph.c +++ b/sys/cam/cam_periph.c @@ -89,7 +89,7 @@ periphdriver_register(void *data) int ndrivers; ndrivers = nperiph_drivers + 2; - newdrivers = malloc(sizeof(*newdrivers) * ndrivers, M_TEMP, M_WAITOK); + newdrivers = malloc(sizeof(*newdrivers) * ndrivers, M_TEMP, 0); if (periph_drivers) bcopy(periph_drivers, newdrivers, sizeof(*newdrivers) * nperiph_drivers); diff --git a/sys/cam/cam_sim.c b/sys/cam/cam_sim.c index b7e0ec5..35b18f7 100644 --- a/sys/cam/cam_sim.c +++ b/sys/cam/cam_sim.c @@ -67,7 +67,7 @@ cam_sim_alloc(sim_action_func sim_action, sim_poll_func sim_poll, */ if (strcmp(sim_name, "xpt") == 0) sim = (struct cam_sim *)malloc(sizeof(struct cam_sim), - M_DEVBUF, M_WAITOK); + M_DEVBUF, 0); else sim = (struct cam_sim *)malloc(sizeof(struct cam_sim), M_DEVBUF, M_NOWAIT); diff --git a/sys/cam/cam_xpt.c b/sys/cam/cam_xpt.c index e22357b..96af6d7 100644 --- a/sys/cam/cam_xpt.c +++ b/sys/cam/cam_xpt.c @@ -4804,7 +4804,7 @@ xpt_alloc_ccb() { union ccb *new_ccb; - new_ccb = malloc(sizeof(*new_ccb), M_DEVBUF, M_WAITOK); + new_ccb = malloc(sizeof(*new_ccb), M_DEVBUF, 0); return (new_ccb); } @@ -5169,7 +5169,7 @@ xpt_scan_bus(struct cam_periph *periph, union ccb *request_ccb) /* Save some state for use while we probe for devices */ scan_info = (xpt_scan_bus_info *) - malloc(sizeof(xpt_scan_bus_info), M_TEMP, M_WAITOK); + malloc(sizeof(xpt_scan_bus_info), M_TEMP, 0); scan_info->request_ccb = request_ccb; scan_info->cpi = &work_ccb->cpi; diff --git a/sys/cam/scsi/scsi_cd.c b/sys/cam/scsi/scsi_cd.c index c5be698..a187c79 100644 --- a/sys/cam/scsi/scsi_cd.c +++ b/sys/cam/scsi/scsi_cd.c @@ -1788,7 +1788,7 @@ cdioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct thread *td) struct cd_mode_data *data; data = malloc(sizeof(struct cd_mode_data), M_TEMP, - M_WAITOK); + 0); CAM_DEBUG(periph->path, CAM_DEBUG_SUBTRACE, ("trying to do CDIOCPLAYTRACKS\n")); @@ -1822,7 +1822,7 @@ cdioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct thread *td) struct cd_mode_data *data; data = malloc(sizeof(struct cd_mode_data), M_TEMP, - M_WAITOK); + 0); CAM_DEBUG(periph->path, CAM_DEBUG_SUBTRACE, ("trying to do CDIOCPLAYMSF\n")); @@ -1857,7 +1857,7 @@ cdioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct thread *td) ("trying to do CDIOCPLAYBLOCKS\n")); data = malloc(sizeof(struct cd_mode_data), M_TEMP, - M_WAITOK); + 0); error = cdgetmode(periph, data, AUDIO_PAGE); if (error) { @@ -1884,7 +1884,7 @@ cdioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct thread *td) ("trying to do CDIOCREADSUBCHANNEL\n")); data = malloc(sizeof(struct cd_sub_channel_info), - M_TEMP, M_WAITOK); + M_TEMP, 0); if ((len > sizeof(struct cd_sub_channel_info)) || (len < sizeof(struct cd_sub_channel_header))) { @@ -1928,7 +1928,7 @@ cdioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct thread *td) ("trying to do CDIOREADTOCHEADER\n")); th = malloc(sizeof(struct ioc_toc_header), M_TEMP, - M_WAITOK); + 0); error = cdreadtoc(periph, 0, 0, (struct cd_toc_entry *)th, sizeof (*th)); @@ -1971,8 +1971,8 @@ cdioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct thread *td) CAM_DEBUG(periph->path, CAM_DEBUG_SUBTRACE, ("trying to do CDIOREADTOCENTRYS\n")); - data = malloc(sizeof(data_t), M_TEMP, M_WAITOK); - lead = malloc(sizeof(lead_t), M_TEMP, M_WAITOK); + data = malloc(sizeof(data_t), M_TEMP, 0); + lead = malloc(sizeof(lead_t), M_TEMP, 0); if (te->data_len < sizeof(struct cd_toc_entry) || (te->data_len % sizeof(struct cd_toc_entry)) != 0 @@ -2098,7 +2098,7 @@ cdioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct thread *td) CAM_DEBUG(periph->path, CAM_DEBUG_SUBTRACE, ("trying to do CDIOREADTOCENTRY\n")); - data = malloc(sizeof(data_t), M_TEMP, M_WAITOK); + data = malloc(sizeof(data_t), M_TEMP, 0); if (te->address_format != CD_MSF_FORMAT && te->address_format != CD_LBA_FORMAT) { @@ -2164,7 +2164,7 @@ cdioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct thread *td) ("trying to do CDIOCSETPATCH\n")); data = malloc(sizeof(struct cd_mode_data), M_TEMP, - M_WAITOK); + 0); error = cdgetmode(periph, data, AUDIO_PAGE); if (error) { free(data, M_TEMP); @@ -2189,7 +2189,7 @@ cdioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct thread *td) ("trying to do CDIOCGETVOL\n")); data = malloc(sizeof(struct cd_mode_data), M_TEMP, - M_WAITOK); + 0); error = cdgetmode(periph, data, AUDIO_PAGE); if (error) { free(data, M_TEMP); @@ -2213,7 +2213,7 @@ cdioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct thread *td) ("trying to do CDIOCSETVOL\n")); data = malloc(sizeof(struct cd_mode_data), M_TEMP, - M_WAITOK); + 0); error = cdgetmode(periph, data, AUDIO_PAGE); if (error) { free(data, M_TEMP); @@ -2239,7 +2239,7 @@ cdioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct thread *td) ("trying to do CDIOCSETMONO\n")); data = malloc(sizeof(struct cd_mode_data), - M_TEMP, M_WAITOK); + M_TEMP, 0); error = cdgetmode(periph, data, AUDIO_PAGE); if (error) { free(data, M_TEMP); @@ -2263,7 +2263,7 @@ cdioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct thread *td) ("trying to do CDIOCSETSTEREO\n")); data = malloc(sizeof(struct cd_mode_data), M_TEMP, - M_WAITOK); + 0); error = cdgetmode(periph, data, AUDIO_PAGE); if (error) { free(data, M_TEMP); @@ -2287,7 +2287,7 @@ cdioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct thread *td) ("trying to do CDIOCSETMUTE\n")); data = malloc(sizeof(struct cd_mode_data), M_TEMP, - M_WAITOK); + 0); error = cdgetmode(periph, data, AUDIO_PAGE); if (error) { free(data, M_TEMP); @@ -2309,7 +2309,7 @@ cdioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct thread *td) ("trying to do CDIOCSETLEFT\n")); data = malloc(sizeof(struct cd_mode_data), M_TEMP, - M_WAITOK); + 0); error = cdgetmode(periph, data, AUDIO_PAGE); if (error) { free(data, M_TEMP); @@ -2333,7 +2333,7 @@ cdioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct thread *td) ("trying to do CDIOCSETRIGHT\n")); data = malloc(sizeof(struct cd_mode_data), M_TEMP, - M_WAITOK); + 0); error = cdgetmode(periph, data, AUDIO_PAGE); if (error) { free(data, M_TEMP); @@ -2485,7 +2485,7 @@ cdsize(dev_t dev, u_int32_t *size) ccb = cdgetccb(periph, /* priority */ 1); rcap_buf = malloc(sizeof(struct scsi_read_capacity_data), - M_TEMP, M_WAITOK); + M_TEMP, 0); scsi_read_capacity(&ccb->csio, /*retries*/ 1, @@ -3054,7 +3054,7 @@ cdreportkey(struct cam_periph *periph, struct dvd_authinfo *authinfo) } if (length != 0) { - databuf = malloc(length, M_DEVBUF, M_WAITOK | M_ZERO); + databuf = malloc(length, M_DEVBUF, M_ZERO); } else databuf = NULL; @@ -3187,7 +3187,7 @@ cdsendkey(struct cam_periph *periph, struct dvd_authinfo *authinfo) length = sizeof(*challenge_data); - challenge_data = malloc(length, M_DEVBUF, M_WAITOK | M_ZERO); + challenge_data = malloc(length, M_DEVBUF, M_ZERO); databuf = (u_int8_t *)challenge_data; @@ -3204,7 +3204,7 @@ cdsendkey(struct cam_periph *periph, struct dvd_authinfo *authinfo) length = sizeof(*key2_data); - key2_data = malloc(length, M_DEVBUF, M_WAITOK | M_ZERO); + key2_data = malloc(length, M_DEVBUF, M_ZERO); databuf = (u_int8_t *)key2_data; @@ -3221,7 +3221,7 @@ cdsendkey(struct cam_periph *periph, struct dvd_authinfo *authinfo) length = sizeof(*rpc_data); - rpc_data = malloc(length, M_DEVBUF, M_WAITOK | M_ZERO); + rpc_data = malloc(length, M_DEVBUF, M_ZERO); databuf = (u_int8_t *)rpc_data; @@ -3363,7 +3363,7 @@ cdreaddvdstructure(struct cam_periph *periph, struct dvd_struct *dvdstruct) } if (length != 0) { - databuf = malloc(length, M_DEVBUF, M_WAITOK | M_ZERO); + databuf = malloc(length, M_DEVBUF, M_ZERO); } else databuf = NULL; diff --git a/sys/cam/scsi/scsi_ch.c b/sys/cam/scsi/scsi_ch.c index fcbb53b..51f6946 100644 --- a/sys/cam/scsi/scsi_ch.c +++ b/sys/cam/scsi/scsi_ch.c @@ -1100,7 +1100,7 @@ chgetelemstatus(struct cam_periph *periph, * we can allocate enough storage for all of them. We assume * that the first one can fit into 1k. */ - data = (caddr_t)malloc(1024, M_DEVBUF, M_WAITOK); + data = (caddr_t)malloc(1024, M_DEVBUF, 0); ccb = cam_periph_getccb(periph, /*priority*/ 1); @@ -1137,7 +1137,7 @@ chgetelemstatus(struct cam_periph *periph, * device. */ free(data, M_DEVBUF); - data = (caddr_t)malloc(size, M_DEVBUF, M_WAITOK); + data = (caddr_t)malloc(size, M_DEVBUF, 0); scsi_read_element_status(&ccb->csio, /* retries */ 1, @@ -1172,7 +1172,7 @@ chgetelemstatus(struct cam_periph *periph, user_data = (struct changer_element_status *) malloc(avail * sizeof(struct changer_element_status), - M_DEVBUF, M_WAITOK | M_ZERO); + M_DEVBUF, M_ZERO); desc = (struct read_element_status_descriptor *)((uintptr_t)data + sizeof(struct read_element_status_header) + diff --git a/sys/cam/scsi/scsi_da.c b/sys/cam/scsi/scsi_da.c index 950d2b8..df68134 100644 --- a/sys/cam/scsi/scsi_da.c +++ b/sys/cam/scsi/scsi_da.c @@ -575,7 +575,7 @@ daopen(dev_t dev, int flags __unused, int fmt __unused, struct thread *td __unus /* Do a read capacity */ rcap = (struct scsi_read_capacity_data *)malloc(sizeof(*rcap), M_TEMP, - M_WAITOK); + 0); ccb = cam_periph_getccb(periph, /*priority*/1); scsi_read_capacity(&ccb->csio, diff --git a/sys/cam/scsi/scsi_low.c b/sys/cam/scsi/scsi_low.c index afda113..753560a 100644 --- a/sys/cam/scsi/scsi_low.c +++ b/sys/cam/scsi/scsi_low.c @@ -961,7 +961,7 @@ scsi_low_rescan_bus_cam(slp) struct scsi_low_softc *slp; { struct cam_path *path; - union ccb *ccb = malloc(sizeof(union ccb), M_DEVBUF, M_WAITOK); + union ccb *ccb = malloc(sizeof(union ccb), M_DEVBUF, 0); cam_status status; bzero(ccb, sizeof(union ccb)); diff --git a/sys/cam/scsi/scsi_sa.c b/sys/cam/scsi/scsi_sa.c index ce077c5..b920b00 100644 --- a/sys/cam/scsi/scsi_sa.c +++ b/sys/cam/scsi/scsi_sa.c @@ -1895,7 +1895,7 @@ samount(struct cam_periph *periph, int oflags, dev_t dev) * read a full record. */ rblim = (struct scsi_read_block_limits_data *) - malloc(8192, M_TEMP, M_WAITOK); + malloc(8192, M_TEMP, 0); if (rblim == NULL) { xpt_print_path(ccb->ccb_h.path); printf("no memory for test read\n"); @@ -2520,7 +2520,7 @@ retry: mode_buffer_len += sizeof (sa_comp_t); } - mode_buffer = malloc(mode_buffer_len, M_TEMP, M_WAITOK | M_ZERO); + mode_buffer = malloc(mode_buffer_len, M_TEMP, M_ZERO); mode_hdr = (struct scsi_mode_header_6 *)mode_buffer; mode_blk = (struct scsi_mode_blk_desc *)&mode_hdr[1]; @@ -2700,7 +2700,7 @@ sasetparams(struct cam_periph *periph, sa_params params_to_set, softc = (struct sa_softc *)periph->softc; - ccomp = malloc(sizeof (sa_comp_t), M_TEMP, M_WAITOK); + ccomp = malloc(sizeof (sa_comp_t), M_TEMP, 0); /* * Since it doesn't make sense to set the number of blocks, or @@ -2723,7 +2723,7 @@ sasetparams(struct cam_periph *periph, sa_params params_to_set, if (params_to_set & SA_PARAM_COMPRESSION) mode_buffer_len += sizeof (sa_comp_t); - mode_buffer = malloc(mode_buffer_len, M_TEMP, M_WAITOK | M_ZERO); + mode_buffer = malloc(mode_buffer_len, M_TEMP, M_ZERO); mode_hdr = (struct scsi_mode_header_6 *)mode_buffer; mode_blk = (struct scsi_mode_blk_desc *)&mode_hdr[1]; diff --git a/sys/cam/scsi/scsi_target.c b/sys/cam/scsi/scsi_target.c index 9db2604..25001ef 100644 --- a/sys/cam/scsi/scsi_target.c +++ b/sys/cam/scsi/scsi_target.c @@ -189,7 +189,7 @@ targopen(dev_t dev, int flags, int fmt, struct thread *td) "targ%d", dev2unit(dev)); } MALLOC(softc, struct targ_softc *, sizeof(*softc), M_TARG, - M_WAITOK | M_ZERO); + M_ZERO); dev->si_drv1 = softc; softc->state = TARG_STATE_OPENED; softc->periph = NULL; @@ -977,7 +977,7 @@ targgetccb(struct targ_softc *softc, xpt_opcode type, int priority) int ccb_len; ccb_len = targccblen(type); - MALLOC(ccb, union ccb *, ccb_len, M_TARG, M_WAITOK); + MALLOC(ccb, union ccb *, ccb_len, M_TARG, 0); CAM_DEBUG(softc->path, CAM_DEBUG_PERIPH, ("getccb %p\n", ccb)); xpt_setup_ccb(&ccb->ccb_h, softc->path, priority); @@ -1021,7 +1021,7 @@ targgetdescr(struct targ_softc *softc) struct targ_cmd_descr *descr; MALLOC(descr, struct targ_cmd_descr *, sizeof(*descr), M_TARG, - M_WAITOK); + 0); descr->mapinfo.num_bufs_used = 0; return (descr); } |