Page 1 of 11 123 ... LastLast
Results 1 to 10 of 103

Thread: HP Scanjet 5100C / ppscsi in Hardy

  1. #1
    Join Date
    Jun 2007
    Location
    Auckland, New Zealand
    Beans
    110
    Distro
    Ubuntu 12.04 Precise Pangolin

    HP Scanjet 5100C / ppscsi in Hardy

    Once again I'm trying to get my scanner up and running in Hardy after upgrading.

    Unfortunately the news isn't as good as it was with Feisty because my old instructions to get the ppscsi module compiled (located here) no longer work entirely.

    The problem stems from an update to the way Ubuntu (actually I think it's the Kernel in general) handles what they call scatterlists in the 2.6.24 kernel. The reason for the change is a good one - it is apparently supposed to remove some of the speed bottlenecks that faster systems have encountered when using these scatterlists, sadly for me (and others like me wanting to get our old HP scanners up and running for whatever reason the ppscsi code is no longer maintained and hasn't been updated in upwards of 2 years.

    Even sadder is that Hardy includes code and a kernel patch for ppscsi in its repos - but it doesn't work. This is a known bug (see here) but nothing is being done about it.

    I'm hoping that some programming guru reads this, because I have to admit I'm not and trying to work out the fix just leaves me hopelessly confused.

    After following my earlier instructions I have isolated two snippets of code that need to be somehow updated to work with the new way scatterlists work, both in ppscsi.c (as downloaded from penguin-breeder and updated as per my earlier post (relating to feisty/gutsy).

    Code:
    static void ppsc_update_sg (PHA *pha)
    {
    	if ((!pha->cur_len) && pha->sg_count) {
    		pha->sg_count--;
    		pha->sg_list++;
    		pha->cur_buf = page_address(pha->sg_list->page) + pha->sg_list->offset;
    		pha->cur_len = pha->sg_list->length;
    	}
    }
    and the line of code that references it - line 573 in the ppscsi.c file:

    Code:
    pha->cur_buf = page_address(pha->sg_list->page) + pha->sg_list->offset;
    While I was flailing around trying to work out how to update the code I found this page talking about what has been done to modify scatterlists that underlies the original code no longer working if thats any help.

    Can anyone out there help?

    I'll keep looking of course, but if someone can post the solution here that'd be awesome.

  2. #2
    Join Date
    Apr 2007
    Beans
    27

    Re: HP Scanjet 5100C / ppscsi in Hardy

    Struggling with exactly the same problem.

  3. #3
    Join Date
    Jun 2007
    Location
    BC. Canada
    Beans
    99
    Distro
    Ubuntu

    Re: HP Scanjet 5100C / ppscsi in Hardy

    I guess I am even more newbie than you are since I am not even sure it is the same problem.
    I have HP6100C connected to a PCI SCSI card Adaptec AHA2940U it was working fine if Feisty, Gutsy but since I have upgraded to Hardy the screen that use to come up at the beginning to load the SCSI does not.

    When I type any of the following command line
    lsscsi lspci lshw
    I can not see anything about the above Hardware It is like the scsi module does not exist?

    If this is the same problem I sure hope some one is working on this since this is retrograding...

    Or if some one knows how to fix this let me know
    Rick

  4. #4
    Join Date
    Apr 2007
    Beans
    27

    Re: HP Scanjet 5100C / ppscsi in Hardy

    Nope, this thread is about running scsi over a parallel port with a module called ppscsi. Good luck with your problem, sorry I can't help you with it.

  5. #5
    Join Date
    Jun 2007
    Location
    BC. Canada
    Beans
    99
    Distro
    Ubuntu

    Re: HP Scanjet 5100C / ppscsi in Hardy

    Got it I guess I will have to start my own thread...
    Rick

  6. #6
    Join Date
    Feb 2008
    Beans
    5

    Re: HP Scanjet 5100C / ppscsi in Hardy

    Yes I have the same problem... If you find a solution (even if it's only a beginning) thank to post it!!!

  7. #7
    Join Date
    Jun 2007
    Location
    Auckland, New Zealand
    Beans
    110
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: HP Scanjet 5100C / ppscsi in Hardy

    Someone has posted a solution in a bug report here which s/he claims will work on 8.04 (Hardy).

    I'm planning to test it out tonight. I'll post whether it works and either instructions on how to do the changes or a copy of the changed files so that they can just be made and installed.

    Keep watching this space.. or do it yourself if you get bored of waiting for me.

  8. #8
    Join Date
    Jun 2007
    Location
    Auckland, New Zealand
    Beans
    110
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: HP Scanjet 5100C / ppscsi in Hardy

    I've done some initial testing and at least this version of the code compiles which is more than I can say for the last one I tested.

    Unfortunately my scanner is at home so I can't test if this *really* works for a few hours. Follow the following instructions to get the ppscsi and epst modules to build and if anyone gets a chance to test this before I make it back with an update on whether it fixes the scanner please post here:

    Steps:

    Download the ppscsi-beta2-20060424 file from penguin breeder.

    Unpack the file - either using your preferred archive manager or the command line:
    Code:
    tar zxvf ppscsi-beta2-20060424.tar.gz
    Open ppscsi.h and edit the following line:

    Line 16 - change from:
    #include <linux/config.h>
    to:
    #include <linux/autoconf.h>

    Save and close ppscsi.h

    Open ppscsi.c and edit the following lines:

    Line 486 - change from:
    pha->cur_buf = page_address(pha->sg_list->page) + pha->sg_list->offset;
    to:
    pha->cur_buf = sg_virt(pha->sg_list);

    Line 573 - change from:
    pha->cur_buf = page_address(pha->sg_list->page) + pha->sg_list->offset;
    to:
    pha->cur_buf = sg_virt(pha->sg_list);

    Line 1148 - change from:
    INIT_WORK(&pha->wq, ppsc_tq_int, pha);
    to:
    INIT_WORK(&pha->wq, ppsc_tq_int);

    Save and close ppscsi.c

    Type "make" at a command line and push enter to build the modules we need. Anyone who's never built anything before the word make should not have quote "" marks around it on the command line and I'm assuming that you've already installed the build-essential package and the kernel headers or you're not going to be able to do much more than edit some lines in the above files.

    For the record - you can install both from the command line by typing the following and pressing enter:

    Code:
    sudo apt-get install build-essential linux-headers-`uname -r`
    Since the Makefile for ppscsi (still) has no instructions for installing these files we need to copy them to their new location manually:
    Code:
    sudo cp ppscsi.ko epst.ko /lib/modules/`uname -r`/kernel/drivers/parport
    I've not tested the rest, but I'm fairly confident that the remaining steps are much the same as they were in my original instructions:

    Next we need to tell the kernel that they exist:
    Code:
    sudo depmod
    Lastly we need to load the modules:
    Code:
    sudo modprobe ppscsi
    sudo modprobe epst
    This will make the scanner useable until next time the computer is rebooted.

    In order to make sure that the scanner is recognised from the moment you boot up it is necessary to edit /etc/modules and add the following two lines to the end of the file:
    Code:
    ppscsi
    epst
    I honestly have no clue if those last few steps are even needed in Hardy (Ubuntu 8.04). I'll hopefully get to test it tonight and post an update here. Also as I wrote earlier, I'll try to find a place to host and link the updated archive contaning the corrected ppscsi.h and ppscsi.c files.


    Please note, I can't take any credit for working this all out. That was done by Jaska Kivelä and posted here. I'm just putting it all together for those who search the Ubuntu forums first like I tend to.

    As I said, if anyone makes it back with confirmation that this works before I do, please post here.

  9. #9
    Join Date
    Jul 2007
    Beans
    43
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: HP Scanjet 5100C / ppscsi in Hardy

    @haydnc

    When I run 'make' I get the following error

    Code:
    make -C /lib/modules/`uname -r`/build M=`pwd` modules
    make[1]: Går til katalog '/usr/src/linux-headers-2.6.24-16-386'
      CC [M]  /home/kralnor/ppscsi-beta2/ppscsi.o
    /home/kralnor/ppscsi-beta2/ppscsi.c: In function ‘ppsc_update_sg’:
    /home/kralnor/ppscsi-beta2/ppscsi.c:486: fejl: ‘struct scatterlist’ has no member named ‘page’
    /home/kralnor/ppscsi-beta2/ppscsi.c: In function ‘ppsc_engine’:
    /home/kralnor/ppscsi-beta2/ppscsi.c:573: fejl: ‘struct scatterlist’ has no member named ‘page’
    make[2]: *** [/home/kralnor/ppscsi-beta2/ppscsi.o] Fejl 1
    make[1]: *** [_module_/home/kralnor/ppscsi-beta2] Fejl 2
    make[1]: Forlader katalog '/usr/src/linux-headers-2.6.24-16-386'
    make: *** [all] Fejl 2

  10. #10
    Join Date
    Jun 2007
    Location
    Auckland, New Zealand
    Beans
    110
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: HP Scanjet 5100C / ppscsi in Hardy

    Hi Kralnor,

    It looks like you missed some steps. Those errors are generated by the ppscsi.c file on lines 486 and 573. Follow these instructions and it will build:

    Open ppscsi.c and edit the following lines:

    Line 486 - change from:
    pha->cur_buf = page_address(pha->sg_list->page) + pha->sg_list->offset;
    to:
    pha->cur_buf = sg_virt(pha->sg_list);

    Line 573 - change from:
    pha->cur_buf = page_address(pha->sg_list->page) + pha->sg_list->offset;
    to:
    pha->cur_buf = sg_virt(pha->sg_list);

    Line 1148 - change from:
    INIT_WORK(&pha->wq, ppsc_tq_int, pha);
    to:
    INIT_WORK(&pha->wq, ppsc_tq_int);

    Save and close ppscsi.c
    ~~~

    For everyone else:

    Unfortunately it still doesn't recognise my scanner even though all the instructions seem to work. I don't know if that's something strange in my setup, or a side effect of the lifeview tv tuner card in my machine.

    If anyone has any further success please let me know.
    Last edited by haydnc; May 16th, 2008 at 11:18 PM. Reason: clarify which lines are being edited

Page 1 of 11 123 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •