summaryrefslogtreecommitdiffstats
path: root/sys/cam
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2003-02-19 05:47:46 +0000
committerimp <imp@FreeBSD.org>2003-02-19 05:47:46 +0000
commitcf874b345d0f766fb64cf4737e1c85ccc78d2bee (patch)
tree9e20e320fe15ae4bf68f8335fcf9d3e71d3b3614 /sys/cam
parentb72619cecb8265d3efb3781b0acff1380762c173 (diff)
downloadFreeBSD-src-cf874b345d0f766fb64cf4737e1c85ccc78d2bee.zip
FreeBSD-src-cf874b345d0f766fb64cf4737e1c85ccc78d2bee.tar.gz
Back out M_* changes, per decision of the TRB.
Approved by: trb
Diffstat (limited to 'sys/cam')
-rw-r--r--sys/cam/cam_periph.c2
-rw-r--r--sys/cam/cam_sim.c2
-rw-r--r--sys/cam/cam_xpt.c4
-rw-r--r--sys/cam/scsi/scsi_cd.c44
-rw-r--r--sys/cam/scsi/scsi_ch.c6
-rw-r--r--sys/cam/scsi/scsi_da.c2
-rw-r--r--sys/cam/scsi/scsi_low.c2
-rw-r--r--sys/cam/scsi/scsi_sa.c8
-rw-r--r--sys/cam/scsi/scsi_target.c6
9 files changed, 38 insertions, 38 deletions
diff --git a/sys/cam/cam_periph.c b/sys/cam/cam_periph.c
index 591d765..247ebb8 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, 0);
+ newdrivers = malloc(sizeof(*newdrivers) * ndrivers, M_TEMP, M_WAITOK);
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 35b18f7..b7e0ec5 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, 0);
+ M_DEVBUF, M_WAITOK);
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 96af6d7..e22357b 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, 0);
+ new_ccb = malloc(sizeof(*new_ccb), M_DEVBUF, M_WAITOK);
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, 0);
+ malloc(sizeof(xpt_scan_bus_info), M_TEMP, M_WAITOK);
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 ebfe241..543714f 100644
--- a/sys/cam/scsi/scsi_cd.c
+++ b/sys/cam/scsi/scsi_cd.c
@@ -1784,7 +1784,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,
- 0);
+ M_WAITOK);
CAM_DEBUG(periph->path, CAM_DEBUG_SUBTRACE,
("trying to do CDIOCPLAYTRACKS\n"));
@@ -1818,7 +1818,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,
- 0);
+ M_WAITOK);
CAM_DEBUG(periph->path, CAM_DEBUG_SUBTRACE,
("trying to do CDIOCPLAYMSF\n"));
@@ -1853,7 +1853,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,
- 0);
+ M_WAITOK);
error = cdgetmode(periph, data, AUDIO_PAGE);
if (error) {
@@ -1880,7 +1880,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, 0);
+ M_TEMP, M_WAITOK);
if ((len > sizeof(struct cd_sub_channel_info)) ||
(len < sizeof(struct cd_sub_channel_header))) {
@@ -1924,7 +1924,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,
- 0);
+ M_WAITOK);
error = cdreadtoc(periph, 0, 0,
(struct cd_toc_entry *)th,
sizeof (*th));
@@ -1967,8 +1967,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, 0);
- lead = malloc(sizeof(lead_t), M_TEMP, 0);
+ data = malloc(sizeof(data_t), M_TEMP, M_WAITOK);
+ lead = malloc(sizeof(lead_t), M_TEMP, M_WAITOK);
if (te->data_len < sizeof(struct cd_toc_entry)
|| (te->data_len % sizeof(struct cd_toc_entry)) != 0
@@ -2094,7 +2094,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, 0);
+ data = malloc(sizeof(data_t), M_TEMP, M_WAITOK);
if (te->address_format != CD_MSF_FORMAT
&& te->address_format != CD_LBA_FORMAT) {
@@ -2160,7 +2160,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,
- 0);
+ M_WAITOK);
error = cdgetmode(periph, data, AUDIO_PAGE);
if (error) {
free(data, M_TEMP);
@@ -2185,7 +2185,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,
- 0);
+ M_WAITOK);
error = cdgetmode(periph, data, AUDIO_PAGE);
if (error) {
free(data, M_TEMP);
@@ -2209,7 +2209,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,
- 0);
+ M_WAITOK);
error = cdgetmode(periph, data, AUDIO_PAGE);
if (error) {
free(data, M_TEMP);
@@ -2235,7 +2235,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, 0);
+ M_TEMP, M_WAITOK);
error = cdgetmode(periph, data, AUDIO_PAGE);
if (error) {
free(data, M_TEMP);
@@ -2259,7 +2259,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,
- 0);
+ M_WAITOK);
error = cdgetmode(periph, data, AUDIO_PAGE);
if (error) {
free(data, M_TEMP);
@@ -2283,7 +2283,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,
- 0);
+ M_WAITOK);
error = cdgetmode(periph, data, AUDIO_PAGE);
if (error) {
free(data, M_TEMP);
@@ -2305,7 +2305,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,
- 0);
+ M_WAITOK);
error = cdgetmode(periph, data, AUDIO_PAGE);
if (error) {
free(data, M_TEMP);
@@ -2329,7 +2329,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,
- 0);
+ M_WAITOK);
error = cdgetmode(periph, data, AUDIO_PAGE);
if (error) {
free(data, M_TEMP);
@@ -2481,7 +2481,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, 0);
+ M_TEMP, M_WAITOK);
scsi_read_capacity(&ccb->csio,
/*retries*/ 1,
@@ -3050,7 +3050,7 @@ cdreportkey(struct cam_periph *periph, struct dvd_authinfo *authinfo)
}
if (length != 0) {
- databuf = malloc(length, M_DEVBUF, M_ZERO);
+ databuf = malloc(length, M_DEVBUF, M_WAITOK | M_ZERO);
} else
databuf = NULL;
@@ -3183,7 +3183,7 @@ cdsendkey(struct cam_periph *periph, struct dvd_authinfo *authinfo)
length = sizeof(*challenge_data);
- challenge_data = malloc(length, M_DEVBUF, M_ZERO);
+ challenge_data = malloc(length, M_DEVBUF, M_WAITOK | M_ZERO);
databuf = (u_int8_t *)challenge_data;
@@ -3200,7 +3200,7 @@ cdsendkey(struct cam_periph *periph, struct dvd_authinfo *authinfo)
length = sizeof(*key2_data);
- key2_data = malloc(length, M_DEVBUF, M_ZERO);
+ key2_data = malloc(length, M_DEVBUF, M_WAITOK | M_ZERO);
databuf = (u_int8_t *)key2_data;
@@ -3217,7 +3217,7 @@ cdsendkey(struct cam_periph *periph, struct dvd_authinfo *authinfo)
length = sizeof(*rpc_data);
- rpc_data = malloc(length, M_DEVBUF, M_ZERO);
+ rpc_data = malloc(length, M_DEVBUF, M_WAITOK | M_ZERO);
databuf = (u_int8_t *)rpc_data;
@@ -3359,7 +3359,7 @@ cdreaddvdstructure(struct cam_periph *periph, struct dvd_struct *dvdstruct)
}
if (length != 0) {
- databuf = malloc(length, M_DEVBUF, M_ZERO);
+ databuf = malloc(length, M_DEVBUF, M_WAITOK | M_ZERO);
} else
databuf = NULL;
diff --git a/sys/cam/scsi/scsi_ch.c b/sys/cam/scsi/scsi_ch.c
index 51f6946..fcbb53b 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, 0);
+ data = (caddr_t)malloc(1024, M_DEVBUF, M_WAITOK);
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, 0);
+ data = (caddr_t)malloc(size, M_DEVBUF, M_WAITOK);
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_ZERO);
+ M_DEVBUF, M_WAITOK | 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 6b5802d..65878a1 100644
--- a/sys/cam/scsi/scsi_da.c
+++ b/sys/cam/scsi/scsi_da.c
@@ -582,7 +582,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,
- 0);
+ M_WAITOK);
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 753560a..afda113 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, 0);
+ union ccb *ccb = malloc(sizeof(union ccb), M_DEVBUF, M_WAITOK);
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 75dd670..e77865b 100644
--- a/sys/cam/scsi/scsi_sa.c
+++ b/sys/cam/scsi/scsi_sa.c
@@ -1896,7 +1896,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, 0);
+ malloc(8192, M_TEMP, M_WAITOK);
if (rblim == NULL) {
xpt_print_path(ccb->ccb_h.path);
printf("no memory for test read\n");
@@ -2521,7 +2521,7 @@ retry:
mode_buffer_len += sizeof (sa_comp_t);
}
- mode_buffer = malloc(mode_buffer_len, M_TEMP, M_ZERO);
+ mode_buffer = malloc(mode_buffer_len, M_TEMP, M_WAITOK | M_ZERO);
mode_hdr = (struct scsi_mode_header_6 *)mode_buffer;
mode_blk = (struct scsi_mode_blk_desc *)&mode_hdr[1];
@@ -2701,7 +2701,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, 0);
+ ccomp = malloc(sizeof (sa_comp_t), M_TEMP, M_WAITOK);
/*
* Since it doesn't make sense to set the number of blocks, or
@@ -2724,7 +2724,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_ZERO);
+ mode_buffer = malloc(mode_buffer_len, M_TEMP, M_WAITOK | 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 25001ef..9db2604 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_ZERO);
+ M_WAITOK | 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, 0);
+ MALLOC(ccb, union ccb *, ccb_len, M_TARG, M_WAITOK);
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,
- 0);
+ M_WAITOK);
descr->mapinfo.num_bufs_used = 0;
return (descr);
}
OpenPOWER on IntegriCloud