Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
HOWTO: Parallel Port Scanner
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3, 4  Next  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
Hypnos
Advocate
Advocate


Joined: 18 Jul 2002
Posts: 2868
Location: Omnipresent

PostPosted: Tue May 16, 2006 8:46 pm    Post subject: Reply with quote

Um, have you tried rebuilding ppscsi?
_________________
Personal overlay | Simple backup scheme
Back to top
View user's profile Send private message
wipp
n00b
n00b


Joined: 27 Mar 2004
Posts: 32
Location: Zurich, Switzerland

PostPosted: Wed May 17, 2006 7:35 pm    Post subject: Reply with quote

Yes, that's what I do everytime after building a new kernel.
I even switched to ppscsi-beta2-20060424.
Back to top
View user's profile Send private message
Hypnos
Advocate
Advocate


Joined: 18 Jul 2002
Posts: 2868
Location: Omnipresent

PostPosted: Wed May 17, 2006 8:49 pm    Post subject: Reply with quote

I have nothing to offer but to suggest contacting the ppscsi developers.
_________________
Personal overlay | Simple backup scheme
Back to top
View user's profile Send private message
wipp
n00b
n00b


Joined: 27 Mar 2004
Posts: 32
Location: Zurich, Switzerland

PostPosted: Thu May 18, 2006 2:54 pm    Post subject: Reply with quote

ok, wrote a mail to penguin breeder.

Anyone else having this issue? Ore is this specific to my hardware?
Back to top
View user's profile Send private message
blue_american
Tux's lil' helper
Tux's lil' helper


Joined: 16 Sep 2005
Posts: 92
Location: Coimbra, Portugal

PostPosted: Thu Dec 07, 2006 3:56 pm    Post subject: Reply with quote

Does this solution work on Plustek scanners? And if it works, in my case my scanner scans negatives, will this work too? Thanks.
Back to top
View user's profile Send private message
Hypnos
Advocate
Advocate


Joined: 18 Jul 2002
Posts: 2868
Location: Omnipresent

PostPosted: Thu Dec 07, 2006 4:53 pm    Post subject: Reply with quote

blue_american wrote:
Does this solution work on Plustek scanners? And if it works, in my case my scanner scans negatives, will this work too? Thanks.

Try it, report back. :)
_________________
Personal overlay | Simple backup scheme
Back to top
View user's profile Send private message
blue_american
Tux's lil' helper
Tux's lil' helper


Joined: 16 Sep 2005
Posts: 92
Location: Coimbra, Portugal

PostPosted: Fri Dec 08, 2006 2:14 am    Post subject: Reply with quote

Hi.

First of all, I don't know which modules to load. I tried to load them all and it stuck on sparcsi.ko.

If I lunch xsane, will open with the tv card selected :P

Anyone actually got a plustek working on 2.6?
Back to top
View user's profile Send private message
Hypnos
Advocate
Advocate


Joined: 18 Jul 2002
Posts: 2868
Location: Omnipresent

PostPosted: Sat Jan 20, 2007 2:38 am    Post subject: Reply with quote

Updated top post to include info about new ebuild.
_________________
Personal overlay | Simple backup scheme
Back to top
View user's profile Send private message
keba
Guru
Guru


Joined: 02 Jun 2006
Posts: 304
Location: Switzerland

PostPosted: Thu Aug 23, 2007 12:15 pm    Post subject: problem with linux/config.h Reply with quote

Hi,

your patch is great, it solved half of my problem! But I still have one. I'm using Kernel 2.6.22 and I get the following error:
Code:

make -C /lib/modules/`uname -r`/build M=`pwd` modules
make[1]: Entering directory `/usr/src/linux-2.6.22-gentoo-r2'
  CC [M]  /home/jonathan/Documents/downloads/ppscsi-beta2/ppscsi.o
In file included from /home/jonathan/Documents/downloads/ppscsi-beta2/ppscsi.c:55:
/home/jonathan/Documents/downloads/ppscsi-beta2/ppscsi.h:16:26: error: linux/config.h: No such file or directory
/home/jonathan/Documents/downloads/ppscsi-beta2/ppscsi.c: In function 'ppsc_detect':
/home/jonathan/Documents/downloads/ppscsi-beta2/ppscsi.c:1151: warning: assignment from incompatible pointer type
make[2]: *** [/home/jonathan/Documents/downloads/ppscsi-beta2/ppscsi.o] Error 1
make[1]: *** [_module_/home/jonathan/Documents/downloads/ppscsi-beta2] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.22-gentoo-r2'
make: *** [all] Error 2


I have re-emerged the linux-headers but there is no config.h! What can I do?
_________________
Prayer can change the world!
Back to top
View user's profile Send private message
keba
Guru
Guru


Joined: 02 Jun 2006
Posts: 304
Location: Switzerland

PostPosted: Thu Aug 23, 2007 3:08 pm    Post subject: Solution Reply with quote

Well, I found the solution, and it's quit easy. /lib/modules/"kernel-version/build/linux/config.h got renamed to autoconf.h around kernel 2.6.19. My last kernel (before 2.6.22) was 2.6.18... So I created a patch. The first part (which changes ppscsi.c) is identical to what you already found out in this thread. The second part changes ppscsi.h:

Code:


--- ppscsi.c.orig   2007-04-02 13:34:27.000000000 +0100
+++ ppscsi.c   2007-04-02 13:34:41.000000000 +0100
@@ -1144,8 +1144,12 @@
       pha->device[p] = '.';
       pha->device[p+1] = '0' + i;
       pha->device[p+2] = 0;
-
-      INIT_WORK(&pha->wq, ppsc_tq_int, pha);
+      
+      #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)
+         INIT_WORK(&pha->wq, ppsc_tq_int, pha);
+      #else
+         INIT_WORK(&pha->wq, ppsc_tq_int);
+      #endif
 
       init_timer (&pha->timer);
       pha->timer.data = (unsigned long) pha;
 
--- ppscsi.h.orig   2007-08-23 13:34:27.000000000 +0100
+++ ppscsi.h   2007-08-23 13:34:41.000000000 +0100
lines 15-17
#include <linux/module.h>
-#include <linux/config.h>
+#include <linux/autoconf.h>
#include <linux/version.h>


Hope this will help you.
_________________
Prayer can change the world!
Back to top
View user's profile Send private message
logistiker
n00b
n00b


Joined: 16 Jun 2008
Posts: 36

PostPosted: Mon Jun 16, 2008 6:11 pm    Post subject: Reply with quote

Can anyone post a newer patch for gentoo-sources 2.6.25? The posted patches only work until 2.6.24.

http://bugs.gentoo.org/show_bug.cgi?id=119196
Back to top
View user's profile Send private message
Desperadoss
n00b
n00b


Joined: 19 Jun 2008
Posts: 7

PostPosted: Thu Jun 19, 2008 7:02 am    Post subject: Reply with quote

logistiker wrote:
Can anyone post a newer patch for gentoo-sources 2.6.25? The posted patches only work until 2.6.24.

http://bugs.gentoo.org/show_bug.cgi?id=119196


i dont find any new patch !
Back to top
View user's profile Send private message
Hypnos
Advocate
Advocate


Joined: 18 Jul 2002
Posts: 2868
Location: Omnipresent

PostPosted: Thu Jun 19, 2008 7:04 am    Post subject: Reply with quote

I sold the scanner, so I can't help -- good luck!
_________________
Personal overlay | Simple backup scheme
Back to top
View user's profile Send private message
Liftyor
n00b
n00b


Joined: 05 Jul 2008
Posts: 1

PostPosted: Sat Jul 05, 2008 5:27 pm    Post subject: Reply with quote

ppscsi-2.6.25.diff

Code:

diff -u old/ppscsi.c new/ppscsi.c
--- old/ppscsi.c   2008-07-04 23:39:44.000000000 +0400
+++ new/ppscsi.c   2008-07-04 23:40:05.000000000 +0400
@@ -422,16 +422,16 @@
 
    bf &= (!((1<<pha->cur_cmd->device->id) & pha->slow_targets));
    
-   r = pha->cur_cmd->use_sg;
+   r = pha->cur_cmd->sdb.table.nents;
    if (r) {
       b = 0;
-      p = (struct scatterlist *)pha->cur_cmd->request_buffer;
+      p = (struct scatterlist *)pha->cur_cmd->sdb.table.sgl;
       for (k=0;k<r;k++) {
          b += p->length;
          p++;
       }
    } else {
-      b = pha->cur_cmd->request_bufflen;
+      b = pha->cur_cmd->sdb.length;
    }
 
    bf &= (b > 127);
@@ -565,16 +565,16 @@
             pha->data_dir = phase & PPSC_IO;
             pha->data_count = 0;
 
-            pha->sg_count = pha->cur_cmd->use_sg;
+            pha->sg_count = pha->cur_cmd->sdb.table.nents;
             if (pha->sg_count) {
                pha->sg_count--;
                pha->sg_list =
-                  (struct scatterlist *)pha->cur_cmd->request_buffer;
+                  (struct scatterlist *)pha->cur_cmd->sdb.table.sgl;
                pha->cur_buf = sg_virt(pha->sg_list); /* page_address(pha->sg_list->page) + pha->sg_list->offset; */
                pha->cur_len = pha->sg_list->length;
             } else {
-               pha->cur_buf = pha->cur_cmd->request_buffer;
-               pha->cur_len = pha->cur_cmd->request_bufflen;
+               pha->cur_buf = pha->cur_cmd->sdb.table.sgl;
+               pha->cur_len = pha->cur_cmd->sdb.length;
             }
 
             pha->last_phase = phase;
@@ -620,7 +620,7 @@
 
             if (pha->cur_cmd->cmnd[0] == REQUEST_SENSE) {
 
-               sb = (char *)pha->cur_cmd->request_buffer;
+               sb = (char *)pha->cur_cmd->sdb.table.sgl;
                printk("%s: Sense key: %x ASC: %x ASCQ: %x\n",
                       pha->device, sb[2] & 0xff,
                       sb[12] & 0xff, sb[13] & 0xff);
@@ -815,9 +815,9 @@
       cmd->cmnd[4] = sizeof(cmd->sense_buffer);
       cmd->cmnd[5] = 0;
       cmd->cmd_len = 6;
-      cmd->use_sg = 0;
-      cmd->request_buffer = (char *) cmd->sense_buffer;
-      cmd->request_bufflen = sizeof(cmd->sense_buffer);
+      cmd->sdb.table.nents = 0;
+      cmd->sdb.table.sgl = (char *) cmd->sense_buffer;
+      cmd->sdb.length = sizeof(cmd->sense_buffer);
 
       pha->cur_cmd = cmd;
       ppsc_do_claimed(pha,ppsc_start);
@@ -1014,9 +1014,9 @@
    cmd.device = &dev;
    cmd.cmd_len = 6;
    for (i=0;i<6;i++) cmd.cmnd[i] = inq[i];
-   cmd.use_sg = 0;
-   cmd.request_buffer = buf;
-   cmd.request_bufflen = 36;
+   cmd.sdb.table.nents = 0;
+   cmd.sdb.table.sgl = buf;
+   cmd.sdb.length = 36;
 
    return ppsc_command(&cmd);
    


It worked for me on 2.6.25.4.

Apply it on http://penguin-breeder.org/kernel/download/ppscsi-beta2-20060424.tar.gz after http://www.kivela.net/jaska/projects/ubuntu-ppscsi/ppscsi-beta2-for-2.6.24.diff.txt (http://www.kivela.net/jaska/projects/ubuntu-ppscsi).

I'm not a kernel hacker, I just found a similiar patch here: :D
http://aur.archlinux.org/packages.php?do_Details&ID=14443
http://bugs.gentoo.org/attachment.cgi?id=145284
Back to top
View user's profile Send private message
logistiker
n00b
n00b


Joined: 16 Jun 2008
Posts: 36

PostPosted: Tue Jul 08, 2008 4:52 am    Post subject: Reply with quote

For anyone who's interested, I created a tarball with all the combined patches along with the latest patch (modified for older kernel support). It works with 2.6.25 as well as < 2.6.25.

http://bugs.gentoo.org/attachment.cgi?id=159853

http://bugs.gentoo.org/show_bug.cgi?id=119196
Back to top
View user's profile Send private message
logistiker
n00b
n00b


Joined: 16 Jun 2008
Posts: 36

PostPosted: Wed Jan 07, 2009 2:45 am    Post subject: ppscsi on 2.6.28? Reply with quote

Anyone have any idea how to fix this compile warning? I'd like to have this work for 2.6.28.


/var/tmp/portage/portage/media-gfx/ppscsi-20060424-r2/work/ppscsi-beta2/ppscsi.c: In function ‘ppsc_engine’:
/var/tmp/portage/portage/media-gfx/ppscsi-20060424-r2/work/ppscsi-beta2/ppscsi.c:597: warning: assignment from incompatible pointer type
/var/tmp/portage/portage/media-gfx/ppscsi-20060424-r2/work/ppscsi-beta2/ppscsi.c: In function ‘ppsc_cleanup’:
/var/tmp/portage/portage/media-gfx/ppscsi-20060424-r2/work/ppscsi-beta2/ppscsi.c:849: warning: assignment from incompatible pointer type
/var/tmp/portage/portage/media-gfx/ppscsi-20060424-r2/work/ppscsi-beta2/ppscsi.c: In function ‘ppsc_inquire’:
/var/tmp/portage/portage/media-gfx/ppscsi-20060424-r2/work/ppscsi-beta2/ppscsi.c:1054: warning: assignment from incompatible pointer type
/var/tmp/portage/portage/media-gfx/ppscsi-20060424-r2/work/ppscsi-beta2/ppscsi.c: In function ‘ppsc_detect’:
/var/tmp/portage/portage/media-gfx/ppscsi-20060424-r2/work/ppscsi-beta2/ppscsi.c:1192: warning: assignment from incompatible pointer type
Back to top
View user's profile Send private message
keba
Guru
Guru


Joined: 02 Jun 2006
Posts: 304
Location: Switzerland

PostPosted: Thu Dec 31, 2009 1:37 pm    Post subject: Reply with quote

For kernel 2.6.32, I got it to work like the Ubuntu guys did. First, make sure you have the following kernel options enabled (you might also need some of the other options):
Code:

Device Drivers -->
    Parallel Port Support -->
        [*] PC-style Hardware


The Ubuntu guys used a Tutorial from an italian page, which basically said to do this:

Code:

wget http://penguin-breeder.org/kernel/download/ppscsi-beta2-20060424.tar.gz
wget http://www.iadegesso.netsons.org/assets/files/ppscsi-patch-2_6_27up.tar.gz
tar xf ppscsi-beta2-20060424.tar.gz
tar xf ppscsi-patch-2_6_27up.tar.gz
mv ppscsi.*.patch ppscsi-beta2
cd ppscsi-beta2
patch -Np1 -i ppscsi.c.patch
patch -Np0 -i ppscsi.h.patch
make


You can then insmod the modules in the directory where you compiled them and/or add the modules to your configuration permanently if you want:
Code:

mkdir /lib/modules/`uname -r`/kernel/drivers/parport
cp ppscsi.ko epst.ko /lib/modules/`uname -r`/kernel/drivers/parport
depmod
echo "" >> /etc/conf.d/modules
echo "modules_2_6=\"${modules_2_6} ppscsi\"" >> /etc/conf.d/modules
echo "module_ppscsi_args_2_6=\"\"" >> /etc/conf.d/modules
echo "" >> /etc/conf.d/modules
echo "modules_2_6=\"${modules_2_6} epst\"" >> /etc/conf.d/modules
echo "module_epst_args_2_6=\"\"" >> /etc/conf.d/modules

_________________
Prayer can change the world!
Back to top
View user's profile Send private message
keba
Guru
Guru


Joined: 02 Jun 2006
Posts: 304
Location: Switzerland

PostPosted: Sun Jan 03, 2010 3:48 pm    Post subject: Reply with quote

Looks like it still doesn't work on kernels > 2.6.30. ppscsi loads without a problem, but loading epst.ko hangs without any notification. I guess it's because of the ppscsi detection that doesn't work. Issuing make always gives the following errors although the modules build:

Code:

  CC [M]  /home/xxx/ppscsi-beta2/ppscsi.o
/home/xxx/ppscsi-beta2/ppscsi.c: In function ‘ppsc_cleanup’:
/home/xxx/ppscsi-beta2/ppscsi.c:849: warning: assignment from incompatible pointer type
/home/xxx/ppscsi-beta2/ppscsi.c: In function ‘ppsc_detect’:
/home/xxx/ppscsi-beta2/ppscsi.c:1192: warning: assignment from incompatible pointer type

_________________
Prayer can change the world!
Back to top
View user's profile Send private message
keba
Guru
Guru


Joined: 02 Jun 2006
Posts: 304
Location: Switzerland

PostPosted: Tue Jan 05, 2010 2:32 pm    Post subject: Reply with quote

There is a new patch from here. I'm testing it right now.
_________________
Prayer can change the world!
Back to top
View user's profile Send private message
keba
Guru
Guru


Joined: 02 Jun 2006
Posts: 304
Location: Switzerland

PostPosted: Tue Jan 05, 2010 2:37 pm    Post subject: Reply with quote

Works :D :D :D I got my HP Scanjet 5100c back to work on Kernel 2.6.32. epst.ko takes a while to load, but it does. And Skanlite (KDE) is a great app.

Code:

wget http://penguin-breeder.org/kernel/download/ppscsi-beta2-20060424.tar.gz
wget http://infabo.net/wp-content/uploads/2010/01/ppscsi.patch.tar.gz
tar -xzf ppscsi-beta2-20060424.tar.gz
tar -xzf ppscsi.patch.tar.gz
cd ppscsi-beta2
patch -p1 < ../ppscsi.patch
make
mkdir /lib/modules/`uname -r`/kernel/drivers/parport
cp ppscsi.ko epst.ko /lib/modules/`uname -r`/kernel/drivers/parport
depmod -a
modprobe ppscsi
modprobe epst

_________________
Prayer can change the world!
Back to top
View user's profile Send private message
keba
Guru
Guru


Joined: 02 Jun 2006
Posts: 304
Location: Switzerland

PostPosted: Sat Mar 27, 2010 8:32 am    Post subject: Reply with quote

EDIT: New download location

There is a new patched version that compiles without an error. I got it from here, so you might want to check it out from time to time.

Code:

wget http://homepages.woosh.co.nz/gryphon/files/ppscsi-patched-karmic.tar.gz
tar -zxvf ppscsi-patched-karmic.tar.gz
cd ppscsi-beta2
make
mkdir /lib/modules/`uname -r`/kernel/drivers/parport
cp ppscsi.ko epst.ko /lib/modules/`uname -r`/kernel/drivers/parport
depmod -a
modprobe ppscsi
modprobe epst

_________________
Prayer can change the world!


Last edited by keba on Thu Jun 24, 2010 12:59 pm; edited 2 times in total
Back to top
View user's profile Send private message
keba
Guru
Guru


Joined: 02 Jun 2006
Posts: 304
Location: Switzerland

PostPosted: Mon Mar 29, 2010 12:26 pm    Post subject: Reply with quote

Important for kernel 2.6.33:
/usr/src/linux/include/linux/autoconf.h was moved to /usr/src/linux/include/generated/autoconf.h
As a result, in ppscsi.h, change

Code:
#include <linux/autoconf.h>

to

Code:
#include <generated/autoconf.h>

_________________
Prayer can change the world!
Back to top
View user's profile Send private message
keba
Guru
Guru


Joined: 02 Jun 2006
Posts: 304
Location: Switzerland

PostPosted: Thu Jun 24, 2010 12:12 pm    Post subject: Reply with quote

New Download Location:
http://homepages.woosh.co.nz/gryphon/files/ppscsi-patched-karmic.tar.gz

Important for Kernel 2.6.34:
Make sure to change the line noted in the post above, like for kernel 2.6.33. Works fine.
_________________
Prayer can change the world!
Back to top
View user's profile Send private message
keba
Guru
Guru


Joined: 02 Jun 2006
Posts: 304
Location: Switzerland

PostPosted: Thu Aug 26, 2010 10:38 am    Post subject: Reply with quote

Important for Kernel 2.6.35:
Make sure to change the line noted in the post above, like for kernel 2.6.33. Works fine as well.
_________________
Prayer can change the world!
Back to top
View user's profile Send private message
seo123
n00b
n00b


Joined: 01 Sep 2010
Posts: 1

PostPosted: Wed Sep 01, 2010 10:55 am    Post subject: Reply with quote

keba wrote:
Important for Kernel 2.6.35:
Make sure to change the line noted in the post above, like for kernel 2.6.33. Works fine as well.


yes, now it works. i forget to change it and wasted a half day. sometimes ppl are blind :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Goto page Previous  1, 2, 3, 4  Next
Page 3 of 4

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum