linux-next: manual merge of the target-updates tree with Linus' tree

From: Stephen Rothwell
Date: Mon Jun 01 2015 - 07:19:55 EST


Hi Nicholas,

Today's linux-next merge of the target-updates tree got a conflict in
drivers/target/target_core_user.c between commit 9c1cd1b68cd1
("target/user: Only support full command pass-through") from Linus'
tree and commit 1f44c7e00856 ("target: simplify backend driver
registration") and 1854440347ec ("target: consolidate backend attribute
implementations") from the target-updates tree.

I fixed it up (just this file - see below - I hope that the rest was
taken care of) and can carry the fix as necessary (no action is
required).

--
Cheers,
Stephen Rothwell sfr@xxxxxxxxxxxxxxxx

diff --cc drivers/target/target_core_user.c
index edc955558250,6742e53f5f97..000000000000
--- a/drivers/target/target_core_user.c
+++ b/drivers/target/target_core_user.c
@@@ -1050,30 -1115,57 +1099,10 @@@ tcmu_pass_op(struct se_cmd *se_cmd
static sense_reason_t
tcmu_parse_cdb(struct se_cmd *cmd)
{
- unsigned char *cdb = cmd->t_task_cdb;
- struct tcmu_dev *udev = TCMU_DEV(cmd->se_dev);
- sense_reason_t ret;
-
- switch (udev->pass_level) {
- case TCMU_PASS_ALL:
- /* We're just like pscsi, then */
- /*
- * For REPORT LUNS we always need to emulate the response, for everything
- * else, pass it up.
- */
- switch (cdb[0]) {
- case REPORT_LUNS:
- cmd->execute_cmd = spc_emulate_report_luns;
- break;
- case READ_6:
- case READ_10:
- case READ_12:
- case READ_16:
- case WRITE_6:
- case WRITE_10:
- case WRITE_12:
- case WRITE_16:
- case WRITE_VERIFY:
- cmd->se_cmd_flags |= SCF_SCSI_DATA_CDB;
- /* FALLTHROUGH */
- default:
- cmd->execute_cmd = tcmu_pass_op;
- }
- ret = TCM_NO_SENSE;
- break;
- case TCMU_PASS_IO:
- ret = sbc_parse_cdb(cmd, &tcmu_sbc_ops);
- break;
- default:
- pr_err("Unknown tcm-user pass level %d\n", udev->pass_level);
- ret = TCM_CHECK_CONDITION_ABORT_CMD;
- }
-
- return ret;
+ return passthrough_parse_cdb(cmd, tcmu_pass_op);
}

- DEF_TB_DEV_ATTRIB_RO(tcmu, hw_pi_prot_type);
- TB_DEV_ATTR_RO(tcmu, hw_pi_prot_type);
-
- DEF_TB_DEV_ATTRIB_RO(tcmu, hw_block_size);
- TB_DEV_ATTR_RO(tcmu, hw_block_size);
-
- DEF_TB_DEV_ATTRIB_RO(tcmu, hw_max_sectors);
- TB_DEV_ATTR_RO(tcmu, hw_max_sectors);
-
- DEF_TB_DEV_ATTRIB_RO(tcmu, hw_queue_depth);
- TB_DEV_ATTR_RO(tcmu, hw_queue_depth);
-
- static struct configfs_attribute *tcmu_backend_dev_attrs[] = {
- &tcmu_dev_attrib_hw_pi_prot_type.attr,
- &tcmu_dev_attrib_hw_block_size.attr,
- &tcmu_dev_attrib_hw_max_sectors.attr,
- &tcmu_dev_attrib_hw_queue_depth.attr,
- NULL,
- };
-
- static struct se_subsystem_api tcmu_template = {
+ static const struct target_backend_ops tcmu_ops = {
.name = "user",
.inquiry_prod = "USER",
.inquiry_rev = TCMU_VERSION,

Attachment: pgpuYGyr51emk.pgp
Description: OpenPGP digital signature