From owner-freebsd-questions Sun Dec 1 6:52:49 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9336537B404; Sun, 1 Dec 2002 06:52:34 -0800 (PST) Received: from mail.libertysurf.net (mail.libertysurf.net [213.36.80.91]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1DA0043E88; Sun, 1 Dec 2002 06:52:34 -0800 (PST) (envelope-from groudier@free.fr) Received: from [192.168.1.129] (212.232.50.94) by mail.libertysurf.net (6.5.026) id 3DCA8A7A006B5D9F; Sun, 1 Dec 2002 15:52:27 +0100 Date: Sun, 1 Dec 2002 16:52:40 +0100 (CET) From: =?ISO-8859-1?Q?G=E9rard_Roudier?= X-X-Sender: groudier@localhost.my.domain To: Peter Much Cc: freebsd-scsi@FreeBSD.ORG, , Subject: Re: Getting SCSI Scanner to work (with Symbios 53c810a and FreeBSD 4.4) In-Reply-To: <200212010221.gB12LZk02947@disp.oper.dinoex.org> Message-ID: <20021201163916.O195-100000@localhost.my.domain> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=ISO-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hi Peter, You may ignore my previous minute patch and give a try with the below one. It makes more sense to ignore the period (synchronous period factor) when the offset (REQ/ACK offset) is zero, facing synchronous data transfer negotiation in SCSI. Even if the period should be ignored by SCSI devices when the offset is zero, I would prefer the driver to behave correctly by design here (i.e.: ignore the period value when offset is zero). The below patch just does so in the 2 places the driver checks against a needed sync. negotiation. Btw, I would consider as broken any SCSI code that makes decision about data transfer being asynchronous on period value =3D 0. ;-) --- sym_hipd.c.021201=09Sun Dec 1 16:09:55 2002 +++ sym_hipd.c=09Sun Dec 1 16:13:23 2002 @@ -3074,8 +3074,9 @@ =09/* =09 * negotiate synchronous transfers? =09 */ -=09else if (tp->tinfo.current.period !=3D tp->tinfo.goal.period || -=09=09 tp->tinfo.current.offset !=3D tp->tinfo.goal.offset) +=09else if (tp->tinfo.current.offset !=3D tp->tinfo.goal.offset || +=09=09 (tp->tinfo.goal.offset && +=09=09 tp->tinfo.current.period !=3D tp->tinfo.goal.period)) =09=09nego =3D NS_SYNC; =09switch (nego) { @@ -7838,8 +7839,9 @@ =09 */ =09cp->nego_status =3D 0; =09if (tp->tinfo.current.width !=3D tp->tinfo.goal.width || -=09 tp->tinfo.current.period !=3D tp->tinfo.goal.period || =09 tp->tinfo.current.offset !=3D tp->tinfo.goal.offset || +=09 (tp->tinfo.goal.offset && +=09 tp->tinfo.current.period !=3D tp->tinfo.goal.period)|| =09 tp->tinfo.current.options !=3D tp->tinfo.goal.options) { =09=09if (!tp->nego_cp && lp) =09=09=09msglen +=3D sym_prepare_nego(np, cp, 0, msgptr + msglen); ------------------------ CUT HERE ------------------------ Let me know if this patch makes the driver work with your asynchronous-only SCSI scanner. G=E9rard. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message