LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 01-27-2008, 08:08 PM   #1
jzimm0007@msn.com
Member
 
Registered: Aug 2007
Location: Hamilton, OH
Distribution: fedora 8
Posts: 31

Rep: Reputation: 15
Smile adding scsi support to kernel for scanport sq2030 scanner (ppscsi patch)


Hello, I am trying to get my scanport sq2030 scanner to work under linux so that I don't have to switch over to windows xp every time I need to use it. I did some research and found out that the kernel must be patched with the ppSCSI patch. I downloaded a kernel source file (tar.gz) from www.kernel.org and patched the kernel with the patch linux-ppscsi-2.6.x-20060424 from penguin-breeder.org I did a make oldconfig and it looked at my existing config file to see what questions were already answered. I answered the rest. After that I compiled the kernel with bzimage. Later I did make modules. When I did the make modules I got an error which is make error [1] and make error[2]:

CC [M] drivers/scsi/advansys.o
drivers/scsi/advansys.c:71:2: warning: #warning this driver is still not properly converted to the DMA API
CC [M] drivers/scsi/BusLogic.o
CC [M] drivers/scsi/aic7xxx_old.o
CC [M] drivers/scsi/ips.o
drivers/scsi/ips.c: In function ‘ips_register_scsi’:
drivers/scsi/ips.c:6870: warning: ignoring return value of ‘scsi_add_host’, declared with attribute warn_unused_result
CC [M] drivers/scsi/qlogicfas408.o
CC [M] drivers/scsi/qla1280.o
CC [M] drivers/scsi/dc395x.o
CC [M] drivers/scsi/tmscsim.o
CC [M] drivers/scsi/megaraid.o
CC [M] drivers/scsi/atp870u.o
CC [M] drivers/scsi/gdth.o
drivers/scsi/gdth.c: In function ‘gdth_search_dev’:
drivers/scsi/gdth.c:646: warning: ‘pci_find_device’ is deprecated (declared at include/linux/pci.h:492)
CC [M] drivers/scsi/initio.o
CC [M] drivers/scsi/a100u2w.o
CC [M] drivers/scsi/3w-xxxx.o
CC [M] drivers/scsi/3w-9xxx.o
CC [M] drivers/scsi/ppa.o
CC [M] drivers/scsi/imm.o
CC [M] drivers/scsi/libsrp.o
CC [M] drivers/scsi/hptiop.o
drivers/scsi/hptiop.c: In function ‘hptiop_host_request_callback’:
drivers/scsi/hptiop.c:378: warning: comparison of distinct pointer types lacks a cast
drivers/scsi/hptiop.c:378: warning: comparison of distinct pointer types lacks a cast
CC [M] drivers/scsi/stex.o
CC [M] drivers/scsi/st.o
CC [M] drivers/scsi/osst.o
LD [M] drivers/scsi/sd_mod.o
LD [M] drivers/scsi/sr_mod.o
CC [M] drivers/scsi/sg.o
CC [M] drivers/scsi/ch.o
CC [M] drivers/scsi/ppscsi.o
In file included from drivers/scsi/ppscsi.c:55:
drivers/scsi/ppscsi.h:16:26: error: linux/config.h: No such file or directory
drivers/scsi/ppscsi.c: In function ‘ppsc_update_sg’:
drivers/scsi/ppscsi.c:486: error: ‘struct scatterlist’ has no member named ‘page’
drivers/scsi/ppscsi.c: In function ‘ppsc_engine’:
drivers/scsi/ppscsi.c:573: error: ‘struct scatterlist’ has no member named ‘page’
drivers/scsi/ppscsi.c:1148:39: error: macro "INIT_WORK" passed 3 arguments, but takes just 2
drivers/scsi/ppscsi.c: In function ‘ppsc_detect’:
drivers/scsi/ppscsi.c:1148: error: ‘INIT_WORK’ undeclared (first use in this function)
drivers/scsi/ppscsi.c:1148: error: (Each undeclared identifier is reported only once
drivers/scsi/ppscsi.c:1148: error: for each function it appears in.)
drivers/scsi/ppscsi.c:1190: warning: cast from pointer to integer of different size
make[2]: *** [drivers/scsi/ppscsi.o] Error 1
make[1]: *** [drivers/scsi] Error 2
make: *** [drivers] Error 2
Next i tried to backup my existing modules and got this error message.
[root@fedoradesktop linux-2.6.24]# mv /lib/modules/`uname -r` /lib/modules/`uname r`.bak
uname: extra operand `r'
Try `uname --help' for more information.
[root@fedoradesktop linux-2.6.24]# uname -r
2.6.23.14-107.fc8 (this is my current kernel)
I tried it a different way.
[root@fedoradesktop linux-2.6.24]# mv /lib/modules/2.6.23.14-107.fc8 /lib/modules/2.6.23.14-107.fc8.bak
mv: cannot stat `/lib/modules/2.6.23.14-107.fc8': No such file or directory
[root@fedoradesktop linux-2.6.24]#
So what do I have to do to get a working patch for the kernel source, (I downloaded kernel 2.6.24) compile the kernel, and install it properly?

Last edited by jzimm0007@msn.com; 01-27-2008 at 08:24 PM.
 
Old 01-28-2008, 06:18 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
- Unless you need to build all the modules, I don't think you'd need to include all those SCSI card drivers for ppSCSI (just sg and scsi_mod?).
- Apparently linux/config.h is renamed to linux/autoconf.h, check your kernel source tree and symlink the file. (also see this LQ thread)
- the second uname should read `uname -r`.
 
Old 01-28-2008, 08:04 PM   #3
jzimm0007@msn.com
Member
 
Registered: Aug 2007
Location: Hamilton, OH
Distribution: fedora 8
Posts: 31

Original Poster
Rep: Reputation: 15
I am using /dev/parport0 in my microtek2.conf; this is what I get from dmesg:
ppdev0: registered pardevice
ppdev0: unregistered pardevice
ppdev0: registered pardevice
ppdev0: unregistered pardevice
ppdev0: claim the port first
ppdev0: claim the port first
ppdev0: claim the port first
ppdev0: claim the port first
ppdev0: claim the port first
ppdev0: claim the port first

I tried lp0 and got console ready
What does that mean?
I think that was happening, because the permissions weren't set.

Last edited by jzimm0007@msn.com; 02-06-2008 at 06:44 AM.
 
Old 01-29-2008, 05:48 PM   #4
jzimm0007@msn.com
Member
 
Registered: Aug 2007
Location: Hamilton, OH
Distribution: fedora 8
Posts: 31

Original Poster
Rep: Reputation: 15
okay it seems the only error I am getting from the kernel is with epst: no such device. I got the scanport sq2030 to work when I loaded all of the ppscsi modules except epst with modprobe (parport_pc io=0x278 irq=7) I did modprobe onscsi host5=0,0 It detected my scanner 300a4 scsi7 device (I guess this is also called a microtek scanmaker v310) I tried scanimage -L that worked. I did xsane that worked. I did chmod o+x /dev/sga[0-4] (might be sg4 I forget) to set the permissions. Microtek2.conf says /dev/sga4 When I did scanimage microtek2 /dev/sga4 --mode Color > microtek2.jpg It started moving the head making noises then stopped; the lamp turned off (At first it was saying io error). I rebooted. I did vi /proc/scsi/scsi and looked at the devices. My scanner is no longer there. What happened? So I tried modprobe onscsi host5=0,0 again and the terminal just hangs. Is this a termination problem? I have one scanner (I don't think it is terminated) Is it possible to damage it so that the computer no longer sees it. I think I have tried everything. I think the lamp starts moving forward slowly then moves the wrong direction, because it makes an unusual noise, and I am afraid that I will damage it any help would be appreciated.

Last edited by jzimm0007@msn.com; 02-14-2008 at 03:49 PM.
 
Old 02-01-2008, 07:29 PM   #5
jzimm0007@msn.com
Member
 
Registered: Aug 2007
Location: Hamilton, OH
Distribution: fedora 8
Posts: 31

Original Poster
Rep: Reputation: 15
okay I successfully compiled 2.6.13 and tried to boot it I got kernel panic-not syncing:vfs:unable to mount root fs on unknown-block(0,0). I read a post about using mkinitrd. I tried that and got No module pata_atiixp found for kernel 2.6.13, aborting. I searched for the module and couldn't find it, but I am pretty sure I turned everything on that I could except experimental and turned on all of the modules. What is the deal? kernel 2.6.23.14-107 has this module. I edited ppscsi.c and ppscsi.h and successfully compiled kernel 2.6.23.14 with the ppscsi patch. I made sure not to enable the module that says experimental, because it actually said "This doesn't work yet." I did make modules make modules_install did mkinitrd /initrd-blah-blah blah and edited my grub.conf and it worked! Now what [do I have to do to get my scanport sq2030 working]? This also happened to be the same kernel I am using excluding the - 107 part. In my make oldconfig I didn't have to answer any questions except the ppscsi ones. Okay I insmod(ed) all of those modules in the /etc/rc.d/rc.local and I tried to modprobe them with modprobe e.g. epst and I got FATAL: Error inserting epst (/lib/modules/2.6.23.14/kernel/drivers/scsi/epst.ko): No such device (which is the same thing that I got when I tried the ppscsi-beta2 before I did all of that work compiling the kernel) It appears to work with this in my rc.local:
modprobe scsi_mod
modprobe sg
# modprobe parport
modprobe parport_pc io=0x278 irq=7
modprobe ppscsi
# modprobe epst
# modprobe onscsi
modprobe onscsi host0=0,0
modprobe onscsi host0=0,0
I realized that the resolution has to be set to 50x50 or lower and that you must set it to jpeg 8.5x11.00 inches and it will scan. The image is poor quality. I guess that is, because the resolution was so low. The ppscsi-beta2 seems to work also, before sometimes it did; sometimes it didn't work. I guess you have to recompile ppsci-beta2 for each kernel. I am not sure why, but now I have a custom kernel that works and a yum installed kernel that works with ppscsi. I cannot get it to scan above 50 dpi. In windows you can get 300 dpi. I am just glad my scanner works now... I wonder how long that will last.

Last edited by jzimm0007@msn.com; 02-18-2008 at 07:42 PM.
 
Old 07-05-2008, 12:52 PM   #6
Liftyor
LQ Newbie
 
Registered: Jul 2008
Posts: 1

Rep: Reputation: 0
Quote:
Originally Posted by jzimm0007@msn.com View Post
I cannot get it to scan above 50 dpi. In windows you can get 300 dpi.
You should try setting SANE_SG_BUFFERSIZE variable.

Code:
export SANE_SG_BUFFERSIZE=32768
It worked for me with same problem. 8)

bwt, here's a patch for latest 2.6.25 kernel. %)
http://forums.gentoo.org/viewtopic-p...1.html#5142421

Last edited by Liftyor; 07-05-2008 at 12:56 PM. Reason: append a link to ppscsi-2.6.25 patch
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
adding scanner support abtimoteo Ubuntu 1 09-10-2005 12:14 AM
parralell prot scanner using SCSI-2 commands and ppSCSI kernel patch mathman0 Linux - Hardware 1 12-01-2004 06:43 PM
Hotplug SCSI scanner or How to write to /proc/scsi/scsi from within a shell script. samac Linux - Hardware 1 08-30-2004 02:28 PM
adding scsi support to RH9 scoob8000 Linux - Hardware 8 05-11-2004 04:59 PM
Support for SCSI scanner... cbjhawks Linux - Newbie 1 11-01-2001 02:38 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 09:55 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration