[sane-devel] umax_pp slow

Joe Henley joehenley@kc.rr.com
Fri, 01 Oct 2004 10:56:51 -0500


Stef,

New results after the changes you suggested to modules.conf.  At the end 
are some more info.

So added the following to /etc/modules.conf and then rebooted:

alias parport_lowlevel parport_pc
options parport_pc io=0x378 io_hi=0x778 irq=7 dma=none

svoltz@wanadoo.fr wrote:
> On Thu, Sep 30, 2004 at 04:42:43PM -0500, Joe Henley wrote:
> 
>>Stef,
>>
>>Thanks very much for your reply.  I changed my umax_pp.conf file to read:
>>-------------------------------
>>option buffer 8388608
>>port 0x378
>>option astra 2000
>>

No changes to the above

>>Then I ran the export command, then the scanimage command.  The log 
>>contents are:
>>-------------------------------------------------------------
>>[sanei_debug] Setting debug level of umax_pp_low to 1.
>>[umax_pp_low] SANE_INB level 3
>>[umax_pp_low] sanei_umax_pp_InitPort(0x378,)
>>[umax_pp_low] sanei_ioperm(0x378, 8, 1) OK ...
>>[umax_pp_low] UMAX Astra 1220/1600/2000 P ASIC detected (mode=31)
>>[umax_pp_low] registerRead, found 0xFF expected 0x00 (umax_pp_low.c:6633)
> 
> 
> 	Weird, your paralle port can't do EPP when used directly, while it
> works with ppdev.
> 

The new results are esssentially the same; except for the line I marked
with asterisks:

[sanei_debug] Setting debug level of umax_pp_low to 1.
[umax_pp_low] SANE_INB level 3
[umax_pp_low] sanei_umax_pp_InitPort(0x378,)
[umax_pp_low] sanei_ioperm(0x378, 8, 1) OK ...
[umax_pp_low] UMAX Astra 1220/1600/2000 P ASIC detected (mode=31)
[umax_pp_low] Unexpected value for for register 0x0D, expected 0x00 or
0x40, got 0x18 ! (umax_pp_low.c:7406) ********New line*****************
[umax_pp_low] registerRead, found 0xFF expected 0x00 (umax_pp_low.c:6633)
[umax_pp_low] *** It appears that EPP data transfer doesn't work    ***
[umax_pp_low] *** Please read SETTING EPP section in sane-umax_pp.5 ***
[umax_pp_low] Hardware can't do ECP, giving up (umax_pp_low.c:6856) ...
[umax_pp_low] No EPP or ECP mode working, giving up ... (umax_pp_low.c:7475)

> 
>>[umax_pp_low] *** It appears that EPP data transfer doesn't work    ***
>>[umax_pp_low] *** Please read SETTING EPP section in sane-umax_pp.5 ***
>>[umax_pp_low] Hardware can't do ECP, giving up (umax_pp_low.c:6856) ...
>>[umax_pp_low] No EPP or ECP mode working, giving up ... (umax_pp_low.c:7475)
>>
>>The results surprised me.  I ran ppdiag to check and got:
>>---------------------------------------------------
>>S01: parport built as module
>>S02: parport0:
>>S02:    modes:PCSPP,TRISTATE,EPP
>>S02:    ADDR :0x378
>>S02:    IRQ  :no IRQ used
>>S02:    DMA  :no DMA used
>>S03: no parport parameters
>>S10: ppdev built as module
>>S12: /dev/parport0 exists ...
>>S12: /dev/parport0 is readable ...
>>S12: /dev/parport0 is writable ...
>>successfull end ....
>>

Then reran ppdiag and got:
S01: parport built as module
S02: parport0:
S02:    modes:PCSPP,TRISTATE,EPP
S02:    ADDR :0x378
S02:    IRQ  :7
S02:    DMA  :no DMA used
S03: parport parameters are: options parport_pc io=0x378 io_hi=0x778
irq=7 dma=none
S10: ppdev built as module
S12: /dev/parport0 exists ...
S12: /dev/parport0 is readable ...
S12: /dev/parport0 is writable ...
successfull end ...


>>I double checked my BIOS and it's set to EPP, port 378 and IRQ 7.
>>
>>So now I'm really stumped.  Please point me in the right direction.
>>
>>If it's relevant:  using RedHat 9, kernel is 2.4.20-20.9, xsane is 
>>version 0.96, sane-backend is: 1.0.14 with the 6.3 patch for umax_pp, 
>>mobo is an Intel 875PBZ.
>>
>>Joe
>>
>>PS:  Sorry about RoadRunner blocking your replies.  I don't know why.
> 
> 
> 	Try tweaking the parport parameters in /etc/modules.conf :
> 
> alias parport_lowlevel parport_pc
> options parport_pc io=0x378 io_hi=0x778 irq=7 dma=none
> 
> 	Another thing to try is to check is the kernel you use is
> compiled with the followwing options in 'Parallel port support':
> 
>     <M> Parallel port support
>     <M> PC-style hardware
>     < > Multi-IO cards (parallel and serial)
>     [*] Use FIFO/DMA if available (EXPERIMENTAL)
>     [*] SuperIO chipset support (EXPERIMENTAL)
>     < > Support for PCMCIA management for PC-style ports
>     [ ] Support foreign hardware
>     [*] IEEE 1284 transfer modes 
> 

In my compile config file (it's Red Hat, so there's abit of translation)
is the following.  I think I have all but the two experimental options
set as you'd suugest:
#
# Parallel port support
#
CONFIG_PARPORT=m
CONFIG_PARPORT_PC=m
CONFIG_PARPORT_PC_CML1=m
CONFIG_PARPORT_SERIAL=m
# CONFIG_PARPORT_PC_FIFO is not set
# CONFIG_PARPORT_PC_SUPERIO is not set
CONFIG_PARPORT_PC_PCMCIA=m
# CONFIG_PARPORT_AMIGA is not set
# CONFIG_PARPORT_MFC3 is not set
# CONFIG_PARPORT_ATARI is not set
# CONFIG_PARPORT_GSC is not set
# CONFIG_PARPORT_SUNBPP is not set
# CONFIG_PARPORT_OTHER is not set
CONFIG_PARPORT_1284=y

With all these changes, I tried to do a scan and it failed with
essentially the same messages as in the log entry above.

> 	What other parallel port BIOS setting do you have ?

In the BIOS set up screen, it says I have "Output only,"
"Bi-directional," "EPP," and "ECP".  I had forgotten I had ECP.  Oddly
it's in the BIOS, but ppdiag doesn't see it as an option.

So I rebooted and set the BIOS to ECP.  All other settings the same
(including the "export" command).  The scanimage command hung in a loop
with the following:

[sanei_debug] Setting debug level of umax_pp_low to 1.
[umax_pp_low] SANE_INB level 3
[umax_pp_low] sanei_umax_pp_InitPort(0x378,)
[umax_pp_low] sanei_ioperm(0x378, 8, 1) OK ...
[umax_pp_low] UMAX Astra 1220/1600/2000 P ASIC detected (mode=31)
[umax_pp_low] Unexpected value for for register 0x0D, expected 0x00 or
0x40, got 0x18 ! (umax_pp_low.c:7406)
[umax_pp_low] registerRead, found 0xFF expected 0x00 (umax_pp_low.c:6633)
[umax_pp_low] *** It appears that EPP data transfer doesn't work    ***
[umax_pp_low] *** Please read SETTING EPP section in sane-umax_pp.5 ***
[umax_pp_low] ECPregisterRead failed, expecting 0x20, got 0x22
(umax_pp_low.c:2850)
[umax_pp_low] ECPregisterRead failed, expecting 0x20, got 0x22
(umax_pp_low.c:2850)
[umax_pp_low] ECPregisterRead failed, expecting 0x20, got 0x22
(umax_pp_low.c:2850)
.........................the avove line just keeps going, over and over
.....

The results for ppdiag (under ECP) are:
S01: parport built as module
S02: parport0:
S02:    modes:PCSPP,TRISTATE
S02:    ADDR :0x378
S02:    IRQ  :7
S02:    DMA  :no DMA used
S03: parport parameters are: options parport_pc io=0x378 io_hi=0x778
irq=7 dma=none
S10: ppdev built as module
S12: /dev/parport0 exists ...
S12: /dev/parport0 is readable ...
S12: /dev/parport0 is writable ...
successfull end ....

Perhaps it's relevant, I looked in the messages boot log and saw the
following:
Oct  1 10:26:30 Eddie kernel: parport0: PC-style at 0x378 (0x778), irq 7
[PCSPP,TRISTATE]
Oct  1 10:26:40 Eddie kernel: parport0: PC-style at 0x378 (0x778), irq 7
[PCSPP,TRISTATE]
Oct  1 10:26:40 Eddie kernel: lp0: using parport0 (interrupt-driven).
Oct  1 10:26:40 Eddie kernel: lp0: console ready
Oct  1 10:38:56 Eddie kernel: ppdev: user-space parallel port driver

Again I tried to do a scan, it crapped out with messages as in the log file.

Does all this tell you something (other than my parallel port is screwed 
up)?  Any further thoughts or suggestions?

Again, thanks for all your help.

Joe Henley


> 
> Regards,
> 	Stef
>