mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 20:23:34 +00:00
- 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:
parent
815cfb4aa2
commit
73d39ce072
1 changed files with 52 additions and 27 deletions
|
@ -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:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue