userlibandfileserver/fileserver/shostmassstorage/server/protocol/cscsiprotocol.cpp
changeset 33 0173bcd7697c
parent 31 56f325a607ea
child 62 4a8fed1c0ef6
--- a/userlibandfileserver/fileserver/shostmassstorage/server/protocol/cscsiprotocol.cpp	Wed Dec 23 11:43:31 2009 +0000
+++ b/userlibandfileserver/fileserver/shostmassstorage/server/protocol/cscsiprotocol.cpp	Thu Jan 07 13:38:45 2010 +0200
@@ -260,7 +260,15 @@
 	TLba lastLba;
 	TUint32 blockLength;
 
-	TInt err = iSbcInterface->ReadCapacity10L(lastLba, blockLength);
+    // Retry ReadCapacity10L if stalled
+    TInt stallCounter = 4;
+    TInt err = KErrNone;
+    do
+        {
+        err = iSbcInterface->ReadCapacity10L(lastLba, blockLength);
+        } while (err == KErrCommandStalled && stallCounter-- > 0);
+
+
     if (err)
         {
         if (err == KErrCommandFailed)