mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 23:32:14 +00:00
[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>
This commit is contained in:
parent
ccf4d680f8
commit
1078da163f
5 changed files with 5 additions and 46 deletions
|
@ -939,18 +939,6 @@ static u16 tcm_loop_get_fabric_sense_len(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static u64 tcm_loop_pack_lun(unsigned int lun)
|
||||
{
|
||||
u64 result;
|
||||
|
||||
/* LSB of lun into byte 1 big-endian */
|
||||
result = ((lun & 0xff) << 8);
|
||||
/* use flat space addressing method */
|
||||
result |= 0x40 | ((lun >> 8) & 0x3f);
|
||||
|
||||
return cpu_to_le64(result);
|
||||
}
|
||||
|
||||
static char *tcm_loop_dump_proto_id(struct tcm_loop_hba *tl_hba)
|
||||
{
|
||||
switch (tl_hba->tl_proto_id) {
|
||||
|
@ -1481,7 +1469,6 @@ static int tcm_loop_register_configfs(void)
|
|||
fabric->tf_ops.set_fabric_sense_len = &tcm_loop_set_fabric_sense_len;
|
||||
fabric->tf_ops.get_fabric_sense_len = &tcm_loop_get_fabric_sense_len;
|
||||
fabric->tf_ops.is_state_remove = &tcm_loop_is_state_remove;
|
||||
fabric->tf_ops.pack_lun = &tcm_loop_pack_lun;
|
||||
|
||||
tf_cg = &fabric->tf_group;
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue