@@ -183,6 +183,10 @@ VirtIODeviceFindVirtualQueue(
// activate the queue
pa = ScsiPortGetPhysicalAddress(DeviceExtension, NULL, info->queue,&dummy);
+ if(!pa.QuadPart) {
+ ScsiPortWritePortUlong((PULONG)(adaptExt->device_base + VIRTIO_PCI_QUEUE_PFN),(ULONG)0);
+ return NULL;
+ }
pageNum = (ULONG)(pa.QuadPart>> PAGE_SHIFT);
RhelDbgPrint(TRACE_LEVEL_FATAL, ("[%s] queue phys.address %08lx:%08lx, pfn %lx\n", __FUNCTION__, pa.u.HighPart, pa.u.LowPart, pageNum));
ScsiPortWritePortUlong((PULONG)(adaptExt->device_base + VIRTIO_PCI_QUEUE_PFN),(ULONG)(pageNum));
@@ -247,29 +247,6 @@ VirtIoFindAdapter(
return SP_RETURN_NOT_FOUND;
}
- if (!ScsiPortValidateRange(DeviceExtension,
- ConfigInfo->AdapterInterfaceType,
- ConfigInfo->SystemIoBusNumber,
- accessRange->RangeStart,
- accessRange->RangeLength,
- (BOOLEAN)!accessRange->RangeInMemory)) {
-
- ScsiPortLogError(DeviceExtension,
- NULL,
- 0,
- 0,
- 0,
- SP_INTERNAL_ADAPTER_ERROR,
- __LINE__);
-
- RhelDbgPrint(TRACE_LEVEL_FATAL, ("Range validation failed %x for %x bytes\n",
- (*ConfigInfo->AccessRanges)[0].RangeStart.LowPart,
- (*ConfigInfo->AccessRanges)[0].RangeLength));
-
- return SP_RETURN_ERROR;
- }
-
-
ConfigInfo->NumberOfBuses = 1;
ConfigInfo->MaximumNumberOfTargets = 1;
ConfigInfo->MaximumNumberOfLogicalUnits = 1;
@@ -707,7 +684,7 @@ VirtIoAdapterControl(
RhelDbgPrint(TRACE_LEVEL_VERBOSE, ("ScsiRestartAdapter\n"));
adaptExt->pci_vq_info.vq = NULL;
#ifdef MSI_SUPPORTED
- if(!adaptExt->dump_mode& adaptExt->msix_vectors) {
+ if(!adaptExt->dump_mode&& adaptExt->msix_vectors) {
adaptExt->pci_vq_info.vq = VirtIODeviceFindVirtualQueue(DeviceExtension, 0, adaptExt->msix_vectors);
}
#endif