ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
September 2010
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
18 participants
278 discussions
Start a n
N
ew thread
[akhaldi] 48870: [CMAKE] - Fix set_subsystem for mingw32.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sat Sep 25 14:02:06 2010 New Revision: 48870 URL:
http://svn.reactos.org/svn/reactos?rev=48870&view=rev
Log: [CMAKE] - Fix set_subsystem for mingw32. Modified: branches/cmake-bringup/gcc.cmake Modified: branches/cmake-bringup/gcc.cmake URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/gcc.cmake?rev=488…
============================================================================== --- branches/cmake-bringup/gcc.cmake [iso-8859-1] (original) +++ branches/cmake-bringup/gcc.cmake [iso-8859-1] Sat Sep 25 14:02:06 2010 @@ -38,7 +38,7 @@ endmacro() macro(set_subsystem MODULE SUBSYSTEM) - set_target_properties(${MODULE} PROPERTIES LINK_FLAGS "-Wl,--subsystem:${SUBSYSTEM}") + set_target_properties(${MODULE} PROPERTIES LINK_FLAGS "-Wl,--subsystem,${SUBSYSTEM}") endmacro() macro(add_importlibs MODULE)
14 years, 3 months
1
0
0
0
[jgardou] 48869: [CMAKE] - Add win32cui module type to gcc toolchain - Add cacls to build
by jgardou@svn.reactos.org
Author: jgardou Date: Sat Sep 25 13:38:44 2010 New Revision: 48869 URL:
http://svn.reactos.org/svn/reactos?rev=48869&view=rev
Log: [CMAKE] - Add win32cui module type to gcc toolchain - Add cacls to build Added: branches/cmake-bringup/base/applications/cacls/CMakeLists.txt (with props) Modified: branches/cmake-bringup/base/applications/CMakeLists.txt branches/cmake-bringup/gcc.cmake Modified: branches/cmake-bringup/base/applications/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/base/applications…
============================================================================== --- branches/cmake-bringup/base/applications/CMakeLists.txt [iso-8859-1] (original) +++ branches/cmake-bringup/base/applications/CMakeLists.txt [iso-8859-1] Sat Sep 25 13:38:44 2010 @@ -1,5 +1,5 @@ -#add_subdirectory(cacls) +add_subdirectory(cacls) add_subdirectory(calc) #add_subdirectory(charmap) #add_subdirectory(cmdutils) Added: branches/cmake-bringup/base/applications/cacls/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/base/applications…
============================================================================== --- branches/cmake-bringup/base/applications/cacls/CMakeLists.txt (added) +++ branches/cmake-bringup/base/applications/cacls/CMakeLists.txt [iso-8859-1] Sat Sep 25 13:38:44 2010 @@ -1,0 +1,12 @@ + +add_definitions(-DUNICODE -D_UNICODE) + +add_executable(cacls + cacls.c + cacls.rc) + +set_module_type(cacls win32cui) + +add_importlibs(cacls advapi32 ntdll user32 shell32 msvcrt) + +add_dependencies(cacls psdk) Propchange: branches/cmake-bringup/base/applications/cacls/CMakeLists.txt ------------------------------------------------------------------------------ svn:eol-style = native Modified: branches/cmake-bringup/gcc.cmake URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/gcc.cmake?rev=488…
============================================================================== --- branches/cmake-bringup/gcc.cmake [iso-8859-1] (original) +++ branches/cmake-bringup/gcc.cmake [iso-8859-1] Sat Sep 25 13:38:44 2010 @@ -57,6 +57,10 @@ set_subsystem(${MODULE} windows) set_entrypoint(${MODULE} wWinMainCRTStartup) endif() + if(${TYPE} MATCHES win32cui) + set_subsystem(${MODULE} windows) + set_entrypoint(${MODULE} mainCRTStartup) + endif() endmacro() endif()
14 years, 3 months
1
0
0
0
[akhaldi] 48868: [DDK] - Fix a typo and introduce some minor formatting changes.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sat Sep 25 09:39:08 2010 New Revision: 48868 URL:
http://svn.reactos.org/svn/reactos?rev=48868&view=rev
Log: [DDK] - Fix a typo and introduce some minor formatting changes. Modified: trunk/reactos/include/ddk/classpnp.h Modified: trunk/reactos/include/ddk/classpnp.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/classpnp.h?rev…
============================================================================== --- trunk/reactos/include/ddk/classpnp.h [iso-8859-1] (original) +++ trunk/reactos/include/ddk/classpnp.h [iso-8859-1] Sat Sep 25 09:39:08 2010 @@ -19,10 +19,10 @@ #define SRB_CLASS_FLAGS_FREE_MDL 0x80000000 #define ASSERT_FDO(x) \ - ASSERT(((PCOMMON_DEVICE_EXTENSION) (x)->DeviceExtension)->IsFdo) + ASSERT(((PCOMMON_DEVICE_EXTENSION) (x)->DeviceExtension)->IsFdo) #define ASSERT_PDO(x) \ - ASSERT(!(((PCOMMON_DEVICE_EXTENSION) (x)->DeviceExtension)->IsFdo)) + ASSERT(!(((PCOMMON_DEVICE_EXTENSION) (x)->DeviceExtension)->IsFdo)) #define IS_CLEANUP_REQUEST(majorFunction) \ ((majorFunction == IRP_MJ_CLOSE) || \ @@ -119,18 +119,18 @@ #define DebugPrint(x) #endif -#define DEBUG_BUFFER_LENGTH 256 - -#define START_UNIT_TIMEOUT (60 * 4) - -#define MEDIA_CHANGE_DEFAULT_TIME 1 -#define MEDIA_CHANGE_TIMEOUT_TIME 300 +#define DEBUG_BUFFER_LENGTH 256 + +#define START_UNIT_TIMEOUT (60 * 4) + +#define MEDIA_CHANGE_DEFAULT_TIME 1 +#define MEDIA_CHANGE_TIMEOUT_TIME 300 #define MAXIMUM_RETRY_FOR_SINGLE_IO_IN_100NS_UNITS 0x3b9aca00 #ifdef ALLOCATE_SRB_FROM_POOL -#define ClasspAllocateSrb(ext) +#define ClasspAllocateSrb(ext) \ ExAllocatePoolWithTag(NonPagedPool, \ sizeof(SCSI_REQUEST_BLOCK), \ 'sBRS')
14 years, 3 months
1
0
0
0
[ekohl] 48867: Fix build failure from r48863.
by ekohl@svn.reactos.org
Author: ekohl Date: Sat Sep 25 07:53:07 2010 New Revision: 48867 URL:
http://svn.reactos.org/svn/reactos?rev=48867&view=rev
Log: Fix build failure from r48863. Modified: trunk/reactos/lib/sdk/ioevent/ioevent.c Modified: trunk/reactos/lib/sdk/ioevent/ioevent.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/ioevent/ioevent.c?…
============================================================================== --- trunk/reactos/lib/sdk/ioevent/ioevent.c [iso-8859-1] (original) +++ trunk/reactos/lib/sdk/ioevent/ioevent.c [iso-8859-1] Sat Sep 25 07:53:07 2010 @@ -1,6 +1,7 @@ #include <stdarg.h> #define COM_NO_WINDOWS_H +#include "windef.h" #include "initguid.h" #include <ioevent.h>
14 years, 3 months
1
0
0
0
[ekohl] 48866: [HAL] Implement HalStopProfileInterrupt and add required RTC register and flag definitions.
by ekohl@svn.reactos.org
Author: ekohl Date: Sat Sep 25 07:22:40 2010 New Revision: 48866 URL:
http://svn.reactos.org/svn/reactos?rev=48866&view=rev
Log: [HAL] Implement HalStopProfileInterrupt and add required RTC register and flag definitions. Modified: trunk/reactos/hal/halx86/generic/cmos.c trunk/reactos/hal/halx86/generic/profil.c trunk/reactos/hal/halx86/include/halp.h Modified: trunk/reactos/hal/halx86/generic/cmos.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/generic/cmos.c?…
============================================================================== --- trunk/reactos/hal/halx86/generic/cmos.c [iso-8859-1] (original) +++ trunk/reactos/hal/halx86/generic/cmos.c [iso-8859-1] Sat Sep 25 07:22:40 2010 @@ -19,8 +19,8 @@ /* PRIVATE FUNCTIONS *********************************************************/ -FORCEINLINE UCHAR +NTAPI HalpReadCmos(IN UCHAR Reg) { /* Select the register */ @@ -30,8 +30,8 @@ return READ_PORT_UCHAR(CMOS_DATA_PORT); } -FORCEINLINE VOID +NTAPI HalpWriteCmos(IN UCHAR Reg, IN UCHAR Value) { Modified: trunk/reactos/hal/halx86/generic/profil.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/generic/profil.…
============================================================================== --- trunk/reactos/hal/halx86/generic/profil.c [iso-8859-1] (original) +++ trunk/reactos/hal/halx86/generic/profil.c [iso-8859-1] Sat Sep 25 07:22:40 2010 @@ -4,6 +4,7 @@ * FILE: hal/halx86/generic/profil.c * PURPOSE: System Profiling * PROGRAMMERS: Alex Ionescu (alex.ionescu(a)reactos.org) + * Eric Kohl */ /* INCLUDES ******************************************************************/ @@ -15,14 +16,28 @@ /* FUNCTIONS *****************************************************************/ /* - * @unimplemented + * @implemented */ VOID NTAPI HalStopProfileInterrupt(IN KPROFILE_SOURCE ProfileSource) { - UNIMPLEMENTED; - return; + UCHAR StatusB; + + /* Acquire the CMOS lock */ + HalpAcquireSystemHardwareSpinLock(); + + /* Read Status Register B */ + StatusB = HalpReadCmos(RTC_REGISTER_B); + + /* Disable periodic interrupts */ + StatusB = StatusB & ~RTC_REG_B_PI; + + /* Write new value into Status Register B */ + HalpWriteCmos(RTC_REGISTER_B, StatusB); + + /* Release the CMOS lock */ + HalpReleaseCmosSpinLock(); } /* Modified: trunk/reactos/hal/halx86/include/halp.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/include/halp.h?…
============================================================================== --- trunk/reactos/hal/halx86/include/halp.h [iso-8859-1] (original) +++ trunk/reactos/hal/halx86/include/halp.h [iso-8859-1] Sat Sep 25 07:22:40 2010 @@ -48,8 +48,11 @@ #define CMOS_CONTROL_PORT (PUCHAR)0x70 #define CMOS_DATA_PORT (PUCHAR)0x71 #define RTC_REGISTER_A 0x0A +#define RTC_REG_A_UIP 0x80 #define RTC_REGISTER_B 0x0B -#define RTC_REG_A_UIP 0x80 +#define RTC_REG_B_PI 0x40 +#define RTC_REGISTER_C 0x0C +#define RTC_REGISTER_D 0x0D #define RTC_REGISTER_CENTURY 0x32 /* Usage flags */ @@ -683,12 +686,25 @@ ); // -// CMOS initialization +// CMOS Routines // VOID NTAPI HalpInitializeCmos( VOID +); + +UCHAR +NTAPI +HalpReadCmos( + IN UCHAR Reg +); + +VOID +NTAPI +HalpWriteCmos( + IN UCHAR Reg, + IN UCHAR Value ); //
14 years, 3 months
1
0
0
0
[sir_richard] 48865: [PSDK/DDK]: Last couple of fixes to headers. Classpnp can compile (and link) now.
by sir_richard@svn.reactos.org
Author: sir_richard Date: Sat Sep 25 05:46:31 2010 New Revision: 48865 URL:
http://svn.reactos.org/svn/reactos?rev=48865&view=rev
Log: [PSDK/DDK]: Last couple of fixes to headers. Classpnp can compile (and link) now. Modified: trunk/reactos/include/ddk/classpnp.h trunk/reactos/include/psdk/ntddstor.h Modified: trunk/reactos/include/ddk/classpnp.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/classpnp.h?rev…
============================================================================== --- trunk/reactos/include/ddk/classpnp.h [iso-8859-1] (original) +++ trunk/reactos/include/ddk/classpnp.h [iso-8859-1] Sat Sep 25 05:46:31 2010 @@ -17,6 +17,12 @@ #define SRB_CLASS_FLAGS_PERSISTANT 0x20000000 #define SRB_CLASS_FLAGS_PAGING 0x40000000 #define SRB_CLASS_FLAGS_FREE_MDL 0x80000000 + +#define ASSERT_FDO(x) \ + ASSERT(((PCOMMON_DEVICE_EXTENSION) (x)->DeviceExtension)->IsFdo) + +#define ASSERT_PDO(x) \ + ASSERT(!(((PCOMMON_DEVICE_EXTENSION) (x)->DeviceExtension)->IsFdo)) #define IS_CLEANUP_REQUEST(majorFunction) \ ((majorFunction == IRP_MJ_CLOSE) || \ @@ -177,6 +183,17 @@ #define GUID_CLASSPNP_WORKING_SET {0x105701b0, 0x9e9b, 0x47cb, {0x97, 0x80, 0x81, 0x19, 0x8a, 0xf7, 0xb5, 0x24}} #define DEFAULT_FAILURE_PREDICTION_PERIOD 60 * 60 * 1 + +static inline ULONG CountOfSetBitsUChar(UCHAR _X) +{ ULONG i = 0; while (_X) { _X &= _X - 1; i++; } return i; } +static inline ULONG CountOfSetBitsULong(ULONG _X) +{ ULONG i = 0; while (_X) { _X &= _X - 1; i++; } return i; } +static inline ULONG CountOfSetBitsULong32(ULONG32 _X) +{ ULONG i = 0; while (_X) { _X &= _X - 1; i++; } return i; } +static inline ULONG CountOfSetBitsULong64(ULONG64 _X) +{ ULONG i = 0; while (_X) { _X &= _X - 1; i++; } return i; } +static inline ULONG CountOfSetBitsUlongPtr(ULONG_PTR _X) +{ ULONG i = 0; while (_X) { _X &= _X - 1; i++; } return i; } typedef enum _MEDIA_CHANGE_DETECTION_STATE { MediaUnknown, @@ -772,6 +789,14 @@ PVOID Context); SCSIPORTAPI +NTSTATUS +NTAPI +ClassIoCompleteAssociated( + PDEVICE_OBJECT DeviceObject, + PIRP Irp, + PVOID Context); + +SCSIPORTAPI BOOLEAN NTAPI ClassInterpretSenseInfo( @@ -860,6 +885,13 @@ ClassClaimDevice( PDEVICE_OBJECT LowerDeviceObject, BOOLEAN Release); + +SCSIPORTAPI +NTSTATUS +NTAPI +ClassInternalIoControl ( + PDEVICE_OBJECT DeviceObject, + PIRP Irp); SCSIPORTAPI VOID Modified: trunk/reactos/include/psdk/ntddstor.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/ntddstor.h?re…
============================================================================== --- trunk/reactos/include/psdk/ntddstor.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/ntddstor.h [iso-8859-1] Sat Sep 25 05:46:31 2010 @@ -124,10 +124,10 @@ CTL_CODE(IOCTL_STORAGE_BASE, 0x0301, METHOD_BUFFERED, FILE_ANY_ACCESS) #define IOCTL_STORAGE_RESET_BUS \ - CTL_CODE(IOCTL_STORAGE_BASE, 0x0400, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS) + CTL_CODE(IOCTL_STORAGE_BASE, 0x0400, METHOD_BUFFERED, FILE_READ_ACCESS) #define IOCTL_STORAGE_RESET_DEVICE \ - CTL_CODE(IOCTL_STORAGE_BASE, 0x0401, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS) + CTL_CODE(IOCTL_STORAGE_BASE, 0x0401, METHOD_BUFFERED, FILE_READ_ACCESS) #define IOCTL_STORAGE_GET_DEVICE_NUMBER \ CTL_CODE(IOCTL_STORAGE_BASE, 0x0420, METHOD_BUFFERED, FILE_ANY_ACCESS)
14 years, 3 months
1
0
0
0
[sir_richard] 48864: [PSDK/DDK]: Add more missing definitions. Fix classpnp.h.
by sir_richard@svn.reactos.org
Author: sir_richard Date: Sat Sep 25 05:15:47 2010 New Revision: 48864 URL:
http://svn.reactos.org/svn/reactos?rev=48864&view=rev
Log: [PSDK/DDK]: Add more missing definitions. Fix classpnp.h. Modified: trunk/reactos/include/ddk/classpnp.h trunk/reactos/include/psdk/ntdef.h trunk/reactos/include/psdk/wmistr.h Modified: trunk/reactos/include/ddk/classpnp.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/classpnp.h?rev…
============================================================================== --- trunk/reactos/include/ddk/classpnp.h [iso-8859-1] (original) +++ trunk/reactos/include/ddk/classpnp.h [iso-8859-1] Sat Sep 25 05:15:47 2010 @@ -40,6 +40,42 @@ (opCode == SCSIOP_WRITE16)) #define IS_SCSIOP_READWRITE(opCode) (IS_SCSIOP_READ(opCode) || IS_SCSIOP_WRITE(opCode)) + +#define ADJUST_FUA_FLAG(fdoExt) { \ + if (TEST_FLAG(fdoExt->DeviceFlags, DEV_WRITE_CACHE) && \ + !TEST_FLAG(fdoExt->DeviceFlags, DEV_POWER_PROTECTED) && \ + !TEST_FLAG(fdoExt->ScanForSpecialFlags, CLASS_SPECIAL_FUA_NOT_SUPPORTED) ) { \ + fdoExt->CdbForceUnitAccess = TRUE; \ + } else { \ + fdoExt->CdbForceUnitAccess = FALSE; \ + } \ +} + +#define FREE_POOL(_PoolPtr) \ + if (_PoolPtr != NULL) { \ + ExFreePool(_PoolPtr); \ + _PoolPtr = NULL; \ + } + +#ifdef POOL_TAGGING +#undef ExAllocatePool +#undef ExAllocatePoolWithQuota +#define ExAllocatePool(a,b) ExAllocatePoolWithTag(a,b,'nUcS') +//#define ExAllocatePool(a,b) #assert(0) +#define ExAllocatePoolWithQuota(a,b) ExAllocatePoolWithQuotaTag(a,b,'nUcS') +#endif + +#define CLASS_TAG_AUTORUN_DISABLE 'ALcS' +#define CLASS_TAG_FILE_OBJECT_EXTENSION 'FLcS' +#define CLASS_TAG_MEDIA_CHANGE_DETECTION 'MLcS' +#define CLASS_TAG_MOUNT 'mLcS' +#define CLASS_TAG_RELEASE_QUEUE 'qLcS' +#define CLASS_TAG_POWER 'WLcS' +#define CLASS_TAG_WMI 'wLcS' +#define CLASS_TAG_FAILURE_PREDICT 'fLcS' +#define CLASS_TAG_DEVICE_CONTROL 'OIcS' +#define CLASS_TAG_MODE_DATA 'oLcS' +#define CLASS_TAG_MULTIPATH 'mPcS' #define MAXIMUM_RETRIES 4 @@ -217,12 +253,9 @@ struct _MEDIA_CHANGE_DETECTION_INFO; typedef struct _MEDIA_CHANGE_DETECTION_INFO MEDIA_CHANGE_DETECTION_INFO, *PMEDIA_CHANGE_DETECTION_INFO; -struct _DICTIONARY_HEADER; -typedef struct _DICTIONARY_HEADER DICTIONARY_HEADER, *PDICTIONARY_HEADER; - typedef struct _DICTIONARY { ULONGLONG Signature; - PDICTIONARY_HEADER List; + struct _DICTIONARY_HEADER* List; KSPIN_LOCK SpinLock; } DICTIONARY, *PDICTIONARY; @@ -558,9 +591,6 @@ ULONG_PTR Reserved4; } PHYSICAL_DEVICE_EXTENSION, *PPHYSICAL_DEVICE_EXTENSION; -struct _FAILURE_PREDICTION_INFO; -typedef struct _FAILURE_PREDICTION_INFO *PFAILURE_PREDICTION_INFO; - typedef struct _CLASS_POWER_OPTIONS { ULONG PowerDown:1; ULONG LockQueue:1; @@ -652,7 +682,7 @@ BOOLEAN ReleaseQueueIrpFromPool; BOOLEAN FailurePredicted; ULONG FailureReason; - PFAILURE_PREDICTION_INFO FailurePredictionInfo; + struct _FAILURE_PREDICTION_INFO* FailurePredictionInfo; BOOLEAN PowerDownInProgress; ULONG EnumerationInterlock; KEVENT ChildLock; @@ -734,6 +764,14 @@ PIRP Irp); SCSIPORTAPI +NTSTATUS +NTAPI +ClassIoComplete( + PDEVICE_OBJECT DeviceObject, + PIRP Irp, + PVOID Context); + +SCSIPORTAPI BOOLEAN NTAPI ClassInterpretSenseInfo( @@ -848,7 +886,7 @@ ClassGetDescriptor( PDEVICE_OBJECT DeviceObject, PSTORAGE_PROPERTY_ID PropertyId, - PVOID *Descriptor); + PSTORAGE_DESCRIPTOR_HEADER *Descriptor); SCSIPORTAPI VOID @@ -1007,6 +1045,13 @@ ClassReleaseChildLock( PFUNCTIONAL_DEVICE_EXTENSION FdoExtension); +NTSTATUS +NTAPI +ClassSignalCompletion( + PDEVICE_OBJECT DeviceObject, + PIRP Irp, + PKEVENT Event); + VOID NTAPI ClassSendStartUnit( @@ -1020,10 +1065,26 @@ UCHAR RemoveType); SCSIPORTAPI +NTSTATUS +NTAPI +ClassAsynchronousCompletion( + PDEVICE_OBJECT DeviceObject, + PIRP Irp, + PVOID Event); + +SCSIPORTAPI VOID NTAPI ClassCheckMediaState( PFUNCTIONAL_DEVICE_EXTENSION FdoExtension); + +SCSIPORTAPI +NTSTATUS +NTAPI +ClassCheckVerifyComplete( + PDEVICE_OBJECT DeviceObject, + PIRP Irp, + PVOID Context); SCSIPORTAPI VOID Modified: trunk/reactos/include/psdk/ntdef.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/ntdef.h?rev=4…
============================================================================== --- trunk/reactos/include/psdk/ntdef.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/ntdef.h [iso-8859-1] Sat Sep 25 05:15:47 2010 @@ -616,6 +616,12 @@ #define RTL_CONSTANT_STRING(s) { sizeof(s)-sizeof((s)[0]), sizeof(s), s } #define RTL_FIELD_SIZE(type, field) (sizeof(((type *)0)->field)) + +#define RTL_SIZEOF_THROUGH_FIELD(type, field) \ + (FIELD_OFFSET(type, field) + RTL_FIELD_SIZE(type, field)) + +#define RTL_CONTAINS_FIELD(Struct, Size, Field) \ + ( (((PCHAR)(&(Struct)->Field)) + sizeof((Struct)->Field)) <= (((PCHAR)(Struct))+(Size)) ) #define RTL_NUMBER_OF_V1(A) (sizeof(A)/sizeof((A)[0])) #define RTL_NUMBER_OF_V2(A) RTL_NUMBER_OF_V1(A) Modified: trunk/reactos/include/psdk/wmistr.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/wmistr.h?rev=…
============================================================================== --- trunk/reactos/include/psdk/wmistr.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/wmistr.h [iso-8859-1] Sat Sep 25 05:15:47 2010 @@ -25,6 +25,123 @@ ULONG Flags; } WNODE_HEADER, *PWNODE_HEADER; +#define WNODE_FLAG_ALL_DATA 0x00000001 +#define WNODE_FLAG_SINGLE_INSTANCE 0x00000002 +#define WNODE_FLAG_SINGLE_ITEM 0x00000004 +#define WNODE_FLAG_EVENT_ITEM 0x00000008 +#define WNODE_FLAG_FIXED_INSTANCE_SIZE 0x00000010 +#define WNODE_FLAG_TOO_SMALL 0x00000020 +#define WNODE_FLAG_INSTANCES_SAME 0x00000040 +#define WNODE_FLAG_STATIC_INSTANCE_NAMES 0x00000080 +#define WNODE_FLAG_INTERNAL 0x00000100 +#define WNODE_FLAG_USE_TIMESTAMP 0x00000200 +#define WNODE_FLAG_PERSIST_EVENT 0x00000400 +#define WNODE_FLAG_EVENT_REFERENCE 0x00002000 +#define WNODE_FLAG_ANSI_INSTANCENAMES 0x00004000 +#define WNODE_FLAG_METHOD_ITEM 0x00008000 +#define WNODE_FLAG_PDO_INSTANCE_NAMES 0x00010000 +#define WNODE_FLAG_TRACED_GUID 0x00020000 +#define WNODE_FLAG_LOG_WNODE 0x00040000 +#define WNODE_FLAG_USE_GUID_PTR 0x00080000 +#define WNODE_FLAG_USE_MOF_PTR 0x00100000 +#define WNODE_FLAG_NO_HEADER 0x00200000 +#define WNODE_FLAG_SEVERITY_MASK 0xff000000 + +typedef struct tagWNODE_TOO_SMALL +{ + struct _WNODE_HEADER WnodeHeader; + ULONG SizeNeeded; +} WNODE_TOO_SMALL, *PWNODE_TOO_SMALL; + +typedef struct tagWNODE_SINGLE_INSTANCE +{ + struct _WNODE_HEADER WnodeHeader; + ULONG OffsetInstanceName; + ULONG InstanceIndex; + ULONG DataBlockOffset; + ULONG SizeDataBlock; + UCHAR VariableData[]; +} WNODE_SINGLE_INSTANCE, *PWNODE_SINGLE_INSTANCE; + +#define WMIREG_FLAG_EXPENSIVE 0x00000001 +#define WMIREG_FLAG_INSTANCE_LIST 0x00000004 +#define WMIREG_FLAG_INSTANCE_BASENAME 0x00000008 +#define WMIREG_FLAG_INSTANCE_PDO 0x00000020 +#define WMIREG_FLAG_REMOVE_GUID 0x00010000 +#define WMIREG_FLAG_RESERVED1 0x00020000 +#define WMIREG_FLAG_RESERVED2 0x00040000 +#define WMIREG_FLAG_TRACED_GUID 0x00080000 +#define WMIREG_FLAG_TRACE_CONTROL_GUID 0x00001000 +#define WMIREG_FLAG_EVENT_ONLY_GUID 0x00000040 + +typedef struct +{ + GUID Guid; + ULONG Flags; + ULONG InstanceCount; + union + { + ULONG InstanceNameList; + ULONG BaseNameOffset; + ULONG_PTR Pdo; + ULONG_PTR InstanceInfo; + }; +} WMIREGGUIDW, *PWMIREGGUIDW; + +typedef struct +{ + ULONG BufferSize; + ULONG NextWmiRegInfo; + ULONG RegistryPath; + ULONG MofResourceName; + ULONG GuidCount; + WMIREGGUIDW WmiRegGuid[]; +} WMIREGINFOW, *PWMIREGINFOW; + +typedef WMIREGINFOW WMIREGINFO; +typedef PWMIREGINFOW PWMIREGINFO; + +typedef struct +{ + ULONG OffsetInstanceData; + ULONG LengthInstanceData; +} OFFSETINSTANCEDATAANDLENGTH, *POFFSETINSTANCEDATAANDLENGTH; + +typedef struct tagWNODE_ALL_DATA +{ + struct _WNODE_HEADER WnodeHeader; + ULONG DataBlockOffset; + ULONG InstanceCount; + ULONG OffsetInstanceNameOffsets; + union + { + ULONG FixedInstanceSize; + OFFSETINSTANCEDATAANDLENGTH OffsetInstanceDataAndLength[0]; + }; +} WNODE_ALL_DATA, *PWNODE_ALL_DATA; + +typedef struct tagWNODE_SINGLE_ITEM +{ + struct _WNODE_HEADER WnodeHeader; + ULONG OffsetInstanceName; + ULONG InstanceIndex; + ULONG ItemId; + ULONG DataBlockOffset; + ULONG SizeDataItem; + UCHAR VariableData[]; +} WNODE_SINGLE_ITEM, *PWNODE_SINGLE_ITEM; + +typedef struct tagWNODE_METHOD_ITEM +{ + struct _WNODE_HEADER WnodeHeader; + ULONG OffsetInstanceName; + ULONG InstanceIndex; + ULONG MethodId; + ULONG DataBlockOffset; + ULONG SizeDataBlock; + UCHAR VariableData[]; +} WNODE_METHOD_ITEM, *PWNODE_METHOD_ITEM; + typedef enum { WMI_GET_ALL_DATA = 0,
14 years, 3 months
1
0
0
0
[akhaldi] 48863: [PSDK] - Add some missing structures in ioevent.h [DDK] - Add some more missing definitions.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sat Sep 25 01:12:17 2010 New Revision: 48863 URL:
http://svn.reactos.org/svn/reactos?rev=48863&view=rev
Log: [PSDK] - Add some missing structures in ioevent.h [DDK] - Add some more missing definitions. Modified: trunk/reactos/include/ddk/classpnp.h trunk/reactos/include/psdk/ioevent.h Modified: trunk/reactos/include/ddk/classpnp.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/classpnp.h?rev…
============================================================================== --- trunk/reactos/include/ddk/classpnp.h [iso-8859-1] (original) +++ trunk/reactos/include/ddk/classpnp.h [iso-8859-1] Sat Sep 25 01:12:17 2010 @@ -13,8 +13,6 @@ #include <scsi.h> -#define DEBUG_BUFFER_LENGTH 256 - #define SRB_CLASS_FLAGS_LOW_PRIORITY 0x10000000 #define SRB_CLASS_FLAGS_PERSISTANT 0x20000000 #define SRB_CLASS_FLAGS_PAGING 0x40000000 @@ -53,6 +51,33 @@ #define ClassAcquireRemoveLock(devobj, tag) \ ClassAcquireRemoveLockEx(devobj, tag, __FILE__, __LINE__) + +#ifdef TRY +#undef TRY +#endif +#ifdef LEAVE +#undef LEAVE +#endif + +#ifdef FINALLY +#undef FINALLY +#endif + +#define TRY +#define LEAVE goto __tryLabel; +#define FINALLY __tryLabel: + +#if defined DebugPrint +#undef DebugPrint +#endif + +#if DBG +#define DebugPrint(x) ClassDebugPrint x +#else +#define DebugPrint(x) +#endif + +#define DEBUG_BUFFER_LENGTH 256 #define START_UNIT_TIMEOUT (60 * 4) @@ -606,7 +631,7 @@ LONG ProtectedLockCount; LONG InternalLockCount; KEVENT EjectSynchronizationEvent; - USHORT DeviceFlags; + USHORT DeviceFlags; UCHAR SectorShift; #if (NTDDI_VERSION >= NTDDI_VISTA) UCHAR CdbForceUnitAccess; @@ -615,7 +640,7 @@ #endif PMEDIA_CHANGE_DETECTION_INFO MediaChangeDetectionInfo; PKEVENT Unused1; - HANDLE Unused2; + HANDLE Unused2; FILE_OBJECT_EXTENSION KernelModeMcnContext; ULONG MediaChangeCount; HANDLE DeviceDirectory; @@ -658,6 +683,7 @@ ULONG_PTR Reserved2; ULONG_PTR Reserved3; ULONG_PTR Reserved4; + #endif /* (NTDDI_VERSION <= NTDDI_WIN2K) */ } FUNCTIONAL_DEVICE_EXTENSION, *PFUNCTIONAL_DEVICE_EXTENSION; Modified: trunk/reactos/include/psdk/ioevent.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/ioevent.h?rev…
============================================================================== --- trunk/reactos/include/psdk/ioevent.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/ioevent.h [iso-8859-1] Sat Sep 25 01:12:17 2010 @@ -71,6 +71,44 @@ DEFINE_GUID(GUID_IO_DISK_LAYOUT_CHANGE, 0x11DFF54C, 0x8469, 0x41F9, 0xB3, 0xDE, 0xEF, 0x83, 0x64, 0x87, 0xC5, 0x4A); +typedef struct _DEVICE_EVENT_MOUNT { + ULONG Version; + ULONG Flags; + ULONG FileSystemNameLength; + ULONG FileSystemNameOffset; +} DEVICE_EVENT_MOUNT, *PDEVICE_EVENT_MOUNT; + +typedef struct _DEVICE_EVENT_BECOMING_READY { + ULONG Version; + ULONG Reason; + ULONG Estimated100msToReady; +} DEVICE_EVENT_BECOMING_READY, *PDEVICE_EVENT_BECOMING_READY; + +typedef struct _DEVICE_EVENT_EXTERNAL_REQUEST { + ULONG Version; + ULONG DeviceClass; + USHORT ButtonStatus; + USHORT Request; + LARGE_INTEGER SystemTime; +} DEVICE_EVENT_EXTERNAL_REQUEST, *PDEVICE_EVENT_EXTERNAL_REQUEST; + +typedef struct _DEVICE_EVENT_GENERIC_DATA { + ULONG EventNumber; +} DEVICE_EVENT_GENERIC_DATA, *PDEVICE_EVENT_GENERIC_DATA; + +typedef struct _DEVICE_EVENT_RBC_DATA { + ULONG EventNumber; + UCHAR SenseQualifier; + UCHAR SenseCode; + UCHAR SenseKey; + UCHAR Reserved; + ULONG Information; +} DEVICE_EVENT_RBC_DATA, *PDEVICE_EVENT_RBC_DATA; + +typedef struct _GUID_IO_DISK_CLONE_ARRIVAL_INFORMATION { + ULONG DiskNumber; +} GUID_IO_DISK_CLONE_ARRIVAL_INFORMATION, *PGUID_IO_DISK_CLONE_ARRIVAL_INFORMATION; + #ifdef __cplusplus } #endif
14 years, 3 months
1
0
0
0
[akhaldi] 48862: [DDK] - classpnp.h: Add FUNCTIONAL_DEVICE_EXTENSION, SET_FLAG, CLEAR_FLAG and TEST_FLAG
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sat Sep 25 00:51:30 2010 New Revision: 48862 URL:
http://svn.reactos.org/svn/reactos?rev=48862&view=rev
Log: [DDK] - classpnp.h: Add FUNCTIONAL_DEVICE_EXTENSION, SET_FLAG, CLEAR_FLAG and TEST_FLAG Modified: trunk/reactos/include/ddk/classpnp.h Modified: trunk/reactos/include/ddk/classpnp.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/classpnp.h?rev…
============================================================================== --- trunk/reactos/include/ddk/classpnp.h [iso-8859-1] (original) +++ trunk/reactos/include/ddk/classpnp.h [iso-8859-1] Sat Sep 25 00:51:30 2010 @@ -82,6 +82,10 @@ (srb)) #endif /* ALLOCATE_SRB_FROM_POOL */ + +#define SET_FLAG(Flags, Bit) ((Flags) |= (Bit)) +#define CLEAR_FLAG(Flags, Bit) ((Flags) &= ~(Bit)) +#define TEST_FLAG(Flags, Bit) (((Flags) & (Bit)) != 0) #define CLASS_WORKING_SET_MAXIMUM 2048 @@ -577,6 +581,87 @@ PCLASS_QUERY_WMI_REGINFO_EX ClassPdoQueryWmiRegInfoEx; } CLASS_QUERY_WMI_REGINFO_EX_LIST, *PCLASS_QUERY_WMI_REGINFO_EX_LIST; +typedef struct _FUNCTIONAL_DEVICE_EXTENSION { + _ANONYMOUS_UNION union { + _ANONYMOUS_STRUCT struct { + ULONG Version; + PDEVICE_OBJECT DeviceObject; + } DUMMYSTRUCTNAME; + COMMON_DEVICE_EXTENSION CommonExtension; + } DUMMYUNIONNAME; + PDEVICE_OBJECT LowerPdo; + PSTORAGE_DEVICE_DESCRIPTOR DeviceDescriptor; + PSTORAGE_ADAPTER_DESCRIPTOR AdapterDescriptor; + DEVICE_POWER_STATE DevicePowerState; + ULONG DMByteSkew; + ULONG DMSkew; + BOOLEAN DMActive; + DISK_GEOMETRY DiskGeometry; + PSENSE_DATA SenseData; + ULONG TimeOutValue; + ULONG DeviceNumber; + ULONG SrbFlags; + ULONG ErrorCount; + LONG LockCount; + LONG ProtectedLockCount; + LONG InternalLockCount; + KEVENT EjectSynchronizationEvent; + USHORT DeviceFlags; + UCHAR SectorShift; +#if (NTDDI_VERSION >= NTDDI_VISTA) + UCHAR CdbForceUnitAccess; +#else + UCHAR ReservedByte; +#endif + PMEDIA_CHANGE_DETECTION_INFO MediaChangeDetectionInfo; + PKEVENT Unused1; + HANDLE Unused2; + FILE_OBJECT_EXTENSION KernelModeMcnContext; + ULONG MediaChangeCount; + HANDLE DeviceDirectory; + KSPIN_LOCK ReleaseQueueSpinLock; + PIRP ReleaseQueueIrp; + SCSI_REQUEST_BLOCK ReleaseQueueSrb; + BOOLEAN ReleaseQueueNeeded; + BOOLEAN ReleaseQueueInProgress; + BOOLEAN ReleaseQueueIrpFromPool; + BOOLEAN FailurePredicted; + ULONG FailureReason; + PFAILURE_PREDICTION_INFO FailurePredictionInfo; + BOOLEAN PowerDownInProgress; + ULONG EnumerationInterlock; + KEVENT ChildLock; + PKTHREAD ChildLockOwner; + ULONG ChildLockAcquisitionCount; + ULONG ScanForSpecialFlags; + KDPC PowerRetryDpc; + KTIMER PowerRetryTimer; + CLASS_POWER_CONTEXT PowerContext; + +#if (NTDDI_VERSION <= NTDDI_WIN2K) + +#if (SPVER(NTDDI_VERSION) < 2)) + ULONG_PTR Reserved1; + ULONG_PTR Reserved2; + ULONG_PTR Reserved3; + ULONG_PTR Reserved4; +#else + ULONG CompletionSuccessCount; + ULONG SavedSrbFlags; + ULONG SavedErrorCount; + ULONG_PTR Reserved1; +#endif + +#else /* (NTDDI_VERSION <= NTDDI_WIN2K) */ + + PCLASS_PRIVATE_FDO_DATA PrivateFdoData; + ULONG_PTR Reserved2; + ULONG_PTR Reserved3; + ULONG_PTR Reserved4; +#endif /* (NTDDI_VERSION <= NTDDI_WIN2K) */ + +} FUNCTIONAL_DEVICE_EXTENSION, *PFUNCTIONAL_DEVICE_EXTENSION; + SCSIPORTAPI ULONG NTAPI
14 years, 3 months
1
0
0
0
[akhaldi] 48861: [DDK] - Add missing classpnp.h
by akhaldi@svn.reactos.org
Author: akhaldi Date: Fri Sep 24 23:42:30 2010 New Revision: 48861 URL:
http://svn.reactos.org/svn/reactos?rev=48861&view=rev
Log: [DDK] - Add missing classpnp.h Added: trunk/reactos/include/ddk/classpnp.h (with props) Added: trunk/reactos/include/ddk/classpnp.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/classpnp.h?rev…
============================================================================== --- trunk/reactos/include/ddk/classpnp.h (added) +++ trunk/reactos/include/ddk/classpnp.h [iso-8859-1] Fri Sep 24 23:42:30 2010 @@ -1,0 +1,1015 @@ + +#pragma once + +#define _CLASS_ + +#include <ntdddisk.h> +#include <ntddcdrm.h> +#include <ntddtape.h> +#include <ntddscsi.h> +#include <ntddstor.h> + +#include <stdio.h> + +#include <scsi.h> + +#define DEBUG_BUFFER_LENGTH 256 + +#define SRB_CLASS_FLAGS_LOW_PRIORITY 0x10000000 +#define SRB_CLASS_FLAGS_PERSISTANT 0x20000000 +#define SRB_CLASS_FLAGS_PAGING 0x40000000 +#define SRB_CLASS_FLAGS_FREE_MDL 0x80000000 + +#define IS_CLEANUP_REQUEST(majorFunction) \ + ((majorFunction == IRP_MJ_CLOSE) || \ + (majorFunction == IRP_MJ_CLEANUP) || \ + (majorFunction == IRP_MJ_SHUTDOWN)) + +#define DO_MCD(fdoExtension) \ + (((fdoExtension)->MediaChangeDetectionInfo != NULL) && \ + ((fdoExtension)->MediaChangeDetectionInfo->MediaChangeDetectionDisableCount == 0)) + +#define IS_SCSIOP_READ(opCode) \ + ((opCode == SCSIOP_READ6) || \ + (opCode == SCSIOP_READ) || \ + (opCode == SCSIOP_READ12) || \ + (opCode == SCSIOP_READ16)) + +#define IS_SCSIOP_WRITE(opCode) \ + ((opCode == SCSIOP_WRITE6) || \ + (opCode == SCSIOP_WRITE) || \ + (opCode == SCSIOP_WRITE12) || \ + (opCode == SCSIOP_WRITE16)) + +#define IS_SCSIOP_READWRITE(opCode) (IS_SCSIOP_READ(opCode) || IS_SCSIOP_WRITE(opCode)) + +#define MAXIMUM_RETRIES 4 + +#define CLASS_DRIVER_EXTENSION_KEY ((PVOID) ClassInitialize) + +#define NO_REMOVE 0 +#define REMOVE_PENDING 1 +#define REMOVE_COMPLETE 2 + +#define ClassAcquireRemoveLock(devobj, tag) \ + ClassAcquireRemoveLockEx(devobj, tag, __FILE__, __LINE__) + +#define START_UNIT_TIMEOUT (60 * 4) + +#define MEDIA_CHANGE_DEFAULT_TIME 1 +#define MEDIA_CHANGE_TIMEOUT_TIME 300 + +#define MAXIMUM_RETRY_FOR_SINGLE_IO_IN_100NS_UNITS 0x3b9aca00 + +#ifdef ALLOCATE_SRB_FROM_POOL + +#define ClasspAllocateSrb(ext) + ExAllocatePoolWithTag(NonPagedPool, \ + sizeof(SCSI_REQUEST_BLOCK), \ + 'sBRS') + +#define ClasspFreeSrb(ext, srb) ExFreePool((srb)); + +#else /* ALLOCATE_SRB_FROM_POOL */ + +#define ClasspAllocateSrb(ext) \ + ExAllocateFromNPagedLookasideList( \ + &((ext)->CommonExtension.SrbLookasideList)) + +#define ClasspFreeSrb(ext, srb) \ + ExFreeToNPagedLookasideList( \ + &((ext)->CommonExtension.SrbLookasideList), \ + (srb)) + +#endif /* ALLOCATE_SRB_FROM_POOL */ + +#define CLASS_WORKING_SET_MAXIMUM 2048 + +#define CLASS_INTERPRET_SENSE_INFO2_MAXIMUM_HISTORY_COUNT 30000 + +#define CLASS_SPECIAL_DISABLE_SPIN_DOWN 0x00000001 +#define CLASS_SPECIAL_DISABLE_SPIN_UP 0x00000002 +#define CLASS_SPECIAL_NO_QUEUE_LOCK 0x00000008 +#define CLASS_SPECIAL_DISABLE_WRITE_CACHE 0x00000010 +#define CLASS_SPECIAL_CAUSE_NOT_REPORTABLE_HACK 0x00000020 +#if ((NTDDI_VERSION == NTDDI_WIN2KSP3) || (OSVER(NTDDI_VERSION) == NTDDI_WINXP)) +#define CLASS_SPECIAL_DISABLE_WRITE_CACHE_NOT_SUPPORTED 0x00000040 +#endif +#define CLASS_SPECIAL_MODIFY_CACHE_UNSUCCESSFUL 0x00000040 +#define CLASS_SPECIAL_FUA_NOT_SUPPORTED 0x00000080 +#define CLASS_SPECIAL_VALID_MASK 0x000000FB +#define CLASS_SPECIAL_RESERVED (~CLASS_SPECIAL_VALID_MASK) + +#define DEV_WRITE_CACHE 0x00000001 +#define DEV_USE_SCSI1 0x00000002 +#define DEV_SAFE_START_UNIT 0x00000004 +#define DEV_NO_12BYTE_CDB 0x00000008 +#define DEV_POWER_PROTECTED 0x00000010 +#define DEV_USE_16BYTE_CDB 0x00000020 + +#define GUID_CLASSPNP_QUERY_REGINFOEX {0x00e34b11, 0x2444, 0x4745, {0xa5, 0x3d, 0x62, 0x01, 0x00, 0xcd, 0x82, 0xf7}} +#define GUID_CLASSPNP_SENSEINFO2 {0x509a8c5f, 0x71d7, 0x48f6, {0x82, 0x1e, 0x17, 0x3c, 0x49, 0xbf, 0x2f, 0x18}} +#define GUID_CLASSPNP_WORKING_SET {0x105701b0, 0x9e9b, 0x47cb, {0x97, 0x80, 0x81, 0x19, 0x8a, 0xf7, 0xb5, 0x24}} + +#define DEFAULT_FAILURE_PREDICTION_PERIOD 60 * 60 * 1 + +typedef enum _MEDIA_CHANGE_DETECTION_STATE { + MediaUnknown, + MediaPresent, + MediaNotPresent, + MediaUnavailable +} MEDIA_CHANGE_DETECTION_STATE, *PMEDIA_CHANGE_DETECTION_STATE; + +typedef enum _CLASS_DEBUG_LEVEL { + ClassDebugError = 0, + ClassDebugWarning = 1, + ClassDebugTrace = 2, + ClassDebugInfo = 3, + ClassDebugMediaLocks = 8, + ClassDebugMCN = 9, + ClassDebugDelayedRetry = 10, + ClassDebugSenseInfo = 11, + ClassDebugRemoveLock = 12, + ClassDebugExternal4 = 13, + ClassDebugExternal3 = 14, + ClassDebugExternal2 = 15, + ClassDebugExternal1 = 16 +} CLASS_DEBUG_LEVEL, *PCLASS_DEBUG_LEVEL; + +typedef enum { + EventGeneration, + DataBlockCollection +} CLASSENABLEDISABLEFUNCTION; + +typedef enum { + FailurePredictionNone = 0, + FailurePredictionIoctl, + FailurePredictionSmart, + FailurePredictionSense +} FAILURE_PREDICTION_METHOD, *PFAILURE_PREDICTION_METHOD; + +typedef enum { + PowerDownDeviceInitial, + PowerDownDeviceLocked, + PowerDownDeviceStopped, + PowerDownDeviceOff, + PowerDownDeviceUnlocked +} CLASS_POWER_DOWN_STATE; + +typedef enum { + PowerDownDeviceInitial2, + PowerDownDeviceLocked2, + PowerDownDeviceFlushed2, + PowerDownDeviceStopped2, + PowerDownDeviceOff2, + PowerDownDeviceUnlocked2 +} CLASS_POWER_DOWN_STATE2; + +typedef enum { + PowerUpDeviceInitial, + PowerUpDeviceLocked, + PowerUpDeviceOn, + PowerUpDeviceStarted, + PowerUpDeviceUnlocked +} CLASS_POWER_UP_STATE; + +struct _CLASS_INIT_DATA; +typedef struct _CLASS_INIT_DATA CLASS_INIT_DATA, *PCLASS_INIT_DATA; + +struct _CLASS_PRIVATE_FDO_DATA; +typedef struct _CLASS_PRIVATE_FDO_DATA CLASS_PRIVATE_FDO_DATA, *PCLASS_PRIVATE_FDO_DATA; + +struct _CLASS_PRIVATE_PDO_DATA; +typedef struct _CLASS_PRIVATE_PDO_DATA CLASS_PRIVATE_PDO_DATA, *PCLASS_PRIVATE_PDO_DATA; + +struct _CLASS_PRIVATE_COMMON_DATA; +typedef struct _CLASS_PRIVATE_COMMON_DATA CLASS_PRIVATE_COMMON_DATA, *PCLASS_PRIVATE_COMMON_DATA; + +struct _MEDIA_CHANGE_DETECTION_INFO; +typedef struct _MEDIA_CHANGE_DETECTION_INFO MEDIA_CHANGE_DETECTION_INFO, *PMEDIA_CHANGE_DETECTION_INFO; + +struct _DICTIONARY_HEADER; +typedef struct _DICTIONARY_HEADER DICTIONARY_HEADER, *PDICTIONARY_HEADER; + +typedef struct _DICTIONARY { + ULONGLONG Signature; + PDICTIONARY_HEADER List; + KSPIN_LOCK SpinLock; +} DICTIONARY, *PDICTIONARY; + +typedef struct _CLASSPNP_SCAN_FOR_SPECIAL_INFO { + PCHAR VendorId; + PCHAR ProductId; + PCHAR ProductRevision; + ULONG_PTR Data; +} CLASSPNP_SCAN_FOR_SPECIAL_INFO, *PCLASSPNP_SCAN_FOR_SPECIAL_INFO; + +typedef VOID +(NTAPI *PCLASS_ERROR)( + PDEVICE_OBJECT DeviceObject, + PSCSI_REQUEST_BLOCK Srb, + NTSTATUS *Status, + BOOLEAN *Retry); + +typedef NTSTATUS +(NTAPI *PCLASS_ADD_DEVICE)( + PDRIVER_OBJECT DriverObject, + PDEVICE_OBJECT Pdo); + +typedef NTSTATUS +(NTAPI *PCLASS_POWER_DEVICE)( + PDEVICE_OBJECT DeviceObject, + PIRP Irp); + +typedef NTSTATUS +(NTAPI *PCLASS_START_DEVICE)( + PDEVICE_OBJECT DeviceObject); + +typedef NTSTATUS +(NTAPI *PCLASS_STOP_DEVICE)( + PDEVICE_OBJECT DeviceObject, + UCHAR Type); + +typedef NTSTATUS +(NTAPI *PCLASS_INIT_DEVICE)( + PDEVICE_OBJECT DeviceObject); + +typedef NTSTATUS +(NTAPI *PCLASS_ENUM_DEVICE)( + PDEVICE_OBJECT DeviceObject); + +typedef NTSTATUS +(NTAPI *PCLASS_READ_WRITE)( + PDEVICE_OBJECT DeviceObject, + PIRP Irp); + +typedef NTSTATUS +(NTAPI *PCLASS_DEVICE_CONTROL)( + PDEVICE_OBJECT DeviceObject, + PIRP Irp); + +typedef NTSTATUS +(NTAPI *PCLASS_SHUTDOWN_FLUSH)( + PDEVICE_OBJECT DeviceObject, + PIRP Irp); + +typedef NTSTATUS +(NTAPI *PCLASS_CREATE_CLOSE)( + PDEVICE_OBJECT DeviceObject, + PIRP Irp); + +typedef NTSTATUS +(NTAPI *PCLASS_QUERY_ID)( + PDEVICE_OBJECT DeviceObject, + BUS_QUERY_ID_TYPE IdType, + PUNICODE_STRING IdString); + +typedef NTSTATUS +(NTAPI *PCLASS_REMOVE_DEVICE)( + PDEVICE_OBJECT DeviceObject, + UCHAR Type); + +typedef VOID +(NTAPI *PCLASS_UNLOAD)( + PDRIVER_OBJECT DriverObject); + +typedef NTSTATUS +(NTAPI *PCLASS_QUERY_PNP_CAPABILITIES)( + PDEVICE_OBJECT PhysicalDeviceObject, + PDEVICE_CAPABILITIES Capabilities); + +typedef VOID +(NTAPI *PCLASS_TICK)( + PDEVICE_OBJECT DeviceObject); + +typedef NTSTATUS +(NTAPI *PCLASS_QUERY_WMI_REGINFO_EX)( + PDEVICE_OBJECT DeviceObject, + ULONG *RegFlags, + PUNICODE_STRING Name, + PUNICODE_STRING MofResouceName); + +typedef NTSTATUS +(NTAPI *PCLASS_QUERY_WMI_REGINFO)( + PDEVICE_OBJECT DeviceObject, + ULONG *RegFlags, + PUNICODE_STRING Name); + +typedef NTSTATUS +(NTAPI *PCLASS_QUERY_WMI_DATABLOCK)( + PDEVICE_OBJECT DeviceObject, + PIRP Irp, + ULONG GuidIndex, + ULONG BufferAvail, + PUCHAR Buffer); + +typedef NTSTATUS +(NTAPI *PCLASS_SET_WMI_DATABLOCK)( + PDEVICE_OBJECT DeviceObject, + PIRP Irp, + ULONG GuidIndex, + ULONG BufferSize, + PUCHAR Buffer); + +typedef NTSTATUS +(NTAPI *PCLASS_SET_WMI_DATAITEM)( + PDEVICE_OBJECT DeviceObject, + PIRP Irp, + ULONG GuidIndex, + ULONG DataItemId, + ULONG BufferSize, + PUCHAR Buffer); + +typedef NTSTATUS +(NTAPI *PCLASS_EXECUTE_WMI_METHOD)( + PDEVICE_OBJECT DeviceObject, + PIRP Irp, + ULONG GuidIndex, + ULONG MethodId, + ULONG InBufferSize, + ULONG OutBufferSize, + PUCHAR Buffer); + +typedef NTSTATUS +(NTAPI *PCLASS_WMI_FUNCTION_CONTROL)( + PDEVICE_OBJECT DeviceObject, + PIRP Irp, + ULONG GuidIndex, + CLASSENABLEDISABLEFUNCTION Function, + BOOLEAN Enable); + +typedef struct _SRB_HISTORY_ITEM { + LARGE_INTEGER TickCountSent; + LARGE_INTEGER TickCountCompleted; + ULONG MillisecondsDelayOnRetry; + SENSE_DATA NormalizedSenseData; + UCHAR SrbStatus; + UCHAR ClassDriverUse; +} SRB_HISTORY_ITEM, *PSRB_HISTORY_ITEM; + +typedef struct _SRB_HISTORY { + ULONG_PTR ClassDriverUse[4]; + ULONG TotalHistoryCount; + ULONG UsedHistoryCount; + SRB_HISTORY_ITEM History[1]; +} SRB_HISTORY, *PSRB_HISTORY; + +typedef BOOLEAN +(NTAPI *PCLASS_INTERPRET_SENSE_INFO)( + PDEVICE_OBJECT Fdo, + PIRP OriginalRequest, + PSCSI_REQUEST_BLOCK Srb, + UCHAR MajorFunctionCode, + ULONG IoDeviceCode, + ULONG PreviousRetryCount, + SRB_HISTORY *RequestHistory, + NTSTATUS *Status, + LONGLONG *RetryIn100nsUnits); + +typedef VOID +(NTAPI *PCLASS_COMPRESS_RETRY_HISTORY_DATA)( + PDEVICE_OBJECT DeviceObject, + PSRB_HISTORY RequestHistory); + +typedef struct { + GUID Guid; + ULONG InstanceCount; + ULONG Flags; +} GUIDREGINFO, *PGUIDREGINFO; + +typedef struct _CLASS_WMI_INFO { + ULONG GuidCount; + PGUIDREGINFO GuidRegInfo; + PCLASS_QUERY_WMI_REGINFO ClassQueryWmiRegInfo; + PCLASS_QUERY_WMI_DATABLOCK ClassQueryWmiDataBlock; + PCLASS_SET_WMI_DATABLOCK ClassSetWmiDataBlock; + PCLASS_SET_WMI_DATAITEM ClassSetWmiDataItem; + PCLASS_EXECUTE_WMI_METHOD ClassExecuteWmiMethod; + PCLASS_WMI_FUNCTION_CONTROL ClassWmiFunctionControl; +} CLASS_WMI_INFO, *PCLASS_WMI_INFO; + +typedef struct _CLASS_DEV_INFO { + ULONG DeviceExtensionSize; + DEVICE_TYPE DeviceType; + UCHAR StackSize; + ULONG DeviceCharacteristics; + PCLASS_ERROR ClassError; + PCLASS_READ_WRITE ClassReadWriteVerification; + PCLASS_DEVICE_CONTROL ClassDeviceControl; + PCLASS_SHUTDOWN_FLUSH ClassShutdownFlush; + PCLASS_CREATE_CLOSE ClassCreateClose; + PCLASS_INIT_DEVICE ClassInitDevice; + PCLASS_START_DEVICE ClassStartDevice; + PCLASS_POWER_DEVICE ClassPowerDevice; + PCLASS_STOP_DEVICE ClassStopDevice; + PCLASS_REMOVE_DEVICE ClassRemoveDevice; + PCLASS_QUERY_PNP_CAPABILITIES ClassQueryPnpCapabilities; + CLASS_WMI_INFO ClassWmiInfo; +} CLASS_DEV_INFO, *PCLASS_DEV_INFO; + +struct _CLASS_INIT_DATA { + ULONG InitializationDataSize; + CLASS_DEV_INFO FdoData; + CLASS_DEV_INFO PdoData; + PCLASS_ADD_DEVICE ClassAddDevice; + PCLASS_ENUM_DEVICE ClassEnumerateDevice; + PCLASS_QUERY_ID ClassQueryId; + PDRIVER_STARTIO ClassStartIo; + PCLASS_UNLOAD ClassUnload; + PCLASS_TICK ClassTick; +}; + +typedef struct _FILE_OBJECT_EXTENSION { + PFILE_OBJECT FileObject; + PDEVICE_OBJECT DeviceObject; + ULONG LockCount; + ULONG McnDisableCount; +} FILE_OBJECT_EXTENSION, *PFILE_OBJECT_EXTENSION; + +typedef struct _CLASS_WORKING_SET { + ULONG Size; + ULONG XferPacketsWorkingSetMaximum; + ULONG XferPacketsWorkingSetMinimum; +} CLASS_WORKING_SET, *PCLASS_WORKING_SET; + +typedef struct _CLASS_INTERPRET_SENSE_INFO2 { + ULONG Size; + ULONG HistoryCount; + PCLASS_COMPRESS_RETRY_HISTORY_DATA Compress; + PCLASS_INTERPRET_SENSE_INFO Interpret; +} CLASS_INTERPRET_SENSE_INFO2, *PCLASS_INTERPRET_SENSE_INFO2; + +C_ASSERT((MAXULONG - sizeof(SRB_HISTORY)) / 30000 >= sizeof(SRB_HISTORY_ITEM)); + +typedef struct _CLASS_DRIVER_EXTENSION { + UNICODE_STRING RegistryPath; + CLASS_INIT_DATA InitData; + ULONG DeviceCount; +#if (NTDDI_VERSION >= NTDDI_WINXP) + PCLASS_QUERY_WMI_REGINFO_EX ClassFdoQueryWmiRegInfoEx; + PCLASS_QUERY_WMI_REGINFO_EX ClassPdoQueryWmiRegInfoEx; +#endif +#if (NTDDI_VERSION >= NTDDI_VISTA) + REGHANDLE EtwHandle; + PDRIVER_DISPATCH DeviceMajorFunctionTable[IRP_MJ_MAXIMUM_FUNCTION + 1]; + PDRIVER_DISPATCH MpDeviceMajorFunctionTable[IRP_MJ_MAXIMUM_FUNCTION + 1]; + PCLASS_INTERPRET_SENSE_INFO2 InterpretSenseInfo; + PCLASS_WORKING_SET WorkingSet; +#endif +} CLASS_DRIVER_EXTENSION, *PCLASS_DRIVER_EXTENSION; + +typedef struct _COMMON_DEVICE_EXTENSION { + ULONG Version; + PDEVICE_OBJECT DeviceObject; + PDEVICE_OBJECT LowerDeviceObject; + struct _FUNCTIONAL_DEVICE_EXTENSION *PartitionZeroExtension; + PCLASS_DRIVER_EXTENSION DriverExtension; + LONG RemoveLock; + KEVENT RemoveEvent; + KSPIN_LOCK RemoveTrackingSpinlock; + PVOID RemoveTrackingList; + LONG RemoveTrackingUntrackedCount; + PVOID DriverData; + _ANONYMOUS_STRUCT struct { + BOOLEAN IsFdo:1; + BOOLEAN IsInitialized:1; + BOOLEAN IsSrbLookasideListInitialized:1; + } DUMMYSTRUCTNAME; + UCHAR PreviousState; + UCHAR CurrentState; + ULONG IsRemoved; + UNICODE_STRING DeviceName; + struct _PHYSICAL_DEVICE_EXTENSION *ChildList; + ULONG PartitionNumber; + LARGE_INTEGER PartitionLength; + LARGE_INTEGER StartingOffset; + PCLASS_DEV_INFO DevInfo; + ULONG PagingPathCount; + ULONG DumpPathCount; + ULONG HibernationPathCount; + KEVENT PathCountEvent; +#ifndef ALLOCATE_SRB_FROM_POOL + NPAGED_LOOKASIDE_LIST SrbLookasideList; +#endif + UNICODE_STRING MountedDeviceInterfaceName; + ULONG GuidCount; + PGUIDREGINFO GuidRegInfo; + DICTIONARY FileObjectDictionary; +#if (NTDDI_VERSION >= NTDDI_WINXP) + PCLASS_PRIVATE_COMMON_DATA PrivateCommonData; +#else + ULONG_PTR Reserved1; +#endif +#if (NTDDI_VERSION >= NTDDI_VISTA) + PDRIVER_DISPATCH *DispatchTable; +#else + ULONG_PTR Reserved2; +#endif + ULONG_PTR Reserved3; + ULONG_PTR Reserved4; +} COMMON_DEVICE_EXTENSION, *PCOMMON_DEVICE_EXTENSION; + +typedef struct _PHYSICAL_DEVICE_EXTENSION { + _ANONYMOUS_UNION union { + _ANONYMOUS_STRUCT struct { + ULONG Version; + PDEVICE_OBJECT DeviceObject; + } DUMMYSTRUCTNAME; + COMMON_DEVICE_EXTENSION CommonExtension; + } DUMMYUNIONNAME; + BOOLEAN IsMissing; + BOOLEAN IsEnumerated; +#if (NTDDI_VERSION >= NTDDI_WINXP) + PCLASS_PRIVATE_PDO_DATA PrivatePdoData; +#else + ULONG_PTR Reserved1; +#endif + ULONG_PTR Reserved2; + ULONG_PTR Reserved3; + ULONG_PTR Reserved4; +} PHYSICAL_DEVICE_EXTENSION, *PPHYSICAL_DEVICE_EXTENSION; + +struct _FAILURE_PREDICTION_INFO; +typedef struct _FAILURE_PREDICTION_INFO *PFAILURE_PREDICTION_INFO; + +typedef struct _CLASS_POWER_OPTIONS { + ULONG PowerDown:1; + ULONG LockQueue:1; + ULONG HandleSpinDown:1; + ULONG HandleSpinUp:1; + ULONG Reserved:27; +} CLASS_POWER_OPTIONS, *PCLASS_POWER_OPTIONS; + +typedef struct _CLASS_POWER_CONTEXT { + union { + CLASS_POWER_DOWN_STATE PowerDown; + CLASS_POWER_DOWN_STATE2 PowerDown2; + CLASS_POWER_UP_STATE PowerUp; + } PowerChangeState; + CLASS_POWER_OPTIONS Options; + BOOLEAN InUse; + BOOLEAN QueueLocked; + NTSTATUS FinalStatus; + ULONG RetryCount; + ULONG RetryInterval; + PIO_COMPLETION_ROUTINE CompletionRoutine; + PDEVICE_OBJECT DeviceObject; + PIRP Irp; + SCSI_REQUEST_BLOCK Srb; +} CLASS_POWER_CONTEXT, *PCLASS_POWER_CONTEXT; + +typedef struct _COMPLETION_CONTEXT { + PDEVICE_OBJECT DeviceObject; + SCSI_REQUEST_BLOCK Srb; +} COMPLETION_CONTEXT, *PCOMPLETION_CONTEXT; + +SCSIPORTAPI +ULONG +NTAPI +ClassInitialize( + PVOID Argument1, + PVOID Argument2, + PCLASS_INIT_DATA InitializationData); + +typedef struct _CLASS_QUERY_WMI_REGINFO_EX_LIST { + ULONG Size; + PCLASS_QUERY_WMI_REGINFO_EX ClassFdoQueryWmiRegInfoEx; + PCLASS_QUERY_WMI_REGINFO_EX ClassPdoQueryWmiRegInfoEx; +} CLASS_QUERY_WMI_REGINFO_EX_LIST, *PCLASS_QUERY_WMI_REGINFO_EX_LIST; + +SCSIPORTAPI +ULONG +NTAPI +ClassInitializeEx( + PDRIVER_OBJECT DriverObject, + LPGUID Guid, + PVOID Data); + +SCSIPORTAPI +NTSTATUS +NTAPI +ClassCreateDeviceObject( + PDRIVER_OBJECT DriverObject, + PCCHAR ObjectNameBuffer, + PDEVICE_OBJECT LowerDeviceObject, + BOOLEAN IsFdo, + PDEVICE_OBJECT *DeviceObject); + +SCSIPORTAPI +NTSTATUS +NTAPI +ClassReadDriveCapacity( + PDEVICE_OBJECT DeviceObject); + +SCSIPORTAPI +VOID +NTAPI +ClassReleaseQueue( + PDEVICE_OBJECT DeviceObject); + +SCSIPORTAPI +VOID +NTAPI +ClassSplitRequest( + PDEVICE_OBJECT DeviceObject, + PIRP Irp, + ULONG MaximumBytes); + +SCSIPORTAPI +NTSTATUS +NTAPI +ClassDeviceControl( + PDEVICE_OBJECT DeviceObject, + PIRP Irp); + +SCSIPORTAPI +BOOLEAN +NTAPI +ClassInterpretSenseInfo( + PDEVICE_OBJECT DeviceObject, + PSCSI_REQUEST_BLOCK Srb, + UCHAR MajorFunctionCode, + ULONG IoDeviceCode, + ULONG RetryCount, + NTSTATUS *Status, + ULONG *RetryInterval); + +VOID +NTAPI +ClassSendDeviceIoControlSynchronous( + ULONG IoControlCode, + PDEVICE_OBJECT TargetDeviceObject, + PVOID Buffer, + ULONG InputBufferLength, + ULONG OutputBufferLength, + BOOLEAN InternalDeviceIoControl, + PIO_STATUS_BLOCK IoStatus); + +SCSIPORTAPI +NTSTATUS +NTAPI +ClassSendIrpSynchronous( + PDEVICE_OBJECT TargetDeviceObject, + PIRP Irp); + +SCSIPORTAPI +NTSTATUS +NTAPI +ClassForwardIrpSynchronous( + PCOMMON_DEVICE_EXTENSION CommonExtension, + PIRP Irp); + +SCSIPORTAPI +NTSTATUS +NTAPI +ClassSendSrbSynchronous( + PDEVICE_OBJECT DeviceObject, + PSCSI_REQUEST_BLOCK Srb, + PVOID BufferAddress, + ULONG BufferLength, + BOOLEAN WriteToDevice); + +SCSIPORTAPI +NTSTATUS +NTAPI +ClassSendSrbAsynchronous( + PDEVICE_OBJECT DeviceObject, + PSCSI_REQUEST_BLOCK Srb, + PIRP Irp, + PVOID BufferAddress, + ULONG BufferLength, + BOOLEAN WriteToDevice); + +SCSIPORTAPI +NTSTATUS +NTAPI +ClassBuildRequest( + PDEVICE_OBJECT DeviceObject, + PIRP Irp); + +SCSIPORTAPI +ULONG +NTAPI +ClassModeSense( + PDEVICE_OBJECT DeviceObject, + PCHAR ModeSenseBuffer, + ULONG Length, + UCHAR PageMode); + +SCSIPORTAPI +PVOID +NTAPI +ClassFindModePage( + PCHAR ModeSenseBuffer, + ULONG Length, + UCHAR PageMode, + BOOLEAN Use6Byte); + +SCSIPORTAPI +NTSTATUS +NTAPI +ClassClaimDevice( + PDEVICE_OBJECT LowerDeviceObject, + BOOLEAN Release); + +SCSIPORTAPI +VOID +NTAPI +ClassInitializeSrbLookasideList( + PCOMMON_DEVICE_EXTENSION CommonExtension, + ULONG NumberElements); + +SCSIPORTAPI +VOID +NTAPI +ClassDeleteSrbLookasideList( + PCOMMON_DEVICE_EXTENSION CommonExtension); + +SCSIPORTAPI +ULONG +NTAPI +ClassQueryTimeOutRegistryValue( + PDEVICE_OBJECT DeviceObject); + +SCSIPORTAPI +NTSTATUS +NTAPI +ClassGetDescriptor( + PDEVICE_OBJECT DeviceObject, + PSTORAGE_PROPERTY_ID PropertyId, + PVOID *Descriptor); + +SCSIPORTAPI +VOID +NTAPI +ClassInvalidateBusRelations( + PDEVICE_OBJECT Fdo); + +SCSIPORTAPI +VOID +NTAPI +ClassMarkChildrenMissing( + PFUNCTIONAL_DEVICE_EXTENSION Fdo); + +SCSIPORTAPI +BOOLEAN +NTAPI +ClassMarkChildMissing( + PPHYSICAL_DEVICE_EXTENSION PdoExtension, + BOOLEAN AcquireChildLock); + +SCSIPORTAPI +VOID +NTAPI +ClassDebugPrint( + CLASS_DEBUG_LEVEL DebugPrintLevel, + PCCHAR DebugMessage, + ...); + +SCSIPORTAPI +PCLASS_DRIVER_EXTENSION +NTAPI +ClassGetDriverExtension( + PDRIVER_OBJECT DriverObject); + +SCSIPORTAPI +VOID +NTAPI +ClassCompleteRequest( + PDEVICE_OBJECT DeviceObject, + PIRP Irp, + CCHAR PriorityBoost); + +SCSIPORTAPI +VOID +NTAPI +ClassReleaseRemoveLock( + PDEVICE_OBJECT DeviceObject, + PIRP Tag); + +SCSIPORTAPI +ULONG +NTAPI +ClassAcquireRemoveLockEx( + PDEVICE_OBJECT DeviceObject, + PVOID Tag, + PCSTR File, + ULONG Line); + +SCSIPORTAPI +VOID +NTAPI +ClassUpdateInformationInRegistry( + PDEVICE_OBJECT Fdo, + PCHAR DeviceName, + ULONG DeviceNumber, + PINQUIRYDATA InquiryData, + ULONG InquiryDataLength); + +SCSIPORTAPI +NTSTATUS +NTAPI +ClassWmiCompleteRequest( + PDEVICE_OBJECT DeviceObject, + PIRP Irp, + NTSTATUS Status, + ULONG BufferUsed, + CCHAR PriorityBoost); + +SCSIPORTAPI +NTSTATUS +NTAPI +ClassWmiFireEvent( + PDEVICE_OBJECT DeviceObject, + LPGUID Guid, + ULONG InstanceIndex, + ULONG EventDataSize, + PVOID EventData); + +SCSIPORTAPI +VOID +NTAPI +ClassResetMediaChangeTimer( + PFUNCTIONAL_DEVICE_EXTENSION FdoExtension); + +SCSIPORTAPI +VOID +NTAPI +ClassInitializeMediaChangeDetection( + PFUNCTIONAL_DEVICE_EXTENSION FdoExtension, + PUCHAR EventPrefix); + +SCSIPORTAPI +NTSTATUS +NTAPI +ClassInitializeTestUnitPolling( + PFUNCTIONAL_DEVICE_EXTENSION FdoExtension, + BOOLEAN AllowDriveToSleep); + +SCSIPORTAPI +PVPB +NTAPI +ClassGetVpb( + PDEVICE_OBJECT DeviceObject); + +SCSIPORTAPI +NTSTATUS +NTAPI +ClassSpinDownPowerHandler( + PDEVICE_OBJECT DeviceObject, + PIRP Irp); + +NTSTATUS +NTAPI +ClassStopUnitPowerHandler( + PDEVICE_OBJECT DeviceObject, + PIRP Irp); + +NTSTATUS +NTAPI +ClassSetFailurePredictionPoll( + PFUNCTIONAL_DEVICE_EXTENSION FdoExtension, + FAILURE_PREDICTION_METHOD FailurePredictionMethod, + ULONG PollingPeriod); + +VOID +NTAPI +ClassNotifyFailurePredicted( + PFUNCTIONAL_DEVICE_EXTENSION FdoExtension, + PUCHAR Buffer, + ULONG BufferSize, + BOOLEAN LogError, + ULONG UniqueErrorValue, + UCHAR PathId, + UCHAR TargetId, + UCHAR Lun); + +SCSIPORTAPI +VOID +NTAPI +ClassAcquireChildLock( + PFUNCTIONAL_DEVICE_EXTENSION FdoExtension); + +SCSIPORTAPI +VOID +NTAPI +ClassReleaseChildLock( + PFUNCTIONAL_DEVICE_EXTENSION FdoExtension); + +VOID +NTAPI +ClassSendStartUnit( + PDEVICE_OBJECT DeviceObject); + +SCSIPORTAPI +NTSTATUS +NTAPI +ClassRemoveDevice( + PDEVICE_OBJECT DeviceObject, + UCHAR RemoveType); + +SCSIPORTAPI +VOID +NTAPI +ClassCheckMediaState( + PFUNCTIONAL_DEVICE_EXTENSION FdoExtension); + +SCSIPORTAPI +VOID +NTAPI +ClassSetMediaChangeState( + PFUNCTIONAL_DEVICE_EXTENSION FdoExtension, + MEDIA_CHANGE_DETECTION_STATE State, + BOOLEAN Wait); + +SCSIPORTAPI +VOID +NTAPI +ClassEnableMediaChangeDetection( + PFUNCTIONAL_DEVICE_EXTENSION FdoExtension); + +SCSIPORTAPI +VOID +NTAPI +ClassDisableMediaChangeDetection( + PFUNCTIONAL_DEVICE_EXTENSION FdoExtension); + +SCSIPORTAPI +VOID +NTAPI +ClassCleanupMediaChangeDetection( + PFUNCTIONAL_DEVICE_EXTENSION FdoExtension); + +VOID +NTAPI +ClassGetDeviceParameter( + PFUNCTIONAL_DEVICE_EXTENSION FdoExtension, + PWSTR SubkeyName, + PWSTR ParameterName, + PULONG ParameterValue); + +NTSTATUS +NTAPI +ClassSetDeviceParameter( + PFUNCTIONAL_DEVICE_EXTENSION FdoExtension, + PWSTR SubkeyName, + PWSTR ParameterName, + ULONG ParameterValue); + +#if (NTDDI_VERSION >= NTDDI_VISTA) + +PFILE_OBJECT_EXTENSION +NTAPI +ClassGetFsContext( + PCOMMON_DEVICE_EXTENSION CommonExtension, + PFILE_OBJECT FileObject); + +VOID +NTAPI +ClassSendNotification( + PFUNCTIONAL_DEVICE_EXTENSION FdoExtension, + const GUID *Guid, + ULONG ExtraDataSize, + PVOID ExtraData); + +#endif /* (NTDDI_VERSION >= NTDDI_VISTA) */ + +static __inline +BOOLEAN +PORT_ALLOCATED_SENSE( + PFUNCTIONAL_DEVICE_EXTENSION FdoExtension, + PSCSI_REQUEST_BLOCK Srb) +{ + return ((BOOLEAN)((TEST_FLAG(Srb->SrbFlags, SRB_FLAGS_PORT_DRIVER_ALLOCSENSE) && + TEST_FLAG(Srb->SrbFlags, SRB_FLAGS_FREE_SENSE_BUFFER)) && + (Srb->SenseInfoBuffer != FdoExtension->SenseData))); +} + +static __inline +VOID +FREE_PORT_ALLOCATED_SENSE_BUFFER( + PFUNCTIONAL_DEVICE_EXTENSION FdoExtension, + PSCSI_REQUEST_BLOCK Srb) +{ + ASSERT(TEST_FLAG(Srb->SrbFlags, SRB_FLAGS_PORT_DRIVER_ALLOCSENSE)); + ASSERT(TEST_FLAG(Srb->SrbFlags, SRB_FLAGS_FREE_SENSE_BUFFER)); + ASSERT(Srb->SenseInfoBuffer != FdoExtension->SenseData); + + ExFreePool(Srb->SenseInfoBuffer); + Srb->SenseInfoBuffer = FdoExtension->SenseData; + Srb->SenseInfoBufferLength = SENSE_BUFFER_SIZE; + CLEAR_FLAG(Srb->SrbFlags, SRB_FLAGS_FREE_SENSE_BUFFER); + return; +} + +typedef VOID +(NTAPI *PCLASS_SCAN_FOR_SPECIAL_HANDLER)( + PFUNCTIONAL_DEVICE_EXTENSION FdoExtension, + ULONG_PTR Data); + +VOID +NTAPI +ClassScanForSpecial( + PFUNCTIONAL_DEVICE_EXTENSION FdoExtension, + CLASSPNP_SCAN_FOR_SPECIAL_INFO DeviceList[], + PCLASS_SCAN_FOR_SPECIAL_HANDLER Function); Propchange: trunk/reactos/include/ddk/classpnp.h ------------------------------------------------------------------------------ svn:eol-style = native
14 years, 3 months
1
0
0
0
← Newer
1
...
6
7
8
9
10
11
12
...
28
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Results per page:
10
25
50
100
200