sbuff = scp->sense_buffer;
if (!sbuff) {
- sdev_printk(KERN_ERR, scp->device,
- "%s: sense_buffer is NULL\n", __func__);
+ sdev_printk(KERN_ERR, scp->device, "sense_buffer is NULL\n");
return;
}
asc = c_d ? INVALID_FIELD_IN_CDB : INVALID_FIELD_IN_PARAM_LIST;
static void mk_sense_buffer(struct scsi_cmnd *scp, int key, int asc, int asq)
{
if (!scp->sense_buffer) {
- sdev_printk(KERN_ERR, scp->device,
- "%s: sense_buffer is NULL\n", __func__);
+ sdev_printk(KERN_ERR, scp->device, "sense_buffer is NULL\n");
return;
}
memset(scp->sense_buffer, 0, SCSI_SENSE_BUFFERSIZE);
unsigned int information, unsigned char tape_flags)
{
if (!scp->sense_buffer) {
- sdev_printk(KERN_ERR, scp->device,
- "%s: sense_buffer is NULL\n", __func__);
+ sdev_printk(KERN_ERR, scp->device, "sense_buffer is NULL\n");
return;
}
memset(scp->sense_buffer, 0, SCSI_SENSE_BUFFERSIZE);
{
if (sdebug_verbose) {
if (0x1261 == cmd)
- sdev_printk(KERN_INFO, dev,
- "%s: BLKFLSBUF [0x1261]\n", __func__);
+ sdev_printk(KERN_INFO, dev, "BLKFLSBUF [0x1261]\n");
else if (0x5331 == cmd)
sdev_printk(KERN_INFO, dev,
- "%s: CDROM_GET_CAPABILITY [0x5331]\n",
- __func__);
+ "CDROM_GET_CAPABILITY [0x5331]\n");
else
- sdev_printk(KERN_INFO, dev, "%s: cmd=0x%x\n",
- __func__, cmd);
+ sdev_printk(KERN_INFO, dev, "cmd=0x%x\n", cmd);
}
return -EINVAL;
/* return -ENOTTY; // correct return but upsets fdisk */
act_len = sg_pcopy_from_buffer(sdb->table.sgl, sdb->table.nents,
arr, arr_len, skip);
- pr_debug("%s: off_dst=%u, scsi_bufflen=%u, act_len=%u, resid=%d\n",
- __func__, off_dst, scsi_bufflen(scp), act_len,
+ pr_debug("off_dst=%u, scsi_bufflen=%u, act_len=%u, resid=%d\n",
+ off_dst, scsi_bufflen(scp), act_len,
scsi_get_resid(scp));
n = scsi_bufflen(scp) - (off_dst + act_len);
scsi_set_resid(scp, min_t(u32, scsi_get_resid(scp), n));
return DID_ERROR << 16;
else if (sdebug_verbose && (res < param_len))
sdev_printk(KERN_INFO, scp->device,
- "%s: cdb indicated=%d, IO sent=%d bytes\n",
- __func__, param_len, res);
+ "cdb indicated=%d, IO sent=%d bytes\n",
+ param_len, res);
md_len = mselect6 ? (arr[0] + 1) : (get_unaligned_be16(arr + 0) + 2);
bd_len = mselect6 ? arr[3] : get_unaligned_be16(arr + 6);
off = (mselect6 ? 4 : 8);
if (lbdof == 0) {
if (sdebug_verbose)
sdev_printk(KERN_INFO, scp->device,
- "%s: %s: LB Data Offset field bad\n",
- my_name, __func__);
+ "%s: LB Data Offset field bad\n", my_name);
mk_sense_buffer(scp, ILLEGAL_REQUEST, INVALID_FIELD_IN_CDB, 0);
return illegal_condition_result;
}
if ((lrd_size + (num_lrd * lrd_size)) > lbdof_blen) {
if (sdebug_verbose)
sdev_printk(KERN_INFO, scp->device,
- "%s: %s: LBA range descriptors don't fit\n",
- my_name, __func__);
+ "%s: LBA range descriptors don't fit\n", my_name);
mk_sense_buffer(scp, ILLEGAL_REQUEST, INVALID_FIELD_IN_CDB, 0);
return illegal_condition_result;
}
return SCSI_MLQUEUE_HOST_BUSY;
if (sdebug_verbose)
sdev_printk(KERN_INFO, scp->device,
- "%s: %s: Fetch header+scatter_list, lbdof_blen=%u\n",
- my_name, __func__, lbdof_blen);
+ "%s: Fetch header+scatter_list, lbdof_blen=%u\n",
+ my_name, lbdof_blen);
res = fetch_to_dev_buffer(scp, lrdp, lbdof_blen);
if (res == -1) {
ret = DID_ERROR << 16;
num = get_unaligned_be32(up + 8);
if (sdebug_verbose)
sdev_printk(KERN_INFO, scp->device,
- "%s: %s: k=%d LBA=0x%llx num=%u sg_off=%u\n",
- my_name, __func__, k, lba, num, sg_off);
+ "%s: k=%d LBA=0x%llx num=%u sg_off=%u\n",
+ my_name, k, lba, num, sg_off);
if (num == 0)
continue;
ret = check_device_access_params(scp, lba, num, true);
if ((cum_lb + num) > bt_len) {
if (sdebug_verbose)
sdev_printk(KERN_INFO, scp->device,
- "%s: %s: sum of blocks > data provided\n",
- my_name, __func__);
+ "%s: sum of blocks > data provided\n",
+ my_name);
mk_sense_buffer(scp, ILLEGAL_REQUEST, WRITE_ERROR_ASC,
0);
ret = illegal_condition_result;
goto cleanup;
} else if (sdebug_verbose && (ret < (a_num * lb_size))) {
sdev_printk(KERN_INFO, scp->device,
- "%s: %s: cdb indicated=%u, IO sent=%d bytes\n",
- my_name, __func__, a_num * lb_size, ret);
+ "%s: cdb indicated=%u, IO sent=%d bytes\n",
+ my_name, a_num * lb_size, ret);
}
if (is_bytchk3) {
for (j = 1, off = lb_size; j < vnum; ++j, off += lb_size)
devip->debugfs_entry = debugfs_create_dir(dev_name(&sdp->sdev_dev),
sdebug_debugfs_root);
if (IS_ERR_OR_NULL(devip->debugfs_entry))
- pr_info("%s: failed to create debugfs directory for device %s\n",
- __func__, dev_name(&sdp->sdev_gendev));
+ pr_info("failed to create debugfs directory for device %s\n",
+ dev_name(&sdp->sdev_gendev));
dentry = debugfs_create_file("error", 0600, devip->debugfs_entry, sdp,
&sdebug_error_fops);
if (IS_ERR_OR_NULL(dentry))
- pr_info("%s: failed to create error file for device %s\n",
- __func__, dev_name(&sdp->sdev_gendev));
+ pr_info("failed to create error file for device %s\n",
+ dev_name(&sdp->sdev_gendev));
return 0;
}
if (SDEBUG_OPT_ALL_NOISE & sdebug_opts)
sdev_printk(KERN_INFO, SCpnt->device,
- "%s: command%s found\n", __func__,
+ "command%s found\n",
aborted ? "" : " not");
++num_dev_resets;
if (SDEBUG_OPT_ALL_NOISE & sdebug_opts)
- sdev_printk(KERN_INFO, sdp, "%s\n", __func__);
+ sdev_printk(KERN_INFO, sdp, "doing device reset");
scsi_debug_stop_all_queued(sdp);
if (devip) {
++num_target_resets;
if (SDEBUG_OPT_ALL_NOISE & sdebug_opts)
- sdev_printk(KERN_INFO, sdp, "%s\n", __func__);
+ sdev_printk(KERN_INFO, sdp, "doing target reset\n");
list_for_each_entry(devip, &sdbg_host->dev_info_list, dev_list) {
if (devip->target == sdp->id) {
if (SDEBUG_OPT_RESET_NOISE & sdebug_opts)
sdev_printk(KERN_INFO, sdp,
- "%s: %d device(s) found in target\n", __func__, k);
+ "%d device(s) found in target\n", k);
if (sdebug_fail_target_reset(SCpnt)) {
scmd_printk(KERN_INFO, SCpnt, "fail target reset 0x%x\n",
++num_bus_resets;
if (SDEBUG_OPT_ALL_NOISE & sdebug_opts)
- sdev_printk(KERN_INFO, sdp, "%s\n", __func__);
+ sdev_printk(KERN_INFO, sdp, "doing bus reset\n");
list_for_each_entry(devip, &sdbg_host->dev_info_list, dev_list) {
set_bit(SDEBUG_UA_BUS_RESET, devip->uas_bm);
if (SDEBUG_OPT_RESET_NOISE & sdebug_opts)
sdev_printk(KERN_INFO, sdp,
- "%s: %d device(s) found in host\n", __func__, k);
+ "%d device(s) found in host\n", k);
return SUCCESS;
}
++num_host_resets;
if (SDEBUG_OPT_ALL_NOISE & sdebug_opts)
- sdev_printk(KERN_INFO, SCpnt->device, "%s\n", __func__);
+ sdev_printk(KERN_INFO, SCpnt->device, "doing host reset\n");
mutex_lock(&sdebug_host_list_mutex);
list_for_each_entry(sdbg_host, &sdebug_host_list, host_list) {
list_for_each_entry(devip, &sdbg_host->dev_info_list,
stop_all_queued();
if (SDEBUG_OPT_RESET_NOISE & sdebug_opts)
sdev_printk(KERN_INFO, SCpnt->device,
- "%s: %d device(s) found\n", __func__, k);
+ "%d device(s) found\n", k);
return SUCCESS;
}
scsi_result = device_qfull_result;
if (unlikely(SDEBUG_OPT_Q_NOISE & sdebug_opts))
- sdev_printk(KERN_INFO, sdp, "%s: num_in_q=%d +1, <inject> status: TASK SET FULL\n",
- __func__, num_in_q);
+ sdev_printk(KERN_INFO, sdp, "num_in_q=%d +1, <inject> status: TASK SET FULL\n",
+ num_in_q);
}
}
}
if (unlikely(sdebug_verbose && cmnd->result))
- sdev_printk(KERN_INFO, sdp, "%s: non-zero result=0x%x\n",
- __func__, cmnd->result);
+ sdev_printk(KERN_INFO, sdp, "non-zero result=0x%x\n",
+ cmnd->result);
if (delta_jiff > 0 || ndelay > 0) {
ktime_t kt;
sdebug_debugfs_root = debugfs_create_dir("scsi_debug", NULL);
if (IS_ERR_OR_NULL(sdebug_debugfs_root))
- pr_info("%s: failed to create initial debugfs directory\n", __func__);
+ pr_info("failed to create initial debugfs directory\n");
for (k = 0; k < hosts_to_add; k++) {
if (want_store && k == 0) {
if (unlikely(res < 0)) {
xa_unlock_irqrestore(per_store_ap, iflags);
kfree(sip);
- pr_warn("%s: xa_alloc() errno=%d\n", __func__, -res);
+ pr_warn("xa_alloc() errno=%d\n", -res);
return res;
}
sdeb_most_recent_idx = n_idx;
return (int)n_idx;
err:
sdebug_erase_store((int)n_idx, sip);
- pr_warn("%s: failed, errno=%d\n", __func__, -res);
+ pr_warn("failed, errno=%d\n", -res);
return res;
}
put_device(&sdbg_host->dev);
else
kfree(sdbg_host);
- pr_warn("%s: failed, errno=%d\n", __func__, -error);
+ pr_warn("failed, errno=%d\n", -error);
return error;
}
if (qdepth > SDEBUG_CANQUEUE) {
qdepth = SDEBUG_CANQUEUE;
- pr_warn("%s: requested qdepth [%d] exceeds canqueue [%d], trim\n", __func__,
+ pr_warn("requested qdepth [%d] exceeds canqueue [%d], trim\n",
qdepth, SDEBUG_CANQUEUE);
}
if (qdepth < 1)
mutex_unlock(&sdebug_host_list_mutex);
if (SDEBUG_OPT_Q_NOISE & sdebug_opts)
- sdev_printk(KERN_INFO, sdev, "%s: qdepth=%d\n", __func__, qdepth);
+ sdev_printk(KERN_INFO, sdev, "qdepth=%d\n", qdepth);
return sdev->queue_depth;
}
bool res = false;
if (!to_be_aborted_scmd) {
- pr_err("%s: command with tag %#x not found\n", __func__,
- unique_tag);
+ pr_err("command with tag %#x not found\n", unique_tag);
return;
}
res = scsi_debug_stop_cmnd(to_be_aborted_scmd);
if (res)
- pr_info("%s: aborted command with tag %#x\n",
- __func__, unique_tag);
+ pr_info("aborted command with tag %#x\n", unique_tag);
else
- pr_err("%s: failed to abort command with tag %#x\n",
- __func__, unique_tag);
+ pr_err("failed to abort command with tag %#x\n", unique_tag);
set_host_byte(scp, res ? DID_OK : DID_ERROR);
}