[ros-kernel] ScsiPort

Filip Navara xnavara at volny.cz
Tue Mar 30 16:06:30 CEST 2004


Hi Hartmut,

after some more testing I found that it wasn't possible to access second 
drive on the (SCSI) controller after applying your patch. The attached 
patch solves that.

- Filip
-------------- next part --------------
--- R:\Clean\CVS\reactos\drivers\storage\scsiport.copy\scsiport.c	Mon Mar 29 19:36:04 2004
+++ scsiport.c	Tue Mar 30 13:00:32 2004
@@ -897,7 +897,7 @@
 	  MappedIrq = HalGetInterruptVector(PortConfig->AdapterInterfaceType,
 					    PortConfig->SystemIoBusNumber,
 					    PortConfig->BusInterruptLevel,
-					    PortConfig->BusInterruptLevel/*Vector*/,
+					    PortConfig->BusInterruptVector,
 					    &Dirql,
 					    &Affinity);
 	  DPRINT("AdapterInterfaceType %x, SystemIoBusNumber %x, BusInterruptLevel %x, BusInterruptVector %x\n",
@@ -1386,7 +1386,6 @@
 SpiIoStartPacket(IN PDEVICE_OBJECT DeviceObject,
 		 IN PIRP Irp)
 {
-  PLIST_ENTRY ListEntry;
   PSCSI_PORT_DEVICE_EXTENSION DeviceExtension;
   PSCSI_PORT_LUN_EXTENSION LunExtension;
   KIRQL oldIrql;
@@ -1415,13 +1414,7 @@
                                  &Irp->Tail.Overlay.DeviceQueueEntry,
 				 Srb->QueueSortKey))
     {
-      ListEntry = DeviceExtension->LunExtensionListHead.Flink;
-      while (ListEntry != &DeviceExtension->LunExtensionListHead)
-        {
-          LunExtension = CONTAINING_RECORD(ListEntry, SCSI_PORT_LUN_EXTENSION, List);
-	  LunExtension->DeviceQueue.Busy = TRUE;
-	  ListEntry = ListEntry->Flink;
-        }
+      LunExtension->DeviceQueue.Busy = TRUE;
       KeReleaseSpinLockFromDpcLevel(&DeviceExtension->IrpLock);
       DeviceObject->DriverObject->DriverStartIo(DeviceObject, Irp);
       KeLowerIrql (oldIrql);


More information about the Ros-kernel mailing list