kopia lustrzana https://gitlab.com/sane-project/website
102 wiersze
4.0 KiB
HTML
102 wiersze
4.0 KiB
HTML
<!-- received="Fri Oct 17 08:12:18 1997 MST" -->
|
||
<!-- sent="Fri, 17 Oct 1997 11:12:10 -0400" -->
|
||
<!-- name="Michael Sweet" -->
|
||
<!-- email="mike@easysw.com" -->
|
||
<!-- subject="IRIX SCSI driver update for SANE 0.65/0.66" -->
|
||
<!-- id="" -->
|
||
<!-- inreplyto="" -->
|
||
<title>sane-devel: IRIX SCSI driver update for SANE 0.65/0.66</title>
|
||
<h1>IRIX SCSI driver update for SANE 0.65/0.66</h1>
|
||
<b>Michael Sweet</b> (<a href="mailto:mike@easysw.com"><i>mike@easysw.com</i></a>)<br>
|
||
<i>Fri, 17 Oct 1997 11:12:10 -0400</i>
|
||
<p>
|
||
<ul>
|
||
<li> <b>Messages sorted by:</b> <a href="date.html#95">[ date ]</a><a href="index.html#95">[ thread ]</a><a href="subject.html#95">[ subject ]</a><a href="author.html#95">[ author ]</a>
|
||
<!-- next="start" -->
|
||
<li> <b>Next message:</b> <a href="0096.html">Marc LaFleur: "Some questions"</a>
|
||
<li> <b>Previous message:</b> <a href="0094.html">Oliver.Rauch@Wolfsburg.DE: "Re: Problem building sane on FreeBSD 2.2.2"</a>
|
||
<!-- nextthread="start" -->
|
||
<!-- reply="end" -->
|
||
</ul>
|
||
<!-- body="start" -->
|
||
This is a multi-part message in MIME format.<br>
|
||
--------------EB8B42D07B2F8F951CAE31A3<br>
|
||
Content-Type: text/plain; charset=us-ascii<br>
|
||
Content-Transfer-Encoding: 7bit<br>
|
||
<p>
|
||
OK, here is a unified diff patch that will fix the SCSI errors some<br>
|
||
users were experiencing.<br>
|
||
<p>
|
||
The problem was with the data directly following the SCSI command codes.<br>
|
||
Depending on the command this data could be misaligned. The updated<br>
|
||
code copies the command data (up to 64k worth) to a local buffer and<br>
|
||
uses the copy.<br>
|
||
<p>
|
||
<pre>
|
||
--
|
||
________________________________________________________________________
|
||
Mike Sweet Software for SGI and Sun Easy Software Products
|
||
(301) 373-9603 Workstations 44145 Airport View Drive
|
||
mike@easysw.com <a href="http://www.easysw.com">http://www.easysw.com</a> Hollywood, Maryland 20636
|
||
<p>
|
||
SUPPORT THE ANTI-SPAM AMENDMENT! - <a href="http://www.cauce.org">http://www.cauce.org</a>
|
||
--------------EB8B42D07B2F8F951CAE31A3
|
||
Content-Type: text/plain; charset=us-ascii; name="sanei_scsi.c.diffs"
|
||
Content-Transfer-Encoding: 7bit
|
||
Content-Disposition: inline; filename="sanei_scsi.c.diffs"
|
||
<p>
|
||
--- sanei_scsi.c.orig Fri Oct 17 10:48:17 1997
|
||
+++ sanei_scsi.c Fri Oct 17 10:54:09 1997
|
||
@@ -1068,10 +1068,12 @@
|
||
sanei_scsi_cmd (int fd, const void *src, size_t src_size,
|
||
void *dst, size_t *dst_size)
|
||
{
|
||
- dsreq_t scsi_req; /* SCSI request */
|
||
- u_char sensebuf[1024]; /* Request sense buffer */
|
||
- size_t cdb_size; /* Size of SCSI command */
|
||
+ dsreq_t scsi_req; /* SCSI request */
|
||
+ u_char sensebuf[1024], /* Request sense buffer */
|
||
+ databuf[65536]; /* Command data buffer */
|
||
+ size_t cdb_size; /* Size of SCSI command */
|
||
|
||
+
|
||
cdb_size = CDB_SIZE(*(u_char *)src);
|
||
|
||
memset(&scsi_req, 0, sizeof(scsi_req));
|
||
@@ -1099,10 +1101,16 @@
|
||
scsi_req.ds_time = 120 * 1000;
|
||
scsi_req.ds_cmdbuf = (caddr_t)src;
|
||
scsi_req.ds_cmdlen = cdb_size;
|
||
- scsi_req.ds_databuf = (caddr_t)src + cdb_size;
|
||
+ scsi_req.ds_databuf = (caddr_t)databuf;
|
||
scsi_req.ds_datalen = src_size - cdb_size;
|
||
scsi_req.ds_sensebuf = (caddr_t)sensebuf;
|
||
scsi_req.ds_senselen = sizeof (sensebuf);
|
||
+
|
||
+ /*
|
||
+ * Copy data portion to local buffer to ensure 32-bit alignment...
|
||
+ */
|
||
+
|
||
+ memcpy(databuf, ((u_char)src) + cdb_size, src_size - cdb_size);
|
||
}
|
||
if (ioctl (fd, DS_ENTER, &scsi_req) < 0)
|
||
return SANE_STATUS_IO_ERROR;
|
||
<p>
|
||
--------------EB8B42D07B2F8F951CAE31A3--
|
||
<p>
|
||
<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">majordomo@mostang.com</a>
|
||
</pre>
|
||
<!-- body="end" -->
|
||
<p>
|
||
<ul>
|
||
<!-- next="start" -->
|
||
<li> <b>Next message:</b> <a href="0096.html">Marc LaFleur: "Some questions"</a>
|
||
<li> <b>Previous message:</b> <a href="0094.html">Oliver.Rauch@Wolfsburg.DE: "Re: Problem building sane on FreeBSD 2.2.2"</a>
|
||
<!-- nextthread="start" -->
|
||
<!-- reply="end" -->
|
||
</ul>
|