* Problems with Wacom Intuos PT M (CTH680) on FreeBSD @ 2014-10-18 10:56 Denis Akiyakov 2014-10-21 22:33 ` Dmitry Torokhov 0 siblings, 1 reply; 10+ messages in thread From: Denis Akiyakov @ 2014-10-18 10:56 UTC (permalink / raw) To: linux-input Hello, I'm using FreeBSD 10.1 and FreeBSD use webcamd witch contain linux wacom driver to provide wacom tablets support. More info here: http://www.selasky.org/hans_petter/video4bsd/ or http://www.freshports.org/multimedia/webcamd/ I've got latest version of webcamd and Wacom device CTH680, but device isn't working correct. dmesg: ugen2.3: <Wacom Co.,Ltd.> at usbus2 ums0: <Wacom Co.,Ltd. Intuos PTM, class 0/0, rev 2.00/1.00, addr 3> on usbus2 uhid2: <Wacom Co.,Ltd. Intuos PTM, class 0/0, rev 2.00/1.00, addr 3> on usbus2 uhid3: <Wacom Co.,Ltd. Intuos PTM, class 0/0, rev 2.00/1.00, addr 3> on usbus2 here are two outputs from webcamd: first (/usr/local/sbin/webcamd -i 0 -d ugen2.3 -U webcamd -G webcamd -H): : USB HID core driver Linux video capture interface: v2.00 lirc_dev: IR Remote Control driver registered, major 14 IR NEC protocol handler initialized IR RC5(x/sz) protocol handler initialized IR RC6 protocol handler initialized IR JVC protocol handler initialized IR Sony protocol handler initialized IR SANYO protocol handler initialized IR LIRC bridge handler initialized IR XMP protocol handler initialized uvcvideo: Unable to create debugfs directory USB Video Class driver (1.1.1) cpia2: V4L-Driver for Vision CPiA2 based cameras v3.0.1 au0828 driver loaded pvrusb2: V4L in-tree version:Hauppauge WinTV-PVR-USB2 MPEG2 Encoder/Tuner pvrusb2: Debug mask is 31 (0x1f) USBVision USB Video Device Driver for Linux : 0.9.11 em28xx: Registered (Em28xx v4l2 Extension) extension em28xx: Registered (Em28xx dvb Extension) extension Attached to ugen2.3[0] DBG: 0003:056A:0303.0001: Kicking head 1 tail 0 ERR: 0003:056A:0303.0001: usb_submit_urb(ctrl) failed: -32 DBG: 0003:056A:0303.0001: Kicking head 2 tail 0 ERR: 0003:056A:0303.0001: usb_submit_urb(ctrl) failed: -32 DBG: 0003:056A:0303.0001: Kicking head 3 tail 0 ERR: 0003:056A:0303.0001: usb_submit_urb(ctrl) failed: -32 DBG: 0003:056A:0303.0001: Kicking head 4 tail 0 ERR: 0003:056A:0303.0001: usb_submit_urb(ctrl) failed: -32 DBG: 0003:056A:0303.0001: Kicking head 5 tail 0 ERR: 0003:056A:0303.0001: usb_submit_urb(ctrl) failed: -32 DBG: 0003:056A:0303.0001: Kicking head 6 tail 0 ERR: 0003:056A:0303.0001: usb_submit_urb(ctrl) failed: -32 DBG: 0003:056A:0303.0001: Kicking head 7 tail 0 ERR: 0003:056A:0303.0001: usb_submit_urb(ctrl) failed: -32 DBG: 0003:056A:0303.0001: Kicking head 8 tail 0 ERR: 0003:056A:0303.0001: usb_submit_urb(ctrl) failed: -32 DBG: 0003:056A:0303.0001: Kicking head 9 tail 0 ERR: 0003:056A:0303.0001: usb_submit_urb(ctrl) failed: -32 DBG: 0003:056A:0303.0001: Kicking head 10 tail 0 ERR: 0003:056A:0303.0001: usb_submit_urb(ctrl) failed: -32 DBG: 0003:056A:0303.0001: Kicking head 11 tail 0 ERR: 0003:056A:0303.0001: usb_submit_urb(ctrl) failed: -32 DBG: 0003:056A:0303.0001: Kicking head 12 tail 0 ERR: 0003:056A:0303.0001: usb_submit_urb(ctrl) failed: -32 DBG: 0003:056A:0303.0001: Kicking head 13 tail 0 ERR: 0003:056A:0303.0001: usb_submit_urb(ctrl) failed: -32 DBG: 0003:056A:0303.0001: Kicking head 14 tail 0 ERR: 0003:056A:0303.0001: usb_submit_urb(ctrl) failed: -32 DBG: 0003:056A:0303.0001: Kicking head 15 tail 0 ERR: 0003:056A:0303.0001: usb_submit_urb(ctrl) failed: -32 DBG: 0003:056A:0303.0001: Kicking head 16 tail 0 ERR: 0003:056A:0303.0001: usb_submit_urb(ctrl) failed: -32 DBG: 0003:056A:0303.0001: Kicking head 17 tail 0 ERR: 0003:056A:0303.0001: usb_submit_urb(ctrl) failed: -32 DBG: 0003:056A:0303.0001: Kicking head 18 tail 0 ERR: 0003:056A:0303.0001: usb_submit_urb(ctrl) failed: -32 DBG: 0003:056A:0303.0001: Kicking head 19 tail 0 ERR: 0003:056A:0303.0001: usb_submit_urb(ctrl) failed: -32 DBG: 0003:056A:0303.0001: Kicking head 20 tail 0 ERR: 0003:056A:0303.0001: usb_submit_urb(ctrl) failed: -32 DBG: 0003:056A:0303.0001: Kicking head 21 tail 0 ERR: 0003:056A:0303.0001: usb_submit_urb(ctrl) failed: -32 INFO: 0003:056A:0303.0001: П│F: USB HID v1.10 Device [Wacom Co.,Ltd. Intuos PTM] on usb-/dev/usb-/dev/usb/input0 Waiting for HAL USB device. Creating /dev/input/event0 #------------------------------------------ second (/usr/local/sbin/webcamd -i 1 -d ugen2.3 -U webcamd -G webcamd -H): #------------------------------------------ : USB HID core driver Linux video capture interface: v2.00 lirc_dev: IR Remote Control driver registered, major 14 IR NEC protocol handler initialized IR RC5(x/sz) protocol handler initialized IR RC6 protocol handler initialized IR JVC protocol handler initialized IR Sony protocol handler initialized IR SANYO protocol handler initialized IR LIRC bridge handler initialized IR XMP protocol handler initialized uvcvideo: Unable to create debugfs directory USB Video Class driver (1.1.1) cpia2: V4L-Driver for Vision CPiA2 based cameras v3.0.1 au0828 driver loaded pvrusb2: V4L in-tree version:Hauppauge WinTV-PVR-USB2 MPEG2 Encoder/Tuner pvrusb2: Debug mask is 31 (0x1f) USBVision USB Video Device Driver for Linux : 0.9.11 em28xx: Registered (Em28xx v4l2 Extension) extension em28xx: Registered (Em28xx dvb Extension) extension Attached to ugen2.3[1] DBG: 0003:056A:0303.0001: Kicking head 1 tail 0 ERR: 0003:056A:0303.0001: usb_submit_urb(ctrl) failed: -32 DBG: 0003:056A:0303.0001: Kicking head 2 tail 0 ERR: 0003:056A:0303.0001: usb_submit_urb(ctrl) failed: -32 INFO: 0003:056A:0303.0001: П│F: USB HID v1.10 Device [Wacom Co.,Ltd. Intuos PTM] on usb-/dev/usb-/dev/usb/input1 Waiting for HAL USB device. Creating /dev/input/event1 Creating /dev/input/event2 Creating /dev/input/js0 At the end, sometimes after few manipulations the touch by fingers starts working. Pen never works. Can anyone help to resolve this problem? If you need other logs, please ask. -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Problems with Wacom Intuos PT M (CTH680) on FreeBSD 2014-10-18 10:56 Problems with Wacom Intuos PT M (CTH680) on FreeBSD Denis Akiyakov @ 2014-10-21 22:33 ` Dmitry Torokhov 2014-10-23 4:54 ` Denis Akiyakov 0 siblings, 1 reply; 10+ messages in thread From: Dmitry Torokhov @ 2014-10-21 22:33 UTC (permalink / raw) To: Denis Akiyakov; +Cc: linux-input Hi Denis, On Sat, Oct 18, 2014 at 05:56:48PM +0700, Denis Akiyakov wrote: > Hello, > > I'm using FreeBSD 10.1 and FreeBSD use webcamd witch contain linux > wacom driver to provide wacom tablets support. More info here: > http://www.selasky.org/hans_petter/video4bsd/ or > http://www.freshports.org/multimedia/webcamd/ > > I've got latest version of webcamd and Wacom device CTH680, but > device isn't working correct. Have you tried the device with Linux instead of FreeBSD? If it works in Linux that means that the port of linux drivers to BSD is to blame and you need to contact its authors, otherwise we need to adjust wacom driver in kernel for this device. Thanks. -- Dmitry ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Problems with Wacom Intuos PT M (CTH680) on FreeBSD 2014-10-21 22:33 ` Dmitry Torokhov @ 2014-10-23 4:54 ` Denis Akiyakov 2014-10-23 5:54 ` Hans Petter Selasky 0 siblings, 1 reply; 10+ messages in thread From: Denis Akiyakov @ 2014-10-23 4:54 UTC (permalink / raw) To: Dmitry Torokhov Cc: linux-input, Hans Petter Selasky, nox@jelal.kn-bremen.de >> Juergen Lock On 22.10.2014 05:33, Dmitry Torokhov wrote: > Hi Denis, > > On Sat, Oct 18, 2014 at 05:56:48PM +0700, Denis Akiyakov wrote: >> Hello, >> >> I'm using FreeBSD 10.1 and FreeBSD use webcamd witch contain linux >> wacom driver to provide wacom tablets support. More info here: >> http://www.selasky.org/hans_petter/video4bsd/ or >> http://www.freshports.org/multimedia/webcamd/ >> >> I've got latest version of webcamd and Wacom device CTH680, but >> device isn't working correct. > Have you tried the device with Linux instead of FreeBSD? If it works in > Linux that means that the port of linux drivers to BSD is to blame and > you need to contact its authors, otherwise we need to adjust wacom > driver in kernel for this device. > > Thanks. > Hello, Dmitry. I've tried tablet in Ubuntu 14.04.1. All functions that work in Windows 7 (in Krita) work under Ubuntu's Krita. Thank you for your attention. ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Problems with Wacom Intuos PT M (CTH680) on FreeBSD 2014-10-23 4:54 ` Denis Akiyakov @ 2014-10-23 5:54 ` Hans Petter Selasky 2014-10-31 23:27 ` Ping Cheng 0 siblings, 1 reply; 10+ messages in thread From: Hans Petter Selasky @ 2014-10-23 5:54 UTC (permalink / raw) To: Denis Akiyakov, Dmitry Torokhov Cc: linux-input, nox@jelal.kn-bremen.de >> Juergen Lock On 10/23/14 06:54, Denis Akiyakov wrote: > On 22.10.2014 05:33, Dmitry Torokhov wrote: >> Hi Denis, >> >> On Sat, Oct 18, 2014 at 05:56:48PM +0700, Denis Akiyakov wrote: >>> Hello, >>> >>> I'm using FreeBSD 10.1 and FreeBSD use webcamd witch contain linux >>> wacom driver to provide wacom tablets support. More info here: >>> http://www.selasky.org/hans_petter/video4bsd/ or >>> http://www.freshports.org/multimedia/webcamd/ >>> >>> I've got latest version of webcamd and Wacom device CTH680, but >>> device isn't working correct. >> Have you tried the device with Linux instead of FreeBSD? If it works in >> Linux that means that the port of linux drivers to BSD is to blame and >> you need to contact its authors, otherwise we need to adjust wacom >> driver in kernel for this device. >> >> Thanks. >> > Hello, Dmitry. > > I've tried tablet in Ubuntu 14.04.1. All functions that work in Windows > 7 (in Krita) work under Ubuntu's Krita. > > Thank you for your attention. > Hi, The problem appears to be that webcamd launches two instances for each interface, so the shared data is not the same like with Linux. Actually the shared data is NULL. I think however it would be clever that the Linux Wacom code would check "wacom->shared->touch_input" for NULL before using it, because it is not always set. This can be an easy way to crash the kernel when plugging a USB devices. drivers/hid/wacom_wac.c:1395 and some more places. --HPS ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Problems with Wacom Intuos PT M (CTH680) on FreeBSD 2014-10-23 5:54 ` Hans Petter Selasky @ 2014-10-31 23:27 ` Ping Cheng 2014-11-01 7:40 ` Hans Petter Selasky 0 siblings, 1 reply; 10+ messages in thread From: Ping Cheng @ 2014-10-31 23:27 UTC (permalink / raw) To: Hans Petter Selasky Cc: Denis Akiyakov, Dmitry Torokhov, linux-input, nox@jelal.kn-bremen.de >> Juergen Lock Hi Hans, On Wed, Oct 22, 2014 at 10:54 PM, Hans Petter Selasky <hps@selasky.org> wrote: > > On 10/23/14 06:54, Denis Akiyakov wrote: >> >> On 22.10.2014 05:33, Dmitry Torokhov wrote: >>> >>> Hi Denis, >>> >>> On Sat, Oct 18, 2014 at 05:56:48PM +0700, Denis Akiyakov wrote: >>>> >>>> Hello, >>>> >>>> I'm using FreeBSD 10.1 and FreeBSD use webcamd witch contain linux >>>> wacom driver to provide wacom tablets support. More info here: >>>> http://www.selasky.org/hans_petter/video4bsd/ or >>>> http://www.freshports.org/multimedia/webcamd/ >>>> >>>> I've got latest version of webcamd and Wacom device CTH680, but >>>> device isn't working correct. >>> >>> Have you tried the device with Linux instead of FreeBSD? If it works in >>> Linux that means that the port of linux drivers to BSD is to blame and >>> you need to contact its authors, otherwise we need to adjust wacom >>> driver in kernel for this device. >>> >>> Thanks. >>> >> Hello, Dmitry. >> >> I've tried tablet in Ubuntu 14.04.1. All functions that work in Windows >> 7 (in Krita) work under Ubuntu's Krita. >> >> Thank you for your attention. >> > > Hi, > > The problem appears to be that webcamd launches two instances for each interface, so the shared data is not the same like with Linux. Actually the shared data is NULL. If shared is NULL on FreeBSD, you need to make sure that part of code is portable on FreeBSD. On Linux, the driver would fail to load if shared is NULL since at least the current data can be assigned to wacom_shared (please refer to wacom_add_shared_data() in wacom_sys.c for detail). > I think however it would be clever that the Linux Wacom code would check "wacom->shared->touch_input" for NULL before using it, because it is not always set. This can be an easy way to crash the kernel when plugging a USB devices. > > drivers/hid/wacom_wac.c:1395 touch_input is used in 6 places (4 times in wacom_wac.c and 2 times in wacom_sys.c). They are called only when touch_max is not zero, that is, only when touch input is defined. If touch_input is NULL on FreeBSD, you need to figure out the root cause. Checking on touch_input itself would not fix the root cause... We are here to help if there is anything unclear to you in the code. Cheers, Ping ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Problems with Wacom Intuos PT M (CTH680) on FreeBSD 2014-10-31 23:27 ` Ping Cheng @ 2014-11-01 7:40 ` Hans Petter Selasky 2014-11-04 8:08 ` Dmitry Torokhov 0 siblings, 1 reply; 10+ messages in thread From: Hans Petter Selasky @ 2014-11-01 7:40 UTC (permalink / raw) To: Ping Cheng Cc: Denis Akiyakov, Dmitry Torokhov, linux-input, nox@jelal.kn-bremen.de >> Juergen Lock On 11/01/14 00:27, Ping Cheng wrote: > If touch_input is NULL on FreeBSD, you need to figure out the root > cause. Checking on touch_input itself would not fix the root cause... Right. The root cause is that FreeBSD launches two instances of the driver, running in two different userland processes, for the two different Wacom interfaces on a common USB device. In Linux the wacom interface drivers are running from the same kernel, and can share the data in question, but in FreeBSD's webcamd emulation, this doesn't work. Then the first wacom probe call would have to grab the second interface. Technically speaking this is a FreeBSD only problem and I plan to deliver a patch with the webcamd software to fix this, like already suggested to you guys. This situation can also happen on Linux in case of a "BadUSB" device. That's why I think that the NULL check should be upstreamed. --HPS ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Problems with Wacom Intuos PT M (CTH680) on FreeBSD 2014-11-01 7:40 ` Hans Petter Selasky @ 2014-11-04 8:08 ` Dmitry Torokhov 2014-11-04 17:38 ` Ping Cheng 0 siblings, 1 reply; 10+ messages in thread From: Dmitry Torokhov @ 2014-11-04 8:08 UTC (permalink / raw) To: Hans Petter Selasky Cc: Ping Cheng, Denis Akiyakov, linux-input, nox@jelal.kn-bremen.de >> Juergen Lock On Sat, Nov 01, 2014 at 08:40:19AM +0100, Hans Petter Selasky wrote: > On 11/01/14 00:27, Ping Cheng wrote: > >If touch_input is NULL on FreeBSD, you need to figure out the root > >cause. Checking on touch_input itself would not fix the root cause... > > Right. > > The root cause is that FreeBSD launches two instances of the driver, > running in two different userland processes, for the two different > Wacom interfaces on a common USB device. In Linux the wacom > interface drivers are running from the same kernel, and can share > the data in question, but in FreeBSD's webcamd emulation, this > doesn't work. Then the first wacom probe call would have to grab the > second interface. > > Technically speaking this is a FreeBSD only problem and I plan to > deliver a patch with the webcamd software to fix this, like already > suggested to you guys. This situation can also happen on Linux in > case of a "BadUSB" device. That's why I think that the NULL check > should be upstreamed. Hmm, looking at this again it seems that we just cross our fingers and hope that both interfaces are enumerated by the time we get event data from the device. I do not think this is quite safe. We probably should be checking the overall state of probing (i.e. whether we are done probing both interfaces) before processing data for the device. Or maybe we should just forcibly try claiming secondary interface while probing primary instead of messing with shared data item. That won't help Hans though: the devices do use 2 interfaces in tandem, treating them separately will result in incorrect behavior. Thanks. -- Dmitry ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Problems with Wacom Intuos PT M (CTH680) on FreeBSD 2014-11-04 8:08 ` Dmitry Torokhov @ 2014-11-04 17:38 ` Ping Cheng 2014-11-04 18:06 ` Dmitry Torokhov 0 siblings, 1 reply; 10+ messages in thread From: Ping Cheng @ 2014-11-04 17:38 UTC (permalink / raw) To: Dmitry Torokhov Cc: Hans Petter Selasky, Denis Akiyakov, linux-input, nox@jelal.kn-bremen.de >> Juergen Lock Hi Dmitry, On Tue, Nov 4, 2014 at 12:08 AM, Dmitry Torokhov <dmitry.torokhov@gmail.com> wrote: > On Sat, Nov 01, 2014 at 08:40:19AM +0100, Hans Petter Selasky wrote: >> On 11/01/14 00:27, Ping Cheng wrote: >> >If touch_input is NULL on FreeBSD, you need to figure out the root >> >cause. Checking on touch_input itself would not fix the root cause... >> >> Right. >> >> The root cause is that FreeBSD launches two instances of the driver, >> running in two different userland processes, for the two different >> Wacom interfaces on a common USB device. In Linux the wacom >> interface drivers are running from the same kernel, and can share >> the data in question, but in FreeBSD's webcamd emulation, this >> doesn't work. Then the first wacom probe call would have to grab the >> second interface. >> >> Technically speaking this is a FreeBSD only problem and I plan to >> deliver a patch with the webcamd software to fix this, like already >> suggested to you guys. This situation can also happen on Linux in >> case of a "BadUSB" device. That's why I think that the NULL check >> should be upstreamed. > > Hmm, looking at this again it seems that we just cross our fingers and > hope that both interfaces are enumerated by the time we get event data > from the device. I do not think this is quite safe. We probably should > be checking the overall state of probing (i.e. whether we are done > probing both interfaces) before processing data for the device. Are you going to make a patch to address the issue? > Or maybe we should just forcibly try claiming secondary interface > while probing primary instead of messing with shared data item. If we incorporate the above idea into a patch, we need to keep in mind that not all tablets support touch data. So, not all tablets have two interfaces. Cheers, Ping > That won't help Hans though: the devices do use 2 interfaces in tandem, > treating them separately will result in incorrect behavior. > > Thanks. > > -- > Dmitry ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Problems with Wacom Intuos PT M (CTH680) on FreeBSD 2014-11-04 17:38 ` Ping Cheng @ 2014-11-04 18:06 ` Dmitry Torokhov 2014-11-07 1:30 ` Ping Cheng 0 siblings, 1 reply; 10+ messages in thread From: Dmitry Torokhov @ 2014-11-04 18:06 UTC (permalink / raw) To: Ping Cheng Cc: Hans Petter Selasky, Denis Akiyakov, linux-input, nox@jelal.kn-bremen.de >> Juergen Lock On Tue, Nov 04, 2014 at 09:38:38AM -0800, Ping Cheng wrote: > Hi Dmitry, > > On Tue, Nov 4, 2014 at 12:08 AM, Dmitry Torokhov > <dmitry.torokhov@gmail.com> wrote: > > On Sat, Nov 01, 2014 at 08:40:19AM +0100, Hans Petter Selasky wrote: > >> On 11/01/14 00:27, Ping Cheng wrote: > >> >If touch_input is NULL on FreeBSD, you need to figure out the root > >> >cause. Checking on touch_input itself would not fix the root cause... > >> > >> Right. > >> > >> The root cause is that FreeBSD launches two instances of the driver, > >> running in two different userland processes, for the two different > >> Wacom interfaces on a common USB device. In Linux the wacom > >> interface drivers are running from the same kernel, and can share > >> the data in question, but in FreeBSD's webcamd emulation, this > >> doesn't work. Then the first wacom probe call would have to grab the > >> second interface. > >> > >> Technically speaking this is a FreeBSD only problem and I plan to > >> deliver a patch with the webcamd software to fix this, like already > >> suggested to you guys. This situation can also happen on Linux in > >> case of a "BadUSB" device. That's why I think that the NULL check > >> should be upstreamed. > > > > Hmm, looking at this again it seems that we just cross our fingers and > > hope that both interfaces are enumerated by the time we get event data > > from the device. I do not think this is quite safe. We probably should > > be checking the overall state of probing (i.e. whether we are done > > probing both interfaces) before processing data for the device. > > Are you going to make a patch to address the issue? Not in the nearest future, sorry. > > > Or maybe we should just forcibly try claiming secondary interface > > while probing primary instead of messing with shared data item. > > If we incorporate the above idea into a patch, we need to keep in mind > that not all tablets support touch data. So, not all tablets have two > interfaces. Right, but we do know the models that use multiple interfaces, right? -- Dmitry ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Problems with Wacom Intuos PT M (CTH680) on FreeBSD 2014-11-04 18:06 ` Dmitry Torokhov @ 2014-11-07 1:30 ` Ping Cheng 0 siblings, 0 replies; 10+ messages in thread From: Ping Cheng @ 2014-11-07 1:30 UTC (permalink / raw) To: Dmitry Torokhov Cc: Hans Petter Selasky, Denis Akiyakov, linux-input, nox@jelal.kn-bremen.de >> Juergen Lock On Tue, Nov 4, 2014 at 10:06 AM, Dmitry Torokhov <dmitry.torokhov@gmail.com> wrote: > On Tue, Nov 04, 2014 at 09:38:38AM -0800, Ping Cheng wrote: >> Hi Dmitry, >> >> On Tue, Nov 4, 2014 at 12:08 AM, Dmitry Torokhov >> <dmitry.torokhov@gmail.com> wrote: >> > On Sat, Nov 01, 2014 at 08:40:19AM +0100, Hans Petter Selasky wrote: >> >> On 11/01/14 00:27, Ping Cheng wrote: >> >> >If touch_input is NULL on FreeBSD, you need to figure out the root >> >> >cause. Checking on touch_input itself would not fix the root cause... >> >> >> >> Right. >> >> >> >> The root cause is that FreeBSD launches two instances of the driver, >> >> running in two different userland processes, for the two different >> >> Wacom interfaces on a common USB device. In Linux the wacom >> >> interface drivers are running from the same kernel, and can share >> >> the data in question, but in FreeBSD's webcamd emulation, this >> >> doesn't work. Then the first wacom probe call would have to grab the >> >> second interface. >> >> >> >> Technically speaking this is a FreeBSD only problem and I plan to >> >> deliver a patch with the webcamd software to fix this, like already >> >> suggested to you guys. This situation can also happen on Linux in >> >> case of a "BadUSB" device. That's why I think that the NULL check >> >> should be upstreamed. >> > >> > Hmm, looking at this again it seems that we just cross our fingers and >> > hope that both interfaces are enumerated by the time we get event data >> > from the device. I do not think this is quite safe. We probably should >> > be checking the overall state of probing (i.e. whether we are done >> > probing both interfaces) before processing data for the device. >> >> Are you going to make a patch to address the issue? > > Not in the nearest future, sorry. No problem. I just want to make sure we don't duplicate the work... >> > Or maybe we should just forcibly try claiming secondary interface >> > while probing primary instead of messing with shared data item. I looked into the code. It is not a simple task to claim secondary interface while probing the primary one. For some devices, there is no easy way to tell if they have multi-interfaces or not before accessing the data, >> If we incorporate the above idea into a patch, we need to keep in mind >> that not all tablets support touch data. So, not all tablets have two >> interfaces. > > Right, but we do know the models that use multiple interfaces, right? Some models may have same product ID but can have pen or pen and touch interfaces. We'll have to request the device to be sure... Since touch_input is the only shared data/pointer that should not be called before all interlaces are probed, checking on touch_input when it is called, as suggested by Hans, is a feasible solution. As a by-product, it also fixes the FreeBSD issue. I'll post my patch here soon. Ping ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2014-11-07 1:30 UTC | newest] Thread overview: 10+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2014-10-18 10:56 Problems with Wacom Intuos PT M (CTH680) on FreeBSD Denis Akiyakov 2014-10-21 22:33 ` Dmitry Torokhov 2014-10-23 4:54 ` Denis Akiyakov 2014-10-23 5:54 ` Hans Petter Selasky 2014-10-31 23:27 ` Ping Cheng 2014-11-01 7:40 ` Hans Petter Selasky 2014-11-04 8:08 ` Dmitry Torokhov 2014-11-04 17:38 ` Ping Cheng 2014-11-04 18:06 ` Dmitry Torokhov 2014-11-07 1:30 ` Ping Cheng
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).