[Openib-windows] [SRP] patch to fix address format

Estrin, Alex aestrin at silverstorm.com
Fri Oct 27 09:35:30 PDT 2006


Hi Yossi,
 
Please review the following patch.
It makes sense in case if IOC provides more than one service entry.
>From SRP perspective it is just another session ( indexed by target id value )
to another target device with given LUN.
 
Thanks,
Alex
 
Index: srp_data_path.c
===================================================================
--- srp_data_path.c (revision 525)
+++ srp_data_path.c (working copy)
@@ -57,7 +57,7 @@
 //#include "srp_t_logout.h"
 
 // Final address is of the form 0b00ttttttllllllll
-#define BUILD_SCSI_ADDRESS(target, lun) ((((uint64_t)(target & 0x3f)<<8)+(uint64_t)lun) << 48)
+#define BUILD_SCSI_ADDRESS(lun) ((uint64_t)lun << 48)
 
 static inline
 void
@@ -587,7 +587,7 @@
         DBDF_NO_DATA_BUFFER_DESCRIPTOR_PRESENT,
         0,
         0,
-        BUILD_SCSI_ADDRESS( p_srb->TargetId, p_srb->Lun ),
+        BUILD_SCSI_ADDRESS( p_srb->Lun ),
         TAV_SIMPLE_TASK,
         0 );
 
@@ -899,7 +899,7 @@
 
  setup_srp_tsk_mgmt( p_srp_tsk_mgmt,
       p_send_descriptor->tag,
-      BUILD_SCSI_ADDRESS( p_srb->TargetId, p_srb->Lun ),
+      BUILD_SCSI_ADDRESS( p_srb->Lun ),
       TMF_ABORT_TASK,
       iu_tag );
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20061027/10052a98/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: srp_data_path.patch
Type: application/octet-stream
Size: 937 bytes
Desc: srp_data_path.patch
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20061027/10052a98/attachment.obj>


More information about the ofw mailing list