iscsi-2.3.1 on FreeBSD 7.3

Daniel Braniss danny at cs.huji.ac.il
Thu May 19 08:09:37 UTC 2011


> 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;




More information about the freebsd-scsi mailing list