Trying to develop a Pixelsense kernel driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello everyone,

I recently wanted to pick up again on developing a kernel input driver
for the Microsoft Pixelsense (formerly Surface 2.0). I already have a
working user space driver (see also [1]).

However - just like last year [2] - I quickly ran into an issue with a
corrupted device firmware after some brief experimentation with the
kernel driver, while the user space driver didn't and doesn't show any
such issues. This happened on two separate Pixelsense devices, with
different kernel versions.

So even though userspace and kernel driver look like they perform
exactly the same operations on the device, there must be some difference
I don't understand - perhaps libusb does some kind of internal error
handling which the kernel doesn't do?


Userspace version:

// for control commands
usb_control_msg(handle, 0xC0, cmd, 0x00, index, (char*)buf, len, 1000);

// for bulk data transfer
uint8_t buffer[512];
result = usb_bulk_read( handle, 0x86, (char*)(buffer), sizeof(buffer),
1000 );


Kernel version:

// for control commands
#define surface_command(dev, command, index, buffer, size)
usb_control_msg (dev->usbdev, usb_rcvctrlpipe (dev->usbdev, 0),
command, USB_TYPE_VENDOR | USB_RECIP_ENDPOINT | USB_DIR_IN, 0x00,
index, buffer, size, 1000)

// for bulk data transfer
result = usb_bulk_msg (surface->usbdev,
usb_rcvbulkpipe (surface->usbdev, 0x86),
surface->bulk_in_buffer, 512, &bulk_read, 1000);


Can anybody venture a guess what kind of functional difference there is
between these code snippets?

Thanks & BR, Florian

[1] https://github.com/floe/surface-2.0/
[2] http://floe.butterbrot.org/matrix/hacking/surface/brick.html
-- 
SENT FROM MY DEC VT50 TERMINAL

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux