Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
94037f90
Commit
94037f90
authored
Apr 10, 2021
by
Zebediah Figura
Committed by
Alexandre Julliard
Apr 12, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntoskrnl: Do not send power IRPs on device start and removal.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
48b2e67d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
28 deletions
+0
-28
pnp.c
dlls/ntoskrnl.exe/pnp.c
+0
-28
No files found.
dlls/ntoskrnl.exe/pnp.c
View file @
94037f90
...
...
@@ -141,30 +141,6 @@ static NTSTATUS get_device_instance_id( DEVICE_OBJECT *device, WCHAR *buffer )
return
STATUS_SUCCESS
;
}
static
void
send_power_irp
(
DEVICE_OBJECT
*
device
,
DEVICE_POWER_STATE
power
)
{
IO_STATUS_BLOCK
irp_status
;
IO_STACK_LOCATION
*
irpsp
;
KEVENT
event
;
IRP
*
irp
;
device
=
IoGetAttachedDevice
(
device
);
KeInitializeEvent
(
&
event
,
NotificationEvent
,
FALSE
);
if
(
!
(
irp
=
IoBuildSynchronousFsdRequest
(
IRP_MJ_POWER
,
device
,
NULL
,
0
,
NULL
,
&
event
,
&
irp_status
)))
return
;
irpsp
=
IoGetNextIrpStackLocation
(
irp
);
irpsp
->
MinorFunction
=
IRP_MN_SET_POWER
;
irpsp
->
Parameters
.
Power
.
Type
=
DevicePowerState
;
irpsp
->
Parameters
.
Power
.
State
.
DeviceState
=
power
;
irp
->
IoStatus
.
u
.
Status
=
STATUS_NOT_SUPPORTED
;
if
(
IoCallDriver
(
device
,
irp
)
==
STATUS_PENDING
)
KeWaitForSingleObject
(
&
event
,
Executive
,
KernelMode
,
FALSE
,
NULL
);
}
static
NTSTATUS
get_device_caps
(
DEVICE_OBJECT
*
device
,
DEVICE_CAPABILITIES
*
caps
)
{
IO_STACK_LOCATION
*
irpsp
;
...
...
@@ -317,10 +293,7 @@ static void start_device( DEVICE_OBJECT *device, HDEVINFO set, SP_DEVINFO_DATA *
{
load_function_driver
(
device
,
set
,
sp_device
);
if
(
device
->
DriverObject
)
{
send_pnp_irp
(
device
,
IRP_MN_START_DEVICE
);
send_power_irp
(
device
,
PowerDeviceD0
);
}
}
static
void
enumerate_new_device
(
DEVICE_OBJECT
*
device
,
HDEVINFO
set
)
...
...
@@ -384,7 +357,6 @@ static void remove_device( DEVICE_OBJECT *device )
remove_device
(
wine_device
->
children
->
Objects
[
i
]
);
}
send_power_irp
(
device
,
PowerDeviceD3
);
send_pnp_irp
(
device
,
IRP_MN_SURPRISE_REMOVAL
);
send_pnp_irp
(
device
,
IRP_MN_REMOVE_DEVICE
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment