On Mon, Apr 13, 2015 at 3:30 AM, Christoph Hellwig <hch@xxxxxx> wrote: > On Fri, Apr 10, 2015 at 10:19:37PM -0700, Ming Lin wrote: >> Add a protocol identifier field to the target template instead of >> the .get_fabric_proto_ident method. > > Looks like the loop driver allows a per-hba selection of the proto_id. > If we want to support this the proto_id field needs to move into > the se_portal_group structure insted of the ops vector. The cleanup still allows a per-hba selection of the proto_id, see below. > @@ -532,20 +532,7 @@ static u8 tcm_loop_get_fabric_proto_ident(struct se_portal_group *se_tpg) > * Based upon tl_proto_id, TCM_Loop emulates the requested fabric > * ProtocolID using target_core_fabric_lib.c symbols. > */ > - switch (tl_hba->tl_proto_id) { > - case SCSI_PROTOCOL_SAS: > - return sas_get_fabric_proto_ident(se_tpg); > - case SCSI_PROTOCOL_FCP: > - return fc_get_fabric_proto_ident(se_tpg); > - case SCSI_PROTOCOL_ISCSI: > - return iscsi_get_fabric_proto_ident(se_tpg); > - default: > - pr_err("Unknown tl_proto_id: 0x%02x, using" > - " SAS emulation\n", tl_hba->tl_proto_id); > - break; > - } > - > - return sas_get_fabric_proto_ident(se_tpg); > + return target_get_fabric_proto_ident(tl_hba->tl_proto_id); > } -- To unsubscribe from this list: send the line "unsubscribe target-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html