Oliver Rauch wrote:
>
> > "Patricio Díaz G." wrote:
> >
> > Abel,
> >
> > The problem remains, attached I send you the log files generated with the new version you sent to me (thanks for that).
> >
> > Today I played a lot with the sources, and the exact line where the program freezes is:
> >
> > sanei_scsi.c (1972): select (req->fd, &readable, 0, 0, 0);
> >
> > I want to learn about the commands to send to the scanner, do you have some information?, so I could help to fix this problem.
> >
> > thanks,
> >
> >
> > Patricio
>
> Hi,
>
> is it possible, that the sanei_scsi_open_extended does not
> work correct ?:
>
> [sanei_scsi] sanei_scsi_open_extended: using 456704 bytes as SCSI buffer
> ...
> [umax] sane_start: sanei_scsi_open_extended returned scsi buffer size = 456704
> ...
> [sanei_scsi] scsi_req_enter: entered 0x8050cf0
> [sanei_scsi] sanei_scsi.issue: 0x8050cf0
> dev_max(currently)=7 max_active_device=1 (origin 1)
> scsi_dma_free_sectors=48 sg_pool_secs_aval=320 def_reserved_size=32768
>
> (Is def_reserved_size=32768 the real buffer size?)
Oliver,
Things are probably ok. I suspect Abel is using
system("cat /proc/scsi/sg/debug") inside sanei to output
sg's internal state. Here is the output from that command
on my machine when I'm reading a disk via sg:
$ cat /proc/scsi/sg/debug
dev_max(currently)=9 max_active_device=3 (origin 1)
scsi_dma_free_sectors=512 sg_pool_secs_aval=320 def_reserved_size=32768
>>> device=sg0 scsi1 chan=0 id=1 lun=0 em=0 sg_tablesize=255 excl=0
FD(1): timeout=60000ms bufflen=65536 (res)sgat=2 low_dma=0
cmd_q=1 f_packid=0 k_orphan=0 closed=0
rb>> act: id=191488 blen=65536 t_o/elap=40000/10ms sgat=2 op=0x28
The 'def_reserved_size=32768' is inherited by all sg file
descriptors (fds) when they are open()ed. The 'bufflen=65536'
on FD(1) indicates that the SG_SET_RESERVED_SIZE ioctl
must have been called to increase the inherited value.
The command that is active has set its data length to
'blen=65536' and the "rb >> " indicates the reserved
buffer for that fd is being used.
Perhaps this is information overload but it tells me
quite a lot.
The use of the reserved buffer is not essential (i.e.
the command data length may exceed the reserved buffer
size). It just removes a small chance of receiving an
ENOMEM error. [With more memory and less ISA cards
around, the small chance is getting smaller.]
Doug Gilbert
-- Source code, list archive, and docs: http://www.mostang.com/sane/ To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com
This archive was generated by hypermail 2b29 : Sat Feb 03 2001 - 06:38:59 PST