diff options
Diffstat (limited to 'drivers/target/loopback/tcm_loop.c')
-rw-r--r-- | drivers/target/loopback/tcm_loop.c | 33 |
1 files changed, 11 insertions, 22 deletions
diff --git a/drivers/target/loopback/tcm_loop.c b/drivers/target/loopback/tcm_loop.c index 81d5832fbbd5..c47ff7f59e57 100644 --- a/drivers/target/loopback/tcm_loop.c +++ b/drivers/target/loopback/tcm_loop.c | |||
@@ -33,14 +33,9 @@ | |||
33 | #include <scsi/scsi_cmnd.h> | 33 | #include <scsi/scsi_cmnd.h> |
34 | 34 | ||
35 | #include <target/target_core_base.h> | 35 | #include <target/target_core_base.h> |
36 | #include <target/target_core_transport.h> | 36 | #include <target/target_core_fabric.h> |
37 | #include <target/target_core_fabric_ops.h> | ||
38 | #include <target/target_core_fabric_configfs.h> | 37 | #include <target/target_core_fabric_configfs.h> |
39 | #include <target/target_core_fabric_lib.h> | ||
40 | #include <target/target_core_configfs.h> | 38 | #include <target/target_core_configfs.h> |
41 | #include <target/target_core_device.h> | ||
42 | #include <target/target_core_tpg.h> | ||
43 | #include <target/target_core_tmr.h> | ||
44 | 39 | ||
45 | #include "tcm_loop.h" | 40 | #include "tcm_loop.h" |
46 | 41 | ||
@@ -421,11 +416,11 @@ static struct scsi_host_template tcm_loop_driver_template = { | |||
421 | .queuecommand = tcm_loop_queuecommand, | 416 | .queuecommand = tcm_loop_queuecommand, |
422 | .change_queue_depth = tcm_loop_change_queue_depth, | 417 | .change_queue_depth = tcm_loop_change_queue_depth, |
423 | .eh_device_reset_handler = tcm_loop_device_reset, | 418 | .eh_device_reset_handler = tcm_loop_device_reset, |
424 | .can_queue = TL_SCSI_CAN_QUEUE, | 419 | .can_queue = 1024, |
425 | .this_id = -1, | 420 | .this_id = -1, |
426 | .sg_tablesize = TL_SCSI_SG_TABLESIZE, | 421 | .sg_tablesize = 256, |
427 | .cmd_per_lun = TL_SCSI_CMD_PER_LUN, | 422 | .cmd_per_lun = 1024, |
428 | .max_sectors = TL_SCSI_MAX_SECTORS, | 423 | .max_sectors = 0xFFFF, |
429 | .use_clustering = DISABLE_CLUSTERING, | 424 | .use_clustering = DISABLE_CLUSTERING, |
430 | .slave_alloc = tcm_loop_slave_alloc, | 425 | .slave_alloc = tcm_loop_slave_alloc, |
431 | .slave_configure = tcm_loop_slave_configure, | 426 | .slave_configure = tcm_loop_slave_configure, |
@@ -564,8 +559,7 @@ static char *tcm_loop_get_fabric_name(void) | |||
564 | 559 | ||
565 | static u8 tcm_loop_get_fabric_proto_ident(struct se_portal_group *se_tpg) | 560 | static u8 tcm_loop_get_fabric_proto_ident(struct se_portal_group *se_tpg) |
566 | { | 561 | { |
567 | struct tcm_loop_tpg *tl_tpg = | 562 | struct tcm_loop_tpg *tl_tpg = se_tpg->se_tpg_fabric_ptr; |
568 | (struct tcm_loop_tpg *)se_tpg->se_tpg_fabric_ptr; | ||
569 | struct tcm_loop_hba *tl_hba = tl_tpg->tl_hba; | 563 | struct tcm_loop_hba *tl_hba = tl_tpg->tl_hba; |
570 | /* | 564 | /* |
571 | * tl_proto_id is set at tcm_loop_configfs.c:tcm_loop_make_scsi_hba() | 565 | * tl_proto_id is set at tcm_loop_configfs.c:tcm_loop_make_scsi_hba() |
@@ -592,8 +586,7 @@ static u8 tcm_loop_get_fabric_proto_ident(struct se_portal_group *se_tpg) | |||
592 | 586 | ||
593 | static char *tcm_loop_get_endpoint_wwn(struct se_portal_group *se_tpg) | 587 | static char *tcm_loop_get_endpoint_wwn(struct se_portal_group *se_tpg) |
594 | { | 588 | { |
595 | struct tcm_loop_tpg *tl_tpg = | 589 | struct tcm_loop_tpg *tl_tpg = se_tpg->se_tpg_fabric_ptr; |
596 | (struct tcm_loop_tpg *)se_tpg->se_tpg_fabric_ptr; | ||
597 | /* | 590 | /* |
598 | * Return the passed NAA identifier for the SAS Target Port | 591 | * Return the passed NAA identifier for the SAS Target Port |
599 | */ | 592 | */ |
@@ -602,8 +595,7 @@ static char *tcm_loop_get_endpoint_wwn(struct se_portal_group *se_tpg) | |||
602 | 595 | ||
603 | static u16 tcm_loop_get_tag(struct se_portal_group *se_tpg) | 596 | static u16 tcm_loop_get_tag(struct se_portal_group *se_tpg) |
604 | { | 597 | { |
605 | struct tcm_loop_tpg *tl_tpg = | 598 | struct tcm_loop_tpg *tl_tpg = se_tpg->se_tpg_fabric_ptr; |
606 | (struct tcm_loop_tpg *)se_tpg->se_tpg_fabric_ptr; | ||
607 | /* | 599 | /* |
608 | * This Tag is used when forming SCSI Name identifier in EVPD=1 0x83 | 600 | * This Tag is used when forming SCSI Name identifier in EVPD=1 0x83 |
609 | * to represent the SCSI Target Port. | 601 | * to represent the SCSI Target Port. |
@@ -623,8 +615,7 @@ static u32 tcm_loop_get_pr_transport_id( | |||
623 | int *format_code, | 615 | int *format_code, |
624 | unsigned char *buf) | 616 | unsigned char *buf) |
625 | { | 617 | { |
626 | struct tcm_loop_tpg *tl_tpg = | 618 | struct tcm_loop_tpg *tl_tpg = se_tpg->se_tpg_fabric_ptr; |
627 | (struct tcm_loop_tpg *)se_tpg->se_tpg_fabric_ptr; | ||
628 | struct tcm_loop_hba *tl_hba = tl_tpg->tl_hba; | 619 | struct tcm_loop_hba *tl_hba = tl_tpg->tl_hba; |
629 | 620 | ||
630 | switch (tl_hba->tl_proto_id) { | 621 | switch (tl_hba->tl_proto_id) { |
@@ -653,8 +644,7 @@ static u32 tcm_loop_get_pr_transport_id_len( | |||
653 | struct t10_pr_registration *pr_reg, | 644 | struct t10_pr_registration *pr_reg, |
654 | int *format_code) | 645 | int *format_code) |
655 | { | 646 | { |
656 | struct tcm_loop_tpg *tl_tpg = | 647 | struct tcm_loop_tpg *tl_tpg = se_tpg->se_tpg_fabric_ptr; |
657 | (struct tcm_loop_tpg *)se_tpg->se_tpg_fabric_ptr; | ||
658 | struct tcm_loop_hba *tl_hba = tl_tpg->tl_hba; | 648 | struct tcm_loop_hba *tl_hba = tl_tpg->tl_hba; |
659 | 649 | ||
660 | switch (tl_hba->tl_proto_id) { | 650 | switch (tl_hba->tl_proto_id) { |
@@ -687,8 +677,7 @@ static char *tcm_loop_parse_pr_out_transport_id( | |||
687 | u32 *out_tid_len, | 677 | u32 *out_tid_len, |
688 | char **port_nexus_ptr) | 678 | char **port_nexus_ptr) |
689 | { | 679 | { |
690 | struct tcm_loop_tpg *tl_tpg = | 680 | struct tcm_loop_tpg *tl_tpg = se_tpg->se_tpg_fabric_ptr; |
691 | (struct tcm_loop_tpg *)se_tpg->se_tpg_fabric_ptr; | ||
692 | struct tcm_loop_hba *tl_hba = tl_tpg->tl_hba; | 681 | struct tcm_loop_hba *tl_hba = tl_tpg->tl_hba; |
693 | 682 | ||
694 | switch (tl_hba->tl_proto_id) { | 683 | switch (tl_hba->tl_proto_id) { |