[ros-diffs] [fireball] 27493: - Fix a couple of places where tagged commands support was not implemented. - Uncomment buslogic.sys since it now half-works (at least it doesn't hang, and it even recognizes the driver, however an attempt to setup reactos to scsi disk fails).

fireball at svn.reactos.org fireball at svn.reactos.org
Sun Jul 8 19:14:19 CEST 2007


Author: fireball
Date: Sun Jul  8 21:14:19 2007
New Revision: 27493

URL: http://svn.reactos.org/svn/reactos?rev=27493&view=rev
Log:
- Fix a couple of places where tagged commands support was not implemented.
- Uncomment buslogic.sys since it now half-works (at least it doesn't hang, and it even recognizes the driver, however an attempt to setup reactos to scsi disk fails).

Modified:
    trunk/reactos/boot/bootdata/hivesys.inf
    trunk/reactos/boot/freeldr/freeldr/reactos/setupldr.c
    trunk/reactos/drivers/storage/scsiport/scsiport.c

Modified: trunk/reactos/boot/bootdata/hivesys.inf
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/bootdata/hivesys.inf?rev=27493&r1=27492&r2=27493&view=diff
==============================================================================
--- trunk/reactos/boot/bootdata/hivesys.inf (original)
+++ trunk/reactos/boot/bootdata/hivesys.inf Sun Jul  8 21:14:19 2007
@@ -489,7 +489,7 @@
 HKLM,"SYSTEM\CurrentControlSet\Services\BusLogic","ErrorControl",0x00010001,0x00000000
 HKLM,"SYSTEM\CurrentControlSet\Services\BusLogic","Group",0x00000000,"SCSI Miniport"
 HKLM,"SYSTEM\CurrentControlSet\Services\BusLogic","ImagePath",0x00020000,"system32\drivers\buslogic.sys"
-HKLM,"SYSTEM\CurrentControlSet\Services\BusLogic","Start",0x00010001,0x00000004
+HKLM,"SYSTEM\CurrentControlSet\Services\BusLogic","Start",0x00010001,0x00000000
 HKLM,"SYSTEM\CurrentControlSet\Services\BusLogic","Type",0x00010001,0x00000001
 HKLM,"SYSTEM\CurrentControlSet\Services\BusLogic","Tag",0x00010001,0x00000020
 

Modified: trunk/reactos/boot/freeldr/freeldr/reactos/setupldr.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/reactos/setupldr.c?rev=27493&r1=27492&r2=27493&view=diff
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/reactos/setupldr.c (original)
+++ trunk/reactos/boot/freeldr/freeldr/reactos/setupldr.c Sun Jul  8 21:14:19 2007
@@ -452,8 +452,8 @@
     return;
 
   /* Load buslogic.sys (depends on hardware detection) */
-  //if (!LoadDriver(SourcePath, "buslogic.sys"))
-    //return;
+  if (!LoadDriver(SourcePath, "buslogic.sys"))
+    return;
 
   /* Load class2.sys */
   if (!LoadDriver(SourcePath, "class2.sys"))

Modified: trunk/reactos/drivers/storage/scsiport/scsiport.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/storage/scsiport/scsiport.c?rev=27493&r1=27492&r2=27493&view=diff
==============================================================================
--- trunk/reactos/drivers/storage/scsiport/scsiport.c (original)
+++ trunk/reactos/drivers/storage/scsiport/scsiport.c Sun Jul  8 21:14:19 2007
@@ -116,7 +116,7 @@
 		   IN PIRP Irp);
 
 static PSCSI_REQUEST_BLOCK_INFO
-SpiGetSrbData(IN PVOID DeviceExtension,
+SpiGetSrbData(IN PSCSI_PORT_DEVICE_EXTENSION DeviceExtension,
               IN UCHAR PathId,
               IN UCHAR TargetId,
               IN UCHAR Lun,
@@ -2888,6 +2888,7 @@
     PSCSI_REQUEST_BLOCK Srb;
     PDEVICE_OBJECT DeviceObject = (PDEVICE_OBJECT)Context;
     PSCSI_PORT_LUN_EXTENSION LunExtension;
+    PSCSI_REQUEST_BLOCK_INFO SrbInfo;
     BOOLEAN Result;
     BOOLEAN StartTimer;
 
@@ -2937,8 +2938,6 @@
         /* Is this an abort request? */
         if (Srb->Function == SRB_FUNCTION_ABORT_COMMAND)
         {
-            PSCSI_REQUEST_BLOCK_INFO SrbInfo;
-
             /* Get pointer to SRB info structure */
             SrbInfo = SpiGetSrbData(DeviceExtension,
                                     Srb->PathId,
@@ -3011,8 +3010,13 @@
         /* If it's tagged - special thing */
         if (Srb->QueueTag != SP_UNTAGGED)
         {
-            /* TODO: Support tagged requests */
-            ASSERT(FALSE);
+            SrbInfo = &DeviceExtension->SrbInfo[Srb->QueueTag - 1];
+
+            /* Chek for consistency */
+            ASSERT(SrbInfo->Requests.Blink == NULL);
+
+            /* Insert it into the list of requests */
+            InsertTailList(&LunExtension->SrbInfo.Requests, &SrbInfo->Requests);
         }
     }
 
@@ -3875,7 +3879,7 @@
 }
 
 static PSCSI_REQUEST_BLOCK_INFO
-SpiGetSrbData(IN PVOID DeviceExtension,
+SpiGetSrbData(IN PSCSI_PORT_DEVICE_EXTENSION DeviceExtension,
               IN UCHAR PathId,
               IN UCHAR TargetId,
               IN UCHAR Lun,
@@ -3900,9 +3904,11 @@
     }
     else
     {
-        /* TODO: Implement when we have it */
-        ASSERT(FALSE);
-        return NULL;
+        /* Make sure the tag is valid, if it is - return the data */
+        if (QueueTag > DeviceExtension->SrbDataCount || QueueTag < 1)
+            return NULL;
+        else
+            return &DeviceExtension->SrbInfo[QueueTag -1];
     }
 }
 




More information about the Ros-diffs mailing list