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  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
keba
Guru
Guru


Joined: 02 Jun 2006
Posts: 304
Location: Switzerland

PostPosted: Wed Sep 01, 2010 12:04 pm    Post subject: Reply with quote

Cool, some people are still following this thread. I wasn't sure if this helped anyone. Apparently it does. Have fun with your scanner ;-)
_________________
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: Wed Mar 30, 2011 6:01 pm    Post subject: Reply with quote

The above works for kernel 2.6.36, but is not yet tested for 2.6.37 and 2.6.38...
_________________
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: Wed May 18, 2011 7:03 am    Post subject: Reply with quote

complete system freeze when loading epst.ko in kernel 2.6.38
_________________
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: Wed May 18, 2011 7:59 am    Post subject: Reply with quote

So the problem is this code:
Code:

struct scsi_host_template   driver_template = PPSC_TEMPLATE(onscsi);

in t348.c:302, t358.c:378, onscsi.c:529, epsa2.c:492, epst.c:463, vpi0.c:261 and sparcsi.c:373 because it's (apparently) an "initialization from incompatible pointer type". This structure is declared in /usr/src/linux/include/scsi/libiscsi.h, /usr/src/linux/include/scsi/scsi_host.h and /usr/src/linux/drivers/scsi/scsi_priv.h

When loading the modules, it produces a kernel panic, which explains the system freeze (see post above).

I don't know how to fix this, as I'm no C programmer, but maybe someone here knows? That would be a great help...
_________________
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 02, 2011 7:41 am    Post subject: Reply with quote

It turns out that from kernel >=2.6.37, ppscsi doesn't work any more. A guy over at the ubuntu forums has managed to get the code to compile without errors, but the scanner doesn't get recognized any more.

This is his patch:
Code:

diff -crB ppscsi-beta2/ppscsi.c ppscsi-beta3/ppscsi.c
*** ppscsi-beta2/ppscsi.c   2010-01-07 01:47:53.000000000 +0100
--- ppscsi-beta3/ppscsi.c   2011-06-02 08:38:37.000000000 +0200
***************
*** 188,194 ****
     spin_unlock_irqrestore(&ppsc_spinlock,flags);
  }
 
! static void ppsc_tq_int (void *data)
  {
     void (*con)(PHA *);
     unsigned long flags;
--- 188,194 ----
     spin_unlock_irqrestore(&ppsc_spinlock,flags);
  }
 
! static void ppsc_tq_int (struct work_struct *data)
  {
     void (*con)(PHA *);
     unsigned long flags;
***************
*** 383,391 ****
     return cmd->result;
  }
 
! int ppsc_queuecommand (struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *))
  {
!    PHA *pha = (PHA *) cmd->device->host->hostdata[0];
 
     if (pha->cur_cmd) {
        printk("%s: Driver is busy\n",pha->device);
--- 383,391 ----
     return cmd->result;
  }
 
! int ppsc_queuecommand (struct Scsi_Host *host, struct scsi_cmnd *cmd)
  {
!    PHA *pha = (PHA *) host->hostdata[0];
 
     if (pha->cur_cmd) {
        printk("%s: Driver is busy\n",pha->device);
***************
*** 393,399 ****
     }
 
     pha->cur_cmd = cmd;
!    pha->done = done;
     pha->then = jiffies;
 
     ppsc_do_claimed(pha,ppsc_start);
--- 393,399 ----
     }
 
     pha->cur_cmd = cmd;
!    pha->done = cmd->scsi_done;
     pha->then = jiffies;
 
     ppsc_do_claimed(pha,ppsc_start);
***************
*** 1232,1238 ****
        hreg = scsi_register(tpnt,sizeof(PHA*));
        hreg->dma_channel = -1;
        hreg->n_io_port = 0;
!       hreg->unique_id = (int) pha; /* What should we put in here??? */
        hreg->sg_tablesize = s;
        hreg->hostdata[0]=(unsigned long)pha; /* Will be our pointer */
 
--- 1232,1238 ----
        hreg = scsi_register(tpnt,sizeof(PHA*));
        hreg->dma_channel = -1;
        hreg->n_io_port = 0;
!       hreg->unique_id = (unsigned long)pha; /* What should we put in here??? */
        hreg->sg_tablesize = s;
        hreg->hostdata[0]=(unsigned long)pha; /* Will be our pointer */
 
diff -crB ppscsi-beta2/ppscsi.h ppscsi-beta3/ppscsi.h
*** ppscsi-beta2/ppscsi.h   2010-01-07 01:47:53.000000000 +0100
--- ppscsi-beta3/ppscsi.h   2011-06-02 08:39:19.000000000 +0200
***************
*** 13,19 ****
  #define   PPSC_H_VERSION   "0.92"
 
  #include <linux/module.h>
! #include <linux/autoconf.h>
  #include <linux/version.h>
  #include <linux/stddef.h>
  #include <linux/types.h>
--- 13,19 ----
  #define   PPSC_H_VERSION   "0.92"
 
  #include <linux/module.h>
! #include <generated/autoconf.h>
  #include <linux/version.h>
  #include <linux/stddef.h>
  #include <linux/types.h>
***************
*** 32,38 ****
 
  extern int ppsc_proc_info(struct Scsi_Host *, char *,char **,off_t,int,int);
  extern int ppsc_command(struct scsi_cmnd *);
! extern int ppsc_queuecommand(struct scsi_cmnd *, void (* done)(struct scsi_cmnd *));
  extern int ppsc_abort(struct scsi_cmnd *);
  extern int ppsc_reset(struct scsi_cmnd *);
  extern int ppsc_biosparam(struct scsi_device *, struct block_device *, sector_t capacity, int[]);
--- 32,38 ----
 
  extern int ppsc_proc_info(struct Scsi_Host *, char *,char **,off_t,int,int);
  extern int ppsc_command(struct scsi_cmnd *);
! extern int ppsc_queuecommand(struct Scsi_Host *, struct scsi_cmnd *);
  extern int ppsc_abort(struct scsi_cmnd *);
  extern int ppsc_reset(struct scsi_cmnd *);
  extern int ppsc_biosparam(struct scsi_device *, struct block_device *, sector_t capacity, int[]);

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


Joined: 31 Oct 2011
Posts: 7

PostPosted: Mon Oct 31, 2011 7:20 am    Post subject: Reply with quote

So, I got ppscsi-patched-karmic.tar.gz (per the Ubuntu thread) and the patch just above (which I saved as ppscsi-2.6.37.patch.) Look out for a possible ppscsi.c.rej, I had a few lines not patch due to some tabs turning into spaces in my cut'n paste (and patch -l flag not handling it for some reason.) Against that,

Code:

*** ppscsi.c~   Mon Oct 31 01:00:05 2011
--- ppscsi.c    Mon Oct 31 01:55:36 2011
***************
*** 382,390 ****
 
        return cmd->result;
  }
 
!  int ppsc_queuecommand (struct Scsi_Host *host, struct scsi_cmnd *cmd)
  {
      PHA *pha = (PHA *) host->hostdata[0];
 
        if (pha->cur_cmd) {
--- 382,390 ----
 
        return cmd->result;
  }
 
!  int ppsc_queuecommand_lck (struct Scsi_Host *host, struct scsi_cmnd *cmd)
  {
      PHA *pha = (PHA *) host->hostdata[0];
 
        if (pha->cur_cmd) {
***************
*** 400,407 ****
--- 400,409 ----
 
        return 0;
  }
 
+ static DEF_SCSI_QCMD(ppsc_queuecommand)
+
  static void ppsc_arb_fail (PHA *pha)
  {
        PPSC_FAIL(DID_BUS_BUSY,"Arbitration failure");
  }

I'll try it tomorrow. But, the important change in 2.6.37 is that it runs your scsi driver with no locks whatsoever, unless you rename the queue command and add DEF_SCSI_QCMD like the above. The 2.6.37_rc1 kernel changes (edit: http://www.gossamer-threads.com/lists/linux/kernel/1301610) show a patch like this to all the drivers included with the kernel, and looking at 2.6.38-gentoo-r3 source on my box shows that I don't think there's *any* SCSI driver set up to do it's own locks yet. (I'd assume due to timing requirements that fiddling a parallel port is exceptionally unlikely to work with interrupts enabled, which is why it's not working as-is.)
Back to top
View user's profile Send private message
keba
Guru
Guru


Joined: 02 Jun 2006
Posts: 304
Location: Switzerland

PostPosted: Mon Oct 31, 2011 8:03 am    Post subject: Reply with quote

And I was about to throw out the scanner. Do you think you can get it working? If so, could you tell me as soon as possible please? Thanks you
_________________
Prayer can change the world!
Back to top
View user's profile Send private message
hwertz
n00b
n00b


Joined: 31 Oct 2011
Posts: 7

PostPosted: Mon Oct 31, 2011 9:01 pm    Post subject: Reply with quote

I found something odd with the switch from foo_queuecommand to foo_queuecommand_lck in various SCSI drivers -- the DEF_SCSI_QCMD wraps ppsc_queuecommand_lck(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)) wrapping some locks around it, which results in ppsc_queuecommand(struct Scsi_Host *shost, struct scsi_cmnd *cmd). So I actually had to revert one portion of the patch 2 posts above. This is verified "works for me" on Ubuntu 11.04 with 2.6.38-11-generic (since that happens to be what it's on now -- my gentoo box is at home and this scanner is at my parents.) This patch incorporates the rest of that patch already, and goes directly onto ppscsi-patched-karmic.tar.gz
Code:
diff -cr ppscsi-beta2/ppscsi.c ppscsi-beta2-updated/ppscsi.c
*** ppscsi-beta2/ppscsi.c   2010-01-06 18:47:53.000000000 -0600
--- ppscsi-beta2-updated/ppscsi.c   2011-10-31 14:15:02.000000000 -0500
***************
*** 188,194 ****
     spin_unlock_irqrestore(&ppsc_spinlock,flags);
  }
 
! static void ppsc_tq_int (void *data)
  {
     void (*con)(PHA *);
     unsigned long flags;
--- 188,194 ----
     spin_unlock_irqrestore(&ppsc_spinlock,flags);
  }
 
! static void ppsc_tq_int (struct work_struct *data)
  {
     void (*con)(PHA *);
     unsigned long flags;
***************
*** 383,389 ****
     return cmd->result;
  }
 
! int ppsc_queuecommand (struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *))
  {
     PHA *pha = (PHA *) cmd->device->host->hostdata[0];
 
--- 383,389 ----
     return cmd->result;
  }
 
! int ppsc_queuecommand_lck (struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *))
  {
     PHA *pha = (PHA *) cmd->device->host->hostdata[0];
 
***************
*** 393,405 ****
     }
 
     pha->cur_cmd = cmd;
!    pha->done = done;
     pha->then = jiffies;
 
     ppsc_do_claimed(pha,ppsc_start);
 
     return 0;
  }
 
  static void ppsc_arb_fail (PHA *pha)
  {
--- 393,407 ----
     }
 
     pha->cur_cmd = cmd;
!     pha->done = cmd->scsi_done;
     pha->then = jiffies;
 
     ppsc_do_claimed(pha,ppsc_start);
 
     return 0;
  }
+ DEF_SCSI_QCMD(ppsc_queuecommand)
+
 
  static void ppsc_arb_fail (PHA *pha)
  {
***************
*** 1232,1238 ****
        hreg = scsi_register(tpnt,sizeof(PHA*));
        hreg->dma_channel = -1;
        hreg->n_io_port = 0;
!       hreg->unique_id = (int) pha; /* What should we put in here??? */
        hreg->sg_tablesize = s;
        hreg->hostdata[0]=(unsigned long)pha; /* Will be our pointer */
 
--- 1234,1240 ----
        hreg = scsi_register(tpnt,sizeof(PHA*));
        hreg->dma_channel = -1;
        hreg->n_io_port = 0;
!        hreg->unique_id = (unsigned long)pha; /* What should we put in here??? */
        hreg->sg_tablesize = s;
        hreg->hostdata[0]=(unsigned long)pha; /* Will be our pointer */
 
diff -cr ppscsi-beta2/ppscsi.h ppscsi-beta2-updated/ppscsi.h
*** ppscsi-beta2/ppscsi.h   2010-01-06 18:47:53.000000000 -0600
--- ppscsi-beta2-updated/ppscsi.h   2011-10-31 15:56:35.000000000 -0500
***************
*** 13,19 ****
  #define   PPSC_H_VERSION   "0.92"
 
  #include <linux/module.h>
! #include <linux/autoconf.h>
  #include <linux/version.h>
  #include <linux/stddef.h>
  #include <linux/types.h>
--- 13,19 ----
  #define   PPSC_H_VERSION   "0.92"
 
  #include <linux/module.h>
! #include <generated/autoconf.h>
  #include <linux/version.h>
  #include <linux/stddef.h>
  #include <linux/types.h>
***************
*** 32,38 ****
 
  extern int ppsc_proc_info(struct Scsi_Host *, char *,char **,off_t,int,int);
  extern int ppsc_command(struct scsi_cmnd *);
! extern int ppsc_queuecommand(struct scsi_cmnd *, void (* done)(struct scsi_cmnd *));
  extern int ppsc_abort(struct scsi_cmnd *);
  extern int ppsc_reset(struct scsi_cmnd *);
  extern int ppsc_biosparam(struct scsi_device *, struct block_device *, sector_t capacity, int[]);
--- 32,38 ----
 
  extern int ppsc_proc_info(struct Scsi_Host *, char *,char **,off_t,int,int);
  extern int ppsc_command(struct scsi_cmnd *);
! extern int ppsc_queuecommand(struct Scsi_Host *shost, struct scsi_cmnd *cmd);
  extern int ppsc_abort(struct scsi_cmnd *);
  extern int ppsc_reset(struct scsi_cmnd *);
  extern int ppsc_biosparam(struct scsi_device *, struct block_device *, sector_t capacity, int[]);


If you go to the ubuntuforums thread linked to 3 or 4 posts above this, that forum let me attach a .patch.gz (it won't take .patch files but takes gzips..) so you won't have to worry about cut'n'paste mangling the patch.
Back to top
View user's profile Send private message
hwertz
n00b
n00b


Joined: 31 Oct 2011
Posts: 7

PostPosted: Tue Nov 01, 2011 6:59 pm    Post subject: Reply with quote

So, I'm pasting this from the post I made on ubuntuforums, and modifying as appropriate for Ubuntu.
A few more items to make it nice:
I haven't moved this scanner to one of my gentoo boxes yet to see if udev for gentoo has this same problem, but on Ubuntu it does -- the scanner device is owned by root, and only accessible by root. To fix the permissions problems the scanner has by default so xsane and such don't have to be run as root. This is in /etc/udev/rules.d/45-libsane.rules:
Code:

SUBSYSTEM=="scsi_generic",ATTRS{type}=="3", NAME="%k", SYMLINK="scanner%n", MODE="0777", GROUP="scanner"



Secondly, Ubuntu has plenty of kernel updates, and who wants to remember to rebuild ppscsi each time? (This doesn't seem like "the gentoo way" to have this autorun, but the fact of the matter is ppscsi is not equipped for module-rebuild either, if you rebuild your gentoo kernel..) I figured, make runs very fast when there's nothing to build, and ~30 seconds (on a pretty antiquated box) when it does. So on the Ubuntu box, I stuck this in /etc/rc.local just before the "exit 0". On gentoo, this'd be in /etc/conf.d/local.start:
Code:

(cd /usr/src/ppscsi-beta2/
 make
 insmod ./ppscsi.ko
 insmod ./epst.ko)

Rebuilds ppscsi if needed, and loads the modules.
Back to top
View user's profile Send private message
keba
Guru
Guru


Joined: 02 Jun 2006
Posts: 304
Location: Switzerland

PostPosted: Tue Nov 01, 2011 8:30 pm    Post subject: Reply with quote

works on kernel 2.6.38!!! Thank you very much!
Now let's try on kernel 3.0.x
_________________
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 Nov 01, 2011 8:45 pm    Post subject: Reply with quote

It does not work on kernel 3.0.2 :(

Code:

make -C /lib/modules/`uname -r`/build M=`pwd` modules
make[1]: entrant dans le répertoire « /usr/src/linux-3.0.2-pf »
  CC [M]  /home/user/ppscsi-beta2/ppscsi.o
/home/user/ppscsi-beta2/ppscsi.c:73: erreur: ‘SPIN_LOCK_UNLOCKED’ undeclared here (not in a function)
make[2]: *** [/home/user/ppscsi-beta2/ppscsi.o] Erreur 1
make[1]: *** [_module_/home/user/ppscsi-beta2] Erreur 2
make[1]: quittant le répertoire « /usr/src/linux-3.0.2-pf »
make: *** [all] Erreur 2


Also, udev reports that NAME="%k" is not being used because of this:
Code:

Nov  1 21:23:25 linux udevd[4239]: NAME="%k" is ignored, because it breaks kernel supplied names, please remove it from /etc/udev/rules.d/45-libsane.rules:1

_________________
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 Nov 01, 2011 8:57 pm    Post subject: Reply with quote

On kernel 3.0.x,

remove line 73:
Code:

spinlock_t      ppsc_spinlock = SPIN_LOCK_UNLOCKED;


and replace it with
Code:

DEFINE_SPINLOCK(ppsc_spinlock);

to get it to work
_________________
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 Nov 01, 2011 9:02 pm    Post subject: Reply with quote

HOWTO for kernel 3.0.x

Do the following:
1) save the patch below as ppscsi-3.0.patch as a simple text file in the folder where you're downloading the source file of ppscsi-patched-karmic (see below)
2) use these commands
Note: the line starting with "echo" and the one below it are ONE line, it ends with ".rules". You'll have to do this as root
Code:

wget http://homepages.woosh.co.nz/gryphon/files/ppscsi-patched-karmic.tar.gz
tar -zxvf ppscsi-patched-karmic.tar.gz
cd ppscsi-beta2
patch -p1 -i ../ppscsi-3.0.patch
make
mkdir /lib/modules/`uname -r`/kernel/drivers/parport
cp ppscsi.ko epst.ko /lib/modules/`uname -r`/kernel/drivers/parport
depmod -a
echo "SUBSYSTEM==\"scsi_generic\",ATTRS{type}==\"3\", SYMLINK=\"scanner%n\", MODE=\"0777\", GROUP=\"scanner\"" >> /etc/udev/rules.d/45-libsane.rules
modprobe ppscsi
modprobe epst



Patch for kernel 3.0.x, against ppscsi-patched-karmic.tar.gz:
Code:

Seulement dans ppscsi-beta2-updated: .directory
diff -crB ppscsi-beta2/ppscsi.c ppscsi-beta2-updated/ppscsi.c
*** ppscsi-beta2/ppscsi.c   2010-01-07 01:47:53.000000000 +0100
--- ppscsi-beta2-updated/ppscsi.c   2011-11-01 21:58:48.000000000 +0100
***************
*** 70,76 ****
  #define PPSC_DEF_NICE   0
  #define PPSC_INITIATOR  7
 
! spinlock_t      ppsc_spinlock = SPIN_LOCK_UNLOCKED;
 
  static char   ppsc_bulk_map[256];
 
--- 70,76 ----
  #define PPSC_DEF_NICE   0
  #define PPSC_INITIATOR  7
 
! DEFINE_SPINLOCK(ppsc_spinlock);
 
  static char   ppsc_bulk_map[256];
 
***************
*** 188,194 ****
     spin_unlock_irqrestore(&ppsc_spinlock,flags);
  }
 
! static void ppsc_tq_int (void *data)
  {
     void (*con)(PHA *);
     unsigned long flags;
--- 188,194 ----
     spin_unlock_irqrestore(&ppsc_spinlock,flags);
  }
 
! static void ppsc_tq_int (struct work_struct *data)
  {
     void (*con)(PHA *);
     unsigned long flags;
***************
*** 383,389 ****
     return cmd->result;
  }
 
! int ppsc_queuecommand (struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *))
  {
     PHA *pha = (PHA *) cmd->device->host->hostdata[0];
 
--- 383,389 ----
     return cmd->result;
  }
 
! int ppsc_queuecommand_lck (struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *))
  {
     PHA *pha = (PHA *) cmd->device->host->hostdata[0];
 
***************
*** 393,405 ****
     }
 
     pha->cur_cmd = cmd;
!    pha->done = done;
     pha->then = jiffies;
 
     ppsc_do_claimed(pha,ppsc_start);
 
     return 0;
  }
 
  static void ppsc_arb_fail (PHA *pha)
  {
--- 393,407 ----
     }
 
     pha->cur_cmd = cmd;
!     pha->done = cmd->scsi_done;
     pha->then = jiffies;
 
     ppsc_do_claimed(pha,ppsc_start);
 
     return 0;
  }
+ DEF_SCSI_QCMD(ppsc_queuecommand)
+
 
  static void ppsc_arb_fail (PHA *pha)
  {
***************
*** 1232,1238 ****
        hreg = scsi_register(tpnt,sizeof(PHA*));
        hreg->dma_channel = -1;
        hreg->n_io_port = 0;
!       hreg->unique_id = (int) pha; /* What should we put in here??? */
        hreg->sg_tablesize = s;
        hreg->hostdata[0]=(unsigned long)pha; /* Will be our pointer */
 
--- 1234,1240 ----
        hreg = scsi_register(tpnt,sizeof(PHA*));
        hreg->dma_channel = -1;
        hreg->n_io_port = 0;
!        hreg->unique_id = (unsigned long)pha; /* What should we put in here??? */
        hreg->sg_tablesize = s;
        hreg->hostdata[0]=(unsigned long)pha; /* Will be our pointer */
 
diff -crB ppscsi-beta2/ppscsi.h ppscsi-beta2-updated/ppscsi.h
*** ppscsi-beta2/ppscsi.h   2010-01-07 01:47:53.000000000 +0100
--- ppscsi-beta2-updated/ppscsi.h   2011-11-01 21:58:09.000000000 +0100
***************
*** 13,19 ****
  #define   PPSC_H_VERSION   "0.92"
 
  #include <linux/module.h>
! #include <linux/autoconf.h>
  #include <linux/version.h>
  #include <linux/stddef.h>
  #include <linux/types.h>
--- 13,19 ----
  #define   PPSC_H_VERSION   "0.92"
 
  #include <linux/module.h>
! #include <generated/autoconf.h>
  #include <linux/version.h>
  #include <linux/stddef.h>
  #include <linux/types.h>
***************
*** 32,38 ****
 
  extern int ppsc_proc_info(struct Scsi_Host *, char *,char **,off_t,int,int);
  extern int ppsc_command(struct scsi_cmnd *);
! extern int ppsc_queuecommand(struct scsi_cmnd *, void (* done)(struct scsi_cmnd *));
  extern int ppsc_abort(struct scsi_cmnd *);
  extern int ppsc_reset(struct scsi_cmnd *);
  extern int ppsc_biosparam(struct scsi_device *, struct block_device *, sector_t capacity, int[]);
--- 32,38 ----
 
  extern int ppsc_proc_info(struct Scsi_Host *, char *,char **,off_t,int,int);
  extern int ppsc_command(struct scsi_cmnd *);
! extern int ppsc_queuecommand(struct Scsi_Host *shost, struct scsi_cmnd *cmd);
  extern int ppsc_abort(struct scsi_cmnd *);
  extern int ppsc_reset(struct scsi_cmnd *);
  extern int ppsc_biosparam(struct scsi_device *, struct block_device *, sector_t capacity, int[]);

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


Joined: 11 May 2012
Posts: 3

PostPosted: Fri May 11, 2012 12:55 pm    Post subject: Reply with quote

broken in kernel 3.2.0 again. It compiles:

Code:
make
make -C /lib/modules/`uname -r`/build M="`pwd`" modules
make[1]: Entering directory `/usr/src/linux-headers-3.2.0-24-generic-pae'
  CC [M]  /usr/src/ppscsi-beta2_new/ppscsi.o
/usr/src/ppscsi-beta2_new/ppscsi.c: In function âppsc_inquire.isra.12â:
/usr/src/ppscsi-beta2_new/ppscsi.c:1070:1: warning: the frame size of 1084 bytes is larger than 1024 bytes [-Wframe-larger-than=]
  CC [M]  /usr/src/ppscsi-beta2_new/t348.o
  CC [M]  /usr/src/ppscsi-beta2_new/t358.o
  CC [M]  /usr/src/ppscsi-beta2_new/onscsi.o
  CC [M]  /usr/src/ppscsi-beta2_new/epsa2.o
  CC [M]  /usr/src/ppscsi-beta2_new/epst.o
  CC [M]  /usr/src/ppscsi-beta2_new/vpi0.o
  CC [M]  /usr/src/ppscsi-beta2_new/sparcsi.o
  Building modules, stage 2.
  MODPOST 8 modules
  CC      /usr/src/ppscsi-beta2_new/epsa2.mod.o
  LD [M]  /usr/src/ppscsi-beta2_new/epsa2.ko
  CC      /usr/src/ppscsi-beta2_new/epst.mod.o
  LD [M]  /usr/src/ppscsi-beta2_new/epst.ko
  CC      /usr/src/ppscsi-beta2_new/onscsi.mod.o
  LD [M]  /usr/src/ppscsi-beta2_new/onscsi.ko
  CC      /usr/src/ppscsi-beta2_new/ppscsi.mod.o
  LD [M]  /usr/src/ppscsi-beta2_new/ppscsi.ko
  CC      /usr/src/ppscsi-beta2_new/sparcsi.mod.o
  LD [M]  /usr/src/ppscsi-beta2_new/sparcsi.ko
  CC      /usr/src/ppscsi-beta2_new/t348.mod.o
  LD [M]  /usr/src/ppscsi-beta2_new/t348.ko
  CC      /usr/src/ppscsi-beta2_new/t358.mod.o
  LD [M]  /usr/src/ppscsi-beta2_new/t358.ko
  CC      /usr/src/ppscsi-beta2_new/vpi0.mod.o
  LD [M]  /usr/src/ppscsi-beta2_new/vpi0.ko
make[1]: Leaving directory `/usr/src/linux-headers-3.2.0-24-generic-pae'


but it triggers an error when inserting the epst-module:

Code:
modprobe epst
FATAL: Error inserting epst (/lib/modules/3.2.0-24-generic-pae/kernel/drivers/parport/epst.ko): No such device
Back to top
View user's profile Send private message
Hypnos
Advocate
Advocate


Joined: 18 Jul 2002
Posts: 2869
Location: Omnipresent

PostPosted: Fri May 11, 2012 1:06 pm    Post subject: Reply with quote

Does the scanner show up in lsscsi output? If it does, the driver is now broken; if not, parallel port SCSI support is now broken.
_________________
Personal overlay | Simple backup scheme
Back to top
View user's profile Send private message
infabo
n00b
n00b


Joined: 11 May 2012
Posts: 3

PostPosted: Sat May 12, 2012 1:59 pm    Post subject: Reply with quote

No, the scanner does not show up in the lsscsi output. Seems like a problem with the ppscsi driver, correct?
Back to top
View user's profile Send private message
Hypnos
Advocate
Advocate


Joined: 18 Jul 2002
Posts: 2869
Location: Omnipresent

PostPosted: Sat May 12, 2012 2:09 pm    Post subject: Reply with quote

infabo wrote:
No, the scanner does not show up in the lsscsi output. Seems like a problem with the ppscsi driver, correct?

It would seem so ... not sure how to fix it, probably need help from a kernel dev.
_________________
Personal overlay | Simple backup scheme
Back to top
View user's profile Send private message
infabo
n00b
n00b


Joined: 11 May 2012
Posts: 3

PostPosted: Sat May 12, 2012 2:43 pm    Post subject: Reply with quote

I'm so sorry! :oops: The scanner was powered off! I have it plugged into a Gembird SIS-PM programmable power outlet strip, the power-socket for the scanner was offline... :oops:

Code:
[94852.733892] ppSCSI 0.92 (0.92) installed
[94872.444033] epst.0: epst 0.92 (0.92), Shuttle EPST at 0x378 mode 2 (PS/2) dly 1 nice 0 sg 16
[94872.444041] scsi12 : epst
[94872.512283] scsi 12:0:0:0: Processor         HP       C5190A           3740 PQ: 0 ANSI: 2
[94873.186737] scsi 12:0:0:0: Attached scsi generic sg4 type 3


Good to see my old HP Scanjet 5100 working on kernel 3.2.0! Yeah!
Back to top
View user's profile Send private message
zdenek archlinux
n00b
n00b


Joined: 15 Mar 2013
Posts: 1

PostPosted: Fri Mar 15, 2013 9:59 pm    Post subject: Reply with quote

Hi

Im a novice on this forum. I doesnt use Gentoo at all, but i think that i have a important message.

Scanner HP Scanjet 5100C works fine on Linux 3.7.10. Now is 15.3.2013 - scanner is 9 year old.

Because many of old patches is today unavailable (like ppscsi-patched-karmic.tar.gz) here is complete driver for kernel 3.7.10.

http://www.zdenek-stepanek.eu/ppscsi-beta2-3.7.10.tar.gz

Please understand that I'm not a programmer. Driver above is only original driver (ppscsi-beta2-20060424.tar.gz) with all patchsets, which I found on this and other forums.

If you have any question, please dont use PM or this forum. You can write to me on email zdenek@gavanet.org, but once more, I'm not a programmer...

Please write me if this driver helped.

Goog luck :-)
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
Page 4 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