651{
656
660
661
664
666 DeviceExtension->MapBuffers &&
668 {
669
672
673
675 {
679 }
680 }
681
682
683 if (SrbInfo->BaseOfMapRegister && SrbInfo->ScatterGather)
684 {
685 ULONG transferLen = 0;
688
692 {
693 transferLen += SrbInfo->ScatterGather[
i].Length;
694 }
695
698 SrbInfo->BaseOfMapRegister,
700 transferLen,
701 isWrite);
702 }
703
704
706
707
709 {
710
712
713
715
716
718 DeviceExtension->TimerCount = -1;
719
720
722
725 !(*NeedToCallStartIo))
726 {
727
729 }
730 }
731
732
734 {
736 SrbInfo->ScatterGather =
NULL;
737 }
738
739
740 if (SrbInfo->NumberOfMapRegisters)
741 {
743 SrbInfo->BaseOfMapRegister,
744 SrbInfo->NumberOfMapRegisters);
745 }
746
747
749
750
752 {
754 {
756
758 {
759
763 }
764
765
767 }
768
769
772 }
773
774
776
777
778 SrbInfo->SequenceNumber = 0;
779
780
782
783
785 {
786
787 SrbInfo->Requests.Blink =
NULL;
788 SrbInfo->Requests.Flink = (
PLIST_ENTRY)DeviceExtension->FreeSrbInfo;
789 DeviceExtension->FreeSrbInfo = SrbInfo;
790 }
791
792
794
796 {
797
798 DeviceExtension->Flags &= ~SCSI_PORT_REQUEST_PENDING;
799
800
801 *NeedToCallStartIo =
TRUE;
802 }
803
805 {
806
808
811 {
812
814 }
815 else
816 {
817
819 }
820
821 DPRINT(
"IoCompleting request IRP 0x%p\n",
Irp);
822
824
825
827
829 !DeviceExtension->MapRegisters &&
830 DeviceExtension->AdapterObject !=
NULL)
831 {
832
833 DeviceExtension->MapRegisterBase =
NULL;
835 }
836
837
838 return;
839 }
840
841
843
845 !DeviceExtension->MapRegisters &&
846 DeviceExtension->AdapterObject !=
NULL)
847 {
848
849 DeviceExtension->MapRegisterBase =
NULL;
851 }
852
853
855
856
861 {
862
864
865
867 {
868 DPRINT(
"it's being requeued\n");
869
872
874 &
Irp->Tail.Overlay.DeviceQueueEntry,
876 {
877
880
883 }
884
885
887
888 }
890 {
891
894
897
898
900 }
901 else
902 {
904
907
908
909 LunExtension->
Flags &= ~LUNEX_FULL_QUEUE;
910
911
913
914
917 }
918
919 return;
920 }
921
922
927 {
930 else
932 }
933 else
934 {
935
938
939
943 {
944
946 {
947 DPRINT(
"Requeuing busy request to allow request sense\n");
948
950 &LunExtension->
BusyRequest->Tail.Overlay.DeviceQueueEntry,
952 {
953
955
958 return;
959
960 }
961
962
964 }
965
966
968
969
971
972
973 return;
974 }
975
976
978 }
979
980
982}
#define InterlockedDecrement
#define SCSISTAT_CHECK_CONDITION
#define SCSISTAT_QUEUE_FULL
#define SRB_FLAGS_SGLIST_FROM_POOL
#define SRB_FLAGS_DATA_OUT
#define SRB_STATUS_PENDING
#define SRB_STATUS_AUTOSENSE_VALID
#define SRB_STATUS(Status)
#define SRB_STATUS_QUEUE_FROZEN
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
BOOLEAN NTAPI IoFlushAdapterBuffers(IN PADAPTER_OBJECT AdapterObject, IN PMDL Mdl, IN PVOID MapRegisterBase, IN PVOID CurrentVa, IN ULONG Length, IN BOOLEAN WriteToDevice)
VOID NTAPI IoFreeMapRegisters(IN PADAPTER_OBJECT AdapterObject, IN PVOID MapRegisterBase, IN ULONG NumberOfMapRegisters)
VOID NTAPI IoFreeAdapterChannel(IN PADAPTER_OBJECT AdapterObject)
#define ExFreePoolWithTag(_P, _T)
#define STATUS_DEVICE_NOT_READY
static NTSTATUS SpiStatusSrbToNt(_In_ UCHAR SrbStatus)
static VOID SpiSendRequestSense(_In_ PSCSI_PORT_LUN_EXTENSION LunExtension, _In_ PSCSI_REQUEST_BLOCK InitialSrb)
#define RtlCopyMemory(Destination, Source, Length)
#define IO_DISK_INCREMENT