diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-27 22:52:57 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-27 22:52:57 -0400 |
commit | 426048313dfa7d65dbd2379b1665755511f9544f (patch) | |
tree | dc727b9e41eb3d9dfe8e68f14b027c776d8aba98 /drivers/target/loopback/tcm_loop.c | |
parent | 2a56d2220284b0e4dd8569fa475d7053f1c40a63 (diff) | |
parent | 7ad20aa9d39a525542b0840ac38bfc77be831e19 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (60 commits)
[SCSI] lpfc 8.3.24: Extend BSG infrastructure and add link diagnostics
[SCSI] lpfc 8.3.24: Add resource extent support
[SCSI] lpfc 8.3.24: Add request-firmware support
[SCSI] lpfc 8.3.24: Add SR-IOV control
[SCSI] lpfc 8.3.24: Extended hardware support and support dump images
[SCSI] lpfc 8.3.24: Miscellaneous Fixes and Corrections
[SCSI] libsas: Add option for SATA soft reset
[SCSI] libsas: check dev->gone before submitting sata i/o
[SCSI] libsas: fix/amend device gone notification in sas_deform_port()
[SCSI] MAINTAINERS update for SCSI (new email address)
[SCSI] Fix Ultrastor asm snippet
[SCSI] osst: fix warning
[SCSI] osst: wrong index used in inner loop
[SCSI] aic94xx: world-writable sysfs update_bios file
[SCSI] MAINTAINERS: Add drivers/target/ entry
[SCSI] target: Convert TASK_ATTR to scsi_tcq.h definitions
[SCSI] target: Convert REPORT_LUNs to use int_to_scsilun
[SCSI] target: Fix task->task_execute_queue=1 clear bug + LUN_RESET OOPs
[SCSI] target: Fix bug with task_sg chained transport_free_dev_tasks release
[SCSI] target: Fix interrupt context bug with stats_lock and core_tmr_alloc_req
...
Diffstat (limited to 'drivers/target/loopback/tcm_loop.c')
-rw-r--r-- | drivers/target/loopback/tcm_loop.c | 25 |
1 files changed, 6 insertions, 19 deletions
diff --git a/drivers/target/loopback/tcm_loop.c b/drivers/target/loopback/tcm_loop.c index aed4e464d31..dee2a2c909f 100644 --- a/drivers/target/loopback/tcm_loop.c +++ b/drivers/target/loopback/tcm_loop.c | |||
@@ -31,7 +31,7 @@ | |||
31 | #include <scsi/scsi_host.h> | 31 | #include <scsi/scsi_host.h> |
32 | #include <scsi/scsi_device.h> | 32 | #include <scsi/scsi_device.h> |
33 | #include <scsi/scsi_cmnd.h> | 33 | #include <scsi/scsi_cmnd.h> |
34 | #include <scsi/libsas.h> /* For TASK_ATTR_* */ | 34 | #include <scsi/scsi_tcq.h> |
35 | 35 | ||
36 | #include <target/target_core_base.h> | 36 | #include <target/target_core_base.h> |
37 | #include <target/target_core_transport.h> | 37 | #include <target/target_core_transport.h> |
@@ -95,17 +95,17 @@ static struct se_cmd *tcm_loop_allocate_core_cmd( | |||
95 | if (sc->device->tagged_supported) { | 95 | if (sc->device->tagged_supported) { |
96 | switch (sc->tag) { | 96 | switch (sc->tag) { |
97 | case HEAD_OF_QUEUE_TAG: | 97 | case HEAD_OF_QUEUE_TAG: |
98 | sam_task_attr = TASK_ATTR_HOQ; | 98 | sam_task_attr = MSG_HEAD_TAG; |
99 | break; | 99 | break; |
100 | case ORDERED_QUEUE_TAG: | 100 | case ORDERED_QUEUE_TAG: |
101 | sam_task_attr = TASK_ATTR_ORDERED; | 101 | sam_task_attr = MSG_ORDERED_TAG; |
102 | break; | 102 | break; |
103 | default: | 103 | default: |
104 | sam_task_attr = TASK_ATTR_SIMPLE; | 104 | sam_task_attr = MSG_SIMPLE_TAG; |
105 | break; | 105 | break; |
106 | } | 106 | } |
107 | } else | 107 | } else |
108 | sam_task_attr = TASK_ATTR_SIMPLE; | 108 | sam_task_attr = MSG_SIMPLE_TAG; |
109 | 109 | ||
110 | /* | 110 | /* |
111 | * Initialize struct se_cmd descriptor from target_core_mod infrastructure | 111 | * Initialize struct se_cmd descriptor from target_core_mod infrastructure |
@@ -379,7 +379,7 @@ static int tcm_loop_device_reset(struct scsi_cmnd *sc) | |||
379 | * Initialize struct se_cmd descriptor from target_core_mod infrastructure | 379 | * Initialize struct se_cmd descriptor from target_core_mod infrastructure |
380 | */ | 380 | */ |
381 | transport_init_se_cmd(se_cmd, se_tpg->se_tpg_tfo, se_sess, 0, | 381 | transport_init_se_cmd(se_cmd, se_tpg->se_tpg_tfo, se_sess, 0, |
382 | DMA_NONE, TASK_ATTR_SIMPLE, | 382 | DMA_NONE, MSG_SIMPLE_TAG, |
383 | &tl_cmd->tl_sense_buf[0]); | 383 | &tl_cmd->tl_sense_buf[0]); |
384 | /* | 384 | /* |
385 | * Allocate the LUN_RESET TMR | 385 | * Allocate the LUN_RESET TMR |
@@ -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 | /* |