From owner-freebsd-scsi@FreeBSD.ORG Thu May 19 08:09:37 2011 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 09A171065673 for ; Thu, 19 May 2011 08:09:37 +0000 (UTC) (envelope-from danny@cs.huji.ac.il) Received: from cs.huji.ac.il (cs.huji.ac.il [132.65.16.30]) by mx1.freebsd.org (Postfix) with ESMTP id B9E508FC13 for ; Thu, 19 May 2011 08:09:36 +0000 (UTC) Received: from pampa.cs.huji.ac.il ([132.65.80.32] ident=danny) by cs.huji.ac.il with esmtp id 1QMxZn-000CLA-7H; Thu, 19 May 2011 10:23:19 +0300 X-Mailer: exmh version 2.7.2 01/07/2005 with nmh-1.2 To: Toomas Aas In-reply-to: <20110518181109.40330buw2cn4gya0@webmail.raad.tartu.ee> References: <20110517223221.42331bryjddv87y8@webmail.raad.tartu.ee> <20110518181109.40330buw2cn4gya0@webmail.raad.tartu.ee> Comments: In-reply-to Toomas Aas message dated "Wed, 18 May 2011 18:11:09 +0300." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 19 May 2011 10:23:19 +0300 From: Daniel Braniss Message-ID: Cc: freebsd-scsi@freebsd.org Subject: Re: iscsi-2.3.1 on FreeBSD 7.3 X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 May 2011 08:09:37 -0000 > Hello Danny! > > > > I haven't tested on 7.x for a long time, but the patch included should solve > > the missing routine problem: > > Thanks for the patch, however the patched isc_subr.c does not compile: > > cc -O2 -fno-strict-aliasing -pipe -march=nocona > -DISCSI_INITIATOR_DEBUG=2 -DINVARIANTS -D_KERNEL -DKLD_MODULE > -std=c99 -nostdinc -I/usr/src/sys/modules/iscsi/initiator/../../.. > -DHAVE_KERNEL_OPTION_HEADERS -include > /usr/obj/usr/src/sys/HEEROLD/opt_global.h -I. -I@ -I@/contrib/altq > -finline-limit=8000 --param inline-unit-growth=100 --param > large-function-growth=1000 -fno-common -g -fno-omit-frame-pointer > -I/usr/obj/usr/src/sys/HEEROLD -mcmodel=kernel -mno-red-zone > -mfpmath=387 -mno-sse -mno-sse2 -mno-mmx -mno-3dnow -msoft-float > -fno-asynchronous-unwind-tables -ffreestanding -Wall -Wredundant-decls > -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes > -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign > -fformat-extensions -c > /usr/src/sys/modules/iscsi/initiator/../../../dev/iscsi/initiator/isc_subr.c > /usr/src/sys/modules/iscsi/initiator/../../../dev/iscsi/initiator/isc_subr.c: > In function 'calculate_crc32c': > /usr/src/sys/modules/iscsi/initiator/../../../dev/iscsi/initiator/isc_subr.c:172: error: 'p' undeclared (first use in this > function) > /usr/src/sys/modules/iscsi/initiator/../../../dev/iscsi/initiator/isc_subr.c:172: error: (Each undeclared identifier is reported only > once > /usr/src/sys/modules/iscsi/initiator/../../../dev/iscsi/initiator/isc_subr.c:172: error: for each function it appears > in.) > *** Error code 1 > > Stop in /usr/src/sys/modules/iscsi/initiator. > *** Error code 1 > > Stop in /usr/src/sys/modules/iscsi. > *** Error code 1 > > Stop in /usr/src/sys/modules. > *** Error code 1 > > Stop in /usr/obj/usr/src/sys/HEEROLD. > *** Error code 1 > > Stop in /usr/src. > *** Error code 1 > > Stop in /usr/src. > > > -- > Toomas Aas > wups, sorry, here is a patch to apply after the previous patch. --- a/sys/dev/iscsi/initiator/isc_subr.c Wed May 18 12:18:40 2011 +0300 +++ b/sys/dev/iscsi/initiator/isc_subr.c Thu May 19 10:22:20 2011 +0300 @@ -168,6 +168,8 @@ static __inline int calculate_crc32c(uint32_t crc, const void *buf, size_t size) { + const uint8_t *p = buf; + while (size--) crc = crc32Table[(crc ^ *p++) & 0xff] ^ (crc >> 8); return crc;