Bug 564095 - LIRC doesn't work with kernel 2.6.32.7
Summary: LIRC doesn't work with kernel 2.6.32.7
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: 12
Hardware: i686
OS: Linux
low
medium
Target Milestone: ---
Assignee: Kernel Maintainer List
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-02-11 20:19 UTC by David Gesswein
Modified: 2010-03-09 03:30 UTC (History)
8 users (show)

Fixed In Version: lirc-0.8.6-4.fc12
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-03-09 03:30:43 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description David Gesswein 2010-02-11 20:19:33 UTC
Description of problem:

lircd and irrecord fail to operate with lirc_dev and lirc_serial with kernel
kernel-PAE.i686   2.6.32.7-37.fc12

Version-Release number of selected component (if applicable):
lirc-0.8.6-1
kernel-PAE.i686   2.6.32.7-37.fc12.fc12.i686

How reproducible:
Always

Steps to Reproduce:
Install kernel from updates testing
start lircd using lirc_serial device
connect to lircd using irw or other program

Also irrecord gives similar errors

  
Actual results:

Get errors in /var/log/messages
Feb 5 22:01:33 quoth kernel: lirc_dev: IR Remote Control driver registered, major 249
Feb 5 22:01:33 quoth kernel: lirc_serial: Manually using active low receiver
Feb 5 22:01:33 quoth kernel: lirc_serial lirc_serial.0: lirc_dev: driver lirc_serial registered at minor = 0
Feb 5 22:01:37 quoth lircd-0.8.6[1918]: accepted new client on /var/run/lirc/lircd
Feb 5 22:01:37 quoth lircd-0.8.6[1918]: could not get hardware features
Feb 5 22:01:37 quoth lircd-0.8.6[1918]: this device driver does not support the LIRC ioctl interface
Feb 5 22:01:37 quoth lircd-0.8.6[1918]: major number of /dev/lirc0 is 249
Feb 5 22:01:37 quoth lircd-0.8.6[1918]: LIRC major number is 61
Feb 5 22:01:37 quoth lircd-0.8.6[1918]: check if /dev/lirc0 is a LIRC device
Feb 5 22:01:37 quoth lircd-0.8.6[1918]: Failed to initialize hardware 


Expected results:

No errors should be printed after accepted new client on /var/run/lirc/lircd

Additional info:

The problem seems to be some of the kernel ioctl's have been defined as passing 64 bit values but the user space programs are using 32 bit defines. It looks like the kernel code is also only using 32 bits in the put_user. This makes the user space ioctl's fail since the request value doesn't match.

I made it work for me by building a new kernel with all the lines defining 64 bit ioctl values changed to 32 bit in linux-2.6.32.i686/include/linux/lirc.h such as
#define LIRC_GET_FEATURES _IOR('i', 0x00000000, uint64_t) 

In linux-2.6.32.i686/include/linux/lirc.h we have this define
#define LIRC_GET_FEATURES _IOR('i', 0x00000000, uint64_t)
In linux-2.6.32.i686/drivers/input/lirc/lirc_dev.c we have it still returning
a long
case LIRC_GET_FEATURES:
   result = put_user(ir->d.features, (unsigned long *)arg);

In lirc-0.8.6/drivers/lirc.h we have it defined as 32 bits
#define LIRC_GET_FEATURES _IOR('i', 0x00000000, unsigned long)

In lirc-0.8.6/config.h we have
#define LIRC_MAJOR 61

In lirc-0.8.6/daemons/hw_default.c if the get features fails it prints
LIRC_MAJOR if the device doesn't match it. With the new dynamic major ID this error message isn't right but isn't really part of why it doesn't work.
else if(default_ioctl(LIRC_GET_FEATURES, &hw.features)==-1)
{
   logprintf(LOG_ERR,"could not get hardware features");
   logprintf(LOG_ERR,"this device driver does not "
      "support the LIRC ioctl interface");
   if(major(s.st_rdev) == 13)
   {
      logprintf(LOG_ERR, "did you mean to use the devinput "
         "driver instead of the %s driver?", hw.name);
   }
   else if(major(s.st_rdev) != LIRC_MAJOR)
   {
      logprintf(LOG_ERR, "major number of %s is %lu", hw.device,
         (unsigned long) major(s.st_rdev));
         logprintf(LOG_ERR, "LIRC major number is %lu",
         (unsigned long) LIRC_MAJOR);

Comment 1 Fedora Update System 2010-02-18 19:52:15 UTC
lirc-0.8.6-4.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/F12/FEDORA-2010-1361

Comment 2 Fedora Update System 2010-02-18 19:52:44 UTC
lirc-0.8.6-4.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/F12/FEDORA-2010-1361

Comment 3 Fedora Update System 2010-02-18 19:52:58 UTC
lirc-0.8.6-4.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/F12/FEDORA-2010-1361

Comment 4 Jarod Wilson 2010-02-18 19:58:18 UTC
Ugh. Update system went a little batty there. The new package is in updates-testing, and will remain there until a 2.6.32.x kernel gets pushed to updates, at which point lirc will follow it.

Comment 5 Fedora Update System 2010-02-18 22:35:59 UTC
lirc-0.8.6-4.fc12 has been pushed to the Fedora 12 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update lirc'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F12/FEDORA-2010-1361

Comment 6 Terry Barnaby 2010-02-28 07:38:04 UTC
What has happened here ?
There seems to be no lirc-0.8.6-4.fc12 in the Fedora 12 testing repository and
the link above is a link to bind ??

Comment 7 David Gesswein 2010-03-01 12:58:39 UTC
You can download it from here. Don't know why its not in testing. http://kojipkgs.fedoraproject.org/packages/lirc/0.8.6/4.fc12/

Comment 8 Jarod Wilson 2010-03-01 14:55:09 UTC
There have been some issues with bodhi lately... Seems we've been bit by one here... If you look at the update page for lirc, it claims to be in updates-testing, so I dunno what's up.

https://admin.fedoraproject.org/updates/lirc-0.8.6-4.fc12

Will try a few things, see if I can convince it to behave...

Comment 9 Terry Barnaby 2010-03-02 14:13:56 UTC
Thanks, I have got the package and it works fine.

Comment 10 Fedora Update System 2010-03-03 01:52:35 UTC
lirc-0.8.6-4.fc12 has been pushed to the Fedora 12 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update lirc'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F12/FEDORA-2010-3395

Comment 11 Fedora Update System 2010-03-09 03:30:37 UTC
lirc-0.8.6-4.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.