As Jerome put out correctly, I have forgotten to commit the v3 changes to usb_raw.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18577 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1,5 +1,8 @@
|
|||||||
SubDir HAIKU_TOP src add-ons kernel drivers bus usb ;
|
SubDir HAIKU_TOP src add-ons kernel drivers bus usb ;
|
||||||
|
|
||||||
|
SetSubDirSupportedPlatformsBeOSCompatible ;
|
||||||
|
|
||||||
|
SubDirSysHdrs $(HAIKU_TOP) src add-ons kernel bus_managers usb ;
|
||||||
UsePrivateHeaders kernel ;
|
UsePrivateHeaders kernel ;
|
||||||
|
|
||||||
KernelAddon usb_raw : kernel drivers bus usb :
|
KernelAddon usb_raw : kernel drivers bus usb :
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "usb_raw.h"
|
#include "usb_raw.h"
|
||||||
|
#include "BeOSCompatibility.h"
|
||||||
|
|
||||||
|
|
||||||
#define TRACE_USB_RAW
|
#define TRACE_USB_RAW
|
||||||
@@ -33,7 +34,7 @@ uint32 gDeviceCount = 0;
|
|||||||
benaphore gDeviceListLock;
|
benaphore gDeviceListLock;
|
||||||
|
|
||||||
static status_t
|
static status_t
|
||||||
usb_raw_device_added(const usb_device *newDevice, void **cookie)
|
usb_raw_device_added(usb_device newDevice, void **cookie)
|
||||||
{
|
{
|
||||||
TRACE((DRIVER_NAME": device_added()\n"));
|
TRACE((DRIVER_NAME": device_added()\n"));
|
||||||
raw_device *device = (raw_device *)malloc(sizeof(raw_device));
|
raw_device *device = (raw_device *)malloc(sizeof(raw_device));
|
||||||
@@ -52,7 +53,7 @@ usb_raw_device_added(const usb_device *newDevice, void **cookie)
|
|||||||
}
|
}
|
||||||
|
|
||||||
char deviceName[32];
|
char deviceName[32];
|
||||||
memcpy(deviceName, &newDevice, sizeof(usb_device *));
|
memcpy(deviceName, &newDevice, sizeof(usb_device));
|
||||||
if (gUSBModule->usb_ioctl('DNAM', deviceName, sizeof(deviceName)) >= B_OK) {
|
if (gUSBModule->usb_ioctl('DNAM', deviceName, sizeof(deviceName)) >= B_OK) {
|
||||||
sprintf(device->name, "bus/usb/%s", deviceName);
|
sprintf(device->name, "bus/usb/%s", deviceName);
|
||||||
} else {
|
} else {
|
||||||
@@ -433,8 +434,8 @@ usb_raw_ioctl(void *cookie, uint32 op, void *buffer, size_t length)
|
|||||||
if (gUSBModule->queue_request(device->device,
|
if (gUSBModule->queue_request(device->device,
|
||||||
command->control.request_type, command->control.request,
|
command->control.request_type, command->control.request,
|
||||||
command->control.value, command->control.index,
|
command->control.value, command->control.index,
|
||||||
command->control.length, device->buffer, command->control.length,
|
command->control.length, device->buffer, usb_raw_callback,
|
||||||
usb_raw_callback, device) < B_OK) {
|
device) < B_OK) {
|
||||||
command->control.status = RAW_STATUS_FAILED;
|
command->control.status = RAW_STATUS_FAILED;
|
||||||
command->control.length = 0;
|
command->control.length = 0;
|
||||||
benaphore_unlock(&device->lock);
|
benaphore_unlock(&device->lock);
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#include <lock.h>
|
#include <lock.h>
|
||||||
#include <USB.h>
|
#include <USB3.h>
|
||||||
|
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
@@ -131,7 +131,7 @@ typedef union {
|
|||||||
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
const usb_device *device;
|
usb_device device;
|
||||||
benaphore lock;
|
benaphore lock;
|
||||||
|
|
||||||
char name[32];
|
char name[32];
|
||||||
|
|||||||
Reference in New Issue
Block a user