kopia lustrzana https://gitlab.com/sane-project/website
166 wiersze
6.1 KiB
HTML
166 wiersze
6.1 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: sanei_scsi_cmd / snapscan / Prisa640S</TITLE>
|
|
<META NAME="Author" CONTENT="Douglas Gilbert (dgilbert@interlog.com)">
|
|
<META NAME="Subject" CONTENT="Re: sanei_scsi_cmd / snapscan / Prisa640S">
|
|
</HEAD>
|
|
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
|
|
<H1>Re: sanei_scsi_cmd / snapscan / Prisa640S</H1>
|
|
<!-- received="Thu Jan 11 07:22:27 2001" -->
|
|
<!-- isoreceived="20010111152227" -->
|
|
<!-- sent="Thu, 11 Jan 2001 10:43:54 -0500" -->
|
|
<!-- isosent="20010111154354" -->
|
|
<!-- name="Douglas Gilbert" -->
|
|
<!-- email="dgilbert@interlog.com" -->
|
|
<!-- subject="Re: sanei_scsi_cmd / snapscan / Prisa640S" -->
|
|
<!-- id="3A5DD4BA.C5A12C27@interlog.com" -->
|
|
<!-- inreplyto="200101101019.LAA10500@siegel.math.uni-frankfurt.de" -->
|
|
<STRONG>From:</STRONG> Douglas Gilbert (<A HREF="mailto:dgilbert@interlog.com?Subject=Re:%20sanei_scsi_cmd%20/%20snapscan%20/%20Prisa640S&In-Reply-To=<3A5DD4BA.C5A12C27@interlog.com>"><EM>dgilbert@interlog.com</EM></A>)<BR>
|
|
<STRONG>Date:</STRONG> Thu Jan 11 2001 - 07:43:54 PST
|
|
<P>
|
|
<!-- next="start" -->
|
|
<LI><STRONG>Next message:</STRONG> <A HREF="0123.html">Joseph chock: "Dynotak 6P parallel port scanner . . ."</A>
|
|
<UL>
|
|
<LI><STRONG>Previous message:</STRONG> <A HREF="0121.html">Douglas Gilbert: "Re: MICROTEK2 failure : out of memory with kernel 2.4"</A>
|
|
<LI><STRONG>In reply to:</STRONG> <A HREF="0108.html">Christian Nassau: "sanei_scsi_cmd / snapscan / Prisa640S"</A>
|
|
<!-- nextthread="start" -->
|
|
<LI><STRONG>Next in thread:</STRONG> <A HREF="0128.html">Christian Nassau: "Re: sanei_scsi_cmd / snapscan / Prisa640S"</A>
|
|
<LI><STRONG>Reply:</STRONG> <A HREF="0128.html">Christian Nassau: "Re: sanei_scsi_cmd / snapscan / Prisa640S"</A>
|
|
<!-- reply="end" -->
|
|
<LI><STRONG>Messages sorted by:</STRONG>
|
|
<A HREF="date.html#122">[ date ]</A>
|
|
<A HREF="index.html#122">[ thread ]</A>
|
|
<A HREF="subject.html#122">[ subject ]</A>
|
|
<A HREF="author.html#122">[ author ]</A>
|
|
</UL>
|
|
<HR NOSHADE><P>
|
|
<!-- body="start" -->
|
|
<P>
|
|
Christian Nassau wrote:
|
|
<BR>
|
|
<EM>>
|
|
</EM><BR>
|
|
<EM>> I'm currently trying to get an Acer ScanPrisa640S (patched atp870u
|
|
</EM><BR>
|
|
<EM>> scsi driver, kernel version 2.2.16) working with a (modified) snapscan
|
|
</EM><BR>
|
|
<EM>> backend. I had the following problem...
|
|
</EM><BR>
|
|
<EM>>
|
|
</EM><BR>
|
|
<EM>> aborting scanimage in the middle of a scan with CRTL-C leads
|
|
</EM><BR>
|
|
<EM>> to a system lock (requiring an instant reboot).
|
|
</EM><BR>
|
|
<EM>>
|
|
</EM><BR>
|
|
<EM>> ...and have found that sanei_scsi_cmd(..) only protects the
|
|
</EM><BR>
|
|
<EM>> scsi read and write instructions individually against user
|
|
</EM><BR>
|
|
<EM>> breaks. The SCSI-Programming-FAQ (dated 1997) that I have says
|
|
</EM><BR>
|
|
<EM>> that the **pair** (write/read) has to be protected, because
|
|
</EM><BR>
|
|
<EM>> otherwise very bad things will happen... (depending on the
|
|
</EM><BR>
|
|
<EM>> kernel version)...
|
|
</EM><BR>
|
|
<EM>>
|
|
</EM><BR>
|
|
<EM>> ... so, I've created a wrapper "sanei_scsi_protected_cmd(..)" and
|
|
</EM><BR>
|
|
<EM>> made snapscan use this function, and -- alas! -- userbreaks are
|
|
</EM><BR>
|
|
<EM>> safe now.
|
|
</EM><BR>
|
|
<EM>>
|
|
</EM><BR>
|
|
<EM>> Couldn't one make sanei_scsi_cmd(..) protected by default, or at
|
|
</EM><BR>
|
|
<EM>> least provide a protected alternative? (or make the Makefile decide
|
|
</EM><BR>
|
|
<EM>> which one to install, based on the kernel version?)
|
|
</EM><BR>
|
|
<P>Christian,
|
|
<BR>
|
|
Almost 2 years ago, the Linux sg driver was secured against
|
|
<BR>
|
|
a control-C induced failures. The latest SCSI-Programming-HOWTO
|
|
<BR>
|
|
that I can find is dated 7th May 1996 and what it said was
|
|
<BR>
|
|
correct then. Are you using the sg driver that came with
|
|
<BR>
|
|
lk 2.2.16 ?
|
|
<BR>
|
|
<P>The level of protection provided against a control-C
|
|
<BR>
|
|
prematurely terminating the sane process is to safely
|
|
<BR>
|
|
receive and dispose of any responses that arrive after
|
|
<BR>
|
|
the sg device fds have been closed. It is possible that
|
|
<BR>
|
|
the scanner gets upset because a subsequent SCSI command
|
|
<BR>
|
|
(e.g. RECEIVE) is not transmitted.
|
|
<BR>
|
|
<P>To debug such a lockup is difficult. Do the CapsLock and
|
|
<BR>
|
|
NumLock keys still operate the LEDs on the keyboard? If
|
|
<BR>
|
|
so, Alt-SysRq ("p" and "t") may gather some information.
|
|
<BR>
|
|
Do you have a SCSI disk with your root partition on
|
|
<BR>
|
|
the same SCSI bus as the scanner?
|
|
<BR>
|
|
<P>So I think you have a very "special" case that does
|
|
<BR>
|
|
not require the sanei interface to be changed. The
|
|
<BR>
|
|
problem with such a lock, is that it will make SANE
|
|
<BR>
|
|
inoperable for the timeout period (often 10 minutes)
|
|
<BR>
|
|
if the scanner locks up before sending a response.
|
|
<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:%20sanei_scsi_cmd%20/%20snapscan%20/%20Prisa640S&In-Reply-To=<3A5DD4BA.C5A12C27@interlog.com>">majordomo@mostang.com</A>
|
|
</PRE>
|
|
<P><!-- body="end" -->
|
|
<HR NOSHADE>
|
|
<UL>
|
|
<!-- next="start" -->
|
|
<LI><STRONG>Next message:</STRONG> <A HREF="0123.html">Joseph chock: "Dynotak 6P parallel port scanner . . ."</A>
|
|
<LI><STRONG>Previous message:</STRONG> <A HREF="0121.html">Douglas Gilbert: "Re: MICROTEK2 failure : out of memory with kernel 2.4"</A>
|
|
<LI><STRONG>In reply to:</STRONG> <A HREF="0108.html">Christian Nassau: "sanei_scsi_cmd / snapscan / Prisa640S"</A>
|
|
<!-- nextthread="start" -->
|
|
<LI><STRONG>Next in thread:</STRONG> <A HREF="0128.html">Christian Nassau: "Re: sanei_scsi_cmd / snapscan / Prisa640S"</A>
|
|
<LI><STRONG>Reply:</STRONG> <A HREF="0128.html">Christian Nassau: "Re: sanei_scsi_cmd / snapscan / Prisa640S"</A>
|
|
<!-- reply="end" -->
|
|
<LI><STRONG>Messages sorted by:</STRONG>
|
|
<A HREF="date.html#122">[ date ]</A>
|
|
<A HREF="index.html#122">[ thread ]</A>
|
|
<A HREF="subject.html#122">[ subject ]</A>
|
|
<A HREF="author.html#122">[ 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 Jan 11 2001 - 07:23:25 PST</EM>
|
|
</EM>
|
|
</SMALL>
|
|
</BODY>
|
|
</HTML>
|