Bug 246406 - Sane backend mustek_pp doesn't work if ppdev kernel module is loaded
Sane backend mustek_pp doesn't work if ppdev kernel module is loaded
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: libieee1284 (Show other bugs)
7
All Linux
low Severity medium
: ---
: ---
Assigned To: Tim Waugh
:
Depends On:
Blocks: F7Update
  Show dependency treegraph
 
Reported: 2007-07-01 19:05 EDT by Juan Antonio Martinez
Modified: 2007-11-30 17:12 EST (History)
3 users (show)

See Also:
Fixed In Version: 0.2.11-1.fc7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-09-25 04:28:34 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Juan Antonio Martinez 2007-07-01 19:05:40 EDT
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 04:30:22 EDT
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 18:57:23 EDT
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 19:08:29 EDT
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 02:18:44 EDT
"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 10:01:03 EDT
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 09:28:18 EDT
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 07:23:15 EDT
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 16:20:57 EDT
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 02:36:43 EDT
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 05:40:55 EDT
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 06:51:16 EDT
0.2.11 built for Fedora 8.  Keeping this open for the F-7 update.
Comment 12 Fedora Update System 2007-09-18 18:30:54 EDT
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 12:48:02 EDT
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 19:04:38 EDT
:) Closing then...

Cheers
Chris
Comment 15 Fedora Update System 2007-09-25 04:28:32 EDT
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.