diff options
author | Nicholas Bellinger <nab@linux-iscsi.org> | 2011-05-19 23:19:13 -0400 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2011-05-27 07:49:43 -0400 |
commit | 1078da163fd2c1d3cba76cd4018e897a4f98efc5 (patch) | |
tree | 74ab10b4fb4ddc6120f8b2f1079088b77980c538 /drivers/target/tcm_fc | |
parent | ccf4d680f80941f0073a9bc6a5e0ed41496b46e7 (diff) |
[SCSI] target: Convert REPORT_LUNs to use int_to_scsilun
This patch converts transport_core_report_lun_response() to use
drivers/scsi/scsi_scan.c:int_to_scsilun instead of using the
struct target_core_fabric_ops->pack_lun() fabric provided API vector.
It also removes the tfo->pack_lun check from target_fabric_tf_ops_check()
and removes from struct target_core_fabric_ops->pack_lun() from
target_core_fabric_ops.h, and the following mainline scsi-misc fabric
modules:
*) tcm_loop: Drop tcm_loop_pack_lun() usage
*) tcm_fc: Drop ft_pack_lun() usage
Reported-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: Nicholas A. Bellinger <nab@linux-iscsi.org>
Signed-off-by: James Bottomley <jbottomley@parallels.com>
Diffstat (limited to 'drivers/target/tcm_fc')
-rw-r--r-- | drivers/target/tcm_fc/tfc_conf.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/drivers/target/tcm_fc/tfc_conf.c b/drivers/target/tcm_fc/tfc_conf.c index fcdbbffe88cc..84e868c255dd 100644 --- a/drivers/target/tcm_fc/tfc_conf.c +++ b/drivers/target/tcm_fc/tfc_conf.c | |||
@@ -519,13 +519,6 @@ static u32 ft_tpg_get_inst_index(struct se_portal_group *se_tpg) | |||
519 | return tpg->index; | 519 | return tpg->index; |
520 | } | 520 | } |
521 | 521 | ||
522 | static u64 ft_pack_lun(unsigned int index) | ||
523 | { | ||
524 | WARN_ON(index >= 256); | ||
525 | /* Caller wants this byte-swapped */ | ||
526 | return cpu_to_le64((index & 0xff) << 8); | ||
527 | } | ||
528 | |||
529 | static struct target_core_fabric_ops ft_fabric_ops = { | 522 | static struct target_core_fabric_ops ft_fabric_ops = { |
530 | .get_fabric_name = ft_get_fabric_name, | 523 | .get_fabric_name = ft_get_fabric_name, |
531 | .get_fabric_proto_ident = fc_get_fabric_proto_ident, | 524 | .get_fabric_proto_ident = fc_get_fabric_proto_ident, |
@@ -564,7 +557,6 @@ static struct target_core_fabric_ops ft_fabric_ops = { | |||
564 | .get_fabric_sense_len = ft_get_fabric_sense_len, | 557 | .get_fabric_sense_len = ft_get_fabric_sense_len, |
565 | .set_fabric_sense_len = ft_set_fabric_sense_len, | 558 | .set_fabric_sense_len = ft_set_fabric_sense_len, |
566 | .is_state_remove = ft_is_state_remove, | 559 | .is_state_remove = ft_is_state_remove, |
567 | .pack_lun = ft_pack_lun, | ||
568 | /* | 560 | /* |
569 | * Setup function pointers for generic logic in | 561 | * Setup function pointers for generic logic in |
570 | * target_core_fabric_configfs.c | 562 | * target_core_fabric_configfs.c |