- Handle NextLuRequest and ResetDetected in ScsiPortNotification() API

- Add UNIMPLEMENTED into ScsiPortGetBusData() when it's called with Length = 0. Does not happen so far, when tested with BusLogic.sys in our tree.

svn path=/trunk/; revision=29241
This commit is contained in:
Aleksey Bragin 2007-09-27 10:04:56 +00:00
parent 815cfb4aa2
commit 73d39ce072

View file

@ -384,11 +384,20 @@ ScsiPortGetBusData(IN PVOID DeviceExtension,
IN PVOID Buffer, IN PVOID Buffer,
IN ULONG Length) IN ULONG Length)
{ {
return(HalGetBusData(BusDataType, if (Length)
{
/* If Length is non-zero, just forward the call to
HalGetBusData() function */
return HalGetBusData(BusDataType,
SystemIoBusNumber, SystemIoBusNumber,
SlotNumber, SlotNumber,
Buffer, Buffer,
Length)); Length);
}
/* We have a more complex case here */
UNIMPLEMENTED;
return 0;
} }
@ -1817,27 +1826,43 @@ ScsiPortNotification(IN SCSI_NOTIFICATION_TYPE NotificationType,
UCHAR PathId; UCHAR PathId;
UCHAR TargetId; UCHAR TargetId;
UCHAR Lun; UCHAR Lun;
PSCSI_PORT_LUN_EXTENSION LunExtension;
PathId = (UCHAR) va_arg (ap, int); PathId = (UCHAR) va_arg (ap, int);
TargetId = (UCHAR) va_arg (ap, int); TargetId = (UCHAR) va_arg (ap, int);
Lun = (UCHAR) va_arg (ap, int); Lun = (UCHAR) va_arg (ap, int);
DPRINT1 ("Notify: NextLuRequest(PathId %u TargetId %u Lun %u)\n", DPRINT("Notify: NextLuRequest(PathId %u TargetId %u Lun %u)\n",
PathId, TargetId, Lun); PathId, TargetId, Lun);
/* FIXME: Implement it! */
ASSERT(FALSE);
// DeviceExtension->IrpFlags |= IRP_FLAG_NEXT; /* Mark it in the flags field */
// DeviceExtension->IrpFlags |= IRP_FLAG_NEXT_LU; DeviceExtension->InterruptData.Flags |= SCSI_PORT_NEXT_REQUEST_READY;
/* Hack! */ /* Get the LUN extension */
// DeviceExtension->IrpFlags |= IRP_FLAG_NEXT; LunExtension = SpiGetLunExtension(DeviceExtension,
PathId,
TargetId,
Lun);
/* This request should not be processed if */
if ((LunExtension && LunExtension->ReadyLun) ||
(LunExtension && LunExtension->SrbInfo.Srb))
{
/* Nothing to do here */
break;
}
/* Add this LUN to the list */
LunExtension->ReadyLun = DeviceExtension->InterruptData.ReadyLun;
DeviceExtension->InterruptData.ReadyLun = LunExtension;
} }
break; break;
case ResetDetected: case ResetDetected:
DPRINT1("Notify: ResetDetected\n"); DPRINT("Notify: ResetDetected\n");
/* FIXME: ??? */ /* Add RESET flags */
DeviceExtension->InterruptData.Flags |=
SCSI_PORT_RESET | SCSI_PORT_RESET_REPORTED;
break; break;
default: default: