Herein, I report resolution of the joypad-delay on hardy-rtai problem with
notes.

The motherboard is MSI K9MM-V (via chipset) purchased Dec 06

So i removed the joypad from its usb port on the back of the computer
and connected it to a _different_ usb hub with ports at the front of
the computer and the joypad worked with no event timing delays (sigh).

Examining syslog showed that the kernel was disabling IRQ 10 and reverting to
_polling_ for the interrupt associated with two of the five usb hubs on this
machine (as well as the wired ethernet device, but I didn't notice since
I'm using a usb wifi device).

 $ grep 10 /proc/interrupts
 10: 100051   XT-PIC-XT   uhci_hcd:usb1, uhci_hcd:usb2, eth0, [EMAIL 
PROTECTED]:0000:01:00.0


   syslog excerpt:
   ...
   irq 10: nobody cared (try booting with the "irqpoll" option)
   Pid: 4952, comm: sh Not tainted 2.6.24-16-rtai #1
    [__report_bad_irq+0x36/0x7d] __report_bad_irq+0x36/0x7d
    [note_interrupt+0x19c/0x1d7] note_interrupt+0x19c/0x1d7
    [handle_IRQ_event+0x1e/0x4a] handle_IRQ_event+0x1e/0x4a
    ...
    [error_code+0x6f/0x80] error_code+0x6f/0x80
    =======================
   handlers:
   [<f889b7d6>] (usb_hcd_irq+0x0/0x53 [usbcore])
   [<f889b7d6>] (usb_hcd_irq+0x0/0x53 [usbcore])
   [<f884774a>] (rhine_interrupt+0x0/0x634 [via_rhine])
   [<f8ec93a6>] (via_driver_irq_handler+0x0/0x15b [via])
   Disabling IRQ #10
   ...

Something was misbehaving in the arrangement of interrupt sharing.  With the
IRQ 10 interrupt disabled, the kernel apparently reverts to polling with a
latency of 64 jiffies:

   syslog excerpt:
   PCI: Setting latency timer of device 0000:00:01.0 to 64  <-- pci bridge
   PCI: Setting latency timer of device 0000:00:11.5 to 64  <-- audio controller

The 64 corresponds to 64 jiffies (I think) between polls and 64 jiffies * 4
mS/jiffie = 256 mS (the 4 mS/jiffie is from wikipedia, i don't know why I
measure 248 mS but it seems pretty close).

With the same hardware configuration booting the hardy-GENERIC kernel, ACPI is
used to configure interrupts and there is no problem with the joypad.  There
is, however, an anomaly with my hardware since the generic kernel using ACPI
also reports disabling of an interrupt:

   syslog excerpt:
   irq 20: nobody cared (try booting with the "irqpoll" option)
   Pid: 5716, comm: xkbcomp Not tainted 2.6.24-16-generic #1
    [<c0164924>] __report_bad_irq+0x24/0x80
    [<c0164bfb>] note_interrupt+0x27b/0x2c0
    [<c0163e20>] handle_IRQ_event+0x30/0x60
    [<c01655b6>] handle_fasteoi_irq+0x86/0xe0
    [<c0106f1b>] do_IRQ+0x3b/0x70
    [<c018deb1>] sys_read+0x41/0x70
    [<c0105413>] common_interrupt+0x23/0x30
    =======================
   handlers:
   [<f8fe1430>] (via_driver_irq_handler+0x0/0x1c0 [via])
   Disabling IRQ #20

My understanding is that ACPI must be disabled with RTAI and the disabling 
is confirmed by comparing the config files for hardy-rtai and hardy-generic.

On this machine, in both the hardy-generic and hardy-rtai cases, there seems to
be some bad behavior with the via chipset at pci device 0000:01:00.0 
This device is the via/unichrome on-board video adapter:

  01:00.0 VGA compatible controller: VIA Technologies, Inc. S3 Unichrome Pro 
VGA Adapter (rev 01)

At this point, I realized the new hardy-rtai install was using the via driver 
for X
where I have been using the _vesa_ driver on dapper.

So I changed xorg.conf to use my vesa based xorg.conf file from dapper and
rebooted hardy-rtai.  The joypad worked properly, the Disabling of IRQ was gone
as was the message "irq 10 nobody cared ..."

As a test, I changed the xorg.conf from the vesa driver  back to the via driver
and restarted X (no reboot), the disabling of IRQ 10 occurs again:

 syslog excerpt:
 ...
 [drm] Initialized drm 1.1.0 20060810
 [drm] Initialized via 2.11.1 20070202 on minor 0
 agpgart: Found an AGP 3.0 compliant device at 0000:00:00.0.
 agpgart: Xorg tried to set rate=x12. Setting to AGP3 x8 mode.
 agpgart: Putting AGP V3 device at 0000:00:00.0 into 8x mode
 agpgart: Putting AGP V3 device at 0000:01:00.0 into 8x mode
 NetworkManager: <debug> [1215794879.883825] nm_hal_device_added(): New device 
added (hal udi is 
'/org/freedesktop/Hal/devices/pci_1106_3108_drm_unichrom_card0').
 irq 10: nobody cared (try booting with the "irqpoll" option)
 ...


In summary:

  The root problem was a misbehaving via video driver component (not sure which 
  possibly via-agp.ko) in conjunction with the unavailability of ACPI with RTAI.

  It's a long road from poor joypad response to the vesa video driver.

  The automatic configuration of xorg.conf with hardy is so sophisticated as to
  be non-understandable.

Lessons learned:

  Pay more attention to messages in syslog 


Hope this can help someone else.
-- 
Dewey Garrett    (925)447-9364


-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to