kopia lustrzana https://gitlab.com/sane-project/website
188 wiersze
6.6 KiB
HTML
188 wiersze
6.6 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: SG_BIG_BUFF setting in Problems incorrect</TITLE>
|
|
<META NAME="Author" CONTENT="Douglas Gilbert (dgilbert@interlog.com)">
|
|
<META NAME="Subject" CONTENT="Re: SG_BIG_BUFF setting in Problems incorrect">
|
|
</HEAD>
|
|
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
|
|
<H1>Re: SG_BIG_BUFF setting in Problems incorrect</H1>
|
|
<!-- received="Thu Feb 3 19:39:26 2000" -->
|
|
<!-- isoreceived="20000204033926" -->
|
|
<!-- sent="Thu, 03 Feb 2000 22:49:33 -0500" -->
|
|
<!-- isosent="20000204034933" -->
|
|
<!-- name="Douglas Gilbert" -->
|
|
<!-- email="dgilbert@interlog.com" -->
|
|
<!-- subject="Re: SG_BIG_BUFF setting in Problems incorrect" -->
|
|
<!-- id="389A4C4D.47F6CA11@interlog.com" -->
|
|
<!-- inreplyto="200002032239.OAA14015@gbr.newt.com" -->
|
|
<STRONG>From:</STRONG> Douglas Gilbert (<A HREF="mailto:dgilbert@interlog.com?Subject=Re:%20SG_BIG_BUFF%20setting%20in%20Problems%20incorrect&In-Reply-To=<389A4C4D.47F6CA11@interlog.com>"><EM>dgilbert@interlog.com</EM></A>)<BR>
|
|
<STRONG>Date:</STRONG> Thu Feb 03 2000 - 19:49:33 PST
|
|
<P>
|
|
<!-- next="start" -->
|
|
<LI><STRONG>Next message:</STRONG> <A HREF="0032.html">Bill Wohler: "Re: new snapshot?"</A>
|
|
<UL>
|
|
<LI><STRONG>Previous message:</STRONG> <A HREF="0030.html">Petter Reinholdtsen: "Re: new snapshot?"</A>
|
|
<LI><STRONG>In reply to:</STRONG> <A HREF="0028.html">Bill Wohler: "SG_BIG_BUFF setting in Problems incorrect"</A>
|
|
<!-- nextthread="start" -->
|
|
<LI><STRONG>Next in thread:</STRONG> <A HREF="0033.html">Bill Wohler: "Re: SG_BIG_BUFF setting in Problems incorrect"</A>
|
|
<!-- reply="end" -->
|
|
<LI><STRONG>Messages sorted by:</STRONG>
|
|
<A HREF="date.html#31">[ date ]</A>
|
|
<A HREF="index.html#31">[ thread ]</A>
|
|
<A HREF="subject.html#31">[ subject ]</A>
|
|
<A HREF="author.html#31">[ author ]</A>
|
|
</UL>
|
|
<HR NOSHADE><P>
|
|
<!-- body="start" -->
|
|
<P>
|
|
Bill Wohler wrote:
|
|
<BR>
|
|
<EM>>
|
|
</EM><BR>
|
|
<EM>> I just installed DEVEL_1_9 from the CVS repository and couldn't get
|
|
</EM><BR>
|
|
<EM>> to my scanner (HP Photosmart SCSI, running under a Linux 2.2.1
|
|
</EM><BR>
|
|
<EM>> kernel).
|
|
</EM><BR>
|
|
<P>Linux kernels < 2.2.6 (including RH 6.0) have the original sg driver
|
|
<BR>
|
|
(what I now call version 1). So an unpatched lk 2.2.1 has the original
|
|
<BR>
|
|
sg driver.
|
|
<BR>
|
|
<P><EM>> Thanks to the debugging output, the problem was clear:
|
|
</EM><BR>
|
|
<EM>>
|
|
</EM><BR>
|
|
<EM>> [wohler@gbr:587]% SANE_DEBUG_SANEI_SCSI=128 SANE_DEBUG_HP=128 scanimage
|
|
</EM><BR>
|
|
<EM>> ...
|
|
</EM><BR>
|
|
<EM>> [sanei_scsi] sanei_scsi_open: could not allocate SG buffer memory wanted: 131072 got: 32768
|
|
</EM><BR>
|
|
<P>With the original sg driver you are unable to change the buffer
|
|
<BR>
|
|
memory size dynamically (via an ioctl). So any attempt to change
|
|
<BR>
|
|
the default will fail and you will be left with the compiled
|
|
<BR>
|
|
in default.
|
|
<BR>
|
|
<P>Worse, in the original driver there is only one SG_BIG_BUFF
|
|
<BR>
|
|
sized buffer available at any one time (other users would
|
|
<BR>
|
|
be restricted to a 4 KB maximum buffer size). So running
|
|
<BR>
|
|
SANE and cdrecord on the original sg driver at the same
|
|
<BR>
|
|
time is almost guaranteed to fail.
|
|
<BR>
|
|
|
|
<BR>
|
|
<EM>> The sane-scsi manpage suggested bumping SG_BIG_BUFF in
|
|
</EM><BR>
|
|
<EM>> /usr/src/linux/include/scsi/sg.h to 128*1024-512=130560 bytes, but
|
|
</EM><BR>
|
|
<EM>> this doesn't work. After bumping SG_BIG_BUFF to 128*1024=131072
|
|
</EM><BR>
|
|
<EM>> bytes, recompiling the kernel, rebooting, and recompiling sane, all
|
|
</EM><BR>
|
|
<EM>> was well (phew!). I would suggest updating the sane-scsi man page
|
|
</EM><BR>
|
|
<EM>> with the correct value to save others from an extra kernel compiling
|
|
</EM><BR>
|
|
<EM>> step.
|
|
</EM><BR>
|
|
<P>SG_BIG_BUFF in the original sg driver needs to be a power of 2
|
|
<BR>
|
|
(I think). That SG_BIG_BUFF hack should only be done on the
|
|
<BR>
|
|
original sg driver which is what you seem to have. If you
|
|
<BR>
|
|
upgraded just your sg driver rather than the whole kernel
|
|
<BR>
|
|
then hopefully that "could not allocate" debug message would
|
|
<BR>
|
|
go away. For example you could get the sg driver version 2.1.36
|
|
<BR>
|
|
(as used in lk 2.2.14) from the table at
|
|
<BR>
|
|
<A HREF="http://www/torque.net/sg">http://www/torque.net/sg</A>
|
|
<BR>
|
|
<P>I agree that the man page could do with some fine tuning
|
|
<BR>
|
|
in this area.
|
|
<BR>
|
|
|
|
<BR>
|
|
<EM>> Also, the Problems document mentions that newer kernels (>=2.2) can
|
|
</EM><BR>
|
|
<EM>> get the value from /proc/sys/kernel/sg-big-buff. I have 2.2.1 and
|
|
</EM><BR>
|
|
<EM>> this file is not present.
|
|
</EM><BR>
|
|
<P>This file is only present if sg is built into the kernel (i.e. it is
|
|
<BR>
|
|
_not_ a module). As far as I can see it has always been like this.
|
|
<BR>
|
|
Using this file has never been a very sound tecnique IMHO.
|
|
<BR>
|
|
<P><EM>> Note that the 1.0.1 snapshot was working previously although I had
|
|
</EM><BR>
|
|
<EM>> not updated the value of SG_BIG_BUFF.
|
|
</EM><BR>
|
|
<P>This is a worry. Time I had a close look at that code in SANE.
|
|
<BR>
|
|
It seems pretty important to keep backward compatibility with
|
|
<BR>
|
|
the original linux sg driver. Is the problem just in the HP
|
|
<BR>
|
|
backend or common to all backends, I wonder. If any tester with
|
|
<BR>
|
|
a recent 2.2 series linux kernel wants to test backward
|
|
<BR>
|
|
compatibility with the original sg driver then they can get
|
|
<BR>
|
|
it at the above website.
|
|
<BR>
|
|
<P><P>Doug Gilbert
|
|
<BR>
|
|
linux sg maintainer
|
|
<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:%20SG_BIG_BUFF%20setting%20in%20Problems%20incorrect&In-Reply-To=<389A4C4D.47F6CA11@interlog.com>">majordomo@mostang.com</A>
|
|
</PRE>
|
|
<P><!-- body="end" -->
|
|
<HR NOSHADE>
|
|
<UL>
|
|
<!-- next="start" -->
|
|
<LI><STRONG>Next message:</STRONG> <A HREF="0032.html">Bill Wohler: "Re: new snapshot?"</A>
|
|
<LI><STRONG>Previous message:</STRONG> <A HREF="0030.html">Petter Reinholdtsen: "Re: new snapshot?"</A>
|
|
<LI><STRONG>In reply to:</STRONG> <A HREF="0028.html">Bill Wohler: "SG_BIG_BUFF setting in Problems incorrect"</A>
|
|
<!-- nextthread="start" -->
|
|
<LI><STRONG>Next in thread:</STRONG> <A HREF="0033.html">Bill Wohler: "Re: SG_BIG_BUFF setting in Problems incorrect"</A>
|
|
<!-- reply="end" -->
|
|
<LI><STRONG>Messages sorted by:</STRONG>
|
|
<A HREF="date.html#31">[ date ]</A>
|
|
<A HREF="index.html#31">[ thread ]</A>
|
|
<A HREF="subject.html#31">[ subject ]</A>
|
|
<A HREF="author.html#31">[ 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 Feb 03 2000 - 19:40:26 PST</EM>
|
|
</EM>
|
|
</SMALL>
|
|
</BODY>
|
|
</HTML>
|