From owner-freebsd-usb@FreeBSD.ORG Tue Jan 15 14:02:17 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 77A3016A41B for ; Tue, 15 Jan 2008 14:02:17 +0000 (UTC) (envelope-from stefan.lambrev@moneybookers.com) Received: from blah.sun-fish.com (blah.sun-fish.com [217.18.249.150]) by mx1.freebsd.org (Postfix) with ESMTP id 14E6413C44B for ; Tue, 15 Jan 2008 14:02:17 +0000 (UTC) (envelope-from stefan.lambrev@moneybookers.com) Received: by blah.sun-fish.com (Postfix, from userid 1002) id 9C0551B10F1D; Tue, 15 Jan 2008 15:02:15 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on blah.cmotd.com X-Spam-Level: X-Spam-Status: No, score=-10.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, J_CHICKENPOX_33 autolearn=no version=3.2.3 Received: from hater.haters.org (hater.cmotd.com [192.168.3.125]) by blah.sun-fish.com (Postfix) with ESMTP id 3F17E1B10F19; Tue, 15 Jan 2008 15:02:04 +0100 (CET) Message-ID: <478CBCDB.6090203@moneybookers.com> Date: Tue, 15 Jan 2008 16:02:03 +0200 From: Stefan Lambrev User-Agent: Thunderbird 2.0.0.9 (X11/20071120) MIME-Version: 1.0 To: freebsd-usb@freebsd.org References: <477BC1A3.5080406@moneybookers.com> <200801021837.51376.hselasky@c2i.net> <477CD474.6080302@moneybookers.com> <200801032154.32107.hselasky@c2i.net> <478BE02A.7050100@moneybookers.com> In-Reply-To: <478BE02A.7050100@moneybookers.com> Content-Type: text/plain; charset=windows-1251; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.91.2/5483/Mon Jan 14 15:45:01 2008 on blah.cmotd.com X-Virus-Status: Clean Cc: Subject: Re: Problem with usb4bsd rev566 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jan 2008 14:02:17 -0000 Greetings, Stefan Lambrev wrote: > Greetings, > > Any idea why I get this error when trying go build kernel with latest > usb4bsd? > > cc -c -O2 -pipe -fno-strict-aliasing -march=prescott -std=c99 -Wall > -Wredundant-decls -Wnested-externs -Wstrict-prototypes > -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef > -Wno-pointer-sign -fformat-extensions -nostdinc -I. -I/usr/src/sys > -I/usr/src/sys/contrib/altq -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS > -include opt_global.h -fno-common -finline-limit=8000 --param > inline-unit-growth=100 --param large-function-growth=1000 > -mno-align-long-strings -mpreferred-stack-boundary=2 -mno-mmx > -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -ffreestanding -Werror > /usr/src/sys/dev/usb/usb.c > cc1: warnings being treated as errors > /usr/src/sys/dev/usb/usb.c: In function 'usb_event_thread': > /usr/src/sys/dev/usb/usb.c:206: warning: implicit declaration of > function 'kproc_exit' > /usr/src/sys/dev/usb/usb.c:206: warning: nested extern declaration of > 'kproc_exit' > /usr/src/sys/dev/usb/usb.c: In function 'usb_create_event_thread': > /usr/src/sys/dev/usb/usb.c:303: warning: implicit declaration of > function 'kproc_create' > /usr/src/sys/dev/usb/usb.c:303: warning: nested extern declaration of > 'kproc_create' > *** Error code 1 > > Stop in /usr/obj/usr/src/sys/CORE. > *** Error code 1 > > Stop in /usr/src. > *** Error code 1 > > Stop in /usr/src. > > I'm using FreeBSD 7.0-RC1 #11: Mon Jan 7 11:31:53 EET 2008 i386 and > revision 566 of usb4bsd. > Is the new revision of usb4bsd only for -current or should work with > releng_7_0 ? > I think the new code depends on kproc_exits which is introduced in src/sys/kern/kern_kthread.c Revision 1.40, but this version is only in -current. Also I saw that there is a fix for freebsd 6.X in i4b/trunk/i4b/src/sys/dev/usb/usb_port.h at line 197: #if (__FreeBSD_version >= 700000) But at version 700055 (releng_7_0 from today) kproc_exec() is still not introduced, so the build failed. I tried to compile by changing few lines to: #if (__FreeBSD_version >= 800000) #define usb_thread_create(f, s, p, ...) \ kproc_create((f), (s), (p), RFHIGHPID, 0, __VA_ARGS__) #define usb_thread_exit(err) kproc_exit(err) #elif ((__FreeBSD_version >= 700000) && (__FreeBSD_version < 800000)) #define usb_thread_create(f, s, p, ...) \ kthread_create((f), (s), (p), RFHIGHPID, 0, __VA_ARGS__) #define usb_thread_exit(err) kthread_exit(err) #else #define usb_thread_create(f, s, p, ...) \ kthread_create((f), (s), (p), RFHIGHPID, 0, __VA_ARGS__) #define usb_thread_exit(err) kthread_exit(err) #define thread_lock(td) mtx_lock_spin(&sched_lock) #define thread_unlock(td) mtx_unlock_spin(&sched_lock) #endif But I'm now stuck at: cc -c -O2 -pipe -fno-strict-aliasing -march=prescott -std=c99 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -nostdinc -I. -I/usr/src/sys -I/usr/src/sys/contrib/altq -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -mno-align-long-strings -mpreferred-stack-boundary=2 -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -ffreestanding -Werror /usr/src/sys/dev/usb/usb_transfer.c cc1: warnings being treated as errors /usr/src/sys/dev/usb/usb_transfer.c: In function 'usbd_callback_intr_td': /usr/src/sys/dev/usb/usb_transfer.c:2094: warning: 'xfer[2]' may be used uninitialized in this function /usr/src/sys/dev/usb/usb_transfer.c:2094: warning: 'xfer[3]' may be used uninitialized in this function *** Error code 1 Stop in /usr/obj/usr/src/sys/CORE. *** Error code 1 Stop in /usr/src. *** Error code 1 Stop in /usr/src. -- Best Wishes, Stefan Lambrev ICQ# 24134177