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
a103ee57
Commit
a103ee57
authored
Apr 17, 2020
by
Zebediah Figura
Committed by
Alexandre Julliard
Apr 20, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wineusb.sys: Partially implement URB_FUNCTION_SELECT_CONFIGURATION.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
65b9b202
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
0 deletions
+39
-0
wineusb.c
dlls/wineusb.sys/wineusb.c
+39
-0
No files found.
dlls/wineusb.sys/wineusb.c
View file @
a103ee57
...
@@ -460,6 +460,25 @@ static void queue_irp(struct usb_device *device, IRP *irp, struct libusb_transfe
...
@@ -460,6 +460,25 @@ static void queue_irp(struct usb_device *device, IRP *irp, struct libusb_transfe
LeaveCriticalSection
(
&
wineusb_cs
);
LeaveCriticalSection
(
&
wineusb_cs
);
}
}
struct
pipe
{
unsigned
char
endpoint
;
unsigned
char
type
;
};
static
HANDLE
make_pipe_handle
(
unsigned
char
endpoint
,
USBD_PIPE_TYPE
type
)
{
union
{
struct
pipe
pipe
;
HANDLE
handle
;
}
u
;
u
.
pipe
.
endpoint
=
endpoint
;
u
.
pipe
.
type
=
type
;
return
u
.
handle
;
}
static
NTSTATUS
usb_submit_urb
(
struct
usb_device
*
device
,
IRP
*
irp
)
static
NTSTATUS
usb_submit_urb
(
struct
usb_device
*
device
,
IRP
*
irp
)
{
{
URB
*
urb
=
IoGetCurrentIrpStackLocation
(
irp
)
->
Parameters
.
Others
.
Argument1
;
URB
*
urb
=
IoGetCurrentIrpStackLocation
(
irp
)
->
Parameters
.
Others
.
Argument1
;
...
@@ -501,6 +520,26 @@ static NTSTATUS usb_submit_urb(struct usb_device *device, IRP *irp)
...
@@ -501,6 +520,26 @@ static NTSTATUS usb_submit_urb(struct usb_device *device, IRP *irp)
return
STATUS_PENDING
;
return
STATUS_PENDING
;
}
}
case
URB_FUNCTION_SELECT_CONFIGURATION
:
{
struct
_URB_SELECT_CONFIGURATION
*
req
=
&
urb
->
UrbSelectConfiguration
;
ULONG
i
;
/* FIXME: In theory, we'd call libusb_set_configuration() here, but
* the CASIO FX-9750GII (which has only one configuration) goes into
* an error state if it receives a SET_CONFIGURATION request. Maybe
* we should skip setting that if and only if the configuration is
* already active? */
for
(
i
=
0
;
i
<
req
->
Interface
.
NumberOfPipes
;
++
i
)
{
USBD_PIPE_INFORMATION
*
pipe
=
&
req
->
Interface
.
Pipes
[
i
];
pipe
->
PipeHandle
=
make_pipe_handle
(
pipe
->
EndpointAddress
,
pipe
->
PipeType
);
}
return
STATUS_SUCCESS
;
}
default:
default:
FIXME
(
"Unhandled function %#x.
\n
"
,
urb
->
UrbHeader
.
Function
);
FIXME
(
"Unhandled function %#x.
\n
"
,
urb
->
UrbHeader
.
Function
);
}
}
...
...
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