Commit 3ad0c002 authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

winebus.sys: Drop the hid_report channel.

parent b7e23884
...@@ -59,8 +59,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(plugplay); ...@@ -59,8 +59,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(plugplay);
#ifdef SONAME_LIBSDL2 #ifdef SONAME_LIBSDL2
WINE_DECLARE_DEBUG_CHANNEL(hid_report);
static pthread_mutex_t sdl_cs = PTHREAD_MUTEX_INITIALIZER; static pthread_mutex_t sdl_cs = PTHREAD_MUTEX_INITIALIZER;
static struct sdl_bus_options options; static struct sdl_bus_options options;
...@@ -847,7 +845,7 @@ static void process_device_event(SDL_Event *event) ...@@ -847,7 +845,7 @@ static void process_device_event(SDL_Event *event)
struct sdl_device *impl; struct sdl_device *impl;
SDL_JoystickID id; SDL_JoystickID id;
TRACE_(hid_report)("Received action %x\n", event->type); TRACE("Received action %x\n", event->type);
pthread_mutex_lock(&sdl_cs); pthread_mutex_lock(&sdl_cs);
......
...@@ -101,8 +101,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(plugplay); ...@@ -101,8 +101,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(plugplay);
#ifdef HAVE_UDEV #ifdef HAVE_UDEV
WINE_DECLARE_DEBUG_CHANNEL(hid_report);
static pthread_mutex_t udev_cs = PTHREAD_MUTEX_INITIALIZER; static pthread_mutex_t udev_cs = PTHREAD_MUTEX_INITIALIZER;
static struct udev *udev_context = NULL; static struct udev *udev_context = NULL;
...@@ -344,9 +342,9 @@ static void hidraw_device_read_report(struct unix_device *iface) ...@@ -344,9 +342,9 @@ static void hidraw_device_read_report(struct unix_device *iface)
int size = read(impl->base.device_fd, report_buffer, sizeof(report_buffer)); int size = read(impl->base.device_fd, report_buffer, sizeof(report_buffer));
if (size == -1) if (size == -1)
TRACE_(hid_report)("Read failed. Likely an unplugged device %d %s\n", errno, strerror(errno)); TRACE("Read failed. Likely an unplugged device %d %s\n", errno, strerror(errno));
else if (size == 0) else if (size == 0)
TRACE_(hid_report)("Failed to read report\n"); TRACE("Failed to read report\n");
else else
{ {
/* As described in the Linux kernel driver, when connected over bluetooth, DS4 controllers /* As described in the Linux kernel driver, when connected over bluetooth, DS4 controllers
...@@ -380,7 +378,7 @@ static void hidraw_device_set_output_report(struct unix_device *iface, HID_XFER_ ...@@ -380,7 +378,7 @@ static void hidraw_device_set_output_report(struct unix_device *iface, HID_XFER_
if ((buffer[0] = packet->reportId)) if ((buffer[0] = packet->reportId))
count = write(impl->base.device_fd, packet->reportBuffer, length); count = write(impl->base.device_fd, packet->reportBuffer, length);
else if (length > sizeof(buffer) - 1) else if (length > sizeof(buffer) - 1)
ERR_(hid_report)("id %d length %u >= 8192, cannot write\n", packet->reportId, length); ERR("id %d length %u >= 8192, cannot write\n", packet->reportId, length);
else else
{ {
memcpy(buffer + 1, packet->reportBuffer, length); memcpy(buffer + 1, packet->reportBuffer, length);
...@@ -394,7 +392,7 @@ static void hidraw_device_set_output_report(struct unix_device *iface, HID_XFER_ ...@@ -394,7 +392,7 @@ static void hidraw_device_set_output_report(struct unix_device *iface, HID_XFER_
} }
else else
{ {
ERR_(hid_report)("id %d write failed error: %d %s\n", packet->reportId, errno, strerror(errno)); ERR("id %d write failed error: %d %s\n", packet->reportId, errno, strerror(errno));
io->Information = 0; io->Information = 0;
io->Status = STATUS_UNSUCCESSFUL; io->Status = STATUS_UNSUCCESSFUL;
} }
...@@ -412,7 +410,7 @@ static void hidraw_device_get_feature_report(struct unix_device *iface, HID_XFER ...@@ -412,7 +410,7 @@ static void hidraw_device_get_feature_report(struct unix_device *iface, HID_XFER
if ((buffer[0] = packet->reportId) && length <= 0x1fff) if ((buffer[0] = packet->reportId) && length <= 0x1fff)
count = ioctl(impl->base.device_fd, HIDIOCGFEATURE(length), packet->reportBuffer); count = ioctl(impl->base.device_fd, HIDIOCGFEATURE(length), packet->reportBuffer);
else if (length > sizeof(buffer) - 1) else if (length > sizeof(buffer) - 1)
ERR_(hid_report)("id %d length %u >= 8192, cannot read\n", packet->reportId, length); ERR("id %d length %u >= 8192, cannot read\n", packet->reportId, length);
else else
{ {
count = ioctl(impl->base.device_fd, HIDIOCGFEATURE(length + 1), buffer); count = ioctl(impl->base.device_fd, HIDIOCGFEATURE(length + 1), buffer);
...@@ -426,7 +424,7 @@ static void hidraw_device_get_feature_report(struct unix_device *iface, HID_XFER ...@@ -426,7 +424,7 @@ static void hidraw_device_get_feature_report(struct unix_device *iface, HID_XFER
} }
else else
{ {
ERR_(hid_report)("id %d read failed, error: %d %s\n", packet->reportId, errno, strerror(errno)); ERR("id %d read failed, error: %d %s\n", packet->reportId, errno, strerror(errno));
io->Information = 0; io->Information = 0;
io->Status = STATUS_UNSUCCESSFUL; io->Status = STATUS_UNSUCCESSFUL;
} }
...@@ -448,7 +446,7 @@ static void hidraw_device_set_feature_report(struct unix_device *iface, HID_XFER ...@@ -448,7 +446,7 @@ static void hidraw_device_set_feature_report(struct unix_device *iface, HID_XFER
if ((buffer[0] = packet->reportId) && length <= 0x1fff) if ((buffer[0] = packet->reportId) && length <= 0x1fff)
count = ioctl(impl->base.device_fd, HIDIOCSFEATURE(length), packet->reportBuffer); count = ioctl(impl->base.device_fd, HIDIOCSFEATURE(length), packet->reportBuffer);
else if (length > sizeof(buffer) - 1) else if (length > sizeof(buffer) - 1)
ERR_(hid_report)("id %d length %u >= 8192, cannot write\n", packet->reportId, length); ERR("id %d length %u >= 8192, cannot write\n", packet->reportId, length);
else else
{ {
memcpy(buffer + 1, packet->reportBuffer, length); memcpy(buffer + 1, packet->reportBuffer, length);
...@@ -462,7 +460,7 @@ static void hidraw_device_set_feature_report(struct unix_device *iface, HID_XFER ...@@ -462,7 +460,7 @@ static void hidraw_device_set_feature_report(struct unix_device *iface, HID_XFER
} }
else else
{ {
ERR_(hid_report)("id %d write failed, error: %d %s\n", packet->reportId, errno, strerror(errno)); ERR("id %d write failed, error: %d %s\n", packet->reportId, errno, strerror(errno));
io->Information = 0; io->Information = 0;
io->Status = STATUS_UNSUCCESSFUL; io->Status = STATUS_UNSUCCESSFUL;
} }
...@@ -802,9 +800,9 @@ static void lnxev_device_read_report(struct unix_device *iface) ...@@ -802,9 +800,9 @@ static void lnxev_device_read_report(struct unix_device *iface)
size = read(impl->base.device_fd, &ie, sizeof(ie)); size = read(impl->base.device_fd, &ie, sizeof(ie));
if (size == -1) if (size == -1)
TRACE_(hid_report)("Read failed. Likely an unplugged device\n"); TRACE("Read failed. Likely an unplugged device\n");
else if (size == 0) else if (size == 0)
TRACE_(hid_report)("Failed to read report\n"); TRACE("Failed to read report\n");
else if (set_report_from_event(iface, &ie)) else if (set_report_from_event(iface, &ie))
bus_event_queue_input_report(&event_queue, iface, state->report_buf, state->report_len); bus_event_queue_input_report(&event_queue, iface, state->report_buf, state->report_len);
} }
......
...@@ -41,7 +41,6 @@ ...@@ -41,7 +41,6 @@
#include "unixlib.h" #include "unixlib.h"
WINE_DEFAULT_DEBUG_CHANNEL(plugplay); WINE_DEFAULT_DEBUG_CHANNEL(plugplay);
WINE_DECLARE_DEBUG_CHANNEL(hid_report);
static DRIVER_OBJECT *driver_obj; static DRIVER_OBJECT *driver_obj;
...@@ -1045,21 +1044,21 @@ static NTSTATUS WINAPI hid_internal_dispatch(DEVICE_OBJECT *device, IRP *irp) ...@@ -1045,21 +1044,21 @@ static NTSTATUS WINAPI hid_internal_dispatch(DEVICE_OBJECT *device, IRP *irp)
case IOCTL_HID_WRITE_REPORT: case IOCTL_HID_WRITE_REPORT:
{ {
HID_XFER_PACKET *packet = (HID_XFER_PACKET*)(irp->UserBuffer); HID_XFER_PACKET *packet = (HID_XFER_PACKET*)(irp->UserBuffer);
TRACE_(hid_report)("IOCTL_HID_WRITE_REPORT / IOCTL_HID_SET_OUTPUT_REPORT\n"); TRACE("IOCTL_HID_WRITE_REPORT / IOCTL_HID_SET_OUTPUT_REPORT\n");
unix_device_set_output_report(device, packet, &irp->IoStatus); unix_device_set_output_report(device, packet, &irp->IoStatus);
break; break;
} }
case IOCTL_HID_GET_FEATURE: case IOCTL_HID_GET_FEATURE:
{ {
HID_XFER_PACKET *packet = (HID_XFER_PACKET*)(irp->UserBuffer); HID_XFER_PACKET *packet = (HID_XFER_PACKET*)(irp->UserBuffer);
TRACE_(hid_report)("IOCTL_HID_GET_FEATURE\n"); TRACE("IOCTL_HID_GET_FEATURE\n");
unix_device_get_feature_report(device, packet, &irp->IoStatus); unix_device_get_feature_report(device, packet, &irp->IoStatus);
break; break;
} }
case IOCTL_HID_SET_FEATURE: case IOCTL_HID_SET_FEATURE:
{ {
HID_XFER_PACKET *packet = (HID_XFER_PACKET*)(irp->UserBuffer); HID_XFER_PACKET *packet = (HID_XFER_PACKET*)(irp->UserBuffer);
TRACE_(hid_report)("IOCTL_HID_SET_FEATURE\n"); TRACE("IOCTL_HID_SET_FEATURE\n");
unix_device_set_feature_report(device, packet, &irp->IoStatus); unix_device_set_feature_report(device, packet, &irp->IoStatus);
break; break;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment