mirror of
https://github.com/genodelabs/genode.git
synced 2025-02-20 09:46:20 +00:00
usb_hid: add 'usb_clear_halt'
This function is called by 'hid_reset' when the HID_CLEAR_HALT bit set, as it happens to be on the Rasbarry Pi 1. issue #4958
This commit is contained in:
parent
d191c376f7
commit
7ea020d471
@ -33,3 +33,26 @@ struct usb_driver usbfs_driver = {
|
||||
const struct attribute_group *usb_device_groups[] = { };
|
||||
|
||||
|
||||
/*
|
||||
* Taken and ajdusted from linux/drivers/usb/core/message.c If this is required
|
||||
* by more drivers in the future, we will move it to
|
||||
* dde_linux/src/lib/virt/shadow/drivers/usb/core/message.c
|
||||
*/
|
||||
int usb_clear_halt(struct usb_device *dev, int pipe)
|
||||
{
|
||||
int result;
|
||||
int endp = usb_pipeendpoint(pipe);
|
||||
|
||||
if (usb_pipein(pipe))
|
||||
endp |= USB_DIR_IN;
|
||||
|
||||
/* we don't care if it wasn't halted first. in fact some devices
|
||||
* (like some ibmcam model 1 units) seem to expect hosts to make
|
||||
* this request for iso endpoints, which can't halt!
|
||||
*/
|
||||
result = usb_control_msg(dev, usb_sndctrlpipe(dev, endp),
|
||||
USB_REQ_CLEAR_FEATURE, USB_RECIP_ENDPOINT,
|
||||
USB_ENDPOINT_HALT, endp, NULL, 0,
|
||||
USB_CTRL_SET_TIMEOUT);
|
||||
return result;
|
||||
}
|
||||
|
@ -491,14 +491,6 @@ void usb_block_urb(struct urb * urb)
|
||||
}
|
||||
|
||||
|
||||
#include <linux/usb.h>
|
||||
|
||||
int usb_clear_halt(struct usb_device * dev,int pipe)
|
||||
{
|
||||
lx_emul_trace_and_stop(__func__);
|
||||
}
|
||||
|
||||
|
||||
extern void usb_devio_cleanup(void);
|
||||
void usb_devio_cleanup(void)
|
||||
{
|
||||
|
@ -491,14 +491,6 @@ void usb_block_urb(struct urb * urb)
|
||||
}
|
||||
|
||||
|
||||
#include <linux/usb.h>
|
||||
|
||||
int usb_clear_halt(struct usb_device * dev,int pipe)
|
||||
{
|
||||
lx_emul_trace_and_stop(__func__);
|
||||
}
|
||||
|
||||
|
||||
extern void usb_devio_cleanup(void);
|
||||
void usb_devio_cleanup(void)
|
||||
{
|
||||
|
@ -456,14 +456,6 @@ void usb_block_urb(struct urb * urb)
|
||||
}
|
||||
|
||||
|
||||
#include <linux/usb.h>
|
||||
|
||||
int usb_clear_halt(struct usb_device * dev,int pipe)
|
||||
{
|
||||
lx_emul_trace_and_stop(__func__);
|
||||
}
|
||||
|
||||
|
||||
extern void usb_devio_cleanup(void);
|
||||
void usb_devio_cleanup(void)
|
||||
{
|
||||
|
@ -371,14 +371,6 @@ void usb_block_urb(struct urb * urb)
|
||||
}
|
||||
|
||||
|
||||
#include <linux/usb.h>
|
||||
|
||||
int usb_clear_halt(struct usb_device * dev,int pipe)
|
||||
{
|
||||
lx_emul_trace_and_stop(__func__);
|
||||
}
|
||||
|
||||
|
||||
extern void usb_devio_cleanup(void);
|
||||
void usb_devio_cleanup(void)
|
||||
{
|
||||
|
@ -339,14 +339,6 @@ void usb_block_urb(struct urb * urb)
|
||||
}
|
||||
|
||||
|
||||
#include <linux/usb.h>
|
||||
|
||||
int usb_clear_halt(struct usb_device * dev,int pipe)
|
||||
{
|
||||
lx_emul_trace_and_stop(__func__);
|
||||
}
|
||||
|
||||
|
||||
extern void usb_devio_cleanup(void);
|
||||
void usb_devio_cleanup(void)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user