Subject: Re: Wacom USB tablet and XF86 4.3.0?
To: Matthieu Herrb <matthieu.herrb@laas.fr>
From: Dave Huang <khym@azeotrope.org>
List: tech-x11
Date: 01/01/2004 17:25:46
On Thu, Jan 01, 2004 at 10:00:34AM +0100, Matthieu Herrb wrote:
> The X server need to export the symbols to its modules. Look at the
> following change in OpenBSD:
> 
> http://www.openbsd.org/cgi-bin/cvsweb.cgi/XF4/xc/programs/Xserver/hw/xfree86/loader/xf86sym.c.diff?r1=1.3&r2=1.4

Ah, that was it, thanks!

Now the driver probably works, but I think there are two problems. The
first problem is that if I have the ums driver configured in my
kernel, it'll attach to the Graphire3, and wsmouse attaches to that. I
then no longer have a /dev/uhid0 to call USB_GET_REPORT_DESC on. If I
use /dev/wsmouse1 instead, it returns an "Invalid ioctl for device"
error. It looks like wsmouse doesn't recognize the ioctl, so it calls
ums_ioctl. ums doesn't recognize it either, so it returns EPASSTHOUGH.
I don't know what EPASSTHROUGH does, but it doesn't seem to be passing
it up to uhid, which would know what to do with the ioctl. I guess
this one belongs more on tech-kern than x11 though (I'm touring all
the mailing lists :) For now, I've commented ums out of my kernel:

uhidev0: WACOM CTE-430-UV3.1-4, rev 1.10/3.14, addr 2, iclass 3/1
uhidev0: 3 report ids
uhid0 at uhidev0 reportid 1: input=4, output=0, feature=0
uhid1 at uhidev0 reportid 2: input=7, output=0, feature=1
uhid2 at uhidev0 reportid 3: input=0, output=0, feature=1

But the main problem is that the driver doesn't seem to support the
Graphire3; when I start X, it now complains "/dev/uhid0 has no X, Y,
or In_Range report" (same complaint if I use uhid1 or uhid2). Looks
like the Graphire3 doesn't use the standard USB Digitizer reports?

% usbhidctl -f /dev/uhid0 -r
Report descriptor:
Collection page=Generic_Desktop usage=Mouse
Collection page=Generic_Desktop usage=Pointer
Input   size=1 count=1 page=Button usage=Button_1, logical range 0..1
Input   size=1 count=1 page=Button usage=Button_2, logical range 0..1
Input   size=1 count=1 page=Button usage=Button_3, logical range 0..1
Input   size=8 count=1 page=Generic_Desktop usage=X, logical range -127..127
Input   size=8 count=1 page=Generic_Desktop usage=Y, logical range -127..127
Input   size=8 count=1 page=Generic_Desktop usage=Wheel, logical range -127..127
End collection
End collection
Total   input size 4 bytes
Total  output size 0 bytes
Total feature size 0 bytes

% usbhidctl -f /dev/uhid1 -r
Report descriptor:
Collection page=Digitizer usage=Digitizer
Collection page=0x0000 usage=0x0000
Input   size=8 count=1 page=Microsoft usage=0x0001, logical range 0..255
Input   size=8 count=1 page=Microsoft usage=0x0001, logical range 0..255
Input   size=8 count=1 page=Microsoft usage=0x0001, logical range 0..255
Input   size=8 count=1 page=Microsoft usage=0x0001, logical range 0..255
Input   size=8 count=1 page=Microsoft usage=0x0001, logical range 0..255
Input   size=8 count=1 page=Microsoft usage=0x0001, logical range 0..255
Input   size=8 count=1 page=Microsoft usage=0x0001, logical range 0..255
End collection
Feature size=0 count=1 page=Microsoft usage=0x0001, logical range 0..255
Total   input size 7 bytes
Total  output size 0 bytes
Total feature size 1 bytes

% usbhidctl -f /dev/uhid2 -r
Report descriptor:
Feature size=0 count=1 page=Microsoft usage=0x0001, logical range 0..255
usbhidctl: Excessive collection ends

I see that there's code in sys/dev/usb/uhidev.c to override the report
descriptor for the original Graphire, so I tried using the same
override for the Graphire3, but that only made uhidev0 reportid 1 not
show up at all:

uhidev0 at uhub0 port 2 configuration 1 interface 0
uhidev0: WACOM CTE-430-UV3.1-4, rev 1.10/3.14, addr 2, iclass 3/1
uhidev0: 3 report ids
uhid0 at uhidev0 reportid 2: input=7, output=0, feature=2
uhid1 at uhidev0 reportid 3: input=0, output=0, feature=2

So... am I out of luck? :)
-- 
Name: Dave Huang         |  Mammal, mammal / their names are called /
INet: khym@azeotrope.org |  they raise a paw / the bat, the cat /
FurryMUCK: Dahan         |  dolphin and dog / koala bear and hog -- TMBG
Dahan: Hani G Y+C 28 Y++ L+++ W- C++ T++ A+ E+ S++ V++ F- Q+++ P+ B+ PA+ PL++