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
2025
January
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
May 2009
----- 2025 -----
January 2025
----- 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
27 participants
504 discussions
Start a n
N
ew thread
[janderwald] 40810: - Declare IID_IDmaChannelSlave as it is not visible when using NTDDI >= Vista
by janderwald@svn.reactos.org
Author: janderwald Date: Wed May 6 11:01:00 2009 New Revision: 40810 URL:
http://svn.reactos.org/svn/reactos?rev=40810&view=rev
Log: - Declare IID_IDmaChannelSlave as it is not visible when using NTDDI >= Vista Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/dma_slave.c trunk/reactos/drivers/wdm/audio/backpln/portcls/port_wavecyclic.c Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/dma_slave.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
============================================================================== --- trunk/reactos/drivers/wdm/audio/backpln/portcls/dma_slave.c [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/backpln/portcls/dma_slave.c [iso-8859-1] Wed May 6 11:01:00 2009 @@ -42,6 +42,7 @@ // IUnknown methods // +extern GUID IID_IDmaChannelSlave; NTSTATUS NTAPI Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/port_wavecyclic.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
============================================================================== --- trunk/reactos/drivers/wdm/audio/backpln/portcls/port_wavecyclic.c [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/backpln/portcls/port_wavecyclic.c [iso-8859-1] Wed May 6 11:01:00 2009 @@ -7,6 +7,8 @@ */ #include "private.h" + +extern GUID IID_IDmaChannelSlave; typedef struct {
15 years, 8 months
1
0
0
0
[janderwald] 40809: - Move INTERFACE_TYPE, IO_RESOURCE_DESCRIPTOR, IO_RESOURCE_REQUIREMENTS_LIST, CM_PARTIAL_RESOURCE_DESCRIPTOR to wdm.h - Fix alignment of CM_PARTIAL_RESOURCE_DESCRIPTOR - Remove typedef of PEX_RUNDOWN_REF_CACHE_AWARE, it already exists in wdm.h (verified with WinDDK7) - Fix build 1/2
by janderwald@svn.reactos.org
Author: janderwald Date: Wed May 6 10:59:40 2009 New Revision: 40809 URL:
http://svn.reactos.org/svn/reactos?rev=40809&view=rev
Log: - Move INTERFACE_TYPE, IO_RESOURCE_DESCRIPTOR, IO_RESOURCE_REQUIREMENTS_LIST, CM_PARTIAL_RESOURCE_DESCRIPTOR to wdm.h - Fix alignment of CM_PARTIAL_RESOURCE_DESCRIPTOR - Remove typedef of PEX_RUNDOWN_REF_CACHE_AWARE, it already exists in wdm.h (verified with WinDDK7) - Fix build 1/2 Modified: trunk/reactos/include/ddk/wdm.h trunk/reactos/include/ddk/winddk.h trunk/reactos/include/ndk/extypes.h Modified: trunk/reactos/include/ddk/wdm.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/wdm.h?rev=4080…
============================================================================== --- trunk/reactos/include/ddk/wdm.h [iso-8859-1] (original) +++ trunk/reactos/include/ddk/wdm.h [iso-8859-1] Wed May 6 10:59:40 2009 @@ -71,7 +71,100 @@ #define CmResourceTypePcCardConfig 130 #define CmResourceTypeMfCardConfig 131 - +typedef enum _INTERFACE_TYPE { + InterfaceTypeUndefined = -1, + Internal, + Isa, + Eisa, + MicroChannel, + TurboChannel, + PCIBus, + VMEBus, + NuBus, + PCMCIABus, + CBus, + MPIBus, + MPSABus, + ProcessorInternal, + InternalPowerBus, + PNPISABus, + PNPBus, + MaximumInterfaceType +} INTERFACE_TYPE, *PINTERFACE_TYPE; + +/* IO_RESOURCE_DESCRIPTOR.Option */ + +#define IO_RESOURCE_PREFERRED 0x01 +#define IO_RESOURCE_DEFAULT 0x02 +#define IO_RESOURCE_ALTERNATIVE 0x08 + +typedef struct _IO_RESOURCE_DESCRIPTOR { + UCHAR Option; + UCHAR Type; + UCHAR ShareDisposition; + UCHAR Spare1; + USHORT Flags; + USHORT Spare2; + union { + struct { + ULONG Length; + ULONG Alignment; + PHYSICAL_ADDRESS MinimumAddress; + PHYSICAL_ADDRESS MaximumAddress; + } Port; + struct { + ULONG Length; + ULONG Alignment; + PHYSICAL_ADDRESS MinimumAddress; + PHYSICAL_ADDRESS MaximumAddress; + } Memory; + struct { + ULONG MinimumVector; + ULONG MaximumVector; + } Interrupt; + struct { + ULONG MinimumChannel; + ULONG MaximumChannel; + } Dma; + struct { + ULONG Length; + ULONG Alignment; + PHYSICAL_ADDRESS MinimumAddress; + PHYSICAL_ADDRESS MaximumAddress; + } Generic; + struct { + ULONG Data[3]; + } DevicePrivate; + struct { + ULONG Length; + ULONG MinBusNumber; + ULONG MaxBusNumber; + ULONG Reserved; + } BusNumber; + struct { + ULONG Priority; + ULONG Reserved1; + ULONG Reserved2; + } ConfigData; + } u; +} IO_RESOURCE_DESCRIPTOR, *PIO_RESOURCE_DESCRIPTOR; + +typedef struct _IO_RESOURCE_LIST { + USHORT Version; + USHORT Revision; + ULONG Count; + IO_RESOURCE_DESCRIPTOR Descriptors[1]; +} IO_RESOURCE_LIST, *PIO_RESOURCE_LIST; + +typedef struct _IO_RESOURCE_REQUIREMENTS_LIST { + ULONG ListSize; + INTERFACE_TYPE InterfaceType; + ULONG BusNumber; + ULONG SlotNumber; + ULONG Reserved[3]; + ULONG AlternativeLists; + IO_RESOURCE_LIST List[1]; +} IO_RESOURCE_REQUIREMENTS_LIST, *PIO_RESOURCE_REQUIREMENTS_LIST; // // Global debug flag @@ -79,6 +172,81 @@ extern ULONG NtGlobalFlag; +#include <pshpack4.h> +typedef struct _CM_PARTIAL_RESOURCE_DESCRIPTOR { + UCHAR Type; + UCHAR ShareDisposition; + USHORT Flags; + union { + struct { + PHYSICAL_ADDRESS Start; + ULONG Length; + } Generic; + struct { + PHYSICAL_ADDRESS Start; + ULONG Length; + } Port; + struct { + ULONG Level; + ULONG Vector; + KAFFINITY Affinity; + } Interrupt; +#if (NTDDI_VERSION >= NTDDI_LONGHORN) + struct { + union { + struct { + USHORT Reserved; + USHORT MessageCount; + ULONG Vector; + KAFFINITY Affinity; + } Raw; + struct { + ULONG Level; + ULONG Vector; + KAFFINITY Affinity; + } Translated; + }; + } MessageInterrupt; +#endif + struct { + PHYSICAL_ADDRESS Start; + ULONG Length; + } Memory; + struct { + ULONG Channel; + ULONG Port; + ULONG Reserved1; + } Dma; + struct { + ULONG Data[3]; + } DevicePrivate; + struct { + ULONG Start; + ULONG Length; + ULONG Reserved; + } BusNumber; + struct { + ULONG DataSize; + ULONG Reserved1; + ULONG Reserved2; + } DeviceSpecificData; +#if (NTDDI_VERSION >= NTDDI_LONGHORN) + struct { + PHYSICAL_ADDRESS Start; + ULONG Length40; + } Memory40; + struct { + PHYSICAL_ADDRESS Start; + ULONG Length48; + } Memory48; + struct { + PHYSICAL_ADDRESS Start; + ULONG Length64; + } Memory64; +#endif + } u; +} CM_PARTIAL_RESOURCE_DESCRIPTOR, *PCM_PARTIAL_RESOURCE_DESCRIPTOR; +#include <poppack.h> // // Section map options @@ -2317,6 +2485,8 @@ }; } EX_RUNDOWN_REF, *PEX_RUNDOWN_REF; +typedef struct _EX_RUNDOWN_REF_CACHE_AWARE *PEX_RUNDOWN_REF_CACHE_AWARE; + typedef enum _WORK_QUEUE_TYPE { CriticalWorkQueue, DelayedWorkQueue, Modified: trunk/reactos/include/ddk/winddk.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/winddk.h?rev=4…
============================================================================== --- trunk/reactos/include/ddk/winddk.h [iso-8859-1] (original) +++ trunk/reactos/include/ddk/winddk.h [iso-8859-1] Wed May 6 10:59:40 2009 @@ -1620,107 +1620,11 @@ UCHAR DataTransferRate; } CM_FLOPPY_DEVICE_DATA, *PCM_FLOPPY_DEVICE_DATA; -typedef enum _INTERFACE_TYPE { - InterfaceTypeUndefined = -1, - Internal, - Isa, - Eisa, - MicroChannel, - TurboChannel, - PCIBus, - VMEBus, - NuBus, - PCMCIABus, - CBus, - MPIBus, - MPSABus, - ProcessorInternal, - InternalPowerBus, - PNPISABus, - PNPBus, - MaximumInterfaceType -} INTERFACE_TYPE, *PINTERFACE_TYPE; - typedef struct _PNP_BUS_INFORMATION { GUID BusTypeGuid; INTERFACE_TYPE LegacyBusType; ULONG BusNumber; } PNP_BUS_INFORMATION, *PPNP_BUS_INFORMATION; - -#include <pshpack1.h> -typedef struct _CM_PARTIAL_RESOURCE_DESCRIPTOR { - UCHAR Type; - UCHAR ShareDisposition; - USHORT Flags; - union { - struct { - PHYSICAL_ADDRESS Start; - ULONG Length; - } Generic; - struct { - PHYSICAL_ADDRESS Start; - ULONG Length; - } Port; - struct { - ULONG Level; - ULONG Vector; - KAFFINITY Affinity; - } Interrupt; -#if (NTDDI_VERSION >= NTDDI_LONGHORN) - struct { - union { - struct { - USHORT Reserved; - USHORT MessageCount; - ULONG Vector; - KAFFINITY Affinity; - } Raw; - struct { - ULONG Level; - ULONG Vector; - KAFFINITY Affinity; - } Translated; - }; - } MessageInterrupt; -#endif - struct { - PHYSICAL_ADDRESS Start; - ULONG Length; - } Memory; - struct { - ULONG Channel; - ULONG Port; - ULONG Reserved1; - } Dma; - struct { - ULONG Data[3]; - } DevicePrivate; - struct { - ULONG Start; - ULONG Length; - ULONG Reserved; - } BusNumber; - struct { - ULONG DataSize; - ULONG Reserved1; - ULONG Reserved2; - } DeviceSpecificData; -#if (NTDDI_VERSION >= NTDDI_LONGHORN) - struct { - PHYSICAL_ADDRESS Start; - ULONG Length40; - } Memory40; - struct { - PHYSICAL_ADDRESS Start; - ULONG Length48; - } Memory48; - struct { - PHYSICAL_ADDRESS Start; - ULONG Length64; - } Memory64; -#endif - } u; -} CM_PARTIAL_RESOURCE_DESCRIPTOR, *PCM_PARTIAL_RESOURCE_DESCRIPTOR; /* CM_PARTIAL_RESOURCE_DESCRIPTOR.Type */ @@ -1836,7 +1740,7 @@ ULONG ProtectedModeDataBaseAddress; } CM_PNP_BIOS_INSTALLATION_CHECK, *PCM_PNP_BIOS_INSTALLATION_CHECK; -#include <poppack.h> + typedef struct _CM_DISK_GEOMETRY_DEVICE_DATA { @@ -1962,80 +1866,6 @@ InterruptActiveHigh, InterruptActiveLow } KINTERRUPT_POLARITY, *PKINTERRUPT_POLARITY; - -/* IO_RESOURCE_DESCRIPTOR.Option */ - -#define IO_RESOURCE_PREFERRED 0x01 -#define IO_RESOURCE_DEFAULT 0x02 -#define IO_RESOURCE_ALTERNATIVE 0x08 - -typedef struct _IO_RESOURCE_DESCRIPTOR { - UCHAR Option; - UCHAR Type; - UCHAR ShareDisposition; - UCHAR Spare1; - USHORT Flags; - USHORT Spare2; - union { - struct { - ULONG Length; - ULONG Alignment; - PHYSICAL_ADDRESS MinimumAddress; - PHYSICAL_ADDRESS MaximumAddress; - } Port; - struct { - ULONG Length; - ULONG Alignment; - PHYSICAL_ADDRESS MinimumAddress; - PHYSICAL_ADDRESS MaximumAddress; - } Memory; - struct { - ULONG MinimumVector; - ULONG MaximumVector; - } Interrupt; - struct { - ULONG MinimumChannel; - ULONG MaximumChannel; - } Dma; - struct { - ULONG Length; - ULONG Alignment; - PHYSICAL_ADDRESS MinimumAddress; - PHYSICAL_ADDRESS MaximumAddress; - } Generic; - struct { - ULONG Data[3]; - } DevicePrivate; - struct { - ULONG Length; - ULONG MinBusNumber; - ULONG MaxBusNumber; - ULONG Reserved; - } BusNumber; - struct { - ULONG Priority; - ULONG Reserved1; - ULONG Reserved2; - } ConfigData; - } u; -} IO_RESOURCE_DESCRIPTOR, *PIO_RESOURCE_DESCRIPTOR; - -typedef struct _IO_RESOURCE_LIST { - USHORT Version; - USHORT Revision; - ULONG Count; - IO_RESOURCE_DESCRIPTOR Descriptors[1]; -} IO_RESOURCE_LIST, *PIO_RESOURCE_LIST; - -typedef struct _IO_RESOURCE_REQUIREMENTS_LIST { - ULONG ListSize; - INTERFACE_TYPE InterfaceType; - ULONG BusNumber; - ULONG SlotNumber; - ULONG Reserved[3]; - ULONG AlternativeLists; - IO_RESOURCE_LIST List[1]; -} IO_RESOURCE_REQUIREMENTS_LIST, *PIO_RESOURCE_REQUIREMENTS_LIST; typedef struct _IO_ERROR_LOG_PACKET { UCHAR MajorFunctionCode; Modified: trunk/reactos/include/ndk/extypes.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/extypes.h?rev=…
============================================================================== --- trunk/reactos/include/ndk/extypes.h [iso-8859-1] (original) +++ trunk/reactos/include/ndk/extypes.h [iso-8859-1] Wed May 6 10:59:40 2009 @@ -418,7 +418,7 @@ PVOID PoolToFree; ULONG RunRefSize; ULONG Number; -} EX_RUNDOWN_REF_CACHE_AWARE, *PEX_RUNDOWN_REF_CACHE_AWARE; +} EX_RUNDOWN_REF_CACHE_AWARE; // // Executive Rundown Wait Block
15 years, 8 months
1
0
0
0
[cgutman] 40808: - Implement support for IOCTL_NDIS_QUERY_GLOBAL_STATS
by cgutman@svn.reactos.org
Author: cgutman Date: Wed May 6 04:54:22 2009 New Revision: 40808 URL:
http://svn.reactos.org/svn/reactos?rev=40808&view=rev
Log: - Implement support for IOCTL_NDIS_QUERY_GLOBAL_STATS Modified: trunk/reactos/drivers/network/ndis/ndis/miniport.c Modified: trunk/reactos/drivers/network/ndis/ndis/miniport.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/ndis/ndis/…
============================================================================== --- trunk/reactos/drivers/network/ndis/ndis/miniport.c [iso-8859-1] (original) +++ trunk/reactos/drivers/network/ndis/ndis/miniport.c [iso-8859-1] Wed May 6 04:54:22 2009 @@ -2011,6 +2011,46 @@ return STATUS_SUCCESS; } +NTSTATUS +NTAPI +NdisIDeviceIoControl( + IN PDEVICE_OBJECT DeviceObject, + PIRP Irp) +{ + PLOGICAL_ADAPTER Adapter = (PLOGICAL_ADAPTER)DeviceObject->DeviceExtension; + PIO_STACK_LOCATION Stack = IoGetCurrentIrpStackLocation(Irp); + NDIS_STATUS Status = STATUS_NOT_SUPPORTED; + + Irp->IoStatus.Information = 0; + + ASSERT(Adapter); + + switch (Stack->Parameters.DeviceIoControl.IoControlCode) + { + case IOCTL_NDIS_QUERY_GLOBAL_STATS: + Status = MiniQueryInformation(Adapter, + (NDIS_OID)Irp->AssociatedIrp.SystemBuffer, + Stack->Parameters.DeviceIoControl.OutputBufferLength, + MmGetSystemAddressForMdl(Irp->MdlAddress), + &Irp->IoStatus.Information); + break; + + default: + ASSERT(FALSE); + break; + } + + if (Status != NDIS_STATUS_PENDING) + { + Irp->IoStatus.Status = Status; + IoCompleteRequest(Irp, IO_NO_INCREMENT); + } + else + IoMarkIrpPending(Irp); + + return Status; +} + NTSTATUS NTAPI @@ -2313,6 +2353,7 @@ Miniport->DriverObject->MajorFunction[IRP_MJ_PNP] = NdisIDispatchPnp; Miniport->DriverObject->MajorFunction[IRP_MJ_SHUTDOWN] = NdisIShutdown; + Miniport->DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] = NdisIDeviceIoControl; Miniport->DriverObject->DriverExtension->AddDevice = NdisIAddDevice; return NDIS_STATUS_SUCCESS; @@ -2757,6 +2798,7 @@ DriverBlock->DriverObject->MajorFunction[IRP_MJ_PNP] = NdisIDispatchPnp; DriverBlock->DriverObject->MajorFunction[IRP_MJ_SHUTDOWN] = NdisIShutdown; + DriverBlock->DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] = NdisIDeviceIoControl; DeviceBlock->DeviceObject = DeviceObject; DeviceBlock->SymbolicName = SymbolicName;
15 years, 8 months
1
0
0
0
[cgutman] 40807: - Add definition of IOCTL_NDIS_QUERY_GLOBAL_STATS
by cgutman@svn.reactos.org
Author: cgutman Date: Wed May 6 04:42:44 2009 New Revision: 40807 URL:
http://svn.reactos.org/svn/reactos?rev=40807&view=rev
Log: - Add definition of IOCTL_NDIS_QUERY_GLOBAL_STATS Modified: trunk/reactos/include/ddk/ntddndis.h Modified: trunk/reactos/include/ddk/ntddndis.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/ntddndis.h?rev…
============================================================================== --- trunk/reactos/include/ddk/ntddndis.h [iso-8859-1] (original) +++ trunk/reactos/include/ddk/ntddndis.h [iso-8859-1] Wed May 6 04:42:44 2009 @@ -173,6 +173,11 @@ #define NDIS_MINIPORT_SUPPORTS_CANCEL_SEND_PACKETS 0x00800000 #define NDIS_MINIPORT_64BITS_DMA 0x01000000 +#define IOCTL_NDIS_QUERY_GLOBAL_STATS CTL_CODE(FILE_DEVICE_PHYSICAL_NETCARD, \ + 0, \ + METHOD_OUT_DIRECT, \ + FILE_ANY_ACCESS) + #pragma pack(pop) #ifdef __cplusplus
15 years, 8 months
1
0
0
0
[cgutman] 40806: - Register the unload handler so it gets called by NDIS
by cgutman@svn.reactos.org
Author: cgutman Date: Wed May 6 03:43:18 2009 New Revision: 40806 URL:
http://svn.reactos.org/svn/reactos?rev=40806&view=rev
Log: - Register the unload handler so it gets called by NDIS Modified: trunk/reactos/drivers/network/tcpip/datalink/lan.c trunk/reactos/drivers/network/tcpip/include/lan.h Modified: trunk/reactos/drivers/network/tcpip/datalink/lan.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/tcpip/data…
============================================================================== --- trunk/reactos/drivers/network/tcpip/datalink/lan.c [iso-8859-1] (original) +++ trunk/reactos/drivers/network/tcpip/datalink/lan.c [iso-8859-1] Wed May 6 03:43:18 2009 @@ -1264,6 +1264,42 @@ FreeAdapter(Adapter); return NdisStatus; +} + +VOID +NTAPI +LANUnregisterProtocol(VOID) +/* + * FUNCTION: Unregisters this protocol driver with NDIS + * NOTES: Does not care wether we are already registered + */ +{ + TI_DbgPrint(DEBUG_DATALINK, ("Called.\n")); + + if (ProtocolRegistered) { + NDIS_STATUS NdisStatus; + PLIST_ENTRY CurrentEntry; + PLIST_ENTRY NextEntry; + PLAN_ADAPTER Current; + KIRQL OldIrql; + + TcpipAcquireSpinLock(&AdapterListLock, &OldIrql); + + /* Search the list and remove every adapter we find */ + CurrentEntry = AdapterListHead.Flink; + while (CurrentEntry != &AdapterListHead) { + NextEntry = CurrentEntry->Flink; + Current = CONTAINING_RECORD(CurrentEntry, LAN_ADAPTER, ListEntry); + /* Unregister it */ + LANUnregisterAdapter(Current); + CurrentEntry = NextEntry; + } + + TcpipReleaseSpinLock(&AdapterListLock, OldIrql); + + NdisDeregisterProtocol(&NdisStatus, NdisProtocolHandle); + ProtocolRegistered = FALSE; + } } VOID @@ -1315,6 +1351,7 @@ ProtChars.BindAdapterHandler = ProtocolBindAdapter; ProtChars.PnPEventHandler = ProtocolPnPEvent; ProtChars.UnbindAdapterHandler = ProtocolUnbindAdapter; + ProtChars.UnloadHandler = LANUnregisterProtocol; /* Try to register protocol */ NdisRegisterProtocol(&NdisStatus, @@ -1332,40 +1369,4 @@ return STATUS_SUCCESS; } - -VOID LANUnregisterProtocol( - VOID) -/* - * FUNCTION: Unregisters this protocol driver with NDIS - * NOTES: Does not care wether we are already registered - */ -{ - TI_DbgPrint(DEBUG_DATALINK, ("Called.\n")); - - if (ProtocolRegistered) { - NDIS_STATUS NdisStatus; - PLIST_ENTRY CurrentEntry; - PLIST_ENTRY NextEntry; - PLAN_ADAPTER Current; - KIRQL OldIrql; - - TcpipAcquireSpinLock(&AdapterListLock, &OldIrql); - - /* Search the list and remove every adapter we find */ - CurrentEntry = AdapterListHead.Flink; - while (CurrentEntry != &AdapterListHead) { - NextEntry = CurrentEntry->Flink; - Current = CONTAINING_RECORD(CurrentEntry, LAN_ADAPTER, ListEntry); - /* Unregister it */ - LANUnregisterAdapter(Current); - CurrentEntry = NextEntry; - } - - TcpipReleaseSpinLock(&AdapterListLock, OldIrql); - - NdisDeregisterProtocol(&NdisStatus, NdisProtocolHandle); - ProtocolRegistered = FALSE; - } -} - /* EOF */ Modified: trunk/reactos/drivers/network/tcpip/include/lan.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/tcpip/incl…
============================================================================== --- trunk/reactos/drivers/network/tcpip/include/lan.h [iso-8859-1] (original) +++ trunk/reactos/drivers/network/tcpip/include/lan.h [iso-8859-1] Wed May 6 03:43:18 2009 @@ -92,8 +92,8 @@ NTSTATUS LANRegisterProtocol( PNDIS_STRING Name); -VOID LANUnregisterProtocol( - VOID); +VOID NTAPI +LANUnregisterProtocol(VOID); VOID LANStartup(); VOID LANShutdown();
15 years, 8 months
1
0
0
0
[janderwald] 40805: - Return status code if releasing the mapping has succeeded - Fix calculation of number of tags to be allocate per irp - Fix multiple bugs when acquiring the mapping and releasing the mapping - Vortex AU8810 WDM is now starting to play
by janderwald@svn.reactos.org
Author: janderwald Date: Wed May 6 03:41:59 2009 New Revision: 40805 URL:
http://svn.reactos.org/svn/reactos?rev=40805&view=rev
Log: - Return status code if releasing the mapping has succeeded - Fix calculation of number of tags to be allocate per irp - Fix multiple bugs when acquiring the mapping and releasing the mapping - Vortex AU8810 WDM is now starting to play Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/interfaces.h trunk/reactos/drivers/wdm/audio/backpln/portcls/irpstream.c trunk/reactos/drivers/wdm/audio/backpln/portcls/pin_wavepci.c trunk/reactos/drivers/wdm/audio/backpln/portcls/port_wavepcistream.c trunk/reactos/drivers/wdm/audio/backpln/portcls/portcls.rbuild Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/interfaces.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
============================================================================== --- trunk/reactos/drivers/wdm/audio/backpln/portcls/interfaces.h [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/backpln/portcls/interfaces.h [iso-8859-1] Wed May 6 03:41:59 2009 @@ -227,7 +227,7 @@ OUT PULONG ByteCount, OUT PULONG Flags); - STDMETHOD_(VOID, ReleaseMappingWithTag)(THIS_ + STDMETHOD_(NTSTATUS, ReleaseMappingWithTag)(THIS_ IN PVOID Tag); STDMETHOD_(BOOL, HasLastMappingFailed)(THIS); @@ -518,7 +518,7 @@ IN PDEVICE_OBJECT DeviceObject) PURE; }; -typedef IPortPinWavePci *PPORTPINWAVERT; +typedef IPortPinWaveRT *PPORTPINWAVERT; #endif Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/irpstream.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
============================================================================== --- trunk/reactos/drivers/wdm/audio/backpln/portcls/irpstream.c [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/backpln/portcls/irpstream.c [iso-8859-1] Wed May 6 03:41:59 2009 @@ -56,6 +56,11 @@ IoCompleteRequest(CurMapping->Irp, IO_SOUND_INCREMENT); } + if (CurMapping->Tag) + { + FreeItem(CurMapping->Tag, TAG_PORTCLASS); + } + ExFreePool(CurMapping->Header->Data); ExFreePool(CurMapping->Header); @@ -152,14 +157,28 @@ if (This->MaxFrameSize) { - Mapping->NumTags = max((Mapping->Header->DataUsed / This->MaxFrameSize) + 1, 1); + if (This->MaxFrameSize > Mapping->Header->DataUsed) + { + /* small mapping */ + Mapping->NumTags = 1; + } + else + { + ULONG Rest = Mapping->Header->DataUsed % This->MaxFrameSize; + + Mapping->NumTags = Mapping->Header->DataUsed / This->MaxFrameSize; + if (Rest) + { + Mapping->NumTags++; + } + } Mapping->Tag = AllocateItem(NonPagedPool, sizeof(PVOID) * Mapping->NumTags, TAG_PORTCLASS); Mapping->ReferenceCount = Mapping->NumTags; } This->NumDataAvailable += Mapping->Header->DataUsed; - DPRINT("IIrpQueue_fnAddMapping NumMappings %u SizeOfMapping %lu NumDataAvailable %lu Irp %p\n", This->NumMappings, Mapping->Header->DataUsed, This->NumDataAvailable, Irp); + DPRINT("IIrpQueue_fnAddMapping NumMappings %u SizeOfMapping %lu NumDataAvailable %lu Mapping %p ReferenceCount %u FrameSize %u\n", This->NumMappings, Mapping->Header->DataUsed, This->NumDataAvailable, Mapping, Mapping->ReferenceCount, This->MaxFrameSize); ExInterlockedInsertTailList(&This->ListHead, &Mapping->Entry, &This->Lock); (void)InterlockedIncrement((volatile long*)&This->NumMappings); @@ -298,6 +317,59 @@ This->StartStream = FALSE; } + +VOID +GetMapping( + IIrpQueueImpl * This, + IN ULONG Index, + IN PVOID Tag, + IN PIRP_MAPPING CurMapping, + OUT PPHYSICAL_ADDRESS PhysicalAddress, + OUT PVOID *VirtualAddress, + OUT PULONG ByteCount, + OUT PULONG Flags) +{ + ULONG Offset; + + /* store the tag */ + This->LastTag = Tag; + + /* calculate the offset */ + if (Index) + Offset = (Index + 1) * This->MaxFrameSize; + else + Offset = 0; + + ASSERT(CurMapping->Header->DataUsed > Offset); + + *VirtualAddress = (PUCHAR)CurMapping->Header->Data + Offset; + *PhysicalAddress = MmGetPhysicalAddress(*VirtualAddress); + /* FIXME alignment */ + *ByteCount = min(CurMapping->Header->DataUsed - Offset, This->MaxFrameSize); + + /* reset out of mapping indicator */ + This->OutOfMapping = FALSE; + + /* decrement available byte counter */ + This->NumDataAvailable -= *ByteCount; + + + /* store the tag */ + if (Index) + CurMapping->Tag[Index+1] = Tag; + else + CurMapping->Tag[Index] = Tag; + + if (Index + 1 == CurMapping->NumTags - 1) + { + /* indicate end of packet */ + *Flags = 1; + } + + DPRINT("IIrpQueue_fnGetMappingWithTag Tag %p Mapping %p NumTags %u ReferenceCount %u\n", Tag, CurMapping, CurMapping->NumTags, CurMapping->ReferenceCount); + +} + NTSTATUS NTAPI @@ -310,14 +382,12 @@ OUT PULONG Flags) { PIRP_MAPPING CurMapping; - PIRP_MAPPING Result; PLIST_ENTRY CurEntry; ULONG Index; - ULONG Offset; IIrpQueueImpl * This = (IIrpQueueImpl*)iface; *Flags = 0; - Result = NULL; + ASSERT(This->MaxFrameSize); KeAcquireSpinLockAtDpcLevel(&This->Lock); @@ -326,60 +396,61 @@ { KeReleaseSpinLockFromDpcLevel(&This->Lock); This->OutOfMapping = TRUE; + This->StartStream = FALSE; return STATUS_UNSUCCESSFUL; } - while (CurEntry != &This->ListHead) { CurMapping = CONTAINING_RECORD(CurEntry, IRP_MAPPING, Entry); for(Index = 0; Index < CurMapping->NumTags; Index++) { + /* first stream mapping */ + if (This->LastTag == NULL) + { + ASSERT(Index == 0); + GetMapping(This, Index, Tag, CurMapping, PhysicalAddress, VirtualAddress, ByteCount, Flags); + KeReleaseSpinLockFromDpcLevel(&This->Lock); + return STATUS_SUCCESS; + } + if (CurMapping->Tag[Index] == This->LastTag) { + ASSERT(Index); if (Index + 1 < CurMapping->NumTags) { - CurMapping->Tag[Index+1] = Tag; - Result = CurMapping; - - if (Index + 1 == CurMapping->NumTags - 1) - { - /* indicate end of packet */ - *Flags = 1; - } - Offset = (Index + 1) * This->MaxFrameSize; - ASSERT(Result->Header->DataUsed > Offset); - *VirtualAddress = (PUCHAR)Result->Header->Data + Offset; - *PhysicalAddress = MmGetPhysicalAddress(*VirtualAddress); - *ByteCount = min(Result->Header->DataUsed - Offset, This->MaxFrameSize); - break; + /* found a free mapping within audio irp */ + GetMapping(This, Index, Tag, CurMapping, PhysicalAddress, VirtualAddress, ByteCount, Flags); + KeReleaseSpinLockFromDpcLevel(&This->Lock); + return STATUS_SUCCESS; } + /* last tag was at at last mapping, iterate to next audio irp */ CurEntry = CurEntry->Flink; if (&This->ListHead == CurEntry) { + /* no more items available */ This->OutOfMapping = TRUE; + This->StartStream = FALSE; KeReleaseSpinLockFromDpcLevel(&This->Lock); return STATUS_UNSUCCESSFUL; } - Result = CONTAINING_RECORD(CurEntry, IRP_MAPPING, Entry); - Result->Tag[0] = Tag; - *VirtualAddress = (PUCHAR)Result->Header->Data; - *PhysicalAddress = MmGetPhysicalAddress(*VirtualAddress); - *ByteCount = min(Result->Header->DataUsed, This->MaxFrameSize); - break; + + CurMapping = CONTAINING_RECORD(CurEntry, IRP_MAPPING, Entry); + GetMapping(This, 0, Tag, CurMapping, PhysicalAddress, VirtualAddress, ByteCount, Flags); + KeReleaseSpinLockFromDpcLevel(&This->Lock); + return STATUS_SUCCESS; } } CurEntry = CurEntry->Flink; } - KeReleaseSpinLockFromDpcLevel(&This->Lock); - This->LastTag = Tag; - This->OutOfMapping = FALSE; - return STATUS_SUCCESS; -} - -VOID + This->OutOfMapping = TRUE; + This->StartStream = FALSE; + return STATUS_UNSUCCESSFUL; +} + +NTSTATUS NTAPI IIrpQueue_fnReleaseMappingWithTag( IN IIrpQueue *iface, @@ -388,40 +459,55 @@ PIRP_MAPPING CurMapping; PLIST_ENTRY CurEntry; ULONG Index; - IIrpQueueImpl * This = (IIrpQueueImpl*)iface; - - KeAcquireSpinLockAtDpcLevel(&This->Lock); - CurEntry = This->ListHead.Flink; - - while (CurEntry != &This->ListHead) - { - CurMapping = CONTAINING_RECORD(CurEntry, IRP_MAPPING, Entry); - for(Index = 0; Index < CurMapping->NumTags; Index++) + ULONG Found; + IIrpQueueImpl * This = (IIrpQueueImpl*)iface; + + ASSERT(This->MaxFrameSize); + + DPRINT("IIrpQueue_fnReleaseMappingWithTag Tag %p\n", Tag); + + CurEntry = ExInterlockedRemoveHeadList(&This->ListHead, &This->Lock); + + if (!CurEntry) + { + DPRINT("Empty List while releasing mapping!\n"); + return STATUS_UNSUCCESSFUL; + } + + CurMapping = CONTAINING_RECORD(CurEntry, IRP_MAPPING, Entry); + Found = FALSE; + + for(Index = 0; Index < CurMapping->NumTags; Index++) + { + if (CurMapping->Tag[Index] == Tag) { - if (CurMapping->Tag[Index] == Tag) - { - CurMapping->ReferenceCount--; - if (!CurMapping->ReferenceCount) - { - RemoveEntryList(&CurMapping->Entry); - if (CurMapping->Irp) - { - CurMapping->Irp->IoStatus.Information = CurMapping->Header->FrameExtent; - CurMapping->Irp->IoStatus.Status = STATUS_SUCCESS; - IoCompleteRequest(CurMapping->Irp, IO_SOUND_INCREMENT); - } - ExFreePool(CurMapping->Header->Data); - ExFreePool(CurMapping->Header); - ExFreePool(CurMapping->Tag); - ExFreePool(CurMapping); - } - break; - } + CurMapping->Tag[Index] = NULL; + InterlockedDecrement((PLONG)&CurMapping->ReferenceCount); + Found = TRUE; + break; } - CurEntry = CurEntry->Flink; - } - - KeReleaseSpinLockFromDpcLevel(&This->Lock); + } + + if (!Found) + { + DPRINT("Tag %p not in first mapping %p\n", Tag, CurMapping); + ExInterlockedInsertHeadList(&This->ListHead, &CurMapping->Entry, &This->Lock); + return STATUS_UNSUCCESSFUL; + } + + if (!CurMapping->ReferenceCount) + { + DPRINT("Freeing mapping %p\n", CurMapping); + InterlockedDecrement(&This->NumMappings); + FreeMappingRoutine(CurMapping); + } + else + { + /* insert item back into list as it still has references */ + ExInterlockedInsertHeadList(&This->ListHead, &CurMapping->Entry, &This->Lock); + } + + return STATUS_SUCCESS; } BOOL Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/pin_wavepci.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
============================================================================== --- trunk/reactos/drivers/wdm/audio/backpln/portcls/pin_wavepci.c [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/backpln/portcls/pin_wavepci.c [iso-8859-1] Wed May 6 03:41:59 2009 @@ -202,9 +202,7 @@ ASSERT_IRQL(DISPATCH_LEVEL); Status = This->Stream->lpVtbl->GetPosition(This->Stream, &Position); - DPRINT("Position %ull Status %x\n", Position, Status); - - This->Stream->lpVtbl->Service(This->Stream); + DPRINT("Position %llu Status %x\n", Position, Status); } static IServiceSinkVtbl vt_IServiceSink = Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/port_wavepcistream.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
============================================================================== --- trunk/reactos/drivers/wdm/audio/backpln/portcls/port_wavepcistream.c [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/backpln/portcls/port_wavepcistream.c [iso-8859-1] Wed May 6 03:41:59 2009 @@ -86,12 +86,9 @@ OUT PULONG Flags) { IPortWavePciStreamImpl * This = (IPortWavePciStreamImpl*)iface; - NTSTATUS Status; + ASSERT_IRQL(DISPATCH_LEVEL); - Status = This->Queue->lpVtbl->GetMappingWithTag(This->Queue, Tag, PhysicalAddress, VirtualAddress, ByteCount, Flags); - - DPRINT("IPortWavePciStream_fnGetMapping Tag %p Status %x\n", Tag, Status); - return Status; + return This->Queue->lpVtbl->GetMappingWithTag(This->Queue, Tag, PhysicalAddress, VirtualAddress, ByteCount, Flags); } static @@ -104,9 +101,7 @@ IPortWavePciStreamImpl * This = (IPortWavePciStreamImpl*)iface; ASSERT_IRQL(DISPATCH_LEVEL); - DPRINT("IPortWavePciStream_fnReleaseMapping Tag %p\n", Tag); - This->Queue->lpVtbl->ReleaseMappingWithTag(This->Queue, Tag); - return STATUS_SUCCESS; + return This->Queue->lpVtbl->ReleaseMappingWithTag(This->Queue, Tag); } static @@ -117,7 +112,6 @@ { UNIMPLEMENTED ASSERT_IRQL(DISPATCH_LEVEL); - DPRINT("IPortWavePciStream_fnTerminatePacket\n"); return STATUS_SUCCESS; } Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/portcls.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
============================================================================== --- trunk/reactos/drivers/wdm/audio/backpln/portcls/portcls.rbuild [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/backpln/portcls/portcls.rbuild [iso-8859-1] Wed May 6 03:41:59 2009 @@ -3,6 +3,7 @@ <module name="portcls" type="kernelmodedriver" installbase="system32/drivers" installname="portcls.sys" entrypoint="0"> <importlibrary definition="portcls.spec" /> <define name="PC_NO_IMPORTS" /> + <redefine name="_WIN32_WINNT">0x600</redefine> <include base="portcls">../include</include> <library>ntoskrnl</library> <library>ks</library> @@ -10,39 +11,43 @@ <library>rtl</library> <library>hal</library> <library>libcntpr</library> + <file>adapter.c</file> <file>api.c</file> <file>connection.c</file> <file>dispatcher.c</file> <file>dll.c</file> <file>dma_slave.c</file> + <file>drm.c</file> <file>drm_port.c</file> - <file>adapter.c</file> <file>filter_wavecyclic.c</file> <file>filter_wavepci.c</file> + <file>filter_wavert.c</file> <file>guids.c</file> + <file>interrupt.c</file> <file>irp.c</file> <file>irpstream.c</file> - <file>interrupt.c</file> - <file>drm.c</file> - <file>undoc.c</file> - <file>resource.c</file> - <file>registry.c</file> - <file>service_group.c</file> + <file>miniport.c</file> + <file>miniport_dmus.c</file> + <file>miniport_fmsynth.c</file> <file>pin_wavecyclic.c</file> <file>pin_wavepci.c</file> + <file>pin_wavert.c</file> <file>pool.c</file> <file>port.c</file> - <file>power.c</file> <file>port_dmus.c</file> <file>port_midi.c</file> <file>port_topology.c</file> + <file>port_wavecyclic.c</file> <file>port_wavepci.c</file> - <file>port_wavecyclic.c</file> <file>port_wavepcistream.c</file> + <file>port_wavert.c</file> + <file>port_wavertstream.c</file> + <file>power.c</file> <file>propertyhandler.c</file> - <file>miniport.c</file> - <file>miniport_dmus.c</file> - <file>miniport_fmsynth.c</file> + <file>registry.c</file> + <file>resource.c</file> + <file>service_group.c</file> + <file>undoc.c</file> <file>version.c</file> <file>portcls.rc</file> </module>
15 years, 8 months
1
0
0
0
[cgutman] 40804: - Implement and register a ProtocolUnbindAdapter handler
by cgutman@svn.reactos.org
Author: cgutman Date: Wed May 6 02:40:49 2009 New Revision: 40804 URL:
http://svn.reactos.org/svn/reactos?rev=40804&view=rev
Log: - Implement and register a ProtocolUnbindAdapter handler Modified: trunk/reactos/drivers/network/tcpip/datalink/lan.c Modified: trunk/reactos/drivers/network/tcpip/datalink/lan.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/tcpip/data…
============================================================================== --- trunk/reactos/drivers/network/tcpip/datalink/lan.c [iso-8859-1] (original) +++ trunk/reactos/drivers/network/tcpip/datalink/lan.c [iso-8859-1] Wed May 6 02:40:49 2009 @@ -1266,6 +1266,16 @@ return NdisStatus; } +VOID +NTAPI +ProtocolUnbindAdapter( + PNDIS_STATUS Status, + NDIS_HANDLE ProtocolBindingContext, + NDIS_HANDLE UnbindContext) +{ + /* We don't pend any unbinding so we can just ignore UnbindContext */ + *Status = LANUnregisterAdapter((PLAN_ADAPTER)ProtocolBindingContext); +} NTSTATUS LANRegisterProtocol( PNDIS_STRING Name) @@ -1304,6 +1314,7 @@ ProtChars.StatusCompleteHandler = ProtocolStatusComplete; ProtChars.BindAdapterHandler = ProtocolBindAdapter; ProtChars.PnPEventHandler = ProtocolPnPEvent; + ProtChars.UnbindAdapterHandler = ProtocolUnbindAdapter; /* Try to register protocol */ NdisRegisterProtocol(&NdisStatus,
15 years, 8 months
1
0
0
0
[cgutman] 40803: - Add and register a ProtocolPnPEvent handler with some stubs in it
by cgutman@svn.reactos.org
Author: cgutman Date: Wed May 6 02:24:26 2009 New Revision: 40803 URL:
http://svn.reactos.org/svn/reactos?rev=40803&view=rev
Log: - Add and register a ProtocolPnPEvent handler with some stubs in it Modified: trunk/reactos/drivers/network/tcpip/datalink/lan.c Modified: trunk/reactos/drivers/network/tcpip/datalink/lan.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/tcpip/data…
============================================================================== --- trunk/reactos/drivers/network/tcpip/datalink/lan.c [iso-8859-1] (original) +++ trunk/reactos/drivers/network/tcpip/datalink/lan.c [iso-8859-1] Wed May 6 02:24:26 2009 @@ -514,6 +514,34 @@ } } +NDIS_STATUS NTAPI +ProtocolPnPEvent( + NDIS_HANDLE NdisBindingContext, + PNET_PNP_EVENT PnPEvent) +{ + switch(PnPEvent->NetEvent) + { + case NetEventSetPower: + DbgPrint("Device transitioned to power state %ld\n", PnPEvent->Buffer); + return NDIS_STATUS_SUCCESS; + + case NetEventQueryPower: + DbgPrint("Device wants to go into power state %ld\n", PnPEvent->Buffer); + return NDIS_STATUS_SUCCESS; + + case NetEventQueryRemoveDevice: + DbgPrint("Device is about to be removed\n"); + return NDIS_STATUS_SUCCESS; + + case NetEventCancelRemoveDevice: + DbgPrint("Device removal cancelled\n"); + return NDIS_STATUS_SUCCESS; + + default: + DbgPrint("Unhandled event type: %ld\n", PnPEvent->NetEvent); + return NDIS_STATUS_SUCCESS; + } +} VOID NTAPI ProtocolStatusComplete( NDIS_HANDLE NdisBindingContext) @@ -1275,6 +1303,7 @@ ProtChars.StatusHandler = ProtocolStatus; ProtChars.StatusCompleteHandler = ProtocolStatusComplete; ProtChars.BindAdapterHandler = ProtocolBindAdapter; + ProtChars.PnPEventHandler = ProtocolPnPEvent; /* Try to register protocol */ NdisRegisterProtocol(&NdisStatus,
15 years, 8 months
1
0
0
0
[gedmurphy] 40802: Rewrite, the last method of getting service dependants and dependent services was flawed/buggy.
by gedmurphy@svn.reactos.org
Author: gedmurphy Date: Wed May 6 02:04:19 2009 New Revision: 40802 URL:
http://svn.reactos.org/svn/reactos?rev=40802&view=rev
Log: Rewrite, the last method of getting service dependants and dependent services was flawed/buggy. Modified: trunk/reactos/base/applications/mscutils/servman/dependencies.c trunk/reactos/base/applications/mscutils/servman/precomp.h trunk/reactos/base/applications/mscutils/servman/propsheet_depends.c trunk/reactos/base/applications/mscutils/servman/stop.c Modified: trunk/reactos/base/applications/mscutils/servman/dependencies.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
============================================================================== --- trunk/reactos/base/applications/mscutils/servman/dependencies.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/mscutils/servman/dependencies.c [iso-8859-1] Wed May 6 02:04:19 2009 @@ -9,8 +9,78 @@ #include "precomp.h" + +/* + * Services which depend on the given service. + * The return components depend on this service + */ +LPTSTR +GetDependentServices(SC_HANDLE hService) +{ + LPQUERY_SERVICE_CONFIG lpServiceConfig; + LPTSTR lpStr = NULL; + DWORD bytesNeeded; + DWORD bytes; + + if (!QueryServiceConfig(hService, + NULL, + 0, + &bytesNeeded) && + GetLastError() == ERROR_INSUFFICIENT_BUFFER) + { + lpServiceConfig = HeapAlloc(ProcessHeap, + 0, + bytesNeeded); + if (lpServiceConfig) + { + if (QueryServiceConfig(hService, + lpServiceConfig, + bytesNeeded, + &bytesNeeded)) + { + if (lpServiceConfig) + { + lpStr = lpServiceConfig->lpDependencies; + bytes = 0; + + while (TRUE) + { + bytes++; + + if (!*lpStr && !*(lpStr + 1)) + { + bytes++; + break; + } + + lpStr++; + } + + bytes *= sizeof(TCHAR); + lpStr = HeapAlloc(ProcessHeap, + 0, + bytes); + if (lpStr) + { + CopyMemory(lpStr, + lpServiceConfig->lpDependencies, + bytes); + } + } + } + } + } + + return lpStr; +} + + +/* + * Services which the given service depends on (1st treeview) + * The service depends on the return components + */ LPENUM_SERVICE_STATUS -GetDependentServices(SC_HANDLE hService, +GetServiceDependents(SC_HANDLE hService, LPDWORD lpdwCount) { LPENUM_SERVICE_STATUS lpDependencies; @@ -150,7 +220,7 @@ } /* Get the list of dependencies */ - lpDependencies = GetDependentServices(pStopInfo->hMainService, &dwCount); + lpDependencies = GetServiceDependents(pStopInfo->hMainService, &dwCount); if (lpDependencies) { LPENUM_SERVICE_STATUS lpEnumServiceStatus; Modified: trunk/reactos/base/applications/mscutils/servman/precomp.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
============================================================================== --- trunk/reactos/base/applications/mscutils/servman/precomp.h [iso-8859-1] (original) +++ trunk/reactos/base/applications/mscutils/servman/precomp.h [iso-8859-1] Wed May 6 02:04:19 2009 @@ -106,9 +106,10 @@ BOOL GetServiceList(PMAIN_WND_INFO Info, DWORD *NumServices); /* dependencies */ -LPENUM_SERVICE_STATUS GetDependentServices(SC_HANDLE hService, LPDWORD lpdwCount); +LPENUM_SERVICE_STATUS GetServiceDependents(SC_HANDLE hService, LPDWORD lpdwCount); BOOL HasDependentServices(SC_HANDLE hService); INT_PTR CALLBACK StopDependsDialogProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam); +LPTSTR GetDependentServices(SC_HANDLE hService); /* propsheet.c */ typedef struct _SERVICEPROPSHEET Modified: trunk/reactos/base/applications/mscutils/servman/propsheet_depends.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
============================================================================== --- trunk/reactos/base/applications/mscutils/servman/propsheet_depends.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/mscutils/servman/propsheet_depends.c [iso-8859-1] Wed May 6 02:04:19 2009 @@ -61,7 +61,6 @@ LPQUERY_SERVICE_CONFIG lpServiceConfig; SC_HANDLE hService; HTREEITEM hChild; - DWORD bytesNeeded; LPTSTR lpStr; LPTSTR lpNoDepends; @@ -71,75 +70,54 @@ if (hService) { - if (!QueryServiceConfig(hService, - NULL, - 0, - &bytesNeeded) && - GetLastError() == ERROR_INSUFFICIENT_BUFFER) - { - lpServiceConfig = HeapAlloc(ProcessHeap, - 0, - bytesNeeded); - if (lpServiceConfig) - { - if (QueryServiceConfig(hService, - lpServiceConfig, - bytesNeeded, - &bytesNeeded)) + lpStr = GetDependentServices(hService); + if (lpStr) + { + while (*lpStr) + { + hChild = AddItemToTreeView(hTreeView, + hParent, + lpServiceConfig->lpDisplayName, + lpServiceConfig->dwServiceType); + + + AddServiceDependency(dlgInfo, + hTreeView, + hSCManager, + lpStr, + hChild, + hwndDlg); + + while (*lpStr++) + ; + } + } + else + { + if (TreeView_GetCount(hTreeView) == 0) + { + if (AllocAndLoadString(&lpNoDepends, hInstance, IDS_NO_DEPENDS)) { - if (lpServiceConfig) - { - lpStr = lpServiceConfig->lpDependencies; - - if (*lpStr) - { - while (*lpStr) - { - hChild = AddItemToTreeView(hTreeView, - hParent, - lpServiceConfig->lpDisplayName, - lpServiceConfig->dwServiceType); - - AddServiceDependency(dlgInfo, - hTreeView, - hSCManager, - lpStr, - hChild, - hwndDlg); - - while (*lpStr++) - ; - } - } - else - { - if (TreeView_GetCount(hTreeView) == 0) - { - if (AllocAndLoadString(&lpNoDepends, hInstance, IDS_NO_DEPENDS)) - { - lpStr = lpNoDepends; - } - - AddItemToTreeView(hTreeView, - hParent, - lpStr, - 0); - - HeapFree(ProcessHeap, - 0, - lpNoDepends); - - EnableWindow(hTreeView, FALSE); - } - } - } + lpStr = lpNoDepends; } + + AddItemToTreeView(hTreeView, + hParent, + lpStr, + 0); HeapFree(ProcessHeap, 0, - lpServiceConfig); - } - } + lpNoDepends); + + EnableWindow(hTreeView, FALSE); + } + } + + + HeapFree(ProcessHeap, + 0, + lpStr); CloseServiceHandle(hService); } @@ -147,68 +125,95 @@ } static VOID -AddServiceDependent(PSERVICEPROPSHEET dlgInfo, - HWND hTreeView, +AddServiceDependent(HWND hTreeView, + HTREEITEM hParent, SC_HANDLE hSCManager, LPTSTR lpServiceName, - HTREEITEM hParent, - HWND hwndDlg) + LPTSTR lpDisplayName, + DWORD dwServiceType) { LPENUM_SERVICE_STATUS lpServiceStatus; - SC_HANDLE hService; - HTREEITEM hChild; - LPTSTR lpNoDepends; + SC_HANDLE hChildService; + HTREEITEM hChildNode; DWORD count; INT i; - hService = OpenService(hSCManager, - lpServiceName, - SERVICE_QUERY_STATUS | SERVICE_ENUMERATE_DEPENDENTS); - if (hService) - { - lpServiceStatus = GetDependentServices(hService, &count); + + hChildNode = AddItemToTreeView(hTreeView, + hParent, + lpDisplayName, + dwServiceType); + + hChildService = OpenService(hSCManager, + lpServiceName, + SERVICE_QUERY_STATUS | SERVICE_ENUMERATE_DEPENDENTS); + if (hChildService) + { + lpServiceStatus = GetServiceDependents(hChildService, &count); if (lpServiceStatus) { for (i = 0; i < count; i++) { - hChild = AddItemToTreeView(hTreeView, - hParent, - lpServiceStatus[i].lpDisplayName, - SERVICE_WIN32); - - AddServiceDependent(dlgInfo, - hTreeView, + AddServiceDependent(hTreeView, + hChildNode, hSCManager, lpServiceStatus[i].lpServiceName, - hChild, - hwndDlg); + lpServiceStatus[i].lpDisplayName, + lpServiceStatus[i].ServiceStatus.dwServiceType); } HeapFree(ProcessHeap, 0, lpServiceStatus); } - else - { - if (TreeView_GetCount(hTreeView) == 0) - { - AllocAndLoadString(&lpNoDepends, hInstance, IDS_NO_DEPENDS); - - AddItemToTreeView(hTreeView, - hParent, - lpNoDepends, - 0); - - HeapFree(ProcessHeap, - 0, - lpNoDepends); - - EnableWindow(hTreeView, FALSE); - } - } - } -} - + + CloseServiceHandle(hChildService); + } +} + +static VOID +SetServiceDependents(HWND hTreeView, + SC_HANDLE hSCManager, + SC_HANDLE hService) +{ + LPENUM_SERVICE_STATUS lpServiceStatus; + LPTSTR lpNoDepends; + DWORD count, i; + + lpServiceStatus = GetServiceDependents(hService, &count); + if (lpServiceStatus) + { + for (i = 0; i < count; i++) + { + AddServiceDependent(hTreeView, + NULL, + hSCManager, + lpServiceStatus[i].lpServiceName, + lpServiceStatus[i].lpDisplayName, + lpServiceStatus[i].ServiceStatus.dwServiceType); + } + } + else + { + AllocAndLoadString(&lpNoDepends, hInstance, IDS_NO_DEPENDS); + + AddItemToTreeView(hTreeView, + NULL, + lpNoDepends, + 0); + + HeapFree(ProcessHeap, + 0, + lpNoDepends); + + EnableWindow(hTreeView, FALSE); + } +} + +static VOID +SetDependentServices(SC_HANDLE hService) +{ +} static VOID InitDependPage(PSERVICEPROPSHEET dlgInfo, @@ -216,6 +221,7 @@ { HWND hTreeView1, hTreeView2; SC_HANDLE hSCManager; + SC_HANDLE hService; dlgInfo->hDependsImageList = InitImageList(IDI_NODEPENDS, IDI_DRIVER, @@ -245,19 +251,21 @@ SC_MANAGER_ALL_ACCESS); if (hSCManager) { - AddServiceDependency(dlgInfo, - hTreeView1, - hSCManager, - dlgInfo->pService->lpServiceName, - NULL, - hwndDlg); - - AddServiceDependent(dlgInfo, - hTreeView2, - hSCManager, - dlgInfo->pService->lpServiceName, - NULL, - hwndDlg); + hService = OpenService(hSCManager, + dlgInfo->pService->lpServiceName, + SERVICE_QUERY_STATUS | SERVICE_ENUMERATE_DEPENDENTS | SERVICE_QUERY_CONFIG); + if (hService) + { + /* Set the first tree view */ + SetServiceDependents(hTreeView1, + hSCManager, + hService); + + /* Set the second tree view */ + SetDependentServices(hService); + + CloseServiceHandle(hService); + } CloseServiceHandle(hSCManager); } Modified: trunk/reactos/base/applications/mscutils/servman/stop.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
============================================================================== --- trunk/reactos/base/applications/mscutils/servman/stop.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/mscutils/servman/stop.c [iso-8859-1] Wed May 6 02:04:19 2009 @@ -76,7 +76,7 @@ DWORD dwCount; BOOL bRet = FALSE; - lpDependencies = GetDependentServices(hService, &dwCount); + lpDependencies = GetServiceDependents(hService, &dwCount); if (lpDependencies) { LPENUM_SERVICE_STATUS lpEnumServiceStatus;
15 years, 8 months
1
0
0
0
[dgoette] 407: * run through the whole dependency list while updating entries, instead of just the first one * output the language code instead of id
by dgoette@svn.reactos.org
Author: dgoette Date: Wed May 6 01:57:42 2009 New Revision: 407 URL:
http://svn.reactos.org/svn/reactos?rev=407&view=rev
Log: * run through the whole dependency list while updating entries, instead of just the first one * output the language code instead of id Modified:
branches/danny-web/www/www.reactos.org/roscms/lib/om/Generate.class.php
Modified:
branches/danny-web/www/www.reactos.org/roscms/lib/om/Generate.class.php
URL:
http://svn.reactos.org/svn/reactos/branches/danny-web/www/www.reactos.org/r…
============================================================================== ---
branches/danny-web/www/www.reactos.org/roscms/lib/om/Generate.class.php
[iso-8859-1] (original) +++
branches/danny-web/www/www.reactos.org/roscms/lib/om/Generate.class.php
[iso-8859-1] Wed May 6 01:57:42 2009 @@ -208,7 +208,7 @@ $file_name = $data_name.'.'.$file_extension; // information, what was generated - echo $this->lang_id.'--'.$file_name.'<br />'; + echo $this->lang.'--'.$file_name.'<br />'; // needed by replacing functions $this->page_name = $data_name; @@ -281,7 +281,7 @@ $file_name = $data_name.'_'.$i.'.'.$file_extension; // information, what was generated - echo $this->lang_id.'--'.$file_name.'<br />'; + echo $this->lang.'--'.$file_name.'<br />'; // needed by replacing functions $this->page_name = $data_name; @@ -393,9 +393,7 @@ // only run update once per $rev_id if ($dependency['type'] != 'script') { - $this->update($dependency['id'], $dynamic_num); - break; } } // end while dependency
15 years, 8 months
1
0
0
0
← Newer
1
...
42
43
44
45
46
47
48
...
51
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
Results per page:
10
25
50
100
200