Browse Source

[iscsi] Fix interoperability with QNAP TS-639Pro

Modified-by: Michael Brown <mcb30@etherboot.org>
Signed-off-by: Michael Brown <mcb30@etherboot.org>
tags/v1.20.1
Danny Volkind 15 years ago
parent
commit
cd9c94851b
1 changed files with 10 additions and 3 deletions
  1. 10
    3
      src/net/tcp/iscsi.c

+ 10
- 3
src/net/tcp/iscsi.c View File

@@ -434,9 +434,9 @@ static int iscsi_tx_data_out ( struct iscsi_session *iscsi ) {
434 434
  *
435 435
  *     HeaderDigest=None
436 436
  *     DataDigest=None
437
- *     MaxConnections is irrelevant; we make only one connection anyway
437
+ *     MaxConnections is irrelevant; we make only one connection anyway [4]
438 438
  *     InitialR2T=Yes [1]
439
- *     ImmediateData is irrelevant; we never send immediate data
439
+ *     ImmediateData is irrelevant; we never send immediate data [4]
440 440
  *     MaxRecvDataSegmentLength=8192 (default; we don't care) [3]
441 441
  *     MaxBurstLength=262144 (default; we don't care) [3]
442 442
  *     FirstBurstLength=262144 (default; we don't care)
@@ -459,6 +459,11 @@ static int iscsi_tx_data_out ( struct iscsi_session *iscsi ) {
459 459
  * these parameters, but some targets (notably OpenSolaris)
460 460
  * incorrectly assume a default value of zero, so we explicitly
461 461
  * specify the default values.
462
+ *
463
+ * [4] We are quite happy to use the RFC-defined default values for
464
+ * these parameters, but some targets (notably a QNAP TS-639Pro) fail
465
+ * unless they are supplied, so we explicitly specify the default
466
+ * values.
462 467
  */
463 468
 static int iscsi_build_login_request_strings ( struct iscsi_session *iscsi,
464 469
 					       void *data, size_t len ) {
@@ -516,7 +521,9 @@ static int iscsi_build_login_request_strings ( struct iscsi_session *iscsi,
516 521
 		used += ssnprintf ( data + used, len - used,
517 522
 				    "HeaderDigest=None%c"
518 523
 				    "DataDigest=None%c"
524
+				    "MaxConnections=1%c"
519 525
 				    "InitialR2T=Yes%c"
526
+				    "ImmediateData=No%c"
520 527
 				    "MaxRecvDataSegmentLength=8192%c"
521 528
 				    "MaxBurstLength=262144%c"
522 529
 				    "DefaultTime2Wait=0%c"
@@ -525,7 +532,7 @@ static int iscsi_build_login_request_strings ( struct iscsi_session *iscsi,
525 532
 				    "DataPDUInOrder=Yes%c"
526 533
 				    "DataSequenceInOrder=Yes%c"
527 534
 				    "ErrorRecoveryLevel=0%c",
528
-				    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 );
535
+				    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 );
529 536
 	}
530 537
 
531 538
 	return used;

Loading…
Cancel
Save