kopia lustrzana https://gitlab.com/sane-project/website
170 wiersze
6.2 KiB
HTML
170 wiersze
6.2 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
|
|
"http://www.w3.org/TR/REC-html40/loose.dtd">
|
|
<HTML>
|
|
<HEAD>
|
|
<TITLE>sane-devel: Re: Problem in sanei_scsi.c</TITLE>
|
|
<META NAME="Author" CONTENT="Douglas Gilbert (dgilbert@interlog.com)">
|
|
<META NAME="Subject" CONTENT="Re: Problem in sanei_scsi.c">
|
|
</HEAD>
|
|
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
|
|
<H1>Re: Problem in sanei_scsi.c</H1>
|
|
<!-- received="Thu May 25 21:01:45 2000" -->
|
|
<!-- isoreceived="20000526040145" -->
|
|
<!-- sent="Thu, 25 May 2000 22:41:04 -0400" -->
|
|
<!-- isosent="20000526024104" -->
|
|
<!-- name="Douglas Gilbert" -->
|
|
<!-- email="dgilbert@interlog.com" -->
|
|
<!-- subject="Re: Problem in sanei_scsi.c" -->
|
|
<!-- id="392DE440.8FCE1F4D@interlog.com" -->
|
|
<!-- inreplyto="000f01bfc675$1015ca40$7a53dec2@simon" -->
|
|
<STRONG>From:</STRONG> Douglas Gilbert (<A HREF="mailto:dgilbert@interlog.com?Subject=Re:%20Problem%20in%20sanei_scsi.c&In-Reply-To=<392DE440.8FCE1F4D@interlog.com>"><EM>dgilbert@interlog.com</EM></A>)<BR>
|
|
<STRONG>Date:</STRONG> Thu May 25 2000 - 19:41:04 PDT
|
|
<P>
|
|
<!-- next="start" -->
|
|
<LI><STRONG>Next message:</STRONG> <A HREF="0168.html">Levente NOVAK: "Re: Correct Network Scanner Syntax? (a question)"</A>
|
|
<UL>
|
|
<LI><STRONG>Previous message:</STRONG> <A HREF="0166.html">Peter Kirchgessner: "Re: Sane HP backend coredumps"</A>
|
|
<LI><STRONG>In reply to:</STRONG> <A HREF="0163.html">Simon Munton: "Problem in sanei_scsi.c"</A>
|
|
<!-- nextthread="start" -->
|
|
<LI><STRONG>Next in thread:</STRONG> <A HREF="0174.html">abel deuring: "Re: Problem in sanei_scsi.c"</A>
|
|
<LI><STRONG>Reply:</STRONG> <A HREF="0174.html">abel deuring: "Re: Problem in sanei_scsi.c"</A>
|
|
<!-- reply="end" -->
|
|
<LI><STRONG>Messages sorted by:</STRONG>
|
|
<A HREF="date.html#167">[ date ]</A>
|
|
<A HREF="index.html#167">[ thread ]</A>
|
|
<A HREF="subject.html#167">[ subject ]</A>
|
|
<A HREF="author.html#167">[ author ]</A>
|
|
</UL>
|
|
<HR NOSHADE><P>
|
|
<!-- body="start" -->
|
|
<P>
|
|
Simon Munton wrote:
|
|
<BR>
|
|
<EM>>
|
|
</EM><BR>
|
|
<EM>> Hi,
|
|
</EM><BR>
|
|
<EM>>
|
|
</EM><BR>
|
|
<EM>> I've found a problem in the issue() function in sanei_scsi.c, that results
|
|
</EM><BR>
|
|
<EM>> in the queue in sg filling up, and prevents any more scsi commands being
|
|
</EM><BR>
|
|
<EM>> issued until the device is closed.
|
|
</EM><BR>
|
|
<EM>>
|
|
</EM><BR>
|
|
<EM>> There is a test on line 1690 which can erroneously try to reissue a scsi
|
|
</EM><BR>
|
|
<EM>> command:
|
|
</EM><BR>
|
|
<EM>> if (rp == fdp->sane_qhead && errno == EAGAIN)
|
|
</EM><BR>
|
|
<EM>>
|
|
</EM><BR>
|
|
<EM>> The first time through the enclosing while loop, rp == fdp->sane_qhead. But
|
|
</EM><BR>
|
|
<EM>> if the write() call issuing the command was successful, errno is left
|
|
</EM><BR>
|
|
<EM>> unchanged, and if errno happens to contain EAGAIN, then the command is
|
|
</EM><BR>
|
|
<EM>> issued again, and again... until the command queue in sg is full.
|
|
</EM><BR>
|
|
<P>Simon,
|
|
<BR>
|
|
This may explain the strange behaviour that I saw on a
|
|
<BR>
|
|
Umax 1220S and reported to Oliver Rauch. At the time we
|
|
<BR>
|
|
couldn't resolve it. Excerpt from a post on 2000/05/04
|
|
<BR>
|
|
follows:
|
|
<BR>
|
|
<P>---------------------------------------------------------
|
|
<BR>
|
|
I was watching the progress of a scan in sane 1.0.2 (xsane 0.57
|
|
<BR>
|
|
I think) via debug in a recent 2.3.99 linux kernel.
|
|
<BR>
|
|
<P>This output comes from: 'cat /proc/scsi/sg/debug' :
|
|
<BR>
|
|
<P>dev_max(currently)=11 max_active_device=5 (origin 1)
|
|
<BR>
|
|
scsi_dma_free_sectors=5680 sg_pool_secs_aval=320 def_reserved_size=32768
|
|
<BR>
|
|
<EM> >>> device=sg1 scsi0 chan=0 id=5 lun=0 em=0 sg_tablesize=50 excl=1
|
|
</EM><BR>
|
|
FD(1): timeout=600000ms bufflen=131072 (res)sgat=4 low_dma=1
|
|
<BR>
|
|
cmd_q=1 f_packid=0 k_orphan=0 closed=0
|
|
<BR>
|
|
rcv: id=95 blen=0 dur=10ms sgat=0 op=0x31
|
|
<BR>
|
|
rcv: id=95 blen=0 dur=260ms sgat=0 op=0x31
|
|
<BR>
|
|
rcv: id=95 blen=0 dur=500ms sgat=0 op=0x31
|
|
<BR>
|
|
act: id=95 blen=0 t_o/elap=10000/690ms sgat=0 op=0x31
|
|
<BR>
|
|
act: id=95 blen=0 t_o/elap=10000/670ms sgat=0 op=0x31
|
|
<BR>
|
|
act: id=95 blen=0 t_o/elap=10000/470ms sgat=0 op=0x31
|
|
<BR>
|
|
act: id=95 blen=0 t_o/elap=10000/210ms sgat=0 op=0x31
|
|
<BR>
|
|
prior: id=95 blen=0 t_o/elap=10000/0ms sgat=0 op=0x31
|
|
<BR>
|
|
<P>It indicates 4 queued up OBJECT POSITION (op=0x31)
|
|
<BR>
|
|
commands [act], one waiting to get on the queue [prior]
|
|
<BR>
|
|
and 3 finished [rcv] awaiting read()s . So that's 8
|
|
<BR>
|
|
outstanding write()s.
|
|
<BR>
|
|
<P>---------------------------------------------------------
|
|
<BR>
|
|
<P>Oliver said that command should only have been issued once.
|
|
<BR>
|
|
Repeating the test with more SANE debug on made the problem
|
|
<BR>
|
|
disappear :-) Now if the Umax driver uses that issue()
|
|
<BR>
|
|
function we may have an answer.
|
|
<BR>
|
|
<P>Doug Gilbert
|
|
<BR>
|
|
<P><PRE>
|
|
--
|
|
Source code, list archive, and docs: <A HREF="http://www.mostang.com/sane/">http://www.mostang.com/sane/</A>
|
|
To unsubscribe: echo unsubscribe sane-devel | mail <A HREF="mailto:majordomo@mostang.com?Subject=Re:%20Problem%20in%20sanei_scsi.c&In-Reply-To=<392DE440.8FCE1F4D@interlog.com>">majordomo@mostang.com</A>
|
|
</PRE>
|
|
<P><!-- body="end" -->
|
|
<HR NOSHADE>
|
|
<UL>
|
|
<!-- next="start" -->
|
|
<LI><STRONG>Next message:</STRONG> <A HREF="0168.html">Levente NOVAK: "Re: Correct Network Scanner Syntax? (a question)"</A>
|
|
<LI><STRONG>Previous message:</STRONG> <A HREF="0166.html">Peter Kirchgessner: "Re: Sane HP backend coredumps"</A>
|
|
<LI><STRONG>In reply to:</STRONG> <A HREF="0163.html">Simon Munton: "Problem in sanei_scsi.c"</A>
|
|
<!-- nextthread="start" -->
|
|
<LI><STRONG>Next in thread:</STRONG> <A HREF="0174.html">abel deuring: "Re: Problem in sanei_scsi.c"</A>
|
|
<LI><STRONG>Reply:</STRONG> <A HREF="0174.html">abel deuring: "Re: Problem in sanei_scsi.c"</A>
|
|
<!-- reply="end" -->
|
|
<LI><STRONG>Messages sorted by:</STRONG>
|
|
<A HREF="date.html#167">[ date ]</A>
|
|
<A HREF="index.html#167">[ thread ]</A>
|
|
<A HREF="subject.html#167">[ subject ]</A>
|
|
<A HREF="author.html#167">[ author ]</A>
|
|
</UL>
|
|
<!-- trailer="footer" -->
|
|
<HR NOSHADE>
|
|
<P>
|
|
<SMALL>
|
|
<EM>
|
|
This archive was generated by <A HREF="http://www.hypermail.org/">hypermail 2b29</A>
|
|
: <EM>Thu May 25 2000 - 21:03:48 PDT</EM>
|
|
</EM>
|
|
</SMALL>
|
|
</BODY>
|
|
</HTML>
|