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/loopback | |
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/loopback')
-rw-r--r-- | drivers/target/loopback/tcm_loop.c | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/drivers/target/loopback/tcm_loop.c b/drivers/target/loopback/tcm_loop.c index aed4e464d31c..09681bafe10d 100644 --- a/drivers/target/loopback/tcm_loop.c +++ b/drivers/target/loopback/tcm_loop.c | |||
@@ -939,18 +939,6 @@ static u16 tcm_loop_get_fabric_sense_len(void) | |||
939 | return 0; | 939 | return 0; |
940 | } | 940 | } |
941 | 941 | ||
942 | static u64 tcm_loop_pack_lun(unsigned int lun) | ||
943 | { | ||
944 | u64 result; | ||
945 | |||
946 | /* LSB of lun into byte 1 big-endian */ | ||
947 | result = ((lun & 0xff) << 8); | ||
948 | /* use flat space addressing method */ | ||
949 | result |= 0x40 | ((lun >> 8) & 0x3f); | ||
950 | |||
951 | return cpu_to_le64(result); | ||
952 | } | ||
953 | |||
954 | static char *tcm_loop_dump_proto_id(struct tcm_loop_hba *tl_hba) | 942 | static char *tcm_loop_dump_proto_id(struct tcm_loop_hba *tl_hba) |
955 | { | 943 | { |
956 | switch (tl_hba->tl_proto_id) { | 944 | switch (tl_hba->tl_proto_id) { |
@@ -1481,7 +1469,6 @@ static int tcm_loop_register_configfs(void) | |||
1481 | fabric->tf_ops.set_fabric_sense_len = &tcm_loop_set_fabric_sense_len; | 1469 | fabric->tf_ops.set_fabric_sense_len = &tcm_loop_set_fabric_sense_len; |
1482 | fabric->tf_ops.get_fabric_sense_len = &tcm_loop_get_fabric_sense_len; | 1470 | fabric->tf_ops.get_fabric_sense_len = &tcm_loop_get_fabric_sense_len; |
1483 | fabric->tf_ops.is_state_remove = &tcm_loop_is_state_remove; | 1471 | fabric->tf_ops.is_state_remove = &tcm_loop_is_state_remove; |
1484 | fabric->tf_ops.pack_lun = &tcm_loop_pack_lun; | ||
1485 | 1472 | ||
1486 | tf_cg = &fabric->tf_group; | 1473 | tf_cg = &fabric->tf_group; |
1487 | /* | 1474 | /* |