Windows apparently defaults to a queue depth of 20, which is a bit on the
small side. This patch sets the value to the maximum possible, which is
apparently 254 instead of the documented 255.
Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
#define XENVBD_MAX_SEGMENTS_PER_SRB (XENVBD_MAX_REQUESTS_PER_SRB * XENVBD_MAX_SEGMENTS_PER_REQUEST)
#define XENVBD_MAX_TRANSFER_LENGTH (XENVBD_MAX_SEGMENTS_PER_SRB * PAGE_SIZE)
#define XENVBD_MAX_PHYSICAL_BREAKS (XENVBD_MAX_SEGMENTS_PER_SRB - 1)
+#define XENVBD_MAX_QUEUE_DEPTH (254)
#define XENVBD_MIN_GRANT_REFS (XENVBD_MAX_SEGMENTS_PER_SRB)
break;
case SCSIOP_INQUIRY:
+ if (!StorPortSetDeviceQueueDepth(PdoGetFdo(Pdo),
+ 0,
+ (UCHAR)PdoGetTargetId(Pdo),
+ 0,
+ XENVBD_MAX_QUEUE_DEPTH))
+ Verbose("Target[%d] : Failed to set queue depth\n");
PdoInquiry(PdoGetTargetId(Pdo), FrontendGetInquiry(Pdo->Frontend), Srb, Pdo->DeviceType);
break;
case SCSIOP_MODE_SENSE: