Bug 246406 - Sane backend mustek_pp doesn't work if ppdev kernel module is loaded
Summary: Sane backend mustek_pp doesn't work if ppdev kernel module is loaded
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: libieee1284
Version: 7
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Tim Waugh
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: F7Update
TreeView+ depends on / blocked
 
Reported: 2007-07-01 23:05 UTC by Juan Antonio Martinez
Modified: 2007-11-30 22:12 UTC (History)
3 users (show)

Fixed In Version: 0.2.11-1.fc7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-09-25 08:28:34 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Juan Antonio Martinez 2007-07-01 23:05:40 UTC
Description of problem:
Sane backend mustek_pp doesn't work if ppdev kernel module is loaded

Version-Release number of selected component (if applicable):
[root@drake sane.d]# uname -a
Linux drake.micasa.es 2.6.21-1.3228.fc7 #1 SMP Tue Jun 12 15:37:31 EDT 2007 i686
athlon i386 GNU/Linux
[root@drake sane.d]# rpm -qf /usr/bin/sane-find-scanner 
sane-backends-1.0.18-6.fc7

How reproducible:
allways

Steps to Reproduce:
1. Get a fresh Fedora 7 install, with latest kernel (2.6.21-1.3228.fc7)
2. Configure sane to use any mustek_pp based scanner 
3. sane-find-scanner -p won't locate the scanner, unless you do a
"rmmod ppdev" and prevents kernel from reload module
  
Actual results:
if ppdev module is loaded, scanner won't be found.
with kernels 2.6.20 ppdev works fine

Expected results:
mustek_pp scanner should be found on every kernel version

Additional info:
http://bugs.archlinux.org/task/7438 shows same bug. 
http://sourceforge.net/tracker/index.php?func=detail&aid=1739643&group_id=29314&atid=395778
reports on same error

libieee1284_test output on fail:
[root@drake sane.d]# libieee1284_test
Found 3 ports:
0x278:
0x378:
0x3bc:

0x278: inaccessible
0x378: inaccessible
0x3bc: inaccessible

Comment 1 Juan Antonio Martinez 2007-07-02 08:30:22 UTC
From documentation at:
http://www.digipedia.pl/man/libieee1284.3.html
Create file /etc/ieee1284.conf 

[root@drake char]# cat /etc/ieee1284.conf
# Needed for mustek_pp and some other parallel port Sane backends
disallow method ppdev
[root@drake char]# 

Now everything works fine.
That is: to use libieee1284 library, you need to disable ppdev usage with 2.6.21
 fedora kernel

Not sure if kernel (ppdev) bug (works w/o changes in 2.6.20 kernels) or
libieee1284 one


Comment 2 Chuck Ebbert 2007-07-02 22:57:23 UTC
The ppdev driver hasn't changed in at least six months prior to fc7 release.
What could have caused this, I don't know...


Comment 3 Karsten Wade 2007-07-02 23:08:29 UTC
Bugzilla didn't update the assignment, so this was still assigned to the wrong
person/team.  Reassigning.

Comment 4 Juan Antonio Martinez 2007-07-03 06:18:44 UTC
"The ppdev driver hasn't changed in at least six months prior to fc7 release."

Well, this is not exactly true...

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=da6752964290567a6b4ea180d1becda75e810e87

I've reported this bug to linux-kernel and sent some traces there. See thread
ppdev - libieee1284.so  conflicts with 2.6.21" in kernel-list at vger

Comment 5 Juan Antonio Martinez 2007-07-03 14:01:03 UTC
An stupid question trying to recompile ppdev

I've downloaded kernel-2.6.21-1.3228.fc7.src.rpm, and tried to apply backpatch
to ppdev.c ... and found that -at least- ppdev.c and parport.h are the same ones
than in 2.6.20 version... but git says that these files have change to use new
port-dev in parport struct in 2.6.21
http://www.linuxhq.com/kernel/v2.6/21-git17/drivers/char/ppdev.c
http://www.linuxhq.com/kernel/v2.6/21-git17/include/linux/parport.h

¿Am I doing something wrong? ¿Or perhaps these changes are newer than Fedora's
2.6.21 kernel


Comment 6 Juan Antonio Martinez 2007-07-21 13:28:18 UTC
Just updated to new fedora's kernel 2.6.22.1-27.fc7.

ppdev-libieee1284 conflict still remains

Comment 7 Juan Antonio Martinez 2007-08-14 11:23:15 UTC
From libieee1284 bugtracker:

http://sourceforge.net/tracker/index.php?func=detail&aid=1739643&group_id=29314&atid=395778

Seems that the change on how to handle directoriy inode link count 
in procfs makes libieee1284 fail. A trivial patch to libieee1284/src/detect.c 
is shown:

% diff -u detect.c.orig detect.c
--- detect.c.orig       2007-08-03 09:27:29.000000000 +0200
+++ detect.c    2007-08-03 09:27:46.000000000 +0200
@@ -69,8 +69,7 @@
   int which = 0;
   struct stat st;
   if (stat ("/proc/sys/dev/parport", &st) == 0 &&
-      S_ISDIR (st.st_mode) &&
-      st.st_nlink > 2)
+      S_ISDIR (st.st_mode))
     {
       which = PROC_SYS_DEV_PARPORT_CAPABLE;
       debugprintf ("This system has /proc/sys/dev/parport\n");

I've asked lkml if this is a bug on procfs or a new unnoticed (for me) feature

Comment 8 Christopher Brown 2007-09-17 20:20:57 UTC
Hello Juan,

I'm reviewing this bug as part of the kernel bug triage project, an attempt to
isolate current bugs in the fedora kernel.

http://fedoraproject.org/wiki/KernelBugTriage

I am CC'ing myself to this bug and will try and assist you in resolving it if I can.

There hasn't been much activity on this bug for a while. Could you tell me if
you are still having problems with the latest kernel?

If the problem no longer exists then please close this bug or I'll do so in a
few days if there is no additional information lodged.

Cheers
Chris

Comment 9 Juan Antonio Martinez 2007-09-18 06:36:43 UTC
Chris:
As you can see in the link to sourceforge's libieee1284 project, 
this is not really a kernel bug, just a libiee1284 one

Tim Waugh ( twaugh at redhat dot com ) has already fixed it in their
libieee1284 CVS. We need to contact him to release a new rpm version 
to finally get it solved in Fedora distro

So yes, it's time to close this bug or reassign to Tim
Cheers
Juan Antonio


Comment 10 Christopher Brown 2007-09-18 09:40:55 UTC
Thanks for the info Juan. I'm changing the bug category then which will
hopefully prompt Tim to push the update in time for F8.

Cheers
Chris

Comment 11 Tim Waugh 2007-09-18 10:51:16 UTC
0.2.11 built for Fedora 8.  Keeping this open for the F-7 update.

Comment 12 Fedora Update System 2007-09-18 22:30:54 UTC
libieee1284-0.2.11-1.fc7 has been pushed to the Fedora 7 testing repository.  If problems still persist, please make note of it in this bug report.

Comment 13 Juan Antonio Martinez 2007-09-21 16:48:02 UTC
libieee1284-0.2.11-1.fc7.i386.rpm from fedora testing repository works fine for
me: problem solved (at least with kernel  2.6.22.5-76.fc7 )

Thanks for your work
Juan Antonio

Comment 14 Christopher Brown 2007-09-21 23:04:38 UTC
:) Closing then...

Cheers
Chris

Comment 15 Fedora Update System 2007-09-25 08:28:32 UTC
libieee1284-0.2.11-1.fc7 has been pushed to the Fedora 7 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.