USB DUX and recent kernels

this is of general interest here:
--------------------------------------------------------------------

Hi Bernd,

  just to keep you in touch, I have discovered a strange thing. I have
  three 2.6.15 kernels:

   1. The standard Ubuntu kernel
   2. One I compiled myself using the rtai 3.3 patch
   3. One I compiled myself using the rtai 3.4 patch

On all of these, I can use usbview to see, for example, my usb mouse
appearing and dissapearing as I plug it in and out. However, usbdux
only appears and disappears when using number 2 (with the 3.3 patch)
-- it appears as unknown device.

Hopefuly, this may provide a clue to the problem.

--------------------------------------------------------------------------

Hi Peter, (copying this to the comedi mailing list)

did a kernel testing party yesterday. ;-) My results are the following:
2.6.12.6: works fine
2.6.8 debian: works fine
2.6.15.7: usbdux works fine but my USB mouse only gets detected after X 
server restart
2.6.16.29: no interrupt allocated for the ehci (USB-2.0) controller, so 
usbduxfast was not operational
2.6.17 and younger: loads of changes in the header files of the PCMCIA 
stack which break comedi. Don't know why they do it but it's a pain. 
Dave has written a patch for one driver which has to be replicated to 
the other drivers:
https://bugzilla.comedi.org/cgi-bin/bugzilla/show_bug.cgi?id=238

So, on my machine your ubuntu kernel should work fine. If there's a 
problem with usb it is usually an interrupt problem.

Try "pci=noacpi acpi=noirq" on your machine. It might help.

kernel  /boot/bzImage root=/dev/hda2 ro video=vga16:off pci=noacpi 
acpi=noirq

In general I'm not very impressed by the kernel development just now 
because the kernels are not getting better the higher the version 
number. It's more or less an up and down. My personal solution is to 
work either with the debian 2.6.8 kernel or with a carefully selected 
one (2.6.12.6 in my case).

/Bernd

www:    http://www.berndporr.me.uk/
         http://www.linux-usb-daq.co.uk/
Mobile: +44 (0)7840 340069
Work:   +44 (0)141 330 5237
         University of Glasgow
         Department of Electronics & Electrical Engineering
         Room 519, Rankine Building, Oakfield Avenue,
         Glasgow, G12 8LT


Peter Gawthrop wrote:
> Hi Bernd,
> 
>  just to keep you in touch, I have discovered a strange thing. I have
>  three 2.6.15 kernels:
> 
>   1. The standard Ubuntu kernel
>   2. One I compiled myself using the rtai 3.3 patch
>   3. One I compiled myself using the rtai 3.4 patch
> 
> On all of these, I can use usbview to see, for example, my usb mouse
> appearing and dissapearing as I plug it in and out. However, usbdux
> only appears and disappears when using number 2 (with the 3.3 patch)
> -- it appears as unknown device.
> 
> Hopefuly, this may provide a clue to the problem.
> 
> 	  Peter.
> 
> 
> 
> From: Bernd Porr <B.Porr_at_elec.gla.ac.uk>
> Subject: Re: USB DUX
> Date: Wed, 18 Oct 2006 09:04:45 +0100
> 
>> Hi Peter,
>>  (
>> ok. I'll let you know if I've found a bug.
>>
>> All the best
>> /Bernd
>>
>> www:    http://www.berndporr.me.uk/
>>          http://www.linux-usb-daq.co.uk/
>> Mobile: +44 (0)7840 340069
>> Work:   +44 (0)141 330 5237
>>          University of Glasgow
>>          Department of Electronics & Electrical Engineering
>>          Room 519, Rankine Building, Oakfield Avenue,
>>          Glasgow, G12 8LT
>>
>>
>> Peter Gawthrop wrote:
>>> Hi Bernd,
>>>
>>>   I think you are right, 2.6.17 does not even recognise the
>>>   card. However, I have dropped back to 2.6.15 and the basic tests
>>>   work fine.  I'll let you know how things progress.
>>>
>>>   Best wishes,
>>>
>>>   Peter.
>>>
>>>
>>> From: Bernd Porr <B.Porr_at_elec.gla.ac.uk>
>>> Subject: Re: USB DUX
>>> Date: Tue, 17 Oct 2006 15:51:21 +0100
>>>
>>>
>>>> I'll look into that at the end of the week and compile a newer kernel. I mostly 
>>>> run the original debian 2.6.8 kernel. Probablem is that the linux guys screw up 
>>>> the USB subsystem in every second version just now. Really quite annoying.
>>>>
>>>> /Bernd
>>>>
>>>> www:    http://www.berndporr.me.uk/
>>>>         http://www.linux-usb-daq.co.uk/
>>>> Mobile: +44 (0)7840 340069
>>>> Work:   +44 (0)141 330 5237
>>>>         University of Glasgow
>>>>         Department of Electronics & Electrical Engineering
>>>>         Room 519, Rankine Building, Oakfield Avenue,
>>>>         Glasgow, G12 8LT
>>>>
>>>>
>>>> Peter Gawthrop wrote:
>>>>
>>>>> Hi Bernd,
>>>>>
>>>>>  I can't get the new USB-DUX working under my new kernel
>>>>>  (2.6.17.13-rtai-3.4).
>>>>>
>>>>>  The errors are:
>>>>>
>>>>> root_at_barra:/home/peterg# /etc/hotplug/usb/usbdux
>>>>> Configure failed!: No such device
>>>>> Check kernel log for more information
>>>>> Possible reasons for failure:
>>>>>  Unknown
>>>>>
>>>>> root_at_barra:/home/peterg# dmesg | tail
>>>>> ....
>>>>> [17189276.360000] usb 4-3: new high speed USB device using ehci_hcd and address 5
>>>>> [17189359.208000] comedi0: usbdux: error: attach failed, no usbdux devs connected to the usb bus.
>>>>> [17189359.208000] comedi0: usbdux: detach usb device
>>>>> [17189359.208000] comedi?: usbdux: detach without ptr to usbduxsub[]
>>>>> root_at_barra:/home/peterg#
>>>>>
>>>>> root_at_barra:/home/peterg# lsmod | grep usbdux
>>>>> usbdux                 23232  0
>>>>> comedi                 33344  2 usbdux,kcomedilib
>>>>> usbcore               127104  6 usbdux,hci_usb,usbhid,ehci_hcd,uhci_hcd
>>>>> root_at_barra:/home/peterg#
>>>>>
>>>>>
>>>>> I assume this is to do with the differences betwen 2.6.15 and 2.6.17,
>>>>> but any help would be much appreciated.
>>>>>
>>>>>    Best wishes,
>>>>>
>>>>>    Peter.
>>>>>
>>>>>
>>>>> From: Bernd Porr <B.Porr_at_elec.gla.ac.uk>
>>>>> Subject: Re: USB DUX
>>>>> Date: Mon, 09 Oct 2006 19:30:20 +0100
>>>>>
>>>>>
>>>>>
>>>>>> Hi Peter,
>>>>>>
>>>>>> pleasure! great. Thanks for the order.
>>>>>>
>>>>>> /Bernd
>>>>>>
>>>>>> www:    http://www.berndporr.me.uk/
>>>>>>        http://www.linux-usb-daq.co.uk/
>>>>>> Mobile: +44 (0)7840 340069
>>>>>> Work:   +44 (0)141 330 5237
>>>>>>        University of Glasgow
>>>>>>        Department of Electronics & Electrical Engineering
>>>>>>        Room 519, Rankine Building, Oakfield Avenue,
>>>>>>        Glasgow, G12 8LT
>>>>>>
>>>>>>
>>>>>> Peter Gawthrop wrote:
>>>>>>
>>>>>>
>>>>>>> Hi Bernd,
>>>>>>>
>>>>>>>  thanks for organising that. Unfortunately, I didn't get your
>>>>>>>  measage in time so that is why I have not picked it up.
>>>>>>>
>>>>>>>  Anyway, I have now gone ahead and ordered one.
>>>>>>>
>>>>>>>  Thanks again for your help,
>>>>>>>
>>>>>>>  Peter.
>>>>>>>
>>>>>>>
>>>>>>> From: Bernd Porr <B.Porr_at_elec.gla.ac.uk>
>>>>>>> Subject: Re: USB DUX
>>>>>>> Date: Thu, 05 Oct 2006 11:54:40 +0100
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>> Hi Peter,
>>>>>>>>
>>>>>>>> yes. I have. Have one. I give it to Vi Romanes because I'll be lecturing this 
>>>>>>>> afternoon.
>>>>>>>>
>>>>>>>> /Bernd
>>>>>>>>
>>>>>>>> www:    http://www.berndporr.me.uk/
>>>>>>>>       http://www.linux-usb-daq.co.uk/
>>>>>>>> Mobile: +44 (0)7840 340069
>>>>>>>> Work:   +44 (0)141 330 5237
>>>>>>>>       University of Glasgow
>>>>>>>>       Department of Electronics & Electrical Engineering
>>>>>>>>       Room 519, Rankine Building, Oakfield Avenue,
>>>>>>>>       Glasgow, G12 8LT
>>>>>>>>
>>>>>>>>
>>>>>>>> Peter Gawthrop wrote:
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>> Hi Bernd,
>>>>>>>>>
>>>>>>>>> thanks. I treid the RTAI-Lab generated targets using the -s (soft) option;
>>>>>>>>> they don't crash which is good. Do you have a vesion of USB-DUX with
>>>>>>>>> BNC conector for me to try?
>>>>>>>>>
>>>>>>>>> Best wishes
>>>>>>>>>
>>>>>>>>> Peter.
>>>>>>>>>
>>>>>>>>> From: Bernd Porr <B.Porr_at_elec.gla.ac.uk>
>>>>>>>>> Subject: Re: USB DUX
>>>>>>>>> Date: Mon, 02 Oct 2006 20:40:10 +0100
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>> Hi Peter,
>>>>>>>>>>
>>>>>>>>>> usb and realtime hasn't been tested really. I have never used it. 
>>>>>>>>>> There's been some traffic on the comedi list about that. Don't know if 
>>>>>>>>>> the usb driver is buggy in hard realtime. Try soft realtime.
>>>>>>>>>>
>>>>>>>>>> /Bernd
>>>>>>>>>>
>>>>>>>>>> Peter Gawthrop wrote:
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>> Hi Bernd,
>>>>>>>>>>>
>>>>>>>>>>> that is very kind of you. I gave it a try with the following results
>>>>>>>>>>> (using Linux 2.6.15 patched with RTAI 3.3):
>>>>>>>>>>>
>>>>>>>>>>> Having loaded the various rtai/comedi modules, I sucessfully
>>>>>>>>>>> initialised the card:
>>>>>>>>>>>
>>>>>>>>>>> sudo comedi_config -i /usr/local/share/usb/usbdux_firmware.hex /dev/comedi0 usbdux
>>>>>>>>>>> [  678.327169] comedi0: usbdux: uploading 1471 bytes to addr 0, first byte=2.
>>>>>>>>>>> [  678.330156] comedi0: usbdux: usb-device 0 is attached to comedi.
>>>>>>>>>>> [  678.330323] comedi0: attached to usbdux.
>>>>>>>>>>>
>>>>>>>>>>> I then ran comedi test - this stops before terminating with the
>>>>>>>>>>> following output:
>>>>>>>>>>>
>>>>>>>>>>> peterg_at_barra:~$ sudo comedi_test
>>>>>>>>>>> I: Comedi version: 0.7.73
>>>>>>>>>>> I: Comedilib version: unknown =)
>>>>>>>>>>> I: driver name: usbdux
>>>>>>>>>>> I: device name: usbdux
>>>>>>>>>>> I:
>>>>>>>>>>> I: subdevice 0
>>>>>>>>>>> I: testing info...
>>>>>>>>>>> rev 1
>>>>>>>>>>> I: subdevice type: 1 (analog input)
>>>>>>>>>>> number of channels: 8
>>>>>>>>>>> max data value: 4095
>>>>>>>>>>> ranges:
>>>>>>>>>>> all chans: [-4.096,4.096] [-2.048,2.048] [0,4.096] [0,2.048]
>>>>>>>>>>> I: testing insn_read...
>>>>>>>>>>> rev 1
>>>>>>>>>>> comedi_do_insn returned 1, good
>>>>>>>>>>> I: testing insn_read_0...
>>>>>>>>>>> comedi_do_insn returned 0, good
>>>>>>>>>>> I: testing insn_read_time...
>>>>>>>>>>> rev 1
>>>>>>>>>>> comedi_do_insn: 3
>>>>>>>>>>> read time: 1519 us
>>>>>>>>>>> I: testing cmd_no_cmd...
>>>>>>>>>>> not applicable
>>>>>>>>>>> I: testing cmd_probe_src_mask...
>>>>>>>>>>> rev 1
>>>>>>>>>>> command source mask:
>>>>>>>>>>> start: now|int
>>>>>>>>>>> scan_begin: timer
>>>>>>>>>>> convert: now
>>>>>>>>>>> scan_end: count
>>>>>>>>>>> stop: none|count
>>>>>>>>>>> I: testing cmd_probe_fast_1chan...
>>>>>>>>>>> command fast 1chan:
>>>>>>>>>>> start: now 0
>>>>>>>>>>> scan_begin: timer 1000000
>>>>>>>>>>> convert: now 0
>>>>>>>>>>> scan_end: count 1
>>>>>>>>>>> stop: count 2
>>>>>>>>>>> I: testing cmd_read_fast_1chan...
>>>>>>>>>>>
>>>>>>>>>>> I used ^c to kill at this point
>>>>>>>>>>>
>>>>>>>>>>> I tried running two different real-time programms which work OK with
>>>>>>>>>>> my DAQ-1200 PCMCIA card. They both lock up the kernel - I have to
>>>>>>>>>>> switch off and reboot. There is no system message (using dmesg).
>>>>>>>>>>>
>>>>>>>>>>> Any ideas?
>>>>>>>>>>>
>>>>>>>>>>> Best wishes,
>>>>>>>>>>>
>>>>>>>>>>> Peter.
>>>>>>>>>>>
>>>>>>>>>>> From: Bernd Porr <B.Porr_at_elec.gla.ac.uk>
>>>>>>>>>>> Subject: Re: USB DUX
>>>>>>>>>>> Date: Sat, 30 Sep 2006 19:56:02 +0100
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>> Hi Peter,
>>>>>>>>>>>>
>>>>>>>>>>>> actually I've just got one back from a student which should be still in 
>>>>>>>>>>>> my pigeon hole. Just take it from there. I'm in Rome at a conference 
>>>>>>>>>>>> just now.
>>>>>>>>>>>>
>>>>>>>>>>>> All the best
>>>>>>>>>>>> /Bernd
>>>>>>>>>>>>
>>>>>>>>>>>> Peter Gawthrop wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>> Hi Bernd,
>>>>>>>>>>>>>
>>>>>>>>>>>>> any chance of borrowing a USB-DUX to try out? I'm quite keen on
>>>>>>>>>>>>> buying the BNC version but would like to give it a spin first. I have
>>>>>>>>>>>>> an RTAI/Comedi/RTAI-lab  system up and running in my room at the
>>>>>>>>>>>>> moment using a PCMCIA DAQ-1200 card; I have the usbdux module
>>>>>>>>>>>>> compiled.
>>>>>>>>>>>>>
>>>>>>>>>>>>> Best wishes,
>>>>>>>>>>>>>
>>>>>>>>>>>>> Peter.
>>>>>>>>>>>>>
>>>>>>>>>>>>> --------------------------------------------------------------------
>>>>>>>>>>>>> | Professor Peter J Gawthrop       | Tel: +44 141 330 4960/2528      |
>>>>>>>>>>>>> | Senior Research Fellow           | Fax: +44 141 330 4343           |
>>>>>>>>>>>>> | Centre for Systems and Control & | Room: James Watt 603            |
>>>>>>>>>>>>> | Dept. of Mechanical Engineering  | Email: P.Gawthrop_at_eng.gla.ac.uk |
>>>>>>>>>>>>> | University of Glasgow            | URL: www.mech.gla.ac.uk/~peterg |
>>>>>>>>>>>>> | GLASGOW G12 8QQ, Scotland, UK    |                                 |
>>>>>>>>>>>>> --------------------------------------------------------------------

Received on 2006-10-22Z11:01:36