[SRP] SRP_CMD->LUN is build from 8 bit LUN as required by SCSI architecture Model...
authorsleybo <sleybo@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Thu, 2 Nov 2006 11:02:47 +0000 (11:02 +0000)
committersleybo <sleybo@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Thu, 2 Nov 2006 11:02:47 +0000 (11:02 +0000)
fix bug when IOC report more than 1 service_entry
Submitted by Estrin Alex (aestrin@silverstorm.com)

git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@536 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

ulp/srp/kernel/srp_data_path.c

index c58b01a..9e2d118 100644 (file)
@@ -57,7 +57,7 @@
 //#include "srp_t_logout.h"\r
 \r
 // Final address is of the form 0b00ttttttllllllll\r
-#define BUILD_SCSI_ADDRESS(target, lun) ((((uint64_t)(target & 0x3f)<<8)+(uint64_t)lun) << 48)\r
+#define BUILD_SCSI_ADDRESS(lun) ((uint64_t)lun << 48)\r
 \r
 static inline\r
 void\r
@@ -587,7 +587,7 @@ __srp_build_cmd(
                                           DBDF_NO_DATA_BUFFER_DESCRIPTOR_PRESENT,\r
                                           0,\r
                                           0,\r
-                                          BUILD_SCSI_ADDRESS( p_srb->TargetId, p_srb->Lun ),\r
+                                          BUILD_SCSI_ADDRESS( p_srb->Lun ),\r
                                           TAV_SIMPLE_TASK,\r
                                           0 );\r
 \r
@@ -899,7 +899,7 @@ srp_abort_command(
 \r
        setup_srp_tsk_mgmt( p_srp_tsk_mgmt,\r
                                                p_send_descriptor->tag,\r
-                                               BUILD_SCSI_ADDRESS( p_srb->TargetId, p_srb->Lun ),\r
+                                               BUILD_SCSI_ADDRESS( p_srb->Lun ),\r
                                                TMF_ABORT_TASK,\r
                                                iu_tag );\r
 \r