From owner-freebsd-hackers@FreeBSD.ORG Sun Nov 20 16:10:57 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 45C9C16A41F for ; Sun, 20 Nov 2005 16:10:57 +0000 (GMT) (envelope-from nsrashmi@gmail.com) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.203]) by mx1.FreeBSD.org (Postfix) with ESMTP id 39AC143D46 for ; Sun, 20 Nov 2005 16:10:56 +0000 (GMT) (envelope-from nsrashmi@gmail.com) Received: by wproxy.gmail.com with SMTP id i5so661056wra for ; Sun, 20 Nov 2005 08:10:55 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type; b=GU4BbxV7Bp7z4PaNT9y/LqzxIjyxu6sBDYrUBDx3nwh2HtfwmOFFqRd4CR5Q9cCQMj4uUCrb9niMrjnXCDCFFRmMxnH2IXMzdt5ledlvD1+9Ot1oKOy1uVfOU2O8cY+9NNeApFHING3Yk50uRtKYY+TzEZUZ1nYlUyKtoWaDe6o= Received: by 10.65.206.3 with SMTP id i3mr1892669qbq; Sun, 20 Nov 2005 08:04:29 -0800 (PST) Received: by 10.64.204.16 with HTTP; Sun, 20 Nov 2005 08:04:29 -0800 (PST) Message-ID: <9f9993160511200804w177a521s9cddc6e56afe221e@mail.gmail.com> Date: Sun, 20 Nov 2005 21:34:29 +0530 From: rashmi ns To: bugi@lists.redbrick.dcu.ie, freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Subject: Driver crashes after unloading a module X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Nov 2005 16:10:57 -0000 Hello List , Thanks for the help you given me . We have written driver for hdlc controller .The kernel is crashing after unloading the module with trap 12 fault .here is the order in which we release the resources while detaching the device. 1. stop polling timer(if polling mode) 2. destroy_dev() 3. disable the device 4. free Tx and Rx structures 5. deallocate allocated dma memory 6. bus_deactivate_resource(irq) 7. release all bus resources here is the piece of code /*release bus resources*/ static void hdlc_release(struct hdlc_softc *sc) { dbgprint("Entering"); bus_generic_detach(sc->dev); /*Release the resources held*/ if (sc->irq){ bus_teardown_intr(sc->dev, sc->irq,sc->int_handler_tag); sc->int_handler_tag =3D NULL; bus_release_resource(sc->dev, SYS_RES_IRQ,sc->irq_rid, sc->irq); dbgprint("deallocated irq res irq_rid =3D %d\n",sc->irq_rid); } if (sc->mem){ bus_release_resource (sc->dev, SYS_RES_MEMORY, sc->mem_rid, sc->mem); dbgprint("deallocated bus res\n"); } if(&sc->sc_mtx) mtx_destroy(&sc->sc_mtx); } /*detach function*/ static int hdlc_detach(device_t dev) { struct hdlc_softc *sc =3D device_get_softc(dev); int s; dbgprint("Entering\n"); s=3Dsplimp(); /*If drv is in poll mode then stop the poll timer */ if(sc->intr_mode =3D=3D 0) hdlc_clear_poll_mode(sc); if(!(sc->hdlc_cdev =3D=3D NULL) ){ destroy_dev(sc->hdlc_cdev); } /*stop the controller */ hdlc_hw_reset(sc); /*free hdlc Tx and Rx structures */ hdlc_stop(sc); /*deallocate allocated dma memory*/ hdlc_free_descriptors(sc); bus_deactivate_resource(sc->dev,SYS_RES_IRQ,sc->irq_rid,sc->irq); splx(s); /*free bus resources*/ hdlc_release(sc); uprintf("Detached\n"); return 0; } After unloading the module the it gives the debug print "Module unloaded" kld_loader function from and kernel crashes with trap 12 .Kindly let me know does the order of releasing the resources is the reason for this. Thanks and regards, Rashmi.n.s From owner-freebsd-hackers@FreeBSD.ORG Mon Nov 21 01:50:41 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 95DC916A41F for ; Mon, 21 Nov 2005 01:50:41 +0000 (GMT) (envelope-from mayong@mail.com) Received: from webmail-outgoing.us4.outblaze.com (webmail-outgoing2.us4.outblaze.com [205.158.62.67]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5066D43D45 for ; Mon, 21 Nov 2005 01:50:41 +0000 (GMT) (envelope-from mayong@mail.com) Received: from unknown (unknown [192.168.9.180]) by webmail-outgoing.us4.outblaze.com (Postfix) with QMQP id B34E7180012B for ; Mon, 21 Nov 2005 01:50:40 +0000 (GMT) X-OB-Received: from unknown (205.158.62.51) by wfilter.us4.outblaze.com; 21 Nov 2005 01:50:40 -0000 Received: by ws1-5.us4.outblaze.com (Postfix, from userid 1001) id A4E2A8402E; Mon, 21 Nov 2005 01:50:40 +0000 (GMT) Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="gb2312" MIME-Version: 1.0 From: "Yong Ma" To: =?gb2312?B?ufnV8buq?= , freebsd-hackers@freebsd.org Date: Sun, 20 Nov 2005 20:50:40 -0500 Received: from [159.226.5.225] by ws1-5.us4.outblaze.com with http for mayong@mail.com; Sun, 20 Nov 2005 20:50:40 -0500 X-Originating-Ip: 159.226.5.225 X-Originating-Server: ws1-5.us4.outblaze.com Message-Id: <20051121015040.A4E2A8402E@ws1-5.us4.outblaze.com> Cc: Subject: Re: a puzzle about FreeBSD X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Nov 2005 01:50:41 -0000 ----- Original Message ----- From: =B9=F9=D5=F1=BB=AA To: freebsd-hackers@freebsd.org Subject: a puzzle about FreeBSD Date: Sat, 19 Nov 2005 21:51:58 +0800 >=20 > I am very interested in FreeBSD but it is difficult to master it. There is > little resource related to the most basic and fundamental problems. >=20 > I read the source code of a project. I don=A1=AFt understand SYSCTL_IN ma= cro and > SYSCTL_PROC macro. I want to know when my function registered in SYSCTL_P= ROC > is called. >=20 > In addition, can you give me some advanced reference books or websites wh= ich > are useful? >=20 >=20 >=20 > Best wishes >=20 > Jenvor >=20 > _______________________________________________ May these be help: 1.FreeBSD and Linux Kernel Cross-Reference :http://fxr.watson.org/ you can look up the source of functions and macros you'd like to know. 2.FreeBSD Architecture Handbook :http://www.freebsd.org/doc/en_US.ISO8859-1= /books/arch-handbook/ or the Chinese version:http://www.freebsd.org.cn/snap/doc/zh_CN.GB2312/bo= oks/arch-handbook/ 3.Attacking FreeBSD with Kernel Modules:http://packetstormsecurity.org/pape= rs/unix/bsdkern.htm something about kernel modules and syscalls. 4.http://www.xfocus.net/articles/200312/650.html:something about the kernel= in Chinese. 5.The Design and Implementation of the FreeBSD Operating System Yong --=20 ___________________________________________________ Play 100s of games for FREE! http://games.mail.com/ From owner-freebsd-hackers@FreeBSD.ORG Mon Nov 21 08:16:32 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EFF0316A41F for ; Mon, 21 Nov 2005 08:16:32 +0000 (GMT) (envelope-from kprokazov@s-v-r.net) Received: from globalmail.svr.net.ua (globalmail.svr.net.ua [212.113.40.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8840F43D4C for ; Mon, 21 Nov 2005 08:16:31 +0000 (GMT) (envelope-from kprokazov@s-v-r.net) Received: from [10.1.2.12] (helo=svr012) by globalmail.svr.net.ua with smtp (Exim 4.52) id 1Ee6qk-0006y4-DY for freebsd-hackers@freebsd.org; Mon, 21 Nov 2005 10:16:30 +0200 Message-ID: <0a7a01c5ee75$b300b700$0c02010a@svr012> From: "Konstantin Prokazoff" To: Date: Mon, 21 Nov 2005 10:29:32 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: 7bit X-Priority: 1 X-MSMail-Priority: High X-Mailer: Microsoft Outlook Express 6.00.3790.0 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0 X-Mailman-Approved-At: Mon, 21 Nov 2005 12:30:11 +0000 Subject: poll()/select() X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Nov 2005 08:16:33 -0000 Welcome everybody, have a strange issue under 5.x/6.x (checked). When using a poll()/select() mechanism, which in kernel based on selrecord/selwakeup (pollscan, kern_select) functions, we have deadlock on sellock mutex on heavy load (recursive lock on non-recursive mutex). Have anyone seen this? Deadlock can be reached only if kernel w'be compiled with debugger, because in different case system locks, your can't login, etc. Maybe one path to resolve - change behavour of sched_lock & sellock mutexes block/unblock order. Thnx in advance & for comments. Best regards, Konstantin Prokazoff Center Of Excellence, S_V_R Ltd., Kyiv HQs, Ukraine Official business-partner & DevConnect member of Avaya Inc. Regional development & support center of Digium Inc. Tel. +38 044 244 1181, ext. 1038 Fax. +38 044 234 0455 From owner-freebsd-hackers@FreeBSD.ORG Mon Nov 21 12:42:05 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E949016A41F for ; Mon, 21 Nov 2005 12:42:05 +0000 (GMT) (envelope-from ray@redshift.com) Received: from outgoing.redshift.com (outgoing.redshift.com [207.177.231.8]) by mx1.FreeBSD.org (Postfix) with ESMTP id C18FA43D45 for ; Mon, 21 Nov 2005 12:42:05 +0000 (GMT) (envelope-from ray@redshift.com) Received: from workstation (216-228-19-21.dsl.redshift.com [216.228.19.21]) by outgoing.redshift.com (Postfix) with SMTP id 8E20A97A3A; Mon, 21 Nov 2005 04:42:04 -0800 (PST) Message-Id: <3.0.1.32.20051121044201.00aa1490@pop.redshift.com> X-Mailer: na X-Sender: redshift.com Date: Mon, 21 Nov 2005 04:42:01 -0800 To: "Konstantin Prokazoff" , From: ray@redshift.com In-Reply-To: <0a7a01c5ee75$b300b700$0c02010a@svr012> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Cc: Subject: Re: poll()/select() X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Nov 2005 12:42:06 -0000 At 10:29 AM 11/21/2005 +0200, Konstantin Prokazoff wrote: | Welcome everybody, | | have a strange issue under 5.x/6.x (checked). | When using a poll()/select() mechanism, which in kernel based on | selrecord/selwakeup (pollscan, kern_select) functions, we have deadlock on | sellock mutex on heavy load (recursive lock on non-recursive mutex). Have | anyone seen this? Deadlock can be reached only if kernel w'be compiled with | debugger, because in different case system locks, your can't login, etc. | Maybe one path to resolve - change behavour of sched_lock & sellock mutexes | block/unblock order. | Thnx in advance & for comments. | | Best regards, | Konstantin Prokazoff | Center Of Excellence, S_V_R Ltd., Kyiv HQs, Ukraine | Official business-partner & DevConnect member of Avaya Inc. | Regional development & support center of Digium Inc. | Tel. +38 044 244 1181, ext. 1038 | Fax. +38 044 234 0455 The only thing I can add is that a sys admin friend of mine did try using the poll/select to increase performance and had to finally abandon it due to instability problems under load. I've never tried it first hand myself. Not sure if that helps you. Ray From owner-freebsd-hackers@FreeBSD.ORG Mon Nov 21 13:01:15 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9151B16A5C1 for ; Mon, 21 Nov 2005 13:01:14 +0000 (GMT) (envelope-from kprokazov@s-v-r.net) Received: from globalmail.svr.net.ua (globalmail.svr.net.ua [212.113.40.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id A013F43D49 for ; Mon, 21 Nov 2005 13:01:12 +0000 (GMT) (envelope-from kprokazov@s-v-r.net) Received: from [10.1.2.12] (helo=svr012) by globalmail.svr.net.ua with smtp (Exim 4.52) id 1EeBIF-0006f0-Ey for freebsd-hackers@freebsd.org; Mon, 21 Nov 2005 15:01:11 +0200 Message-ID: <0bb401c5ee9d$79ac2c50$0c02010a@svr012> From: "Konstantin Prokazoff" To: References: <3.0.1.32.20051121044201.00aa1490@pop.redshift.com> Date: Mon, 21 Nov 2005 15:14:16 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.3790.0 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0 X-Mailman-Approved-At: Mon, 21 Nov 2005 13:08:07 +0000 Subject: Re: poll()/select() X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Nov 2005 13:01:15 -0000 Thanks for comment, I think, after kernel inspection, problem (maybe) in preemption. While syscall to poll or select holds sellock, and if another thread (process) tries to syscall or we have taken interrupt (where handler use selrecord/selwakeup too), kernel will deadlock. I have this situation cause to INTR_FAST interrupt handler in device driver for Digium's PCI board, which provides 4 T1/E1 interfaces. Problem 100% repetitive. Another way to avoid such deadlock - provide different kthread/ithreads for select/poll mechanism. Best regards, Konstantin Prokazoff Center Of Excellence, S_V_R Ltd., Kyiv HQs, Ukraine Official business-partner & DevConnect member of Avaya Inc. Regional development & support center of Digium Inc. Tel. +38 044 244 1181, ext. 1038 Fax. +38 044 234 0455 ----- Original Message ----- From: To: "Konstantin Prokazoff" ; Sent: Monday, November 21, 2005 2:42 PM Subject: Re: poll()/select() > At 10:29 AM 11/21/2005 +0200, Konstantin Prokazoff wrote: > | Welcome everybody, > | > | have a strange issue under 5.x/6.x (checked). > | When using a poll()/select() mechanism, which in kernel based on > | selrecord/selwakeup (pollscan, kern_select) functions, we have deadlock on > | sellock mutex on heavy load (recursive lock on non-recursive mutex). Have > | anyone seen this? Deadlock can be reached only if kernel w'be compiled with > | debugger, because in different case system locks, your can't login, etc. > | Maybe one path to resolve - change behavour of sched_lock & sellock mutexes > | block/unblock order. > | Thnx in advance & for comments. > | > | Best regards, > | Konstantin Prokazoff > | Center Of Excellence, S_V_R Ltd., Kyiv HQs, Ukraine > | Official business-partner & DevConnect member of Avaya Inc. > | Regional development & support center of Digium Inc. > | Tel. +38 044 244 1181, ext. 1038 > | Fax. +38 044 234 0455 > > The only thing I can add is that a sys admin friend of mine did try using the > poll/select to increase performance and had to finally abandon it due to > instability problems under load. > > I've never tried it first hand myself. Not sure if that helps you. > > Ray > > > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" From owner-freebsd-hackers@FreeBSD.ORG Mon Nov 21 14:31:11 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 911EC16A421 for ; Mon, 21 Nov 2005 14:31:11 +0000 (GMT) (envelope-from alvest@earthlink.net) Received: from smtpauth04.mail.atl.earthlink.net (smtpauth04.mail.atl.earthlink.net [209.86.89.64]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4259643D9F for ; Mon, 21 Nov 2005 14:30:58 +0000 (GMT) (envelope-from alvest@earthlink.net) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=dk20050327; d=earthlink.net; b=ZzM08rx08PS3jmXbG0m1PnuPOaVPgkOzRv5MdmwJOzB+FXxz6v9OuBjnHAhmP4sP; h=Received:Date:From:To:Subject:Message-Id:In-Reply-To:References:X-Mailer:Mime-Version:Content-Type:Content-Transfer-Encoding:X-ELNK-Trace:X-Originating-IP; Received: from [24.145.140.172] (helo=discovery.vesthome.oh.us) by smtpauth04.mail.atl.earthlink.net with asmtp (Exim 4.34) id 1EeCh7-0001rc-Fh for freebsd-hackers@freebsd.org; Mon, 21 Nov 2005 09:30:57 -0500 Date: Mon, 21 Nov 2005 09:30:58 -0500 From: Albert Vest To: freebsd-hackers@freebsd.org Message-Id: <20051121093058.165817d1.alvest@earthlink.net> In-Reply-To: <20051119015322.S27789@kushnir1.kiev.ua> References: <20051119015322.S27789@kushnir1.kiev.ua> X-Mailer: Sylpheed version 1.0.6 (GTK+ 1.2.10; i386-portbld-freebsd6.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-ELNK-Trace: a37e7a5645c8e49994f5150ab1c16ac0e95ccacfd8efebe22040fca9ca020fe6aa38974e93928f47350badd9bab72f9c350badd9bab72f9c350badd9bab72f9c X-Originating-IP: 24.145.140.172 Subject: Re: ATI drivers for FreeBSD - anything? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Nov 2005 14:31:11 -0000 On Sat, 19 Nov 2005 01:58:25 +0200 (EET) Vladimir Kushnir wrote: > Hi all, > Is there any project on FreeBSD wrapper for ATI Linux drivers (like > nVidia's used to be)? If so - I'd be more than happy to test (sorry I can > hardly write it myself). > > Regards, > Vladimir I too would welcome this, mainly for ATI sound but also for video. I see the x11/nvidia-driver port can still be built with LINUX compatibility turned on; maybe if we "make extract" with LINUX=yes, the source code will contain some hints to how it can be done? -- Albert Vest, al vest at earth link dot net From owner-freebsd-hackers@FreeBSD.ORG Mon Nov 21 15:06:08 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C276F16A420 for ; Mon, 21 Nov 2005 15:06:08 +0000 (GMT) (envelope-from mux@freebsd.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3123C43D46 for ; Mon, 21 Nov 2005 15:06:00 +0000 (GMT) (envelope-from mux@freebsd.org) Received: by elvis.mu.org (Postfix, from userid 1920) id 7B3FD1A3C26; Mon, 21 Nov 2005 07:05:52 -0800 (PST) Date: Mon, 21 Nov 2005 16:05:52 +0100 From: Maxime Henrion To: Albert Vest Message-ID: <20051121150552.GH1327@elvis.mu.org> References: <20051119015322.S27789@kushnir1.kiev.ua> <20051121093058.165817d1.alvest@earthlink.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20051121093058.165817d1.alvest@earthlink.net> User-Agent: Mutt/1.4.2.1i Cc: freebsd-hackers@freebsd.org Subject: Re: ATI drivers for FreeBSD - anything? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Nov 2005 15:06:08 -0000 Albert Vest wrote: > On Sat, 19 Nov 2005 01:58:25 +0200 (EET) > Vladimir Kushnir wrote: > > > Hi all, > > Is there any project on FreeBSD wrapper for ATI Linux drivers (like > > nVidia's used to be)? If so - I'd be more than happy to test (sorry I can > > hardly write it myself). > > > > Regards, > > Vladimir > > I too would welcome this, mainly for ATI sound but also for video. > > I see the x11/nvidia-driver port can still be built with LINUX compatibility turned on; maybe if we "make extract" with LINUX=yes, the source code will contain some hints to how it can be done? The Linux compatibility in the nvidia-driver has nothing to do with a wrapper to run Linux drivers; nVidia releases a build of this driver for FreeBSD. The Linux compatibility option is here to install nVidia's Linux OpenGL libraries so that Linux binaries can run with FreeBSD's driver. This is possible because nVidia's OpenGL libraries communicate with the driver by using /dev/nvidia and the FreeBSD driver offers the same interface. In short, there is no easy way to use the ATI drivers for Linux under FreeBSD. Cheers, Maxime From owner-freebsd-hackers@FreeBSD.ORG Mon Nov 21 15:42:21 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5CF7916A41F; Mon, 21 Nov 2005 15:42:21 +0000 (GMT) (envelope-from e.schuele@computer.org) Received: from sccrmhc14.comcast.net (sccrmhc14.comcast.net [63.240.77.84]) by mx1.FreeBSD.org (Postfix) with ESMTP id DA50A43D45; Mon, 21 Nov 2005 15:42:20 +0000 (GMT) (envelope-from e.schuele@computer.org) Received: from [208.206.151.59] (host59.gtisd.com[208.206.151.59]) by comcast.net (sccrmhc14) with ESMTP id <2005112115421901400l2e1je>; Mon, 21 Nov 2005 15:42:19 +0000 Message-ID: <4381EAD0.9030406@computer.org> Date: Mon, 21 Nov 2005 09:42:08 -0600 From: Eric Schuele User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051107) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Maxime Henrion References: <20051119015322.S27789@kushnir1.kiev.ua> <20051121093058.165817d1.alvest@earthlink.net> <20051121150552.GH1327@elvis.mu.org> In-Reply-To: <20051121150552.GH1327@elvis.mu.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, Albert Vest Subject: Re: ATI drivers for FreeBSD - anything? [Slightly OT] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Nov 2005 15:42:21 -0000 Maxime Henrion wrote: > Albert Vest wrote: > >>On Sat, 19 Nov 2005 01:58:25 +0200 (EET) >>Vladimir Kushnir wrote: >> >> >>>Hi all, >>>Is there any project on FreeBSD wrapper for ATI Linux drivers (like >>>nVidia's used to be)? If so - I'd be more than happy to test (sorry I can >>>hardly write it myself). >>> >>>Regards, >>>Vladimir >> >>I too would welcome this, mainly for ATI sound but also for video. >> >>I see the x11/nvidia-driver port can still be built with LINUX compatibility turned on; maybe if we "make extract" with LINUX=yes, the source code will contain some hints to how it can be done? > > > The Linux compatibility in the nvidia-driver has nothing to do with a > wrapper to run Linux drivers; nVidia releases a build of this driver for > FreeBSD. The Linux compatibility option is here to install nVidia's > Linux OpenGL libraries so that Linux binaries can run with FreeBSD's > driver. This is possible because nVidia's OpenGL libraries communicate > with the driver by using /dev/nvidia and the FreeBSD driver offers the > same interface. With the above said... I have a ATI Radeon m7500 card, and Linux game (nwn) which requires OpenGL (I think). the game is unusably slow. When the game play begins, my frame rate drops to 2fps. I suspect some misconfiguration with my linux-compat openGL setup. Does the ATI driver have a similar 'Linux Compatibility' knob? In short, there is no easy way to use the ATI drivers > for Linux under FreeBSD. > > Cheers, > Maxime > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > -- Regards, Eric From owner-freebsd-hackers@FreeBSD.ORG Mon Nov 21 16:21:22 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AB99916A41F for ; Mon, 21 Nov 2005 16:21:22 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3F27843D45 for ; Mon, 21 Nov 2005 16:21:22 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [127.0.0.1] (may be forged)) by harmony.bsdimp.com (8.13.3/8.13.3) with ESMTP id jALGIxcZ042993; Mon, 21 Nov 2005 09:19:00 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Mon, 21 Nov 2005 09:19:10 -0700 (MST) Message-Id: <20051121.091910.105332203.imp@bsdimp.com> To: dmitry@atlantis.dp.ua From: "M. Warner Losh" In-Reply-To: <20051118124856.F199@atlantis.atlantis.dp.ua> References: <20051118124856.F199@atlantis.atlantis.dp.ua> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Mon, 21 Nov 2005 09:19:00 -0700 (MST) Cc: freebsd-hackers@freebsd.org Subject: Re: Physical memory access from kld X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Nov 2005 16:21:22 -0000 I think that you'll want to use PCIB_READ_CONFIG. This function takes a pointer to a pci bridge device_t and can be used to read an arbitrary register in pci config space. PCIB_READ_CONFIG(pcib, b, s, f, n, w) b -- bus s -- slot f -- function n -- register to read w -- width to read This will help you access device on bus 0, slot 6, function 0. It will access the actual hardware, not the cached values like you have been doing in 4.x. Hope this helps. Warner From owner-freebsd-hackers@FreeBSD.ORG Mon Nov 21 16:31:45 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 45A1E16A41F for ; Mon, 21 Nov 2005 16:31:45 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from speedfactory.net (mail6.speedfactory.net [66.23.216.219]) by mx1.FreeBSD.org (Postfix) with ESMTP id BE6BB43D53 for ; Mon, 21 Nov 2005 16:31:44 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (unverified [66.23.211.162]) by speedfactory.net (SurgeMail 3.5b3) with ESMTP id 2367511 for multiple; Mon, 21 Nov 2005 11:31:54 -0500 Received: from localhost (john@localhost [127.0.0.1]) by server.baldwin.cx (8.13.1/8.13.1) with ESMTP id jALGVdYg069777; Mon, 21 Nov 2005 11:31:39 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Mon, 21 Nov 2005 10:36:07 -0500 User-Agent: KMail/1.8.2 References: <9f9993160511200804w177a521s9cddc6e56afe221e@mail.gmail.com> In-Reply-To: <9f9993160511200804w177a521s9cddc6e56afe221e@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200511211036.08460.jhb@freebsd.org> X-Spam-Status: No, score=-2.8 required=4.2 tests=ALL_TRUSTED autolearn=failed version=3.0.2 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on server.baldwin.cx X-Server: High Performance Mail Server - http://surgemail.com r=1653887525 Cc: rashmi ns , bugi@lists.redbrick.dcu.ie Subject: Re: Driver crashes after unloading a module X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Nov 2005 16:31:45 -0000 On Sunday 20 November 2005 11:04 am, rashmi ns wrote: > Hello List , > > Thanks for the help you given me . > > We have written driver for hdlc controller .The kernel is crashing > after unloading > the module with trap 12 fault .here is the order in which we release the > resources while detaching the device. > > 1. stop polling timer(if polling mode) > > 2. destroy_dev() > > 3. disable the device > > 4. free Tx and Rx structures > > 5. deallocate allocated dma memory > > 6. bus_deactivate_resource(irq) > > 7. release all bus resources > > here is the piece of code > > /*release bus resources*/ > > static void hdlc_release(struct hdlc_softc *sc) > > { > > dbgprint("Entering"); > > bus_generic_detach(sc->dev); > > /*Release the resources held*/ > > if (sc->irq){ > > bus_teardown_intr(sc->dev, sc->irq,sc->int_handler_tag); > > sc->int_handler_tag = NULL; > > bus_release_resource(sc->dev, SYS_RES_IRQ,sc->irq_rid, sc->irq); > > dbgprint("deallocated irq res irq_rid = %d\n",sc->irq_rid); > > } > > if (sc->mem){ > > bus_release_resource (sc->dev, SYS_RES_MEMORY, sc->mem_rid, sc->mem); > > dbgprint("deallocated bus res\n"); > > } > > if(&sc->sc_mtx) > > mtx_destroy(&sc->sc_mtx); > > } As a first guess, do this later since you might still get an open request up until your call to destroy_dev(). Also, you might need to create a purge routine your devsw if threads can block in your devsw routines and wakeup any sleepers in your purge handler so that when destroy-dev() returns you know that all threads are out of your driver. > /*detach function*/ > > static int hdlc_detach(device_t dev) > > { > > struct hdlc_softc *sc = device_get_softc(dev); > > int s; > > dbgprint("Entering\n"); > > s=splimp(); > > /*If drv is in poll mode then stop the poll timer */ > > if(sc->intr_mode == 0) > > hdlc_clear_poll_mode(sc); > > if(!(sc->hdlc_cdev == NULL) ){ > > destroy_dev(sc->hdlc_cdev); > > } > > /*stop the controller */ > > hdlc_hw_reset(sc); > > /*free hdlc Tx and Rx structures */ > > hdlc_stop(sc); > > /*deallocate allocated dma memory*/ > > hdlc_free_descriptors(sc); > > bus_deactivate_resource(sc->dev,SYS_RES_IRQ,sc->irq_rid,sc->irq); > > splx(s); > > /*free bus resources*/ > > hdlc_release(sc); > > uprintf("Detached\n"); > > return 0; > > } > > After unloading the module the it gives the debug print "Module > unloaded" kld_loader function from and kernel crashes with trap 12 .Kindly > let me know does the order of releasing the resources is the reason for > this. > > Thanks and regards, > > Rashmi.n.s > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org From owner-freebsd-hackers@FreeBSD.ORG Mon Nov 21 16:31:46 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6472B16A41F for ; Mon, 21 Nov 2005 16:31:46 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from speedfactory.net (mail6.speedfactory.net [66.23.216.219]) by mx1.FreeBSD.org (Postfix) with ESMTP id A53DC43D53 for ; Mon, 21 Nov 2005 16:31:45 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (unverified [66.23.211.162]) by speedfactory.net (SurgeMail 3.5b3) with ESMTP id 2367513 for multiple; Mon, 21 Nov 2005 11:31:56 -0500 Received: from localhost (john@localhost [127.0.0.1]) by server.baldwin.cx (8.13.1/8.13.1) with ESMTP id jALGVdYh069777; Mon, 21 Nov 2005 11:31:42 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Mon, 21 Nov 2005 10:38:26 -0500 User-Agent: KMail/1.8.2 References: <3.0.1.32.20051121044201.00aa1490@pop.redshift.com> <0bb401c5ee9d$79ac2c50$0c02010a@svr012> In-Reply-To: <0bb401c5ee9d$79ac2c50$0c02010a@svr012> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200511211038.26937.jhb@freebsd.org> X-Spam-Status: No, score=-2.8 required=4.2 tests=ALL_TRUSTED autolearn=failed version=3.0.2 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on server.baldwin.cx X-Server: High Performance Mail Server - http://surgemail.com r=1653887525 Cc: Konstantin Prokazoff Subject: Re: poll()/select() X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Nov 2005 16:31:46 -0000 On Monday 21 November 2005 08:14 am, Konstantin Prokazoff wrote: > Thanks for comment, > > I think, after kernel inspection, problem (maybe) in preemption. While > syscall to poll or select holds sellock, and if another thread (process) > tries to syscall or we have taken interrupt (where handler use > selrecord/selwakeup too), kernel will deadlock. > I have this situation cause to INTR_FAST interrupt handler in device > driver for Digium's PCI board, which provides 4 T1/E1 interfaces. Problem > 100% repetitive. > Another way to avoid such deadlock - provide different kthread/ithreads > for select/poll mechanism. You can't call selwakeup() from an INTR_FAST handler. Try removing INTR_FAST and see if it fixes your issue. If you want to use INTR_FAST, then realize that you can only use spin mutexes in your handler, and that any more complicated work like selwakeup() that uses regular mutexes will have to be deferred either by using a swi handler or dispatching a task to the Fast taskqueue. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org From owner-freebsd-hackers@FreeBSD.ORG Mon Nov 21 17:04:39 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E610616A41F for ; Mon, 21 Nov 2005 17:04:39 +0000 (GMT) (envelope-from fierykylin@gmail.com) Received: from xproxy.gmail.com (xproxy.gmail.com [66.249.82.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8662143D45 for ; Mon, 21 Nov 2005 17:04:39 +0000 (GMT) (envelope-from fierykylin@gmail.com) Received: by xproxy.gmail.com with SMTP id t12so765983wxc for ; Mon, 21 Nov 2005 09:04:39 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=VF1HOhK5TIDpSSDnzDnN0vtyZehEJU2g+a8i9ugHmDi9zDNrLSio/pYMIuajEOsPNO3AN9so9eJKdSDcybQnfDgGE++UfYp0/VqpUP//ZUTkBBYIyXHPL93kCdAgCRrKQrQNCCXZitvhpNDE7BrXm2n1oXAuL2wkhFQa87QLdng= Received: by 10.70.50.16 with SMTP id x16mr2157969wxx; Mon, 21 Nov 2005 08:07:10 -0800 (PST) Received: by 10.70.18.16 with HTTP; Mon, 21 Nov 2005 08:07:10 -0800 (PST) Message-ID: <87ab37ab0511210807p64282a42i657aeca9ef481e3d@mail.gmail.com> Date: Tue, 22 Nov 2005 00:07:10 +0800 From: kylin To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Subject: sysinit how does nexus find legacy's driver? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Nov 2005 17:04:40 -0000 The nexus_attach(device_t dev) will call int bus_generic_probe(device_t dev) { =09devclass_t dc =3D dev->devclass; =09driverlink_t dl; =09TAILQ_FOREACH(dl, &dc->drivers, link) {//here configure has point out the relation? =09=09DEVICE_IDENTIFY(dl->driver, dev);//here refer to the son's IDENTIFY,make son's device structure =09} =09return (0); } the question is in TAILQ_FOREACH(dl, &dc->drivers, link) how does nexus get legacy's driver in its devclass ? have it done in the SI_SUB_DRIVER part?of initialization? What happen during sSI_SUB_DRIVER ,does devclass for each driver initialize= d? May be the before SI_SUB_CONFIGURE, SI_SUB_DRIVER will first be implement ,and the relative drivers will connect to each other. I am sure that in autoconf.c ,the dl->link does not be add in ,so where does the nexus find legacy? In devclass_find_inernal =09TAILQ_FOREACH(dc, &devclasses, link) { =09=09if (!strcmp(dc->name, classname)) =09=09=09break; =09}found nothing , ////////////////// -- we who r about to die,salute u! From owner-freebsd-hackers@FreeBSD.ORG Mon Nov 21 18:16:57 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1758216A41F for ; Mon, 21 Nov 2005 18:16:57 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from speedfactory.net (mail6.speedfactory.net [66.23.216.219]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0243443D53 for ; Mon, 21 Nov 2005 18:16:55 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (unverified [66.23.211.162]) by speedfactory.net (SurgeMail 3.5b3) with ESMTP id 2371900 for multiple; Mon, 21 Nov 2005 13:17:03 -0500 Received: from localhost (john@localhost [127.0.0.1]) by server.baldwin.cx (8.13.1/8.13.1) with ESMTP id jALIGkck070379; Mon, 21 Nov 2005 13:16:47 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: Uwe Doering Date: Mon, 21 Nov 2005 11:49:00 -0500 User-Agent: KMail/1.8.2 References: <200511182215.04399.jhb@freebsd.org> <437F79F1.5040706@geminix.org> In-Reply-To: <437F79F1.5040706@geminix.org> MIME-Version: 1.0 Content-Disposition: inline Message-Id: <200511211149.01165.jhb@freebsd.org> Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.8 required=4.2 tests=ALL_TRUSTED autolearn=failed version=3.0.2 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on server.baldwin.cx X-Server: High Performance Mail Server - http://surgemail.com r=1653887525 Cc: freebsd-hackers@freebsd.org, Charles Sprickman Subject: Re: 4.8 "Alternate system clock has died" error X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Nov 2005 18:16:57 -0000 On Saturday 19 November 2005 02:16 pm, Uwe Doering wrote: > John Baldwin wrote: > > On Friday 18 November 2005 10:05 pm, Charles Sprickman wrote: > >>I tried this query on -stable, hoping someone here can help me further > >>understand and troubleshoot this. > >> > >>Reference: > >>http://thread.gmane.org/gmane.os.freebsd.stable/32837 > >> > >>In short, top, ps report 0% CPU on all processes as of a few weeks ago. > >>"systat -vmstat" hands out the "Alternate system clock has died" error. > >> > >>Box is running 4.8-p24 and has been up 425 days. Nothing out of the > >>ordinary except for the above symptoms. In searching the various > >>lists/newsgroups, it seems that the other folks with this problem have > >>fixed it in various ways: > >> > >>-early 4.x users referenced a PR that was committed before 4.8 > >>-some 5.3 users reported this with unknown resolution/cause > >>-sending init a HUP was suggested (tried it, no luck) > >>-setting kern.timecounter.method: 1 (tried it, no luck) > >>-one user seemed to actually have a dead timer > > > > Actually, there was a patch that was committed in 5.4 and 6.0 for this > > issue. You can see the diff here: > > > > http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/i386/isa/clock.c.diff?r1=1. > >213&r2=1.214&f=h > > > > That patch would probably backport to 4.x fairly easily. > > I just looked at RELENG_4, and yes, backporting should be easy. Though > I haven't tried it yet on our machines. > > I wonder, however, what's writing to the RTC on a running server. Could > this event perhaps have been triggered by the recent Daylight Saving > Time switch? Yep. Also, if you are using ntp, then the adjustments to the time are getting pushed back to the RTC as well. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org From owner-freebsd-hackers@FreeBSD.ORG Mon Nov 21 18:28:39 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DFF3416A41F for ; Mon, 21 Nov 2005 18:28:39 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from speedfactory.net (mail6.speedfactory.net [66.23.216.219]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6239543D46 for ; Mon, 21 Nov 2005 18:28:39 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (unverified [66.23.211.162]) by speedfactory.net (SurgeMail 3.5b3) with ESMTP id 2372368 for multiple; Mon, 21 Nov 2005 13:28:49 -0500 Received: from localhost (john@localhost [127.0.0.1]) by server.baldwin.cx (8.13.1/8.13.1) with ESMTP id jALISZjo070492; Mon, 21 Nov 2005 13:28:35 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Mon, 21 Nov 2005 13:25:38 -0500 User-Agent: KMail/1.8.2 References: <87ab37ab0511210807p64282a42i657aeca9ef481e3d@mail.gmail.com> In-Reply-To: <87ab37ab0511210807p64282a42i657aeca9ef481e3d@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200511211325.39808.jhb@freebsd.org> X-Spam-Status: No, score=-2.8 required=4.2 tests=ALL_TRUSTED autolearn=failed version=3.0.2 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on server.baldwin.cx X-Server: High Performance Mail Server - http://surgemail.com r=1653887525 Cc: kylin Subject: Re: sysinit how does nexus find legacy's driver? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Nov 2005 18:28:40 -0000 On Monday 21 November 2005 11:07 am, kylin wrote: > The nexus_attach(device_t dev) will call > > int > bus_generic_probe(device_t dev) > { > devclass_t dc = dev->devclass; > driverlink_t dl; > > TAILQ_FOREACH(dl, &dc->drivers, link) {//here configure has point out > the relation? > DEVICE_IDENTIFY(dl->driver, dev);//here refer to the son's > IDENTIFY,make son's device structure > } > > return (0); > } > the question is > in TAILQ_FOREACH(dl, &dc->drivers, link) > how does nexus get legacy's driver in its devclass ? > have it done in the SI_SUB_DRIVER part?of initialization? > > What happen during sSI_SUB_DRIVER ,does devclass for each driver > initialized? > > > May be the before SI_SUB_CONFIGURE, SI_SUB_DRIVER will first be > implement ,and the relative drivers will connect to each other. > I am sure that in autoconf.c ,the dl->link does not be add in ,so > where does the nexus find legacy? > In devclass_find_inernal > TAILQ_FOREACH(dc, &devclasses, link) { > if (!strcmp(dc->name, classname)) > break; > }found nothing , > > ////////////////// It's a lot of magic. :) Each driver is a kernel module declared via DRIVER_MODULE(): #define DRIVER_MODULE(name, busname, driver, devclass, evh, arg) \ \ static struct driver_module_data name##_##busname##_driver_mod = { \ evh, arg, \ #busname, \ (kobj_class_t) &driver, \ &devclass \ }; \ \ static moduledata_t name##_##busname##_mod = { \ #busname "/" #name, \ driver_module_handler, \ &name##_##busname##_driver_mod \ }; \ DECLARE_MODULE(name##_##busname, name##_##busname##_mod, \ SI_SUB_DRIVERS, SI_ORDER_MIDDLE) This causes driver_module_handler() to be run at SI_SUB_DRIVERS for each driver in the kernel. One of the things that function does is add the driver to the parent driver's devclass: int driver_module_handler(module_t mod, int what, void *arg) { ... switch (what) { case MOD_LOAD: ... driver = dmd->dmd_driver; PDEBUG(("Loading module: driver %s on bus %s", DRIVERNAME(driver), dmd->dmd_busname)); error = devclass_add_driver(bus_devclass, driver); if (error) break; ... } That adds the driver to the dc_drivers list. Thus, when you see: DRIVER_MODULE(legacy, nexus, legacy_driver, legacy_devclass, 0, 0); in legacy.c, that results in legacy_driver being attached to the devclass for the nexus driver. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org From owner-freebsd-hackers@FreeBSD.ORG Mon Nov 21 20:10:36 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1493C16A41F for ; Mon, 21 Nov 2005 20:10:36 +0000 (GMT) (envelope-from jayesh.freebsdlist@gmail.com) Received: from xproxy.gmail.com (xproxy.gmail.com [66.249.82.194]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5E07F43D53 for ; Mon, 21 Nov 2005 20:10:35 +0000 (GMT) (envelope-from jayesh.freebsdlist@gmail.com) Received: by xproxy.gmail.com with SMTP id t12so813468wxc for ; Mon, 21 Nov 2005 12:10:35 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type; b=NQ6uMHzckm8WgOKzph/pOftnRNS8TlRzBlDCEIwS/qtVO/Rmq4lHGcz/UQIJ62pQIuaPo86qVfXB2DJ7mWDL8zbZTYbu+0bPGzBliPolbIEBrwQKX6vyZT2CARIFRmd9l2TKQpJbDZqemviS015tengR0VT1cfhFyPCbUIzpTmk= Received: by 10.70.52.13 with SMTP id z13mr2402548wxz; Mon, 21 Nov 2005 12:04:26 -0800 (PST) Received: by 10.70.7.2 with HTTP; Mon, 21 Nov 2005 12:04:26 -0800 (PST) Message-ID: Date: Tue, 22 Nov 2005 01:34:26 +0530 From: Jayesh Jayan To: freebsd-questions@freebsd.org, freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Subject: How to check if a processor in the machine is dead X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Nov 2005 20:10:36 -0000 Hi, I am having problem with my dell 2850 server. It has freebsd 5.4 installed. Today the machine is flashing amber light on the face plate.On checking I found that to be PROC Machine Chk which means cpu has failed. The server has dual Intel(R) Xeon(TM) CPU 3.00GHz. I searched and found a utility named x86info but couldn't understand the output much and also couldn't get to know if a cpu has really failed. Please help me in this regard. From owner-freebsd-hackers@FreeBSD.ORG Mon Nov 21 23:09:04 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5067A16A41F for ; Mon, 21 Nov 2005 23:09:04 +0000 (GMT) (envelope-from marcin@studio4plus.com) Received: from pe78.opole.sdi.tpnet.pl (pe78.opole.sdi.tpnet.pl [217.96.240.78]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8A32A43D58 for ; Mon, 21 Nov 2005 23:09:03 +0000 (GMT) (envelope-from marcin@studio4plus.com) Received: from [81.219.217.131] (helo=[192.168.0.101]) by pe78.opole.sdi.tpnet.pl with esmtpa (Exim 4.52 (FreeBSD)) id 1EeKmU-000C73-2Q for freebsd-hackers@freebsd.org; Tue, 22 Nov 2005 00:09:02 +0100 Message-ID: <43825384.1070807@studio4plus.com> Date: Tue, 22 Nov 2005 00:08:52 +0100 From: Marcin Simonides User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051111) X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 7bit Subject: VIA 6420 RAID 0 problem X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Nov 2005 23:09:04 -0000 I have (had?) two issues, perhaps connected: (I posted a question to freebsd-questions about it some time ago. It contains some additional information: http://lists.freebsd.org/pipermail/freebsd-questions/2005-November/103991.html) The first one is a problem with RAID 0, where ar0 device shows size of one disk instead of the whole array (others report the same problem): atapci0: port 0xec00-0xec07,0xe800-0xe803,0xe400-0xe407,0xe000-0xe003,0xdc00-0xdc0f,0xd800-0xd8ff irq 20 at device 15.0 on pci0 [...] ad0: 29314MB at ata0-master UDMA100 ad4: 76319MB at ata2-master SATA150 ad6: 76319MB at ata3-master SATA150 ar0: 76319MB status: READY ar0: disk0 READY using ad4 at ata2-master ar0: disk1 READY using ad6 at ata3-master I could not access slices that started past the first half of array. After trying different things and settings with sysinstall and linux-fdisk port I inspected src/sys/dev/ata/ata-raid.c and in ata_raid_via_read_meta() changed a line: switch (meta->type & VIA_T_MASK) { case VIA_T_RAID0: raid->type = AR_T_RAID0; raid->width = meta->stripe_layout & VIA_L_MASK; - raid->total_sectors = meta->total_sectors; + raid->total_sectors = meta->total_sectors * raid->width; break; to multiply the number of total_sectors by the number of disks (I guess that's what raid->width stands for). I don't know if it is the right thing to do, it just seemed a reasonable fix :) It works fine for me. I can access (read-write) a FAT32 slice that starts near the end of the array and the data is ok, can be read in FreeBSD and Windows with VIA's drivers. A UFS2 partition at the beginning of the array which I use for /usr also works fine, as before the change in kernel, so I think I haven't broken anything, at least for my configuration. Can anybody comment on it? Or maybe I just should send a PR? The other, perhaps connected with this, issue is that I lost an extended partition while creating FreeBSD partition. It had happened before I started trying to fix the size problem described above. After slicing the newly created RAID 0 array with sysinstall and installing Windows, formatting NTFS and FAT slices (with Windows) I created BSD partitions on the first slice and lost the extended partition (slice). (a more detailed description of what I did is in the original posting to freebsd-questions). Today, after the change in kernel, I have removed FreeBSD partitions from the first slice and recreated them (with some differences). Nothing wrong happened. Could this be connected with the bug in VIA ata raid driver? Or maybe it was just a coincidence and/or was entirely my fault? -- Marcin Simonides From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 22 00:40:11 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1AA7616A421 for ; Tue, 22 Nov 2005 00:40:10 +0000 (GMT) (envelope-from spork@fasttrackmonkey.com) Received: from angryfist.fasttrackmonkey.com (angryfist.fasttrackmonkey.com [216.220.107.230]) by mx1.FreeBSD.org (Postfix) with ESMTP id EFA0243D5C for ; Tue, 22 Nov 2005 00:40:07 +0000 (GMT) (envelope-from spork@fasttrackmonkey.com) Received: (qmail 26641 invoked by uid 2003); 22 Nov 2005 00:33:31 -0000 Received: from spork@fasttrackmonkey.com by angryfist.fasttrackmonkey.com by uid 1001 with qmail-scanner-1.20 (clamscan: 0.65. Clear:RC:1(216.220.116.154):. Processed in 0.05328 secs); 22 Nov 2005 00:33:31 -0000 Received: from unknown (HELO white.nat.fasttrackmonkey.com) (216.220.116.154) by 0 with (DHE-RSA-AES256-SHA encrypted) SMTP; 22 Nov 2005 00:33:31 -0000 Date: Mon, 21 Nov 2005 19:40:22 -0500 (EST) From: Charles Sprickman X-X-Sender: spork@white.nat.fasttrackmonkey.com To: John Baldwin In-Reply-To: <200511211149.01165.jhb@freebsd.org> Message-ID: References: <200511182215.04399.jhb@freebsd.org> <437F79F1.5040706@geminix.org> <200511211149.01165.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-hackers@freebsd.org, Uwe Doering Subject: Re: 4.8 "Alternate system clock has died" error X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Nov 2005 00:40:11 -0000 On Mon, 21 Nov 2005, John Baldwin wrote: > On Saturday 19 November 2005 02:16 pm, Uwe Doering wrote: >> John Baldwin wrote: >>> On Friday 18 November 2005 10:05 pm, Charles Sprickman wrote: >>>> I tried this query on -stable, hoping someone here can help me further >>>> understand and troubleshoot this. >>>> >>>> Reference: >>>> http://thread.gmane.org/gmane.os.freebsd.stable/32837 >>>> >>>> In short, top, ps report 0% CPU on all processes as of a few weeks ago. >>>> "systat -vmstat" hands out the "Alternate system clock has died" error. >>>> >>>> Box is running 4.8-p24 and has been up 425 days. Nothing out of the >>>> ordinary except for the above symptoms. In searching the various >>>> lists/newsgroups, it seems that the other folks with this problem have >>>> fixed it in various ways: >>>> >>>> -early 4.x users referenced a PR that was committed before 4.8 >>>> -some 5.3 users reported this with unknown resolution/cause >>>> -sending init a HUP was suggested (tried it, no luck) >>>> -setting kern.timecounter.method: 1 (tried it, no luck) >>>> -one user seemed to actually have a dead timer >>> >>> Actually, there was a patch that was committed in 5.4 and 6.0 for this >>> issue. You can see the diff here: >>> >>> http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/i386/isa/clock.c.diff?r1=1. >>> 213&r2=1.214&f=h >>> >>> That patch would probably backport to 4.x fairly easily. >> >> I just looked at RELENG_4, and yes, backporting should be easy. Though >> I haven't tried it yet on our machines. >> >> I wonder, however, what's writing to the RTC on a running server. Could >> this event perhaps have been triggered by the recent Daylight Saving >> Time switch? > > Yep. Also, if you are using ntp, then the adjustments to the time are getting > pushed back to the RTC as well. I run ntp everywhere. So it certainly looks easy enough for me to change the first two sections of the diff referenced above, but I'm having issues finding that last one in cpu_initclocks(). It looks like that section really has changed quite a bit. (see v.1.206) The original PR that references this is against 4.something and only patches in one place: http://www.freebsd.org/cgi/query-pr.cgi?pr=17800 What's my best course of action to try and fix this? It looks like I can take the first two hunks of that cvsweb diff and then add on the one liner from the PR, but I have no idea what that's actually doing. My experience with C is limited to making very small changes to existing work, and nothing quite as important as this one file appears to be (from reading the commit logs on it). Is there any interest in moving this back to 4-STABLE? And lastly, is there any snippet of code that can twiddle the clock from userspace and determine if it's wedged or dead? Scheduling a reboot of this machine gets much, much more complicated if I need to have another box standing by due to a truly dead timer. Thanks so much to both of you for your help... Charles > -- > John Baldwin <>< http://www.FreeBSD.org/~jhb/ > "Power Users Use the Power to Serve" = http://www.FreeBSD.org > From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 22 01:23:48 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 22D5516A41F; Tue, 22 Nov 2005 01:23:48 +0000 (GMT) (envelope-from gemini@geminix.org) Received: from gen129.n001.c02.escapebox.net (gen129.n001.c02.escapebox.net [213.73.91.129]) by mx1.FreeBSD.org (Postfix) with ESMTP id A6CB143D45; Tue, 22 Nov 2005 01:23:41 +0000 (GMT) (envelope-from gemini@geminix.org) Message-ID: <4382731A.9040904@geminix.org> Date: Tue, 22 Nov 2005 02:23:38 +0100 From: Uwe Doering Organization: Private UNIX Site User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.12) Gecko/20051121 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Charles Sprickman References: <200511182215.04399.jhb@freebsd.org> <437F79F1.5040706@geminix.org> <200511211149.01165.jhb@freebsd.org> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Received: from gemini by geminix.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.54 (FreeBSD)) id 1EeMsl-00029B-To; Tue, 22 Nov 2005 02:23:40 +0100 Cc: freebsd-hackers@freebsd.org Subject: Re: 4.8 "Alternate system clock has died" error X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Nov 2005 01:23:48 -0000 Charles Sprickman wrote: > On Mon, 21 Nov 2005, John Baldwin wrote: >> On Saturday 19 November 2005 02:16 pm, Uwe Doering wrote: >>> John Baldwin wrote: >>>> [...] >>>> Actually, there was a patch that was committed in 5.4 and 6.0 for this >>>> issue. You can see the diff here: >>>> >>>> http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/i386/isa/clock.c.diff?r1=1. >>>> >>>> 213&r2=1.214&f=h >>>> >>>> That patch would probably backport to 4.x fairly easily. >>> >>> I just looked at RELENG_4, and yes, backporting should be easy. Though >>> I haven't tried it yet on our machines. >>> >>> I wonder, however, what's writing to the RTC on a running server. Could >>> this event perhaps have been triggered by the recent Daylight Saving >>> Time switch? > >> Yep. Also, if you are using ntp, then the adjustments to the time are >> getting >> pushed back to the RTC as well. > > I run ntp everywhere. > > So it certainly looks easy enough for me to change the first two > sections of the diff referenced above, but I'm having issues finding > that last one in cpu_initclocks(). It looks like that section really > has changed quite a bit. (see v.1.206) Just look for all instances of writertc(RTC_STATUSB, rtc_statusb); and put rtcin(RTC_INTR); directly behind them (into the next line). There should be three of them, in 4.8 as well as RELENG_4 and CURRENT. > Is there any interest in moving this back to 4-STABLE? Interest there is, I suppose. Plenty of people still run 4.x. The question is rather whether there is any committer willing to do the backport. As far as I can tell, most of them are more focused on newer branches. Perhaps we need special backporting committers for legacy branches. Just a thought. ;-) > And lastly, is there any snippet of code that can twiddle the clock from > userspace and determine if it's wedged or dead? You may want to look at adjkerntz(8). Uwe -- Uwe Doering | EscapeBox - Managed On-Demand UNIX Servers gemini@geminix.org | http://www.escapebox.net From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 22 03:28:07 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 49C3116A41F for ; Tue, 22 Nov 2005 03:28:07 +0000 (GMT) (envelope-from sean-freebsd@farley.org) Received: from mail.farley.org (farley.org [67.64.95.201]) by mx1.FreeBSD.org (Postfix) with ESMTP id CC6DA43D70 for ; Tue, 22 Nov 2005 03:27:51 +0000 (GMT) (envelope-from sean-freebsd@farley.org) Received: from thor.farley.org (thor.farley.org [IPv6:2001:470:1f01:290:1::5]) by mail.farley.org (8.13.1/8.13.1) with ESMTP id jAM3RifK041597; Mon, 21 Nov 2005 21:27:44 -0600 (CST) (envelope-from sean-freebsd@farley.org) Date: Mon, 21 Nov 2005 21:27:45 -0600 (CST) From: =?ISO-8859-1?Q?Se=E1n_C=2E_Farley?= To: Marcin Simonides In-Reply-To: <43825384.1070807@studio4plus.com> Message-ID: <20051121212254.L53010@thor.farley.org> References: <43825384.1070807@studio4plus.com> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="0-1761523166-1132630065=:53010" Cc: freebsd-hackers@freebsd.org Subject: Re: VIA 6420 RAID 0 problem X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Nov 2005 03:28:07 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --0-1761523166-1132630065=:53010 Content-Type: TEXT/PLAIN; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE On Tue, 22 Nov 2005, Marcin Simonides wrote: > I have (had?) two issues, perhaps connected: > (I posted a question to freebsd-questions about it some time ago. It > contains some additional information:=20 > http://lists.freebsd.org/pipermail/freebsd-questions/2005-November/103991= =2Ehtml) > The other, perhaps connected with this, issue is that I lost an > extended partition while creating FreeBSD partition. It had happened > before I started trying to fix the size problem described above. > > After slicing the newly created RAID 0 array with sysinstall and > installing Windows, formatting NTFS and FAT slices (with Windows) I > created BSD partitions on the first slice and lost the extended > partition (slice). (a more detailed description of what I did is in > the original posting to freebsd-questions). > > Today, after the change in kernel, I have removed FreeBSD partitions > from the first slice and recreated them (with some differences). > Nothing wrong happened. > > Could this be connected with the bug in VIA ata raid driver? Or maybe > it was just a coincidence and/or was entirely my fault? With the partition corruption (all of them) in a slice I reported[1] to stable@ with the same controller, I think I smell a bug. I do not know if it is a VIA hardware bug or a bug in the driver. Se=E1n 1. http://lists.freebsd.org/pipermail/freebsd-stable/2005-November/01990= 0.html --=20 sean-freebsd@farley.org --0-1761523166-1132630065=:53010-- From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 22 05:34:16 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 67CF016A41F for ; Tue, 22 Nov 2005 05:34:16 +0000 (GMT) (envelope-from spork@fasttrackmonkey.com) Received: from angryfist.fasttrackmonkey.com (angryfist.fasttrackmonkey.com [216.220.107.230]) by mx1.FreeBSD.org (Postfix) with ESMTP id 242A643D46 for ; Tue, 22 Nov 2005 05:34:12 +0000 (GMT) (envelope-from spork@fasttrackmonkey.com) Received: (qmail 82556 invoked by uid 2003); 22 Nov 2005 05:27:36 -0000 Received: from spork@fasttrackmonkey.com by angryfist.fasttrackmonkey.com by uid 1001 with qmail-scanner-1.20 (clamscan: 0.65. Clear:RC:1(216.220.116.154):. Processed in 0.058554 secs); 22 Nov 2005 05:27:36 -0000 Received: from unknown (HELO white.nat.fasttrackmonkey.com) (216.220.116.154) by 0 with (DHE-RSA-AES256-SHA encrypted) SMTP; 22 Nov 2005 05:27:35 -0000 Date: Tue, 22 Nov 2005 00:34:29 -0500 (EST) From: Charles Sprickman X-X-Sender: spork@white.nat.fasttrackmonkey.com To: Uwe Doering In-Reply-To: <4382731A.9040904@geminix.org> Message-ID: References: <200511182215.04399.jhb@freebsd.org> <437F79F1.5040706@geminix.org> <200511211149.01165.jhb@freebsd.org> <4382731A.9040904@geminix.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-hackers@freebsd.org Subject: Re: 4.8 "Alternate system clock has died" error X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Nov 2005 05:34:16 -0000 On Tue, 22 Nov 2005, Uwe Doering wrote: > Charles Sprickman wrote: >> On Mon, 21 Nov 2005, John Baldwin wrote: >>> On Saturday 19 November 2005 02:16 pm, Uwe Doering wrote: >>>> John Baldwin wrote: >>>>> [...] >>>>> Actually, there was a patch that was committed in 5.4 and 6.0 for this >>>>> issue. You can see the diff here: >>>>> >>>>> http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/i386/isa/clock.c.diff?r1=1. >>>>> 213&r2=1.214&f=h >>>>> >>>>> That patch would probably backport to 4.x fairly easily. >>>> >>>> I just looked at RELENG_4, and yes, backporting should be easy. Though >>>> I haven't tried it yet on our machines. >>>> >>>> I wonder, however, what's writing to the RTC on a running server. Could >>>> this event perhaps have been triggered by the recent Daylight Saving >>>> Time switch? >> >>> Yep. Also, if you are using ntp, then the adjustments to the time are >>> getting >>> pushed back to the RTC as well. >> >> I run ntp everywhere. >> >> So it certainly looks easy enough for me to change the first two sections >> of the diff referenced above, but I'm having issues finding that last one >> in cpu_initclocks(). It looks like that section really has changed quite a >> bit. (see v.1.206) > > Just look for all instances of > > writertc(RTC_STATUSB, rtc_statusb); > > and put > > rtcin(RTC_INTR); > directly behind them (into the next line). There should be three of them, in > 4.8 as well as RELENG_4 and CURRENT. I found the first two (line 721 and 979) and I see third at line 1064. One other question, looking at the initial patch (http://www.freebsd.org/cgi/query-pr.cgi?pr=17800), I see that they followed a slightly different line: /* Initialize RTC. */ writertc(RTC_STATUSA, rtc_statusa); writertc(RTC_STATUSB, RTCSB_24HR); <<<--- + rtcin(RTC_INTR); /* clear any pending interrupt */ Should I worry about that at all? > >> Is there any interest in moving this back to 4-STABLE? > > Interest there is, I suppose. Plenty of people still run 4.x. The question > is rather whether there is any committer willing to do the backport. As far > as I can tell, most of them are more focused on newer branches. Perhaps we > need special backporting committers for legacy branches. Just a thought. ;-) Yeah, I work on a total of about 32 boxes, all still at either 4.8 or 4.11. Committers have to know C, right? :) >> And lastly, is there any snippet of code that can twiddle the clock from >> userspace and determine if it's wedged or dead? > > You may want to look at adjkerntz(8). Running the standard "adjkerntz -a" gives no errors, but I'm not sure if that tells me anything. The manpage does say that if it has a problem it will log it... Also built it with the DEBUG define uncommented and it's still silent. If anyone wants to satisfy my curiousity about this whole clock issue, I'd be grateful. A few questions: RTC = "CMOS clock"? Does the RTC supply all timing in a system, or just "time of day"? How does this line relate to things? kern.clockrate: { hz = 100, tick = 10000, tickadj = 5, profhz = 1024, stathz = 128 } If the RTC doesn't supply the base timing for things like all the I/O busses, processor, what does? Maybe a new thread for that? Thanks, Charles > Uwe > -- > Uwe Doering | EscapeBox - Managed On-Demand UNIX Servers > gemini@geminix.org | http://www.escapebox.net > From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 22 09:35:36 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 457CD16A420; Tue, 22 Nov 2005 09:35:36 +0000 (GMT) (envelope-from gemini@geminix.org) Received: from gen129.n001.c02.escapebox.net (gen129.n001.c02.escapebox.net [213.73.91.129]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5C55243D6D; Tue, 22 Nov 2005 09:35:35 +0000 (GMT) (envelope-from gemini@geminix.org) Message-ID: <4382E664.2050005@geminix.org> Date: Tue, 22 Nov 2005 10:35:32 +0100 From: Uwe Doering Organization: Private UNIX Site User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.12) Gecko/20051121 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Charles Sprickman References: <200511182215.04399.jhb@freebsd.org> <437F79F1.5040706@geminix.org> <200511211149.01165.jhb@freebsd.org> <4382731A.9040904@geminix.org> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Received: from gemini by geminix.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.54 (FreeBSD)) id 1EeUYn-000Dxa-MC; Tue, 22 Nov 2005 10:35:33 +0100 Cc: freebsd-hackers@freebsd.org Subject: Re: 4.8 "Alternate system clock has died" error X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Nov 2005 09:35:36 -0000 Charles Sprickman wrote: > On Tue, 22 Nov 2005, Uwe Doering wrote: >> Charles Sprickman wrote: >>> [...] >>> So it certainly looks easy enough for me to change the first two >>> sections of the diff referenced above, but I'm having issues finding >>> that last one in cpu_initclocks(). It looks like that section really >>> has changed quite a bit. (see v.1.206) >> >> Just look for all instances of >> >> writertc(RTC_STATUSB, rtc_statusb); >> >> and put >> >> rtcin(RTC_INTR); >> directly behind them (into the next line). There should be three of >> them, in 4.8 as well as RELENG_4 and CURRENT. > > I found the first two (line 721 and 979) and I see third at line 1064. > > One other question, looking at the initial patch > (http://www.freebsd.org/cgi/query-pr.cgi?pr=17800), I see that they > followed a slightly different line: > > /* Initialize RTC. */ > writertc(RTC_STATUSA, rtc_statusa); > writertc(RTC_STATUSB, RTCSB_24HR); <<<--- > + rtcin(RTC_INTR); /* clear any pending interrupt */ > > Should I worry about that at all? No. User supplied patches in PRs aren't necessarily 100% correct. In this case the PR submitter clears pending interrupts while interrupt generation is disabled. However, the committer of 1.214 (John Baldwin, in fact) thought that this is wrong because you have to clear pending interrupts after interrupt generation has been re-enabled, or else you'd get a race condition. And I agree with that. >>> Is there any interest in moving this back to 4-STABLE? >> >> Interest there is, I suppose. Plenty of people still run 4.x. The >> question is rather whether there is any committer willing to do the >> backport. As far as I can tell, most of them are more focused on >> newer branches. Perhaps we need special backporting committers for >> legacy branches. Just a thought. ;-) > > Yeah, I work on a total of about 32 boxes, all still at either 4.8 or > 4.11. Committers have to know C, right? :) Not only that. In case of kernel issues they also have to have quite a lot of knowledge and experience in kernel hacking. If you botch a kernel patch and don't notice in time you'll likely cause quite a lot of grief for the users. > [...] > If anyone wants to satisfy my curiousity about this whole clock issue, > I'd be grateful. A few questions: > > RTC = "CMOS clock"? Right. > Does the RTC supply all timing in a system, or just "time of day"? Just the latter (once at boot time) and also the RTC interrupt ('stathz'). Perhaps 'profhz' too, if you enable profiling. Can't tell offhand. > How does this line relate to things? kern.clockrate: { hz = 100, tick = > 10000, tickadj = 5, profhz = 1024, stathz = 128 } > If the RTC doesn't supply the base timing for things like all the I/O > busses, processor, what does? There's another clock device, which 'hz' is derived of, for example. Perhaps one can call it the CPU clock. It drives the CPU, memory, PCI bus etc. Also, while the system is running it drives the kernel's time-of-day clock. However, the CPU clock's frequency isn't overly accurate. That's why the kernel's time-of-day clock usually deviates pretty much from the wall clock unless you apply some form of continuous adjustment, for instance NTP. Uwe -- Uwe Doering | EscapeBox - Managed On-Demand UNIX Servers gemini@geminix.org | http://www.escapebox.net From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 22 09:06:13 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1DF3C16A41F; Tue, 22 Nov 2005 09:06:13 +0000 (GMT) (envelope-from kprokazov@s-v-r.net) Received: from globalmail.svr.net.ua (globalmail.svr.net.ua [212.113.40.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2A08F43D49; Tue, 22 Nov 2005 09:06:08 +0000 (GMT) (envelope-from kprokazov@s-v-r.net) Received: from [10.1.2.12] (helo=svr012) by globalmail.svr.net.ua with smtp (Exim 4.52) id 1EeU6D-00031u-MN; Tue, 22 Nov 2005 11:06:05 +0200 Message-ID: <0d4801c5ef45$d09ba3d0$0c02010a@svr012> From: "Konstantin Prokazoff" To: "John Baldwin" , References: <3.0.1.32.20051121044201.00aa1490@pop.redshift.com> <0bb401c5ee9d$79ac2c50$0c02010a@svr012> <200511211038.26937.jhb@freebsd.org> Date: Tue, 22 Nov 2005 11:19:18 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 1 X-MSMail-Priority: High X-Mailer: Microsoft Outlook Express 6.00.3790.0 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0 X-Mailman-Approved-At: Tue, 22 Nov 2005 12:59:43 +0000 Cc: Subject: Re: poll()/select() X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Nov 2005 09:06:13 -0000 Welcome, John, thanks for the answer. I'll test today bus_setup_intr() without INTR_FAST flag, but how I remember, this cause to system heavy load for interrupt processing ;( in my case. My handler uses spin mutexes to block inter-interrupting & sleep mutexes to block some structures now. I have tried to use swi/taskqueue, but result is a "sync" degradation level. Can you help with sources briefing in my driver case? Thnx in advance. Best regards, Konstantin Prokazoff Center Of Excellence, S_V_R Ltd., Kyiv HQs, Ukraine Official business-partner & DevConnect member of Avaya Inc. Regional development & support center of Digium Inc. Tel. +38 044 594 1781, ext. 1038 Fax. +38 044 234 0455 ----- Original Message ----- From: "John Baldwin" To: Cc: "Konstantin Prokazoff" Sent: Monday, November 21, 2005 5:38 PM Subject: Re: poll()/select() > On Monday 21 November 2005 08:14 am, Konstantin Prokazoff wrote: > > Thanks for comment, > > > > I think, after kernel inspection, problem (maybe) in preemption. While > > syscall to poll or select holds sellock, and if another thread (process) > > tries to syscall or we have taken interrupt (where handler use > > selrecord/selwakeup too), kernel will deadlock. > > I have this situation cause to INTR_FAST interrupt handler in device > > driver for Digium's PCI board, which provides 4 T1/E1 interfaces. Problem > > 100% repetitive. > > Another way to avoid such deadlock - provide different kthread/ithreads > > for select/poll mechanism. > > You can't call selwakeup() from an INTR_FAST handler. Try removing INTR_FAST > and see if it fixes your issue. If you want to use INTR_FAST, then realize > that you can only use spin mutexes in your handler, and that any more > complicated work like selwakeup() that uses regular mutexes will have to be > deferred either by using a swi handler or dispatching a task to the Fast > taskqueue. > > -- > John Baldwin <>< http://www.FreeBSD.org/~jhb/ > "Power Users Use the Power to Serve" = http://www.FreeBSD.org From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 22 09:59:25 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 860AB16A41F; Tue, 22 Nov 2005 09:59:25 +0000 (GMT) (envelope-from kprokazov@s-v-r.net) Received: from globalmail.svr.net.ua (globalmail.svr.net.ua [212.113.40.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1DA2A43D6A; Tue, 22 Nov 2005 09:59:24 +0000 (GMT) (envelope-from kprokazov@s-v-r.net) Received: from [10.1.2.12] (helo=svr012) by globalmail.svr.net.ua with smtp (Exim 4.52) id 1EeUvr-0004bX-09; Tue, 22 Nov 2005 11:59:23 +0200 Message-ID: <0d8401c5ef4d$450fc9b0$0c02010a@svr012> From: "Konstantin Prokazoff" To: "John Baldwin" , References: <3.0.1.32.20051121044201.00aa1490@pop.redshift.com> <0bb401c5ee9d$79ac2c50$0c02010a@svr012> <200511211038.26937.jhb@freebsd.org> Date: Tue, 22 Nov 2005 12:12:39 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.3790.0 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0 X-Mailman-Approved-At: Tue, 22 Nov 2005 12:59:57 +0000 Cc: Subject: Re: poll()/select() X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Nov 2005 09:59:25 -0000 Now, have checking non-FAST handler. Have some interest moments, such as error codes, like: Short write: 0/15 (Programming error) Write to 137 (fdno) failed: Programming error Maybe server becomes overloaded? (4xE1, Xeon 3G) Best regards, Konstantin Prokazoff Center Of Excellence, S_V_R Ltd., Kyiv HQs, Ukraine Official business-partner & DevConnect member of Avaya Inc. Regional development & support center of Digium Inc. Tel. +38 044 594 1781, ext. 1038 Fax. +38 044 234 0455 ----- Original Message ----- From: "John Baldwin" To: Cc: "Konstantin Prokazoff" Sent: Monday, November 21, 2005 5:38 PM Subject: Re: poll()/select() > On Monday 21 November 2005 08:14 am, Konstantin Prokazoff wrote: > > Thanks for comment, > > > > I think, after kernel inspection, problem (maybe) in preemption. While > > syscall to poll or select holds sellock, and if another thread (process) > > tries to syscall or we have taken interrupt (where handler use > > selrecord/selwakeup too), kernel will deadlock. > > I have this situation cause to INTR_FAST interrupt handler in device > > driver for Digium's PCI board, which provides 4 T1/E1 interfaces. Problem > > 100% repetitive. > > Another way to avoid such deadlock - provide different kthread/ithreads > > for select/poll mechanism. > > You can't call selwakeup() from an INTR_FAST handler. Try removing INTR_FAST > and see if it fixes your issue. If you want to use INTR_FAST, then realize > that you can only use spin mutexes in your handler, and that any more > complicated work like selwakeup() that uses regular mutexes will have to be > deferred either by using a swi handler or dispatching a task to the Fast > taskqueue. > > -- > John Baldwin <>< http://www.FreeBSD.org/~jhb/ > "Power Users Use the Power to Serve" = http://www.FreeBSD.org From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 22 13:43:33 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 154FC16A422 for ; Tue, 22 Nov 2005 13:43:33 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from speedfactory.net (mail6.speedfactory.net [66.23.216.219]) by mx1.FreeBSD.org (Postfix) with ESMTP id D71ED43D8A for ; Tue, 22 Nov 2005 13:42:08 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (unverified [66.23.211.162]) by speedfactory.net (SurgeMail 3.5b3) with ESMTP id 2419652 for multiple; Tue, 22 Nov 2005 08:41:59 -0500 Received: from zion.baldwin.cx (zion.baldwin.cx [192.168.0.7]) (authenticated bits=0) by server.baldwin.cx (8.13.1/8.13.1) with ESMTP id jAMDfirw077065; Tue, 22 Nov 2005 08:41:44 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: Uwe Doering Date: Tue, 22 Nov 2005 08:41:41 -0500 User-Agent: KMail/1.8.3 References: <4382E664.2050005@geminix.org> In-Reply-To: <4382E664.2050005@geminix.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200511220841.42863.jhb@freebsd.org> X-Spam-Status: No, score=-2.8 required=4.2 tests=ALL_TRUSTED autolearn=failed version=3.0.2 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on server.baldwin.cx X-Server: High Performance Mail Server - http://surgemail.com r=1653887525 Cc: Charles Sprickman , freebsd-hackers@freebsd.org Subject: Re: 4.8 "Alternate system clock has died" error X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Nov 2005 13:43:33 -0000 On Tuesday 22 November 2005 04:35 am, Uwe Doering wrote: > Charles Sprickman wrote: > > On Tue, 22 Nov 2005, Uwe Doering wrote: > >> Charles Sprickman wrote: > >>> [...] > >>> So it certainly looks easy enough for me to change the first two > >>> sections of the diff referenced above, but I'm having issues finding > >>> that last one in cpu_initclocks(). It looks like that section really > >>> has changed quite a bit. (see v.1.206) > >> > >> Just look for all instances of > >> > >> writertc(RTC_STATUSB, rtc_statusb); > >> > >> and put > >> > >> rtcin(RTC_INTR); > >> directly behind them (into the next line). There should be three of > >> them, in 4.8 as well as RELENG_4 and CURRENT. > > > > I found the first two (line 721 and 979) and I see third at line 1064. > > > > One other question, looking at the initial patch > > (http://www.freebsd.org/cgi/query-pr.cgi?pr=3D17800), I see that they > > followed a slightly different line: > > > > /* Initialize RTC. */ > > writertc(RTC_STATUSA, rtc_statusa); > > writertc(RTC_STATUSB, RTCSB_24HR); <<<--- > > + rtcin(RTC_INTR); /* clear any pending interrupt */ > > > > Should I worry about that at all? > > No. User supplied patches in PRs aren't necessarily 100% correct. In > this case the PR submitter clears pending interrupts while interrupt > generation is disabled. However, the committer of 1.214 (John Baldwin, > in fact) thought that this is wrong because you have to clear pending > interrupts after interrupt generation has been re-enabled, or else you'd > get a race condition. And I agree with that. Yeah, put the rtcin() after both writes have been completed. > >>> Is there any interest in moving this back to 4-STABLE? > >> > >> Interest there is, I suppose. Plenty of people still run 4.x. The > >> question is rather whether there is any committer willing to do the > >> backport. As far as I can tell, most of them are more focused on > >> newer branches. Perhaps we need special backporting committers for > >> legacy branches. Just a thought. ;-) > > > > Yeah, I work on a total of about 32 boxes, all still at either 4.8 or > > 4.11. Committers have to know C, right? :) > > Not only that. In case of kernel issues they also have to have quite a > lot of knowledge and experience in kernel hacking. If you botch a > kernel patch and don't notice in time you'll likely cause quite a lot of > grief for the users. Well, if your box boots ok with it then send me a diff in an e-mail and I'l= l=20 backport it. Note, however, that there isn't going to be a 4.12 release. > > Does the RTC supply all timing in a system, or just "time of day"? > > Just the latter (once at boot time) and also the RTC interrupt > ('stathz'). Perhaps 'profhz' too, if you enable profiling. Can't tell > offhand. Yes, it does provide profhz as well. When you start profiling a process, w= e=20 reprogram the RTC to interrupt at profhz and divided down to still call=20 statclock at stathz (see the fiddling with pscnt and psdiv). > > How does this line relate to things? kern.clockrate: { hz =3D 100, tick= =3D > > 10000, tickadj =3D 5, profhz =3D 1024, stathz =3D 128 } > > If the RTC doesn't supply the base timing for things like all the I/O > > busses, processor, what does? > > There's another clock device, which 'hz' is derived of, for example. > Perhaps one can call it the CPU clock. It drives the CPU, memory, PCI > bus etc. Also, while the system is running it drives the kernel's > time-of-day clock. However, the CPU clock's frequency isn't overly > accurate. That's why the kernel's time-of-day clock usually deviates > pretty much from the wall clock unless you apply some form of continuous > adjustment, for instance NTP. Actually, the timer for 'hz' is ISA timer #0. There are three ISA timers, = 0,=20 1, and 2. I have no idea if 1 has a common use though I don't think FreeBS= D=20 uses it. timer 2 drives the pc speaker, and timer 0 can generate a periodi= c=20 interrupt. The three timers are in the i8254 "chip" (part of the southbrid= ge=20 LPC stuff in modern systems). On 6.0 and later we do actually use a per-CP= U=20 timer known as the lapic (short for Local APIC) timer to drive 'hz',=20 'stathz', and 'profhz' on systems using an APIC. =2D-=20 John Baldwin =A0<>< =A0http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" =A0=3D =A0http://www.FreeBSD.org From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 22 15:11:01 2005 Return-Path: X-Original-To: hackers@FreeBSD.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6911316A41F for ; Tue, 22 Nov 2005 15:11:01 +0000 (GMT) (envelope-from igor@duma.bryansk.ru) Received: from duma.bryansk.ru (mx.duma.bryansk.ru [195.239.215.157]) by mx1.FreeBSD.org (Postfix) with ESMTP id 52C0E43D8A for ; Tue, 22 Nov 2005 15:10:33 +0000 (GMT) (envelope-from igor@duma.bryansk.ru) Received: from konov ([192.168.0.240]) by duma.bryansk.ru with esmtp (Exim 4.54 (FreeBSD)) id 1EeZmq-0002KG-Nt for hackers@FreeBSD.org; Tue, 22 Nov 2005 18:10:24 +0300 Message-ID: <438334BF.1090107@duma.bryansk.ru> Date: Tue, 22 Nov 2005 18:09:51 +0300 From: Igor User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; ru-RU; rv:1.7.6) Gecko/20050319 X-Accept-Language: ru-ru, ru MIME-Version: 1.0 To: hackers@FreeBSD.org Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Tue, 22 Nov 2005 16:08:55 +0000 Cc: Subject: Core dump after RELENG_5_4 to RELENG_6_0 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Nov 2005 15:11:01 -0000 Core dump after RELENG_5_4 to RELENG_6_0 (kgdb) where #0 doadump () at pcpu.h:165 #1 0xc04d2f92 in boot (howto=260) at /usr/src/sys/kern/kern_shutdown.c:399 #2 0xc04d3228 in panic (fmt=0xc064717a "%s") at /usr/src/sys/kern/kern_shutdown.c:555 #3 0xc062a698 in trap_fatal (frame=0xc7b97c2c, eva=0) at /usr/src/sys/i386/i386/trap.c:831 #4 0xc062a403 in trap_pfault (frame=0xc7b97c2c, usermode=0, eva=0) at /usr/src/sys/i386/i386/trap.c:742 #5 0xc062a061 in trap (frame= {tf_fs = -1058078712, tf_es = -1058078680, tf_ds = -944177112, tf_edi = -1057380052, tf_esi = 0, tf_ebp = -944145256, tf_isp = -944145320, tf_ebx = 52, tf_edx = 128, tf_ecx = 13, tf_eax = -1057380052, tf_trapno = 12, tf_err = 0, tf_eip = -1067284630, tf_cs = 32, tf_eflags = 66050, tf_esp = 0, tf_ss = -1057381320}) at /usr/src/sys/i386/i386/trap.c:432 #6 0xc061a14a in calltrap () at /usr/src/sys/i386/i386/exception.s:139 #7 0xc062876a in generic_bcopy () at /usr/src/sys/i386/i386/support.s:489 Previous frame inner to this frame (corrupt stack?) (kgdb) #less /var/log/messages Nov 22 16:40:39 gate syslogd: kernel boot file is /boot/kernel/kernel Nov 22 16:40:39 gate kernel: Copyright (c) 1992-2005 The FreeBSD Project. Nov 22 16:40:39 gate kernel: Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 Nov 22 16:40:39 gate kernel: The Regents of the University of California. All rights reserved. Nov 22 16:40:39 gate kernel: FreeBSD 6.0-RELEASE #0: Tue Nov 22 12:48:05 MSK 2005 Nov 22 16:40:39 gate kernel: igor@duma.bryansk.ru:/usr/obj/usr/src/sys/iPII350_6_0_1 Nov 22 16:40:39 gate kernel: Timecounter "i8254" frequency 1193182 Hz quality 0 Nov 22 16:40:39 gate kernel: CPU: Pentium II/Pentium II Xeon/Celeron (350.80-MHz 686-class CPU) Nov 22 16:40:39 gate kernel: Origin = "GenuineIntel" Id = 0x652 Stepping = 2 Nov 22 16:40:39 gate kernel: Features=0x183f9ff Nov 22 16:40:39 gate kernel: real memory = 134205440 (127 MB) Nov 22 16:40:39 gate kernel: avail memory = 125984768 (120 MB) Nov 22 16:40:39 gate kernel: npx0: [FAST] Nov 22 16:40:39 gate kernel: npx0: on motherboard Nov 22 16:40:39 gate kernel: npx0: INT 16 interface Nov 22 16:40:39 gate kernel: acpi0: on motherboard Nov 22 16:40:39 gate kernel: acpi0: Power Button (fixed) Nov 22 16:40:39 gate kernel: pci_link0: irq 11 on acpi0 Nov 22 16:40:39 gate kernel: pci_link1: irq 10 on acpi0 Nov 22 16:40:39 gate kernel: pci_link2: irq 12 on acpi0 Nov 22 16:40:39 gate kernel: pci_link3: irq 7 on acpi0 Nov 22 16:40:39 gate kernel: Timecounter "ACPI-safe" frequency 3579545 Hz quality 1000 Nov 22 16:40:39 gate kernel: acpi_timer0: <24-bit timer at 3.579545MHz> port 0xe408-0xe40b on acpi0 Nov 22 16:40:39 gate kernel: cpu0: on acpi0 Nov 22 16:40:39 gate kernel: acpi_button0: on acpi0 Nov 22 16:40:39 gate kernel: pcib0: port 0xcf8-0xcff on acpi0 Nov 22 16:40:39 gate kernel: pci0: on pcib0 Nov 22 16:40:39 gate kernel: agp0: mem 0xe4000000-0xe7ffffff at device 0.0 on pci0 Nov 22 16:40:39 gate kernel: pcib1: at device 1.0 on pci0 Nov 22 16:40:39 gate kernel: pci1: on pcib1 Nov 22 16:40:39 gate kernel: pci1: at device 0.0 (no driver attached) Nov 22 16:40:39 gate kernel: isab0: at device 4.0 on pci0 Nov 22 16:40:39 gate kernel: isa0: on isab0 Nov 22 16:40:39 gate kernel: atapci0: port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xd800-0xd80f at device 4.1 on pci0 Nov 22 16:40:39 gate kernel: ata0: on atapci0 Nov 22 16:40:39 gate kernel: ata1: on atapci0 Nov 22 16:40:39 gate kernel: uhci0: port 0xd400-0xd41f at device 4.2 on pci0 Nov 22 16:40:39 gate kernel: uhci0: [GIANT-LOCKED] Nov 22 16:40:39 gate kernel: usb0: on uhci0 Nov 22 16:40:39 gate kernel: usb0: USB revision 1.0 Nov 22 16:40:39 gate kernel: uhub0: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 Nov 22 16:40:39 gate kernel: uhub0: 2 ports with 2 removable, self powered Nov 22 16:40:39 gate kernel: pci0: at device 4.3 (no driver attached) Nov 22 16:40:39 gate kernel: rl0: port 0xd000-0xd0ff mem 0xdb800000-0xdb8000ff irq 7 at device 9.0 on pci0 Nov 22 16:40:39 gate kernel: miibus0: on rl0 Nov 22 16:40:39 gate kernel: rlphy0: on miibus0 Nov 22 16:40:39 gate kernel: rlphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto Nov 22 16:40:39 gate kernel: rl0: Ethernet address: 00:c0:df:26:7a:25 Nov 22 16:40:39 gate kernel: rl1: port 0xb800-0xb8ff mem 0xdb000000-0xdb0000ff irq 12 at device 10.0 on pci0 Nov 22 16:40:39 gate kernel: miibus1: on rl1 Nov 22 16:40:39 gate kernel: rlphy1: on miibus1 Nov 22 16:40:39 gate kernel: rlphy1: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto Nov 22 16:40:39 gate kernel: rl1: Ethernet address: 00:c0:df:01:b8:5a Nov 22 16:40:39 gate kernel: rl2: port 0xb400-0xb4ff mem 0xda800000-0xda8000ff irq 10 at device 11.0 on pci0 Nov 22 16:40:39 gate kernel: miibus2: on rl2 Nov 22 16:40:39 gate kernel: rlphy2: on miibus2 Nov 22 16:40:39 gate kernel: rlphy2: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto Nov 22 16:40:39 gate kernel: rl2: Ethernet address: 00:c0:df:03:45:c2 Nov 22 16:40:39 gate kernel: rl3: port 0xb000-0xb0ff mem 0xda000000-0xda0000ff irq 11 at device 12.0 on pci0 Nov 22 16:40:39 gate kernel: miibus3: on rl3 Nov 22 16:40:39 gate kernel: rlphy3: on miibus3 Nov 22 16:40:39 gate kernel: rlphy3: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto Nov 22 16:40:39 gate kernel: rl3: Ethernet address: 00:c0:df:01:b1:eb Nov 22 16:40:39 gate kernel: fdc0: port 0x3f2-0x3f5,0x3f7 irq 6 drq 2 on acpi0 Nov 22 16:40:39 gate kernel: fdc0: [FAST] Nov 22 16:40:39 gate kernel: fd0: <1440-KB 3.5" drive> on fdc0 drive 0 Nov 22 16:40:39 gate kernel: sio0: <16550A-compatible COM port> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0 Nov 22 16:40:39 gate kernel: sio0: type 16550A Nov 22 16:40:39 gate kernel: sio1: <16550A-compatible COM port> port 0x2f8-0x2ff irq 3 on acpi0 Nov 22 16:40:39 gate kernel: sio1: type 16550A Nov 22 16:40:39 gate kernel: atkbdc0: port 0x60,0x64 irq 1 on acpi0 Nov 22 16:40:39 gate kernel: atkbd0: irq 1 on atkbdc0 Nov 22 16:40:39 gate kernel: kbd0 at atkbd0 Nov 22 16:40:39 gate kernel: atkbd0: [GIANT-LOCKED] Nov 22 16:40:39 gate kernel: pmtimer0 on isa0 Nov 22 16:40:39 gate kernel: orm0: at iomem 0xc0000-0xc7fff on isa0 Nov 22 16:40:39 gate kernel: ppc0: parallel port not found. Nov 22 16:40:39 gate kernel: sc0: at flags 0x100 on isa0 Nov 22 16:40:39 gate kernel: sc0: VGA <16 virtual consoles, flags=0x300> Nov 22 16:40:39 gate kernel: vga0: at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0 Nov 22 16:40:39 gate kernel: Timecounter "TSC" frequency 350797990 Hz quality 800 Nov 22 16:40:39 gate kernel: Timecounters tick every 1.000 msec Nov 22 16:40:39 gate kernel: ipfw2 (+ipv6) initialized, divert loadable, rule-based forwarding disabled, default to deny, logging limited to 100 packets/entry by default Nov 22 16:40:39 gate kernel: ad0: 4126MB at ata0-master UDMA33 Nov 22 16:40:39 gate kernel: acd0: CDROM at ata1-slave PIO3 From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 22 18:44:56 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B366A16A420 for ; Tue, 22 Nov 2005 18:44:56 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from speedfactory.net (mail6.speedfactory.net [66.23.216.219]) by mx1.FreeBSD.org (Postfix) with ESMTP id D188A43D9D for ; Tue, 22 Nov 2005 18:44:47 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (unverified [66.23.211.162]) by speedfactory.net (SurgeMail 3.5b3) with ESMTP id 2435333 for multiple; Tue, 22 Nov 2005 13:44:45 -0500 Received: from localhost (john@localhost [127.0.0.1]) by server.baldwin.cx (8.13.1/8.13.1) with ESMTP id jAMIiMh0078629; Tue, 22 Nov 2005 13:44:29 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: "Konstantin Prokazoff" Date: Tue, 22 Nov 2005 13:41:24 -0500 User-Agent: KMail/1.8.2 References: <3.0.1.32.20051121044201.00aa1490@pop.redshift.com> <200511211038.26937.jhb@freebsd.org> <0d8401c5ef4d$450fc9b0$0c02010a@svr012> In-Reply-To: <0d8401c5ef4d$450fc9b0$0c02010a@svr012> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200511221341.25704.jhb@freebsd.org> X-Spam-Status: No, score=-2.8 required=4.2 tests=ALL_TRUSTED autolearn=failed version=3.0.2 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on server.baldwin.cx X-Server: High Performance Mail Server - http://surgemail.com r=1653887525 Cc: freebsd-hackers@freebsd.org Subject: Re: poll()/select() X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Nov 2005 18:44:56 -0000 On Tuesday 22 November 2005 05:12 am, Konstantin Prokazoff wrote: > Now, have checking non-FAST handler. Have some interest moments, such as > error codes, like: > Short write: 0/15 (Programming error) > Write to 137 (fdno) failed: Programming error > Maybe server becomes overloaded? (4xE1, Xeon 3G) Hmm, you really shouldn't be getting Programming error (EDOOFS) in userland, or are these messages from your driver? -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 22 18:46:22 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A5EA616A41F for ; Tue, 22 Nov 2005 18:46:22 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from speedfactory.net (mail6.speedfactory.net [66.23.216.219]) by mx1.FreeBSD.org (Postfix) with ESMTP id 28F6843D46 for ; Tue, 22 Nov 2005 18:46:14 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (unverified [66.23.211.162]) by speedfactory.net (SurgeMail 3.5b3) with ESMTP id 2435332 for multiple; Tue, 22 Nov 2005 13:44:43 -0500 Received: from localhost (john@localhost [127.0.0.1]) by server.baldwin.cx (8.13.1/8.13.1) with ESMTP id jAMIiMgx078629; Tue, 22 Nov 2005 13:44:27 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: "Konstantin Prokazoff" Date: Tue, 22 Nov 2005 13:39:05 -0500 User-Agent: KMail/1.8.2 References: <3.0.1.32.20051121044201.00aa1490@pop.redshift.com> <200511211038.26937.jhb@freebsd.org> <0d4801c5ef45$d09ba3d0$0c02010a@svr012> In-Reply-To: <0d4801c5ef45$d09ba3d0$0c02010a@svr012> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200511221339.06731.jhb@freebsd.org> X-Spam-Status: No, score=-2.8 required=4.2 tests=ALL_TRUSTED autolearn=failed version=3.0.2 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on server.baldwin.cx X-Server: High Performance Mail Server - http://surgemail.com r=1653887525 Cc: freebsd-hackers@freebsd.org Subject: Re: poll()/select() X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Nov 2005 18:46:22 -0000 On Tuesday 22 November 2005 04:19 am, Konstantin Prokazoff wrote: > Welcome, > > John, thanks for the answer. I'll test today bus_setup_intr() without > INTR_FAST flag, but how I remember, this cause to system heavy load for > interrupt processing ;( in my case. > My handler uses spin mutexes to block inter-interrupting & sleep > mutexes to block some structures now. I have tried to use swi/taskqueue, > but result is a "sync" degradation level. > Can you help with sources briefing in my driver case? > Thnx in advance. Well, I'm not quite sure what you mean by "sync" degradation level for starters, but I'm not much an expert on synchronous serial devices. What kind of load are you seeing on your system with the non-INTR_FAST handler? And what kind of system (CPU, etc.) are you running FreeBSD on? > > > I have this situation cause to INTR_FAST interrupt handler in > > > device driver for Digium's PCI board, which provides 4 T1/E1 > > > interfaces. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 22 19:00:38 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 48CB616A423 for ; Tue, 22 Nov 2005 19:00:38 +0000 (GMT) (envelope-from ringworm01@gmail.com) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.194]) by mx1.FreeBSD.org (Postfix) with ESMTP id C8A3043D9A for ; Tue, 22 Nov 2005 19:00:15 +0000 (GMT) (envelope-from ringworm01@gmail.com) Received: by wproxy.gmail.com with SMTP id i27so653937wra for ; Tue, 22 Nov 2005 11:00:09 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:from:to:subject:date:user-agent:mime-version:content-type:content-transfer-encoding:content-disposition:message-id; b=I1OYX1SCDHlZrlml4ZOgmQDklQWL5v4DPZStJ1s4+93D6e2sCixEkiBCVpuGiv6xwLc3eiAzfx2DMCr80IxTdVcMgYGD7gYKbGJfdf5KIK3lwttz58STLK9k15TpLybeYvhWUbkFSDucGmZnkJ/oCY1BzIKbZ1E1D3XfbCKy9lg= Received: by 10.54.107.10 with SMTP id f10mr3293740wrc; Tue, 22 Nov 2005 11:00:09 -0800 (PST) Received: from ?192.168.1.10? ( [71.102.14.129]) by mx.gmail.com with ESMTP id 45sm1025465wri.2005.11.22.11.00.08; Tue, 22 Nov 2005 11:00:08 -0800 (PST) From: "Michael C. Shultz" To: freebsd-hackers@freebsd.org Date: Tue, 22 Nov 2005 10:50:48 -0800 User-Agent: KMail/1.8.3 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200511221050.49807.ringworm01@gmail.com> Subject: Question about closeing and opening stdin X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Nov 2005 19:00:38 -0000 How do I close then open stdin and keep it set to the same terminal as when it was closed? Everything I've tried so far has met with failure accept this works sort of and I don't get why: signal( SIGALRM, MGPMrTimer ); alarm( 300 ); /* time out in 5 minutes */ answer = getc(stdin); the signal handler just closes descriptor 0 if a timeout occrs: close( 0 ) then to reset stdin I tried this: stdinFileDescriptor = open( "/dev/tty", O_RDWR ) ) stdin = fdopen( stdinFileDescriptor, "r" ); and it works in this instance of the program, but if a second instance is started the second instance can't close stdin. I got the above idea from google, what I don't understand though is there is no /dev/tty! So anyone have any suggested books I might read or tips so I can learn how to do this right, and understand why it works? Thank you, Mike From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 22 20:47:37 2005 Return-Path: X-Original-To: hackers@FreeBSD.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 01CAB16A41F for ; Tue, 22 Nov 2005 20:47:37 +0000 (GMT) (envelope-from kris@obsecurity.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8921C43D5F for ; Tue, 22 Nov 2005 20:47:36 +0000 (GMT) (envelope-from kris@obsecurity.org) Received: from obsecurity.dyndns.org (elvis.mu.org [192.203.228.196]) by elvis.mu.org (Postfix) with ESMTP id 6B20E1A3C29; Tue, 22 Nov 2005 12:47:36 -0800 (PST) Received: by obsecurity.dyndns.org (Postfix, from userid 1000) id B48E951589; Tue, 22 Nov 2005 15:47:35 -0500 (EST) Date: Tue, 22 Nov 2005 15:47:35 -0500 From: Kris Kennaway To: Igor Message-ID: <20051122204735.GA72031@xor.obsecurity.org> References: <438334BF.1090107@duma.bryansk.ru> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="9amGYk9869ThD9tj" Content-Disposition: inline In-Reply-To: <438334BF.1090107@duma.bryansk.ru> User-Agent: Mutt/1.4.2.1i Cc: hackers@FreeBSD.org Subject: Re: Core dump after RELENG_5_4 to RELENG_6_0 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Nov 2005 20:47:37 -0000 --9amGYk9869ThD9tj Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Nov 22, 2005 at 06:09:51PM +0300, Igor wrote: > Core dump after RELENG_5_4 to RELENG_6_0 >=20 > (kgdb) where > #0 doadump () at pcpu.h:165 > #1 0xc04d2f92 in boot (howto=3D260) at /usr/src/sys/kern/kern_shutdown.c= :399 > #2 0xc04d3228 in panic (fmt=3D0xc064717a "%s") at=20 > /usr/src/sys/kern/kern_shutdown.c:555 > #3 0xc062a698 in trap_fatal (frame=3D0xc7b97c2c, eva=3D0) at=20 > /usr/src/sys/i386/i386/trap.c:831 > #4 0xc062a403 in trap_pfault (frame=3D0xc7b97c2c, usermode=3D0, eva=3D0)= at=20 > /usr/src/sys/i386/i386/trap.c:742 > #5 0xc062a061 in trap (frame=3D > {tf_fs =3D -1058078712, tf_es =3D -1058078680, tf_ds =3D -944177112,= =20 > tf_edi =3D -1057380052, tf_esi =3D 0, tf_ebp =3D -944145256, tf_isp =3D= =20 > -944145320, tf_ebx =3D 52, tf_edx =3D 128, tf_ecx =3D 13, tf_eax =3D=20 > -1057380052, tf_trapno =3D 12, tf_err =3D 0, tf_eip =3D -1067284630, tf_c= s =3D=20 > 32, tf_eflags =3D 66050, tf_esp =3D 0, tf_ss =3D -1057381320}) at=20 > /usr/src/sys/i386/i386/trap.c:432 > #6 0xc061a14a in calltrap () at /usr/src/sys/i386/i386/exception.s:139 > #7 0xc062876a in generic_bcopy () at /usr/src/sys/i386/i386/support.s:489 > Previous frame inner to this frame (corrupt stack?) > (kgdb) Did you remember to rebuild all your modules (e.g. any third-party modules like the nvidia driver)? Kris --9amGYk9869ThD9tj Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQFDg4PnWry0BWjoQKURAh4uAKC12rHBPVfvotSJ9Y8KAwEypHg7GgCfep1i K7moGu5RIKOYv66hnxPXg0U= =8maf -----END PGP SIGNATURE----- --9amGYk9869ThD9tj-- From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 22 22:40:05 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7939716A41F for ; Tue, 22 Nov 2005 22:40:05 +0000 (GMT) (envelope-from ringworm01@gmail.com) Received: from xproxy.gmail.com (xproxy.gmail.com [66.249.82.194]) by mx1.FreeBSD.org (Postfix) with ESMTP id A1A9943D5E for ; Tue, 22 Nov 2005 22:40:04 +0000 (GMT) (envelope-from ringworm01@gmail.com) Received: by xproxy.gmail.com with SMTP id s9so970182wxc for ; Tue, 22 Nov 2005 14:40:04 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:from:to:subject:date:user-agent:references:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:message-id; b=NO8bWiArWxmyzq5sB4mfb0BegxOqB9xdQPjgfvhKMBISRQy2TtVT7hRxgqDEcJxqwzHYbQSQSD8Ivs9vyLn6STpIPDZwEQTyf8QAEUhsne9vNti6JvVbN6qG3vvZqhjK1dL1EFZw2FuhD7g4JkhGWvbL9HW//jryrkIXtY30vn0= Received: by 10.70.103.10 with SMTP id a10mr4145109wxc; Tue, 22 Nov 2005 13:34:07 -0800 (PST) Received: from ?192.168.1.10? ( [71.102.14.129]) by mx.gmail.com with ESMTP id h35sm2354951wxd.2005.11.22.13.34.06; Tue, 22 Nov 2005 13:34:07 -0800 (PST) From: "Michael C. Shultz" To: freebsd-hackers@freebsd.org Date: Tue, 22 Nov 2005 13:24:49 -0800 User-Agent: KMail/1.8.3 References: <200511221050.49807.ringworm01@gmail.com> In-Reply-To: <200511221050.49807.ringworm01@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200511221324.49439.ringworm01@gmail.com> Subject: Re: Question about closeing and opening stdin X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Nov 2005 22:40:05 -0000 On Tuesday 22 November 2005 10:50, Michael C. Shultz wrote: > How do I close then open stdin and keep it set to the same terminal > as when it was closed? Everything I've tried so far has met with failure > accept this works sort of and I don't get why: > > signal( SIGALRM, MGPMrTimer ); > alarm( 300 ); /* time out in 5 minutes */ > answer = getc(stdin); > > the signal handler just closes descriptor 0 if a timeout occrs: > > close( 0 ) > > > then to reset stdin I tried this: > > stdinFileDescriptor = open( "/dev/tty", O_RDWR ) ) > stdin = fdopen( stdinFileDescriptor, "r" ); > > and it works in this instance of the program, but > if a second instance is started the second instance can't > close stdin. > > I got the above idea from google, what I don't understand though > is there is no /dev/tty! So anyone have any suggested books > I might read or tips so I can learn how to do this right, and understand > why it works? > > Thank you, > > Mike Please disregard the previous post, I figured it out, simple solution. -Mike From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 22 23:19:36 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D119A16A41F; Tue, 22 Nov 2005 23:19:36 +0000 (GMT) (envelope-from vkushnir@i.kiev.ua) Received: from horse.iptelecom.net.ua (horse.iptelecom.net.ua [212.9.224.8]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0DB1E43D6B; Tue, 22 Nov 2005 23:19:34 +0000 (GMT) (envelope-from vkushnir@i.kiev.ua) Received: from h72.241.159.dialup.iptcom.net ([213.159.241.72]:4308 "EHLO kushnir1.kiev.ua" ident: "SOCKFAULT1" whoson: "vkushnir") by horse.iptelecom.net.ua with ESMTP id S1219466AbVKVXTc (ORCPT + 1 other); Wed, 23 Nov 2005 01:19:32 +0200 Received: from kushnir1.kiev.ua (kushnir1.kiev.ua [10.0.0.1]) by kushnir1.kiev.ua (8.13.4/8.13.3) with ESMTP id jAMNJTYi004180; Wed, 23 Nov 2005 01:19:29 +0200 (EET) (envelope-from vkushnir@i.kiev.ua) Date: Wed, 23 Nov 2005 01:19:29 +0200 (EET) From: Vladimir Kushnir X-X-Sender: vkushnir@kushnir1.kiev.ua To: Maxime Henrion In-Reply-To: <20051121150552.GH1327@elvis.mu.org> Message-ID: <20051123011358.J3135@kushnir1.kiev.ua> References: <20051119015322.S27789@kushnir1.kiev.ua> <20051121093058.165817d1.alvest@earthlink.net> <20051121150552.GH1327@elvis.mu.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-hackers@freebsd.org, Albert Vest Subject: Re: ATI drivers for FreeBSD - anything? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Nov 2005 23:19:36 -0000 On Mon, 21 Nov 2005, Maxime Henrion wrote: > Albert Vest wrote: >> On Sat, 19 Nov 2005 01:58:25 +0200 (EET) >> Vladimir Kushnir wrote: >> >>> Hi all, >>> Is there any project on FreeBSD wrapper for ATI Linux drivers (like >>> nVidia's used to be)? If so - I'd be more than happy to test (sorry I can >>> hardly write it myself). >>> >>> Regards, >>> Vladimir >> >> I too would welcome this, mainly for ATI sound but also for video. >> >> I see the x11/nvidia-driver port can still be built with LINUX compatibility turned on; maybe if we "make extract" with LINUX=yes, the source code will contain some hints to how it can be done? > > The Linux compatibility in the nvidia-driver has nothing to do with a > wrapper to run Linux drivers; nVidia releases a build of this driver for > FreeBSD. The Linux compatibility option is here to install nVidia's > Linux OpenGL libraries so that Linux binaries can run with FreeBSD's > driver. This is possible because nVidia's OpenGL libraries communicate > with the driver by using /dev/nvidia and the FreeBSD driver offers the > same interface. In short, there is no easy way to use the ATI drivers > for Linux under FreeBSD. > True, but before they've started releasing them there was a wrapper in ports which used the Linux driver (and I think that was what motivated nVidia to release FreeBSD drivers). I just thought might be somebody who knows better than myself woud feel interested enough to write a similar wrapper for ATI drivers (which could eventualy stir them towards the same direction as nVidia). It looks I was wrong. A pity. Regards, Vladimir From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 22 22:13:03 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 230B216A423; Tue, 22 Nov 2005 22:13:03 +0000 (GMT) (envelope-from linimon@lonesome.com) Received: from mail.soaustin.net (mail.soaustin.net [207.200.4.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id DD92E43D5C; Tue, 22 Nov 2005 22:13:02 +0000 (GMT) (envelope-from linimon@lonesome.com) Received: by mail.soaustin.net (Postfix, from userid 502) id 82E8835DF; Tue, 22 Nov 2005 16:13:02 -0600 (CST) Date: Tue, 22 Nov 2005 16:13:02 -0600 To: Max Laier Message-ID: <20051122221302.GB6266@soaustin.net> References: <200511181336.59361.max@love2party.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200511181336.59361.max@love2party.net> User-Agent: Mutt/1.5.9i From: linimon@lonesome.com (Mark Linimon) X-Mailman-Approved-At: Wed, 23 Nov 2005 01:21:44 +0000 Cc: freebsd-hackers@freebsd.org, freebsd-current@freebsd.org Subject: Re: FreeBSD Status Report Third Quarter 2005 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Nov 2005 22:13:03 -0000 When I initially wrote the Ports Status report I included information about a project that Edwin Groothuis created. At that time I neglected to get his approval for that text, and that was an oversight and a mistake on my part and I apologize. I did not intend for anyone to get the impression that anyone other than himself should get the credit for this project. mcl From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 22 22:16:05 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4468E16A422 for ; Tue, 22 Nov 2005 22:16:05 +0000 (GMT) (envelope-from darcy@wavefire.com) Received: from mail2.dbitech.ca (radius.wavefire.com [64.141.13.252]) by mx1.FreeBSD.org (Postfix) with SMTP id D5E8443D5C for ; Tue, 22 Nov 2005 22:16:03 +0000 (GMT) (envelope-from darcy@wavefire.com) Received: (qmail 16571 invoked from network); 23 Nov 2005 00:42:39 -0000 Received: from dbitech.internal.wavefire.ca (64.141.15.12) by radius.wavefire.com with SMTP; 23 Nov 2005 00:42:39 -0000 From: Darcy Buskermolen Organization: Wavefire Technologies Corp To: freebsd-hackers@freebsd.org Date: Tue, 22 Nov 2005 14:17:31 -0800 User-Agent: KMail/1.8.3 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200511221417.32183.darcy@wavefire.com> X-Mailman-Approved-At: Wed, 23 Nov 2005 04:18:15 +0000 Subject: Xen dom0 support X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Nov 2005 22:16:05 -0000 Hello, I know Kip Macy was working on Xen support for FreeBSD. How is FreeBSD Dom0 coming along as well as SMP support ? -- Darcy Buskermolen Wavefire Technologies Corp. http://www.wavefire.com ph: 250.717.0200 fx: 250.763.1759 From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 23 04:32:11 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7E27616A41F for ; Wed, 23 Nov 2005 04:32:11 +0000 (GMT) (envelope-from dr2867@pacbell.net) Received: from smtp114.sbc.mail.mud.yahoo.com (smtp114.sbc.mail.mud.yahoo.com [68.142.198.213]) by mx1.FreeBSD.org (Postfix) with SMTP id 8799843D53 for ; Wed, 23 Nov 2005 04:32:10 +0000 (GMT) (envelope-from dr2867@pacbell.net) Received: (qmail 81119 invoked from network); 23 Nov 2005 04:32:09 -0000 Received: from unknown (HELO ?192.168.0.190?) (dr2867.business@pacbell.net@68.126.211.246 with plain) by smtp114.sbc.mail.mud.yahoo.com with SMTP; 23 Nov 2005 04:32:09 -0000 Message-ID: <4383F0CA.2030609@pacbell.net> Date: Tue, 22 Nov 2005 20:32:10 -0800 From: Daniel Rudy User-Agent: Mozilla/5.0 (X11R6; UNIX; FreeBSD/i386 5.4-RELEASE-p7; en-US; ja-JP; rv:1.7.12) Gecko/20050915 MultiZilla/1.6.2.0c Mnenhy/0.7.2.0 X-Accept-Language: en-us, en, ja MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: getdirentries_args and other kernel syscall structures X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Nov 2005 04:32:11 -0000 Ok, I'va got a little question here. In the structure getdirentries_args, there seems to be duplicated fields that I'm not entirely sure what they do. Here's the definition of a structure verbatim from sys/sysproto.h: struct getdirentries_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; char buf_l_[PADL_(char *)]; char * buf; char buf_r_[PADR_(char *)]; char count_l_[PADL_(u_int)]; u_int count; char count_r_[PADR_(u_int)]; char basep_l_[PADL_(long *)]; long * basep; char basep_r_[PADR_(long *)]; }; Now my question is what does the l and r variables do? It seems that they do something with padding the data based on the endian of the machine? I look through this header file, and I see all the structures have similar constructs. Is it something that can be safely ignored? -- Daniel Rudy From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 23 05:52:43 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D76BB16A41F for ; Wed, 23 Nov 2005 05:52:43 +0000 (GMT) (envelope-from thierry.herbelot@laposte.net) Received: from smtp4-g19.free.fr (smtp4-g19.free.fr [212.27.42.30]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6A16F43D49 for ; Wed, 23 Nov 2005 05:52:42 +0000 (GMT) (envelope-from thierry.herbelot@laposte.net) Received: from herbelot.dyndns.org (bne75-4-82-227-159-103.fbx.proxad.net [82.227.159.103]) by smtp4-g19.free.fr (Postfix) with ESMTP id 266DC3FF36 for ; Wed, 23 Nov 2005 06:52:41 +0100 (CET) Received: from diversion.herbelot.nom (diversion.herbelot.nom [192.168.2.6]) by herbelot.dyndns.org (8.13.3/8.13.3) with ESMTP id jAN5qaGY020918; Wed, 23 Nov 2005 06:52:39 +0100 (CET) From: Thierry Herbelot To: freebsd-hackers@freebsd.org Date: Wed, 23 Nov 2005 06:52:24 +0100 User-Agent: KMail/1.8.3 References: <200511221417.32183.darcy@wavefire.com> In-Reply-To: <200511221417.32183.darcy@wavefire.com> X-Warning: Windows can lose your files X-Op-Sys: Le FriBi de la mort qui tue X-Org: TfH&Co X-MailScanner: Found to be clean MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Content-Disposition: inline Message-Id: <200511230652.27542.thierry.herbelot@laposte.net> Cc: Darcy Buskermolen Subject: Re: Xen dom0 support X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Nov 2005 05:52:44 -0000 Le Tuesday 22 November 2005 23:17, Darcy Buskermolen a écrit : > Hello, > > I know Kip Macy was working on Xen support for FreeBSD. How is FreeBSD > Dom0 coming along as well as SMP support ? Hello, With the instructions on Kip's site or the patch included with the xen sources, it's possible to build a functioning XenU kernel. (I have run it under NetBSD/Xen0 and Debian/Linux2.6/Xen0). One limitation is that all patches have developed for 5.3-Release, and have not been recently updated. I have found the FreeBSD/Xen0 very unstable : I had crashes under even moderate load, and I did not see how to add debugging DDB support (but I did not look very far) Too bad : even just a Xen0 support would be fine (but Xen3 should make it possible to run an "untouched" FreeeBSD kernel on a DomU virtual machine) TfH TfH From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 23 06:26:46 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 878EB16A41F; Wed, 23 Nov 2005 06:26:46 +0000 (GMT) (envelope-from android@oberon.pfi.lt) Received: from nmail.forbis.lt (nmail.forbis.lt [213.226.165.29]) by mx1.FreeBSD.org (Postfix) with ESMTP id B5C3A43D5C; Wed, 23 Nov 2005 06:26:45 +0000 (GMT) (envelope-from android@oberon.pfi.lt) Received: from andrejp.forbis.lt (largo.forbis.lt [172.17.0.99]) by nmail.forbis.lt (8.13.3/8.13.3) with ESMTP id jAN6Qhbp064658; Wed, 23 Nov 2005 08:26:43 +0200 (EET) (envelope-from android@oberon.pfi.lt) To: freebsd-stable@freebsd.org, freebsd-hackers@freebsd.org Message-ID: Date: Wed, 23 Nov 2005 08:26:42 +0200 From: Android Content-Type: text/plain; format=flowed; delsp=yes; charset=utf-8 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit User-Agent: Opera M2/8.50 (Linux, build 1358) X-Virus-Scanned: by amavisd-new Cc: Subject: gdb konsole system crash X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Nov 2005 06:26:46 -0000 Hello all! Discovering troubles with kde-apps startup I've faced with interesting effect - starting of gdb konsole (as nonprivileged user) causes system crash. Here is an example: gdb konsole run In my case this method 100% rebooting system in 80 seconds (mysterious network wait). On konsole appears this message: -------------------- android@callisto:~> gdb konsole GNU gdb 6.1.1 [FreeBSD] Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "amd64-marcel-freebsd"...(no debugging symbols found)... (gdb) run Starting program: /usr/local/bin/konsole (no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...warning: Unable to get location for thread creation breakpoint: generic error [New LWP 100082] (no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...[New Thread 0x50c000 (LWP 100082)] (no debugging symbols found)...(no debugging symbols found)...kbuildsycoca running... -------------------- Then after 80 seconds: [New Thread 0x50c400 (LWP 100128)] and system reboots. Maybe someone has faced with such problem on amd64 platform? Could you try to repeat this situation on other systems, or it's only my computer problem? My system: android@callisto:~> uname -a FreeBSD callisto 6.0-STABLE FreeBSD 6.0-STABLE #0: Sat Nov 19 14:31:34 EET 2005 root@callisto:/usr/obj/usr/src/sys/callisto amd64 I'm keeping up my system actual, ports are updating regullary. -- WBR Android Andrew [:] From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 23 07:23:45 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8678616A41F; Wed, 23 Nov 2005 07:23:45 +0000 (GMT) (envelope-from serg@tmn.ru) Received: from sbtx.tmn.ru (sbtx.tmn.ru [212.76.160.49]) by mx1.FreeBSD.org (Postfix) with ESMTP id 592E143D5E; Wed, 23 Nov 2005 07:23:41 +0000 (GMT) (envelope-from serg@tmn.ru) Received: from sv.tech.sibitex.tmn.ru (sv.tech.sibitex.tmn.ru [10.76.160.59]) by sbtx.tmn.ru (8.13.3/8.13.3) with ESMTP id jAN7NVdB086415; Wed, 23 Nov 2005 12:23:31 +0500 (YEKT) (envelope-from serg@tmn.ru) Received: from sv.tech.sibitex.tmn.ru (localhost.tech.sibitex.tmn.ru [127.0.0.1]) by sv.tech.sibitex.tmn.ru (8.13.4/8.13.4) with ESMTP id jAN7NVQe001026; Wed, 23 Nov 2005 12:23:31 +0500 (YEKT) (envelope-from serg@sv.tech.sibitex.tmn.ru) Received: (from serg@localhost) by sv.tech.sibitex.tmn.ru (8.13.4/8.13.4/Submit) id jAN7NVv3001025; Wed, 23 Nov 2005 12:23:31 +0500 (YEKT) (envelope-from serg) Date: Wed, 23 Nov 2005 12:23:31 +0500 From: "Sergey N. Voronkov" To: freebsd-stable@freebsd.org Message-ID: <20051123072331.GA890@tmn.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.1i X-Virus-Scanned: ClamAV version 0.87.1, clamav-milter version 0.87 on sbtx.tmn.ru X-Virus-Status: Clean Cc: freebsd-hackers@freebsd.org Subject: sym(4) broken on amd64 (Time to port new driver?) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Nov 2005 07:23:45 -0000 Looks like it is broken for a while - "_sym_calloc2: failed to allocate HCB" is always there... And... Looks like Gerard Roudier havn't more interest in maintaining this driver - there is the second generation of the original driver into linux source three since 2001, which is newer ported to FreeBSD by the author. And FreeBSD hooks was removed from the driver code... May be it is a time to port siop(4) from NetBSD? Serg N. Voronkov, Sibitex Ltd. From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 23 07:46:53 2005 Return-Path: X-Original-To: hackers@FreeBSD.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 66E3116A421 for ; Wed, 23 Nov 2005 07:46:53 +0000 (GMT) (envelope-from igor@duma.bryansk.ru) Received: from duma.bryansk.ru (mx.duma.bryansk.ru [195.239.215.157]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2308943D5E for ; Wed, 23 Nov 2005 07:46:51 +0000 (GMT) (envelope-from igor@duma.bryansk.ru) Received: from konov ([192.168.0.240]) by duma.bryansk.ru with esmtp (Exim 4.54 (FreeBSD)) id 1EepL6-00033k-1F for hackers@FreeBSD.org; Wed, 23 Nov 2005 10:46:48 +0300 Message-ID: <43841E47.50208@duma.bryansk.ru> Date: Wed, 23 Nov 2005 10:46:15 +0300 From: Igor User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; ru-RU; rv:1.7.6) Gecko/20050319 X-Accept-Language: ru-ru, ru MIME-Version: 1.0 To: hackers@FreeBSD.org References: <438334BF.1090107@duma.bryansk.ru> <20051122204735.GA72031@xor.obsecurity.org> In-Reply-To: <20051122204735.GA72031@xor.obsecurity.org> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: Re: Core dump after RELENG_5_4 to RELENG_6_0 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Nov 2005 07:46:53 -0000 >>Core dump after RELENG_5_4 to RELENG_6_0 >> >>(kgdb) where >>#0 doadump () at pcpu.h:165 >>#1 0xc04d2f92 in boot (howto=260) at /usr/src/sys/kern/kern_shutdown.c:399 >>#2 0xc04d3228 in panic (fmt=0xc064717a "%s") at >>/usr/src/sys/kern/kern_shutdown.c:555 >>#3 0xc062a698 in trap_fatal (frame=0xc7b97c2c, eva=0) at >>/usr/src/sys/i386/i386/trap.c:831 >>#4 0xc062a403 in trap_pfault (frame=0xc7b97c2c, usermode=0, eva=0) at >>/usr/src/sys/i386/i386/trap.c:742 >>#5 0xc062a061 in trap (frame= >> {tf_fs = -1058078712, tf_es = -1058078680, tf_ds = -944177112, >>tf_edi = -1057380052, tf_esi = 0, tf_ebp = -944145256, tf_isp = >>-944145320, tf_ebx = 52, tf_edx = 128, tf_ecx = 13, tf_eax = >>-1057380052, tf_trapno = 12, tf_err = 0, tf_eip = -1067284630, tf_cs = >>32, tf_eflags = 66050, tf_esp = 0, tf_ss = -1057381320}) at >>/usr/src/sys/i386/i386/trap.c:432 >>#6 0xc061a14a in calltrap () at /usr/src/sys/i386/i386/exception.s:139 >>#7 0xc062876a in generic_bcopy () at /usr/src/sys/i386/i386/support.s:489 >>Previous frame inner to this frame (corrupt stack?) >>(kgdb) >> >> > >Did you remember to rebuild all your modules (e.g. any third-party >modules like the nvidia driver)? > > Did as in /usr/src/Makefile [skip] # 1. `cd /usr/src' (or to the directory containing your source tree). # 2. `make buildworld' # 3. `make buildkernel KERNCONF=YOUR_KERNEL_HERE' (default is GENERIC). # 4. `make installkernel KERNCONF=YOUR_KERNEL_HERE' (default is GENERIC). # 5. `reboot' (in single user mode: boot -s from the loader prompt). # 6. `mergemaster -p' # 7. `make installworld' # 8. `mergemaster' # 9. `reboot' [skip] From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 23 08:32:16 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 011EE16A41F; Wed, 23 Nov 2005 08:32:16 +0000 (GMT) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id 091F443D67; Wed, 23 Nov 2005 08:32:11 +0000 (GMT) (envelope-from scottl@samsco.org) Received: from [192.168.254.11] (junior.samsco.home [192.168.254.11]) (authenticated bits=0) by pooker.samsco.org (8.13.4/8.13.4) with ESMTP id jAN8WARL034261; Wed, 23 Nov 2005 01:32:10 -0700 (MST) (envelope-from scottl@samsco.org) Message-ID: <4384290A.7070805@samsco.org> Date: Wed, 23 Nov 2005 01:32:10 -0700 From: Scott Long User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.8) Gecko/20050615 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "Sergey N. Voronkov" References: <20051123072331.GA890@tmn.ru> In-Reply-To: <20051123072331.GA890@tmn.ru> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.4 required=3.8 tests=ALL_TRUSTED autolearn=failed version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on pooker.samsco.org Cc: freebsd-hackers@freebsd.org, freebsd-stable@freebsd.org Subject: Re: sym(4) broken on amd64 (Time to port new driver?) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Nov 2005 08:32:16 -0000 Sergey N. Voronkov wrote: > Looks like it is broken for a while - "_sym_calloc2: failed to allocate HCB" > is always there... > > And... Looks like Gerard Roudier havn't more interest in maintaining this > driver - there is the second generation of the original driver into linux > source three since 2001, which is newer ported to FreeBSD by the author. And > FreeBSD hooks was removed from the driver code... > > May be it is a time to port siop(4) from NetBSD? > No. I'm working on fixing this right now. Scott From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 23 09:21:05 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B036216A41F for ; Wed, 23 Nov 2005 09:21:05 +0000 (GMT) (envelope-from nz@thiemo.net) Received: from excalibur.ronald.org (excalibur.ronald.org [83.120.8.12]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3F06543D5E for ; Wed, 23 Nov 2005 09:20:59 +0000 (GMT) (envelope-from nz@thiemo.net) Received: from styx.ham01.thiemo.net (port-212-202-20-213.dynamic.qsc.de [212.202.20.213]) by excalibur.ronald.org (8.12.10/8.12.10) with ESMTP id jAN9Kvls020311 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 23 Nov 2005 10:20:58 +0100 (CET) Received: from mygiea.ham01.thiemo.net (localhost [127.0.0.1]) by styx.ham01.thiemo.net (8.13.3/8.13.3) with ESMTP id jAN9Kj7t048307 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 23 Nov 2005 10:20:45 +0100 (CET) Received: (from thiemo@localhost) by mygiea.ham01.thiemo.net (8.13.3/8.13.3/Submit) id jAN9Kjkl048302 for freebsd-hackers@freebsd.org; Wed, 23 Nov 2005 10:20:45 +0100 (CET) Date: Wed, 23 Nov 2005 10:20:45 +0100 From: Thiemo Nordenholz To: freebsd-hackers@freebsd.org Message-ID: <20051123092045.GA48216@mygiea.ham01.thiemo.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i Subject: Writing a driver for a card reader controller - how? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Nov 2005 09:21:05 -0000 Hi there, (Trying here now after no response on -drivers... If nothing happens here, I guess I'll stop bothering you.) I am writing a device driver for a card reader controller which is installed in my notebook, using the Winbond W83L518D chip. It's FreeBSD 6.0-STABLE running there now, though I started programming under 5.4-R, and the symptoms have not changed since then. However, when I attach it, it seems to allocate the resources port 0-0x7 irq 0 drq 4 on acpi0 which seems strange to me -- accessing registers in the respective SYS_RES_IOPORT seems to work, though. Now, as far as I understand the datasheet for the controller, I have to use another I/O port to access the SD card itself, to check if one is there, and finally to access it. How I do this, though, I have no idea. The datasheet lists two configuration registers that "select SD Card interface base address on 8-byte boundary" - but will my driver have to program an address into those registers? Does the bus framework somehow handle this? Does even BIOS do this? Or will I have to write one driver for the controller, have that act as a bus driver, and attach some SD card driver to that one? Maybe someone is willing to spend some time having a look at the datasheet and what I have done so far, and give me a little (or larger) clue-up... In return, I promise to write some documentation about how I have done it once it is ready, just in case someone else faces similar problems. A pointer to some driver programming documentation I have missed so far would be just as nice, of course. So far, I have tried using fdc and ppc as a guideline (after having found the spkr driver to be a bit too simple), and I _think_ I am doing just as those drivers do probing and resource allocation, but somehow they work, and mine does not. Link to the datasheet and some more description of what I have done so far (including my current state of source code) are at http://projects.thiemo.net/WbcrDriver Many thanks, and best regards, Thiemo -- Query a PGP key server (e.g. http://www.pgp.net/) for my public key 41068629. Strange sender address? Please see http://www.thiemo.net/misc/list-mail.shtml From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 23 10:59:22 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EE22516A41F for ; Wed, 23 Nov 2005 10:59:21 +0000 (GMT) (envelope-from doconnor@gsoft.com.au) Received: from cain.gsoft.com.au (cain.gsoft.com.au [203.31.81.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id F11C743D69 for ; Wed, 23 Nov 2005 10:59:05 +0000 (GMT) (envelope-from doconnor@gsoft.com.au) Received: from inchoate.gsoft.com.au (ppp134-41.lns2.adl2.internode.on.net [59.167.134.41]) (authenticated bits=0) by cain.gsoft.com.au (8.13.4/8.13.4) with ESMTP id jANAx17r001190 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO); Wed, 23 Nov 2005 21:29:02 +1030 (CST) (envelope-from doconnor@gsoft.com.au) From: "Daniel O'Connor" To: freebsd-hackers@freebsd.org Date: Wed, 23 Nov 2005 21:28:54 +1030 User-Agent: KMail/1.8.2 References: <20051123092045.GA48216@mygiea.ham01.thiemo.net> In-Reply-To: <20051123092045.GA48216@mygiea.ham01.thiemo.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1328395.4xea69S2zZ"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200511232128.56021.doconnor@gsoft.com.au> X-Spam-Score: 0.05 () FORGED_RCVD_HELO X-Scanned-By: MIMEDefang 2.51 on 203.31.81.10 Cc: Thiemo Nordenholz Subject: Re: Writing a driver for a card reader controller - how? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Nov 2005 10:59:22 -0000 --nextPart1328395.4xea69S2zZ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Wed, 23 Nov 2005 19:50, Thiemo Nordenholz wrote: > I am writing a device driver for a card reader controller which is > installed in my notebook, using the Winbond W83L518D chip. It's FreeBSD > 6.0-STABLE running there now, though I started programming under 5.4-R, a= nd > the symptoms have not changed since then. > > However, when I attach it, it seems to allocate the resources > > port 0-0x7 irq 0 drq 4 on acpi0 > > which seems strange to me -- accessing registers in the respective > SYS_RES_IOPORT seems to work, though. It looks really weird to me.. I can't imagine it's _really_ at 0x0 :) Looking at your page I think you should try attaching to the ISA 'version' = =2D=20 you should be able to key off it's PnP entry I think. I don't know if there is extra magic with the acpi 'bus' though, or what it= =20 really means.. > Now, as far as I understand the datasheet for the controller, I have to u= se > another I/O port to access the SD card itself, to check if one is there, > and finally to access it. How I do this, though, I have no idea. The > datasheet lists two configuration registers that "select SD Card interface > base address on 8-byte boundary" - but will my driver have to program an > address into those registers? Does the bus framework somehow handle this? > Does even BIOS do this? Or will I have to write one driver for the > controller, have that act as a bus driver, and attach some SD card driver > to that one? I would say you'd have to allocate some memory (probably low down) then wri= te=20 it's address into those registers, then you will be able to read the card v= ia=20 that address. I've only hacked on ISA and PCI drivers and they aren't nearly as weird as= =20 that hardware sounds ;) Your next problem will be how to present the SD card to the OS.. Perhaps yo= u=20 can present it as a block device I guess. > Link to the datasheet and some more description of what I have done so far > (including my current state of source code) are at > http://projects.thiemo.net/WbcrDriver =2D-=20 Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C --nextPart1328395.4xea69S2zZ Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQBDhEtv5ZPcIHs/zowRAgk2AKCnIwfCG4K6N+7gtLF1abTcba7dLQCgjZZV KoZs719cOfTFmHzOBQOy8d4= =pkZD -----END PGP SIGNATURE----- --nextPart1328395.4xea69S2zZ-- From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 23 11:11:57 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 38B9016A41F for ; Wed, 23 Nov 2005 11:11:57 +0000 (GMT) (envelope-from stefan@fafoe.narf.at) Received: from viefep12-int.chello.at (viefep12-int.chello.at [213.46.255.25]) by mx1.FreeBSD.org (Postfix) with ESMTP id BFADF43D5D for ; Wed, 23 Nov 2005 11:11:55 +0000 (GMT) (envelope-from stefan@fafoe.narf.at) Received: from wombat.fafoe.narf.at ([213.47.85.26]) by viefep12-int.chello.at (InterMail vM.6.01.04.04 201-2131-118-104-20050224) with ESMTP id <20051123111153.SPUK3413.viefep12-int.chello.at@wombat.fafoe.narf.at>; Wed, 23 Nov 2005 12:11:53 +0100 Received: by wombat.fafoe.narf.at (Postfix, from userid 1001) id E9DDF3EE; Wed, 23 Nov 2005 12:11:46 +0100 (CET) Date: Wed, 23 Nov 2005 12:11:46 +0100 From: Stefan Farfeleder To: Daniel Rudy Message-ID: <20051123111143.GE1281@wombat.fafoe.narf.at> Mail-Followup-To: Daniel Rudy , freebsd-hackers@freebsd.org References: <4383F0CA.2030609@pacbell.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4383F0CA.2030609@pacbell.net> User-Agent: Mutt/1.5.11 Cc: freebsd-hackers@freebsd.org Subject: Re: getdirentries_args and other kernel syscall structures X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Nov 2005 11:11:57 -0000 On Tue, Nov 22, 2005 at 08:32:10PM -0800, Daniel Rudy wrote: > > Ok, I'va got a little question here. In the structure > getdirentries_args, there seems to be duplicated fields that I'm not > entirely sure what they do. Here's the definition of a structure > verbatim from sys/sysproto.h: > > struct getdirentries_args { > char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; > char buf_l_[PADL_(char *)]; char * buf; char buf_r_[PADR_(char *)]; > char count_l_[PADL_(u_int)]; u_int count; char > count_r_[PADR_(u_int)]; > char basep_l_[PADL_(long *)]; long * basep; char > basep_r_[PADR_(long *)]; > }; > > Now my question is what does the l and r variables do? It seems that > they do something with padding the data based on the endian of the > machine? I look through this header file, and I see all the structures > have similar constructs. Is it something that can be safely ignored? This file is automatically generated by makesyscalls.sh. The l and r variables are a hack to correctly the member between them. One of PADL_ or PADR_ always evalutes to 0, the other one to the needed padding, depending on the passed type. This is unfortunate because it relies on the GCC extension to accept 0-sized arrays. I'd love to fix that but couldn't come up with something that isn't very involved. Stefan From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 23 11:23:08 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9F31416A41F for ; Wed, 23 Nov 2005 11:23:08 +0000 (GMT) (envelope-from asmrookie@gmail.com) Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.194]) by mx1.FreeBSD.org (Postfix) with ESMTP id 31C6843D66 for ; Wed, 23 Nov 2005 11:23:08 +0000 (GMT) (envelope-from asmrookie@gmail.com) Received: by zproxy.gmail.com with SMTP id 9so182555nzo for ; Wed, 23 Nov 2005 03:23:07 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=o9kp3vWiQMjREgqc7/q+bSQJ2zOtC2ouXpK6KMkY6MPDDjIOCeCQEESzu0IZauC9ANeC6U9AtOTwgvG10hQWbq1L+vZ8a4XUbdb0LdcXhCUZ+DDtWBkhhrrp8lsNM7EOQzpOJIXAoV8jnnv6m+qaqgrP2FZXI7EiEy1liZSpkSM= Received: by 10.36.132.9 with SMTP id f9mr4726234nzd; Wed, 23 Nov 2005 03:23:07 -0800 (PST) Received: by 10.36.42.16 with HTTP; Wed, 23 Nov 2005 03:23:07 -0800 (PST) Message-ID: <3bbf2fe10511230323xafaea9cr@mail.gmail.com> Date: Wed, 23 Nov 2005 12:23:07 +0100 From: rookie To: Daniel Rudy In-Reply-To: <4383F0CA.2030609@pacbell.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <4383F0CA.2030609@pacbell.net> Cc: freebsd-hackers@freebsd.org Subject: Re: getdirentries_args and other kernel syscall structures X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: rookie@gufi.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Nov 2005 11:23:09 -0000 2005/11/23, Daniel Rudy : > > Ok, I'va got a little question here. In the structure > getdirentries_args, there seems to be duplicated fields that I'm not > entirely sure what they do. Here's the definition of a structure > verbatim from sys/sysproto.h: > > struct getdirentries_args { > char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; > char buf_l_[PADL_(char *)]; char * buf; char buf_r_[PADR_(char *)= ]; > char count_l_[PADL_(u_int)]; u_int count; char > count_r_[PADR_(u_int)]; > char basep_l_[PADL_(long *)]; long * basep; char > basep_r_[PADR_(long *)]; > }; > > Now my question is what does the l and r variables do? It seems that > they do something with padding the data based on the endian of the > machine? I look through this header file, and I see all the structures > have similar constructs. Is it something that can be safely ignored It just pads in the right way (according with endianism) the structure to the right word. For example, x86 gots sizeof(long *) =3D=3D 4. If you want to have a syscall structure like that: struct example_sys { char f; short p; int g; }; it is misaligned. In order to get a proper padded structure (all 32 bits entries) to speed-up accesses to the members, this little trick is used. Attilio -- Peace can only be achieved by understanding - A. Einstein From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 23 13:15:44 2005 Return-Path: X-Original-To: hackers@FreeBSD.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9074C16A41F for ; Wed, 23 Nov 2005 13:15:44 +0000 (GMT) (envelope-from pav@FreeBSD.org) Received: from e0-a11.b1.lan.prg.vol.cz (e0-a11.b1.lan.prg.vol.cz [195.122.204.152]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5477D43D70 for ; Wed, 23 Nov 2005 13:15:36 +0000 (GMT) (envelope-from pav@FreeBSD.org) Received: from pav.hide.vol.cz (localhost [127.0.0.1]) by e0-a11.b1.lan.prg.vol.cz (8.13.4/8.13.4) with ESMTP id jANDFXTT069674 for ; Wed, 23 Nov 2005 14:15:33 +0100 (CET) (envelope-from pav@FreeBSD.org) Received: (from pav@localhost) by pav.hide.vol.cz (8.13.4/8.13.4/Submit) id jANDFXUQ069673 for hackers@FreeBSD.org; Wed, 23 Nov 2005 14:15:33 +0100 (CET) (envelope-from pav@FreeBSD.org) X-Authentication-Warning: pav.hide.vol.cz: pav set sender to pav@FreeBSD.org using -f From: Pav Lucistnik To: hackers@FreeBSD.org Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-hCAcxV/rFcHU9LTMStpK" Date: Wed, 23 Nov 2005 14:15:31 +0100 Message-Id: <1132751731.68208.23.camel@pav.hide.vol.cz> Mime-Version: 1.0 X-Mailer: Evolution 2.4.1 FreeBSD GNOME Team Port Cc: Subject: even more stats for your pleasure X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pav@FreeBSD.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Nov 2005 13:15:44 -0000 --=-hCAcxV/rFcHU9LTMStpK Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Number crunchers, alert! I've put together never before presented statistics related to our bug tracking system, GNATS. PR Arrival Rates http://www.oook.cz/bsd/prstats/arriverates.html PR Closing Rates http://www.oook.cz/bsd/prstats/closerates.html PR New Flow http://www.oook.cz/bsd/prstats/rates.html See how much PRs is flowing in and getting resolved, per month, per category. Be sure to click the headers to see detailed numbers for your favourite category. October 2005 was second busiest month ever for us, ports people, both in arrivals and resolving. We got to almost 40 PRs/day rate, and did rather well, closing 98% of the amount of what arrived. Perky-san quickly created a nice visualization of these charts: http://people.freebsd.org/~perky/arrivalrate.png http://people.freebsd.org/~perky/arrivalrate-except-ports.png --=20 Pav Lucistnik The Linimon's Rule: The More You Close, The More Will Come --=-hCAcxV/rFcHU9LTMStpK Content-Type: application/pgp-signature; name=signature.asc Content-Description: Toto je =?iso-8859-2?Q?digit=E1ln=EC?= =?ISO-8859-1?Q?_podepsan=E1?= =?iso-8859-2?Q?_=E8=E1st?= =?ISO-8859-1?Q?_zpr=E1vy?= -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQBDhGtzntdYP8FOsoIRAoJQAKDNS7d3viNMREW4udkO4axZZ6QGzQCeKHz0 VDlynFXbsZHh5xBfDIFIsAg= =sTWX -----END PGP SIGNATURE----- --=-hCAcxV/rFcHU9LTMStpK-- From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 23 16:15:03 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 73B6416A41F for ; Wed, 23 Nov 2005 16:15:03 +0000 (GMT) (envelope-from simon@comsys.ntu-kpi.kiev.ua) Received: from comsys.ntu-kpi.kiev.ua (comsys.ntu-kpi.kiev.ua [195.245.194.142]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0643C43D58 for ; Wed, 23 Nov 2005 16:14:56 +0000 (GMT) (envelope-from simon@comsys.ntu-kpi.kiev.ua) Received: from pm513-1.comsys.ntu-kpi.kiev.ua (pm513-1.comsys.ntu-kpi.kiev.ua [10.18.52.101]) (authenticated bits=0) by comsys.ntu-kpi.kiev.ua (8.12.10/8.12.10) with ESMTP id jANGP1cp075037 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Wed, 23 Nov 2005 18:25:01 +0200 (EET) Received: by pm513-1.comsys.ntu-kpi.kiev.ua (Postfix, from userid 1001) id C1D485C023; Wed, 23 Nov 2005 18:14:53 +0200 (EET) Date: Wed, 23 Nov 2005 18:14:53 +0200 From: Andrey Simonenko To: gzh@net.pku.edu.cn Message-ID: <20051123161453.GA606@pm513-1.comsys.ntu-kpi.kiev.ua> References: <200511191408.jAJE8KGl024009@net.pku.edu.cn> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200511191408.jAJE8KGl024009@net.pku.edu.cn> User-Agent: Mutt/1.5.11 X-Spam-Status: No, score=-4.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.0.1 X-Spam-Checker-Version: SpamAssassin 3.0.1 (2004-10-22) on comsys.ntu-kpi.kiev.ua X-Virus-Scanned: ClamAV 0.82/1180/Sun Nov 20 12:20:28 2005 on comsys.ntu-kpi.kiev.ua X-Virus-Status: Clean Cc: freebsd-hackers@freebsd.org Subject: Re: a puzzle about FreeBSD X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Nov 2005 16:15:03 -0000 On Sat, Nov 19, 2005 at 09:51:58PM +0800, ?????? wrote: > > I read the source code of a project. I don??t understand SYSCTL_IN macro and > SYSCTL_PROC macro. I want to know when my function registered in SYSCTL_PROC > is called. This sysctl handler is called, for example, from __sysctl -> userland_sysctl -> sysctl_root as oid_handler, which is setuped, when SYSCTL_PROC declared struct sysctl_oid{}. SYSCTL_IN/OUT are used for copying to/from one buffer to another buffer with advancing pointers and offsets of buffers. Since there are two spaces userland and kernel, but interface should be general, there are two functions oldfunc and newfunc in struct sysctl_req{}, which are defined to sysctl_{new,old}_{kernel,user}, depending from which space it is necessary to make sysctl call. From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 23 17:32:09 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 65F0E16A41F for ; Wed, 23 Nov 2005 17:32:09 +0000 (GMT) (envelope-from dr2867@pacbell.net) Received: from smtp106.sbc.mail.mud.yahoo.com (smtp106.sbc.mail.mud.yahoo.com [68.142.198.205]) by mx1.FreeBSD.org (Postfix) with SMTP id A368843D5F for ; Wed, 23 Nov 2005 17:32:08 +0000 (GMT) (envelope-from dr2867@pacbell.net) Received: (qmail 24011 invoked from network); 23 Nov 2005 17:32:07 -0000 Received: from unknown (HELO ?192.168.0.190?) (dr2867.business@pacbell.net@68.126.211.246 with plain) by smtp106.sbc.mail.mud.yahoo.com with SMTP; 23 Nov 2005 17:32:07 -0000 Message-ID: <4384A799.30809@pacbell.net> Date: Wed, 23 Nov 2005 09:32:09 -0800 From: Daniel Rudy User-Agent: Mozilla/5.0 (X11R6; UNIX; FreeBSD/i386 5.4-RELEASE-p7; en-US; ja-JP; rv:1.7.12) Gecko/20050915 MultiZilla/1.6.2.0c Mnenhy/0.7.2.0 X-Accept-Language: en-us, en, ja MIME-Version: 1.0 To: rookie@gufi.org References: <4383F0CA.2030609@pacbell.net> <3bbf2fe10511230323xafaea9cr@mail.gmail.com> In-Reply-To: <3bbf2fe10511230323xafaea9cr@mail.gmail.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: getdirentries_args and other kernel syscall structures X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Nov 2005 17:32:09 -0000 At about the time of 11/23/2005 3:23 AM, rookie stated the following: > 2005/11/23, Daniel Rudy : > >>Ok, I'va got a little question here. In the structure >>getdirentries_args, there seems to be duplicated fields that I'm not >>entirely sure what they do. Here's the definition of a structure >>verbatim from sys/sysproto.h: >> >>struct getdirentries_args { >> char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; >> char buf_l_[PADL_(char *)]; char * buf; char buf_r_[PADR_(char *)]; >> char count_l_[PADL_(u_int)]; u_int count; char >>count_r_[PADR_(u_int)]; >> char basep_l_[PADL_(long *)]; long * basep; char >>basep_r_[PADR_(long *)]; >>}; >> >>Now my question is what does the l and r variables do? It seems that >>they do something with padding the data based on the endian of the >>machine? I look through this header file, and I see all the structures >>have similar constructs. Is it something that can be safely ignored > > > It just pads in the right way (according with endianism) the structure > to the right word. For example, x86 gots sizeof(long *) == 4. If you > want to have a syscall structure like that: > > struct example_sys > { > char f; > short p; > int g; > }; > > it is misaligned. In order to get a proper padded structure (all 32 > bits entries) to speed-up accesses to the members, this little trick > is used. > > Attilio > > -- > Peace can only be achieved by understanding - A. Einstein > Ah, a performance trick. I get it now. Thanks. -- Daniel Rudy From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 23 18:35:46 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D346A16A41F for ; Wed, 23 Nov 2005 18:35:46 +0000 (GMT) (envelope-from dr2867@pacbell.net) Received: from smtp109.sbc.mail.mud.yahoo.com (smtp109.sbc.mail.mud.yahoo.com [68.142.198.208]) by mx1.FreeBSD.org (Postfix) with SMTP id 6D10C43D5C for ; Wed, 23 Nov 2005 18:35:31 +0000 (GMT) (envelope-from dr2867@pacbell.net) Received: (qmail 17269 invoked from network); 23 Nov 2005 18:35:28 -0000 Received: from unknown (HELO ?192.168.0.190?) (dr2867.business@pacbell.net@68.126.211.246 with plain) by smtp109.sbc.mail.mud.yahoo.com with SMTP; 23 Nov 2005 18:35:28 -0000 Message-ID: <4384B671.3030005@pacbell.net> Date: Wed, 23 Nov 2005 10:35:29 -0800 From: Daniel Rudy User-Agent: Mozilla/5.0 (X11R6; UNIX; FreeBSD/i386 5.4-RELEASE-p7; en-US; ja-JP; rv:1.7.12) Gecko/20050915 MultiZilla/1.6.2.0c Mnenhy/0.7.2.0 X-Accept-Language: en-us, en, ja MIME-Version: 1.0 To: Stefan Farfeleder References: <4383F0CA.2030609@pacbell.net> <20051123111143.GE1281@wombat.fafoe.narf.at> In-Reply-To: <20051123111143.GE1281@wombat.fafoe.narf.at> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: getdirentries_args and other kernel syscall structures X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Nov 2005 18:35:46 -0000 At about the time of 11/23/2005 3:11 AM, Stefan Farfeleder stated the following: > On Tue, Nov 22, 2005 at 08:32:10PM -0800, Daniel Rudy wrote: > >>Ok, I'va got a little question here. In the structure >>getdirentries_args, there seems to be duplicated fields that I'm not >>entirely sure what they do. Here's the definition of a structure >>verbatim from sys/sysproto.h: >> >>struct getdirentries_args { >> char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; >> char buf_l_[PADL_(char *)]; char * buf; char buf_r_[PADR_(char *)]; >> char count_l_[PADL_(u_int)]; u_int count; char >>count_r_[PADR_(u_int)]; >> char basep_l_[PADL_(long *)]; long * basep; char >>basep_r_[PADR_(long *)]; >>}; >> >>Now my question is what does the l and r variables do? It seems that >>they do something with padding the data based on the endian of the >>machine? I look through this header file, and I see all the structures >>have similar constructs. Is it something that can be safely ignored? > > > This file is automatically generated by makesyscalls.sh. The l and r > variables are a hack to correctly the member between them. One of PADL_ > or PADR_ always evalutes to 0, the other one to the needed padding, > depending on the passed type. This is unfortunate because it relies on > the GCC extension to accept 0-sized arrays. The file is automatically generated? Now that I think about it, I remember seeing something to that effect in the header file... > I'd love to fix that but couldn't come up with something that > isn't very involved. I have an idea about that... Why not do something like this: #define PAD_(t) (sizeof(register_t) <= sizeof(t) ? \ 0 : sizeof(register_t) - sizeof(t)) struct getdirentries_args { #if BYTE_ORDER == LITTLE_ENDIAN int fd; char fd_r_[PAD_(int)]; char * buf; char buf_r_[PAD_(char *)]; u_int count; char count_r_[PAD_(u_int)]; long * basep; char basep_r_[PAD_(long *)]; #else char fd_l_[PAD_(int)]; int fd; char buf_l_[PAD_(char *)]; char * buf; char count_l_[PAD_(u_int)]; u_int count; char basep_l_[PAD_(long *)]; long * basep; #endif }; This way, you only pad what you need based on the endian of the machine, and the one that isn't used is stripped out by the preprocessor. And as a bonus, it's pretty clear as to what is going on and not as confusing. I haven't looked at the script that generates this file, but I don't see how hard it could be to modify the script to do something like this. Yes, the header file will be larger, but only half will be used. Now, onto the actuall problem that I have been having with the getdirentries syscall. It has to do with the buf member. The buffer seems to be 4K, which we all know is the size of 1 page on IA32 hardware. The problem is that I can only get data for the first struct dirent record. Subsequest records are null. The first record represents the '.' directory. According to the man page, the d_reclen member specifies the length of the current record, so the following code should be able to walk from one record to another: static int new_getdirentries(struct thread *t, struct getdirentries_args *uap) { unsigned int buffsize; unsigned int n; int flag; struct dirent *dirp_start; struct dirent *dirp_current; struct dirent *dirp2; struct dirent *dirp3; int result; int status; /* issue the syscall */ result = getdirentries(t, uap); printf("getdirentries result %d\n", result); if (result != 0) return(result); /* and check the buffer */ dirp_start = (struct dirent *)uap->buf; if (dirp_start == NULL) return(result); /* do we have work to do? */ if (dirp_start->d_namlen > 0) { /* get our buffer size */ buffsize = uap->count; /* allocate memory buffer in kernel space */ MALLOC(dirp2, struct dirent *, buffsize, M_DIRP2, M_NOWAIT); if (dirp2 == NULL) return(result); /* copy data into kernel space */ copyin(uap->buf, dirp2, buffsize); /* setup pointers */ dirp_start = dirp2; dirp_current = dirp_start; /* set the flag */ flag = 0; n = buffsize; r = 0; printf("buffsize %u; dirent size %d; getdirent %d\n", buffsize, sizeof(struct dirent), sizeof(struct getdirentries_args)); /* now walk through the dirent structures */ while (flag == 0) { /* decrement the used buffer length */ n -= dirp_current->d_reclen; printf("**BEFORE\n"); printf("n %u; r %u\n", n, r); printf("name %s; len %hhu; reclen %hu\n", dirp_current->d_name, dirp_current->d_namlen, dirp_current->d_reclen); /* set next pointer */ dirp3 = dirp_current + dirp_current->d_reclen; dirp_current = dirp3; printf("**AFTER\n"); printf("n %u; r %u\n", n, r); printf("name %s; len %hhu; reclen %hu\n", dirp_current->d_name, dirp_current->d_namlen, dirp_current->d_reclen); if (dirp_current->d_namlen == 0) flag = 1; } /* free kernel buffer space */ FREE(dirp2, M_DIRP2); } /* return the function call result */ return(result); } But it doesn't seem to be working correctly and I'm not sure why. The documentation, what little of it that I could find, not not exactly forthcoming about this. I was wondering if you could give me some advise as to how I should be doing this. I tried looking though the source code, but I cannot find exactly where the actuall syscall is being made. It seems that there are a multitude of wrapper functions and #define layers which makes it quite difficult to figure out how something works. > Stefan > -- Daniel Rudy From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 23 23:29:00 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0DA9C16A41F for ; Wed, 23 Nov 2005 23:29:00 +0000 (GMT) (envelope-from ringworm01@gmail.com) Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.203]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0BD5C43D5D for ; Wed, 23 Nov 2005 23:28:41 +0000 (GMT) (envelope-from ringworm01@gmail.com) Received: by zproxy.gmail.com with SMTP id 8so61954nzo for ; Wed, 23 Nov 2005 15:28:41 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:from:to:subject:date:user-agent:references:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:message-id; b=fsDNiVi6MMW//1aVi4HeyyFS7+XTeo5MlShS+ZfyKPo/TtxRM0bwYHWE607ZFVqyDzNM6ABd8DT7wDlAyGkJbbdZK36aFHU9ztMPk4RRYvHoTF6Z0Ryt3HGiOpIO1itH3gRnvagU3H6xtniqVtJ105EpzZ+Y2hjGWIFQ/nN+RGs= Received: by 10.36.250.70 with SMTP id x70mr3761685nzh; Wed, 23 Nov 2005 15:28:41 -0800 (PST) Received: from ?192.168.1.10? ( [71.102.14.129]) by mx.gmail.com with ESMTP id 40sm527802nzf.2005.11.23.15.28.40; Wed, 23 Nov 2005 15:28:41 -0800 (PST) From: "Michael C. Shultz" To: Joan Picanyol i Puig , freebsd-hackers@freebsd.org Date: Wed, 23 Nov 2005 15:19:16 -0800 User-Agent: KMail/1.8.3 References: <200511221050.49807.ringworm01@gmail.com> <20051123192137.GA3559@grummit.biaix.org> In-Reply-To: <20051123192137.GA3559@grummit.biaix.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200511231519.17177.ringworm01@gmail.com> Cc: Subject: Re: Question about closeing and opening stdin X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Nov 2005 23:29:00 -0000 On Wednesday 23 November 2005 11:21, Joan Picanyol i Puig wrote: > [private reply, I'm 100% unsure I understand what you want] > > * Michael C. Shultz [20051122 19:58]: > > How do I close then open stdin and keep it set to the same terminal > > as when it was closed? > > ? If it's closed, you've lost your file descriptor. > > > and it works in this instance of the program, but > > if a second instance is started the second instance can't > > close stdin. > > I seems like you want "file descriptor passing". You can pass > fd's over pipes. > > qvb > -- > pica Here is the solution that finally worked in my case: local_stdin = fopen( "/dev/stdin", "r" ); answer = getc( local_stdin ); if timeout: fclose( local_stdin ); After answer is handled I then just: fclose( local_stdin ); and leave it closed untill needed again I am able to open and close this local_stdin without adversly affecting the global stdin, don't know if it's "the right thing to do" but it works with every test I've thrown at it so far. -Mike From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 24 00:14:16 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5938F16A41F for ; Thu, 24 Nov 2005 00:14:16 +0000 (GMT) (envelope-from fbsd-hackers@mawer.org) Received: from mail28.syd.optusnet.com.au (mail28.syd.optusnet.com.au [211.29.133.169]) by mx1.FreeBSD.org (Postfix) with ESMTP id B390A43D46 for ; Thu, 24 Nov 2005 00:14:15 +0000 (GMT) (envelope-from fbsd-hackers@mawer.org) Received: from [127.0.0.1] (c220-237-120-88.thorn1.nsw.optusnet.com.au [220.237.120.88]) by mail28.syd.optusnet.com.au (8.12.11/8.12.11) with ESMTP id jAO0ECZP006720 for ; Thu, 24 Nov 2005 11:14:13 +1100 Message-ID: <438505D6.7090202@mawer.org> Date: Thu, 24 Nov 2005 11:14:14 +1100 From: Antony Mawer User-Agent: Thunderbird 1.5 (Windows/20051025) MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: libutil properties_read() bug: patch for review X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Nov 2005 00:14:16 -0000 Hi, I recently hit upon a bug in sysinstall, getting an "Invalid realloc size of 0" error that caused sysinstall to terminate. I eventually tracked it down to a bug in the properties_read() function of libutil, which occurs only when reading a properties file of 4096 bytes or greater. This is because libutil discards its current state when the buffer runs out (4096 bytes) and it must refill the buffer, causing the properties file (*.inf) to be incorrectly read. I've made a patch that's attached to the PR I filed, PR 89181, but was hoping to get some extra eyes on the patch to make sure that there's nothing amiss with the patch: http://www.freebsd.org/cgi/query-pr.cgi?pr=89181 Hopefully someone can review this and see about getting it committed for 6.1! -Antony From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 24 01:33:52 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3CD9916A41F for ; Thu, 24 Nov 2005 01:33:52 +0000 (GMT) (envelope-from bsdlists@celeritystorm.com) Received: from mail.celeritystorm.com (mail.celeritystorm.com [213.247.62.79]) by mx1.FreeBSD.org (Postfix) with ESMTP id C8FB443D45 for ; Thu, 24 Nov 2005 01:33:51 +0000 (GMT) (envelope-from bsdlists@celeritystorm.com) Received: by mail.celeritystorm.com (Postfix, from userid 106) id 3DE663DA3FA; Thu, 24 Nov 2005 02:38:55 +0100 (CET) Received: from [192.168.0.1] (unknown [81.84.174.235]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.celeritystorm.com (Postfix) with ESMTP id 0637D3D7B0E for ; Thu, 24 Nov 2005 02:38:51 +0100 (CET) Message-ID: <4385187A.9090407@celeritystorm.com> Date: Thu, 24 Nov 2005 01:33:46 +0000 From: BSD User-Agent: Mozilla Thunderbird 0.7.2 (X11/20040724) X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Thu, 24 Nov 2005 03:12:35 +0000 Subject: 6.0-STABLE & powerd: eating my keyboard input X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Nov 2005 01:33:52 -0000 Hi all, I just upgraded from 6.0-RELEASE to -STABLE today (FreeBSD 6.0-STABLE #0: Thu Nov 24 00:40:48 WET 2005). After the upgrade I couldn't login anymore, so I thought I probably erased master.passwd by mistake with mergemaster, and rebooted into single user mode. Here I reset both root and my user account password, and processed to multiuser, only to fail the login again. Both on KDE and console. I rebooted again into single user, and changed both password to 3 characters. Now I could login, but every word I typed would have some letters wiped out (that was why the login was failing, it was "eating" my password). A quick 'top' inspection showed powerd using ~30% CPU, which is abnormal. I killed it, and voila! No more letter-eating. I started it again, and back to the same. powerd has always worked fine, it started behaving like this when I upgraded just an hour ago. This is a centrino laptop from acer. Comments, suggestions ? From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 24 05:05:20 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2D01216A420 for ; Thu, 24 Nov 2005 05:05:20 +0000 (GMT) (envelope-from bwzhou@hotmail.com) Received: from hotmail.com (bay111-dav10.bay111.hotmail.com [64.4.17.82]) by mx1.FreeBSD.org (Postfix) with ESMTP id BBAC743D5D for ; Thu, 24 Nov 2005 05:05:19 +0000 (GMT) (envelope-from bwzhou@hotmail.com) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Wed, 23 Nov 2005 21:05:19 -0800 Message-ID: Received: from 210.77.2.98 by BAY111-DAV10.phx.gbl with DAV; Thu, 24 Nov 2005 05:05:18 +0000 X-Originating-IP: [210.77.2.98] X-Originating-Email: [bwzhou@hotmail.com] X-Sender: bwzhou@hotmail.com From: "bwzhou" To: Date: Thu, 24 Nov 2005 13:03:38 +0800 Message-ID: <000001c5f0b4$6e5968e0$62024dd2@n610c> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 Thread-Index: AcXwtG4io1o8TFAkQ2WS1w+BJYIs8A== X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-OriginalArrivalTime: 24 Nov 2005 05:05:19.0245 (UTC) FILETIME=[AA55B3D0:01C5F0B4] Subject: Is there disk blocks cleaning function in FreeBSD6.0? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Nov 2005 05:05:20 -0000 Hello, everyone. I used to find VOP_FREEBLK macro cleaning the content of disk blocks of a file in 5.4, however I cannot find any kind of these operations doing the same thing in 6.0release. I wonder if there is any function or macro which will clean the data blocks after the file containing these blocks is deleted in 6.0release. Does anybody have any idea about this issue? thanks Zhou Bo Wen From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 24 09:18:19 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D92FC16A41F for ; Thu, 24 Nov 2005 09:18:19 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id DCC8B43D64 for ; Thu, 24 Nov 2005 09:18:18 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [127.0.0.1] (may be forged)) by harmony.bsdimp.com (8.13.3/8.13.3) with ESMTP id jAO9HSoH099115; Thu, 24 Nov 2005 02:17:28 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Thu, 24 Nov 2005 02:17:47 -0700 (MST) Message-Id: <20051124.021747.02300237.imp@bsdimp.com> To: listmember@thiemo.net From: "M. Warner Losh" In-Reply-To: <20051123092045.GA48216@mygiea.ham01.thiemo.net> References: <20051123092045.GA48216@mygiea.ham01.thiemo.net> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Thu, 24 Nov 2005 02:17:28 -0700 (MST) Cc: freebsd-hackers@freebsd.org Subject: Re: Writing a driver for a card reader controller - how? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Nov 2005 09:18:20 -0000 In message: <20051123092045.GA48216@mygiea.ham01.thiemo.net> Thiemo Nordenholz writes: : I am writing a device driver for a card reader controller which is installed : in my notebook, using the Winbond W83L518D chip. It's FreeBSD 6.0-STABLE : running there now, though I started programming under 5.4-R, and the : symptoms have not changed since then. : : However, when I attach it, it seems to allocate the resources : : port 0-0x7 irq 0 drq 4 on acpi0 : : which seems strange to me -- accessing registers in the respective : SYS_RES_IOPORT seems to work, though. This looks like a problem. It shouldn't be at port 0 or irq 0. There's a resource issue with the ACPI. However, this may be a classic problem instead. If your driver does not filter out pnpid that it gets, then you can wind up with this situation. : Now, as far as I understand the datasheet for the controller, I have to use : another I/O port to access the SD card itself, to check if one is there, and : finally to access it. How I do this, though, I have no idea. The datasheet : lists two configuration registers that "select SD Card interface base : address on 8-byte boundary" - but will my driver have to program an address : into those registers? Does the bus framework somehow handle this? Does even : BIOS do this? Or will I have to write one driver for the controller, have : that act as a bus driver, and attach some SD card driver to that one? Chances are several drivers will be needed to support SD cards. There are a number of layers involved. You have the slot/controller interface which is resposible for sending commands to the card. You have a higher level interface, which different slot controllers can plug into that deals with sending commands to the cards. Finally, you'd likely have a disk layer layered on top of that to prsent bits to the user. : Maybe someone is willing to spend some time having a look at the datasheet : and what I have done so far, and give me a little (or larger) clue-up... In : return, I promise to write some documentation about how I have done it once : it is ready, just in case someone else faces similar problems. A pointer to : some driver programming documentation I have missed so far would be just as : nice, of course. I'd be happy to take a look at the datasheet. : So far, I have tried using fdc and ppc as a guideline (after having found : the spkr driver to be a bit too simple), and I _think_ I am doing just as : those drivers do probing and resource allocation, but somehow they work, and : mine does not. : Link to the datasheet and some more description of what I have done so far : (including my current state of source code) are at : http://projects.thiemo.net/WbcrDriver The probe routine shouldn't allocate resources. Old ISA drivers needed to do this to cope with the vagaries of probing the hardware that may or may not be there. It looks like you have a specific instance in the ACPI space that you can attach to, so there's no need. This should be deferred until attach time. There's no equivalent in FreeBSD to the mmc code that Linux has. There really should be (this is the layering I was describing above). I'm not sure how to best advise moving the device's I/O port address. Not having one to mess with, I'm unsure how you should proceed. I think that the location of '0' might be a default, and that it needs to be set. Can you send me a pointer to the winbond datasheet you are using? IIRC, this chip has an odd API since it appears to be derived from Winbond's superI/O chips with all the 'super' removed except the SD interface. Warner From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 24 11:13:09 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0046816A41F for ; Thu, 24 Nov 2005 11:13:08 +0000 (GMT) (envelope-from nz@thiemo.net) Received: from excalibur.ronald.org (excalibur.ronald.org [83.120.8.12]) by mx1.FreeBSD.org (Postfix) with ESMTP id DA6E243D55 for ; Thu, 24 Nov 2005 11:13:07 +0000 (GMT) (envelope-from nz@thiemo.net) Received: from styx.ham01.thiemo.net (port-212-202-20-213.dynamic.qsc.de [212.202.20.213]) by excalibur.ronald.org (8.12.10/8.12.10) with ESMTP id jAOBClls025217 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 24 Nov 2005 12:12:52 +0100 (CET) Received: from mygiea.ham01.thiemo.net (localhost [127.0.0.1]) by styx.ham01.thiemo.net (8.13.3/8.13.3) with ESMTP id jAOBCgwq075306 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 24 Nov 2005 12:12:42 +0100 (CET) Received: (from thiemo@localhost) by mygiea.ham01.thiemo.net (8.13.3/8.13.3/Submit) id jAOBCgD9075305; Thu, 24 Nov 2005 12:12:42 +0100 (CET) Date: Thu, 24 Nov 2005 12:12:41 +0100 From: Thiemo Nordenholz To: "M. Warner Losh" Message-ID: <20051124111241.GB75190@mygiea.ham01.thiemo.net> References: <20051123092045.GA48216@mygiea.ham01.thiemo.net> <20051124.021747.02300237.imp@bsdimp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20051124.021747.02300237.imp@bsdimp.com> User-Agent: Mutt/1.4.1i Cc: freebsd-hackers@freebsd.org Subject: Re: Writing a driver for a card reader controller - how? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Nov 2005 11:13:09 -0000 Hi Warner, > to be set. Can you send me a pointer to the winbond datasheet you are > using? IIRC, this chip has an odd API since it appears to be derived As I have to wait for some spare time before trying to use the hints I have received here, for now I can only answer that question - I found a datasheet at http://www.winbond.com/e-winbondhtm/partner/PDFresult.asp?Pname=863 which is what I try to work with. (That page sends a file "PDFresult.asp", which is actually a PDF.) Thanks & best wishes, Thiemo -- Query a PGP key server (e.g. http://www.pgp.net/) for my public key 41068629. Strange sender address? Please see http://www.thiemo.net/misc/list-mail.shtml From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 24 11:40:53 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E4BC416A41F for ; Thu, 24 Nov 2005 11:40:53 +0000 (GMT) (envelope-from csaba@beastie.creo.hu) Received: from beastie.creo.hu (www.creo.hu [217.113.62.14]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7675743D66 for ; Thu, 24 Nov 2005 11:40:49 +0000 (GMT) (envelope-from csaba@beastie.creo.hu) Received: from beastie.creo.hu (localhost [127.0.0.1]) by beastie.creo.hu (8.13.3/8.13.3) with ESMTP id jAOBce76089500 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 24 Nov 2005 12:38:40 +0100 (CET) (envelope-from csaba@beastie.creo.hu) Received: (from csaba@localhost) by beastie.creo.hu (8.13.3/8.13.3/Submit) id jAOBceqL089499 for freebsd-hackers@freebsd.org; Thu, 24 Nov 2005 12:38:40 +0100 (CET) (envelope-from csaba) Date: Thu, 24 Nov 2005 12:38:40 +0100 From: Csaba Henk To: freebsd-hackers@freebsd.org Message-ID: <20051124113840.GK2911@beastie.creo.hu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.9i Subject: misteries of find(1) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Nov 2005 11:40:54 -0000 Hi! With fuse based filesystems I experienced find(1) giving up after running for a while, bursting out in a series of "File does not exist" complaints. (On the contrary, gfind just ran peacefully.) Why so? Well, fuse is a synthetic filesystem, where files themselves are subject to on demand creation / garbage collection (ie., not on the vnode level, but on the "backing storage" level, which role is played by the userspace filesystem daemon). As the ENOENT complaints came when file gc hit in, I conjectured that find somehow caches name-inode mappings (which becomes invalid if a file gets gc'd: after that, if it's asked for, it will reappear with a new inode number). I didn't look into find or libc source code, but that's what I think. Now with my CURRENT system (of 13th Nov) I don't see this happening anymore, BSD find also runs fine. I wonder what has changed... find itself doesn't seem to have any essential commits recently. Does anyone has an idea? Regards, Csaba From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 24 15:18:04 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 79BD616A42A for ; Thu, 24 Nov 2005 15:18:04 +0000 (GMT) (envelope-from cristiano.deana@gmail.com) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.205]) by mx1.FreeBSD.org (Postfix) with ESMTP id 06D6743D69 for ; Thu, 24 Nov 2005 15:18:02 +0000 (GMT) (envelope-from cristiano.deana@gmail.com) Received: by wproxy.gmail.com with SMTP id 71so127608wra for ; Thu, 24 Nov 2005 07:18:02 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=TZ1LoOt9tQoY0KklNsbpb9Qb6J5zKi9FTj2A58W03ez2UsYxDT2cmksCilvKpiD44Zg7qxKMlVfPyQNYyoBGK76KPOcJ/SnMX0KLofahb7eSo0iSVI80uyJURw6QXpSke+7wjxAqvEbeDRdzuRIxBoayeFM2lyOkYMzLQhKDFtg= Received: by 10.54.114.17 with SMTP id m17mr5165515wrc; Thu, 24 Nov 2005 07:18:02 -0800 (PST) Received: by 10.54.123.7 with HTTP; Thu, 24 Nov 2005 07:18:01 -0800 (PST) Message-ID: Date: Thu, 24 Nov 2005 16:18:02 +0100 From: Cristiano Deana To: freebsd-hackers@freebsd.org, freebsd-usb@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Cc: Subject: ZyXEL usb wifi X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Nov 2005 15:18:05 -0000 Hi, I got a ZyXEL ZyAIR G-220, dongle usb wi-fi. FreeBSD (-CURRENT) shows it as ugen0, what can i do to help somebody to include support for this product in FreeBSD? few info: # uname -a FreeBSD toshi 7.0-CURRENT FreeBSD 7.0-CURRENT #6: Sat Nov 12 21:48:27 CET 2005 root@toshi:/usr/obj/usr/src/sys/TOSHI7 i386 # kldstat Id Refs Address Size Name 1 33 0xc0400000 3b33b4 kernel 2 2 0xc07b4000 196e8 linux.ko 3 1 0xc07ce000 5748 snd_ich.ko 4 2 0xc07d4000 22074 sound.ko 5 1 0xc07f7000 3bf2d8 nvidia.ko 6 1 0xc0bb7000 3b58 acpi_toshiba.ko 7 3 0xc0bbb000 595f4 acpi.ko 8 1 0xc4340000 4000 if_aue.ko 9 1 0xc4344000 4000 if_axe.ko 10 1 0xc4348000 4000 if_cdce.ko 11 1 0xc434c000 4000 if_cue.ko 12 1 0xc4350000 5000 if_kue.ko 13 1 0xc435e000 5000 if_rue.ko # /usr/sbin/usbd -dv when i plug it: usbd: device-attach event at 1132841280.594729000, ZyAIR G-220, ZyXEL: vndr=3D0x0586 prdct=3D0x3401 rlse=3D0x4810 clss=3D0x00ff subclss=3D0x00ff= prtcl=3D0x00ff device names: ugen0 usbd: Found action 'USB device' for ZyAIR G-220, ZyXEL at ugen0 Thanks -- Cris, member of G.U.F.I Italian FreeBSD User Group http://www.gufi.org/ From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 24 15:38:14 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8D90216A41F for ; Thu, 24 Nov 2005 15:38:14 +0000 (GMT) (envelope-from root@solink.ru) Received: from mail.academ.org (mail.academ.org [81.1.226.250]) by mx1.FreeBSD.org (Postfix) with ESMTP id 683C643D76 for ; Thu, 24 Nov 2005 15:38:10 +0000 (GMT) (envelope-from root@solink.ru) Received: from mail.academ.org (localhost [127.0.0.1]) by mail.academ.org (Postfix) with ESMTP id E6B4063FA6 for ; Thu, 24 Nov 2005 21:38:16 +0600 (NOVT) Received: from [10.10.10.221] (host-81-1-226-117.academ.org [81.1.226.117]) by mail.academ.org (Postfix) with ESMTP id C958663F69 for ; Thu, 24 Nov 2005 21:38:16 +0600 (NOVT) From: Bachilo Dmitry Organization: SoLink To: freebsd-hackers@freebsd.org Date: Thu, 24 Nov 2005 21:38:02 +0600 User-Agent: KMail/1.8 References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200511242138.03152.root@solink.ru> X-AV-Checked: ClamAV Subject: Re: ZyXEL usb wifi X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Nov 2005 15:38:14 -0000 =F7 =D3=CF=CF=C2=DD=C5=CE=C9=C9 =CF=D4 =FE=C5=D4=D7=C5=D2=C7 24 =EE=CF=D1= =C2=D2=D8 2005 21:18 Cristiano Deana =CE=C1=D0=C9=D3=C1=CC(a): > Hi, > > I got a ZyXEL ZyAIR G-220, dongle usb wi-fi. > FreeBSD (-CURRENT) shows it as ugen0, what can i do to help somebody > to include support for this product in FreeBSD? > What for? It will work with NDIS compatibility just fine, i am shure. So wh= y=20 bother? From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 24 17:07:14 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 521C116A41F for ; Thu, 24 Nov 2005 17:07:14 +0000 (GMT) (envelope-from ducrot@poupinou.org) Received: from poup.poupinou.org (poup.poupinou.org [195.101.94.96]) by mx1.FreeBSD.org (Postfix) with ESMTP id E6E8043D69 for ; Thu, 24 Nov 2005 17:07:13 +0000 (GMT) (envelope-from ducrot@poupinou.org) Received: from ducrot by poup.poupinou.org with local (Exim) id 1EfKYq-0000dI-00; Thu, 24 Nov 2005 18:07:04 +0100 Date: Thu, 24 Nov 2005 18:07:04 +0100 To: BSD Message-ID: <20051124170704.GA2351@poupinou.org> References: <4385187A.9090407@celeritystorm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4385187A.9090407@celeritystorm.com> User-Agent: Mutt/1.5.9i From: Bruno Ducrot Cc: freebsd-hackers@freebsd.org Subject: Re: 6.0-STABLE & powerd: eating my keyboard input X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Nov 2005 17:07:14 -0000 On Thu, Nov 24, 2005 at 01:33:46AM +0000, BSD wrote: > Hi all, > > I just upgraded from 6.0-RELEASE to -STABLE today (FreeBSD 6.0-STABLE > #0: Thu Nov 24 00:40:48 WET 2005). After the upgrade I couldn't login > anymore, so I thought I probably erased master.passwd by mistake with > mergemaster, and rebooted into single user mode. Here I reset both root > and my user account password, and processed to multiuser, only to fail > the login again. Both on KDE and console. I rebooted again into single > user, and changed both password to 3 characters. Now I could login, but > every word I typed would have some letters wiped out (that was why the > login was failing, it was "eating" my password). > > A quick 'top' inspection showed powerd using ~30% CPU, which is > abnormal. I killed it, and voila! No more letter-eating. I started it > again, and back to the same. > > powerd has always worked fine, it started behaving like this when I > upgraded just an hour ago. This is a centrino laptop from acer. > Comments, suggestions ? > There is a recent commit from Nate Lawson dated 2005-11-24 05:29:15 UTC that should fix that issue. -- Bruno Ducrot -- Which is worse: ignorance or apathy? -- Don't know. Don't care. From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 24 18:28:12 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 128FB16A429 for ; Thu, 24 Nov 2005 18:28:12 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id D5B1F43D90 for ; Thu, 24 Nov 2005 18:27:27 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [127.0.0.1] (may be forged)) by harmony.bsdimp.com (8.13.3/8.13.3) with ESMTP id jAOIQD8s007916; Thu, 24 Nov 2005 11:26:13 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Thu, 24 Nov 2005 11:26:32 -0700 (MST) Message-Id: <20051124.112632.65222526.imp@bsdimp.com> To: listmember@thiemo.net From: "M. Warner Losh" In-Reply-To: <20051124111241.GB75190@mygiea.ham01.thiemo.net> References: <20051123092045.GA48216@mygiea.ham01.thiemo.net> <20051124.021747.02300237.imp@bsdimp.com> <20051124111241.GB75190@mygiea.ham01.thiemo.net> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Thu, 24 Nov 2005 11:26:13 -0700 (MST) Cc: freebsd-hackers@freebsd.org Subject: Re: Writing a driver for a card reader controller - how? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Nov 2005 18:28:13 -0000 In message: <20051124111241.GB75190@mygiea.ham01.thiemo.net> Thiemo Nordenholz writes: : Hi Warner, : : > to be set. Can you send me a pointer to the winbond datasheet you are : > using? IIRC, this chip has an odd API since it appears to be derived : : As I have to wait for some spare time before trying to use the hints I have : received here, for now I can only answer that question - I found a datasheet : at http://www.winbond.com/e-winbondhtm/partner/PDFresult.asp?Pname=863 : which is what I try to work with. (That page sends a file "PDFresult.asp", : which is actually a PDF.) I've read through this pdf. As far as I can find, it just talks about how to setup the base address for each of the sets of registers without actually talking about the sets of registers themselves. Nor can I find in the document a pointer to the different register sets. Do you have one of those as well? It looks fairly easy to program this device's base addresses or inquire what they are. It is done in much the same way that super I/O chips are programmed. Warner From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 24 23:10:27 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 14CA216A44C for ; Thu, 24 Nov 2005 23:10:27 +0000 (GMT) (envelope-from nz@thiemo.net) Received: from excalibur.ronald.org (excalibur.ronald.org [83.120.8.12]) by mx1.FreeBSD.org (Postfix) with ESMTP id B4EFC445FD for ; Thu, 24 Nov 2005 20:25:40 +0000 (GMT) (envelope-from nz@thiemo.net) Received: from styx.ham01.thiemo.net (port-212-202-20-213.dynamic.qsc.de [212.202.20.213]) by excalibur.ronald.org (8.12.10/8.12.10) with ESMTP id jAOKPVls013123 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 24 Nov 2005 21:25:36 +0100 (CET) Received: from mygiea.ham01.thiemo.net (localhost [127.0.0.1]) by styx.ham01.thiemo.net (8.13.3/8.13.3) with ESMTP id jAOKPSAk084955 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 24 Nov 2005 21:25:30 +0100 (CET) Received: (from thiemo@localhost) by mygiea.ham01.thiemo.net (8.13.3/8.13.3/Submit) id jAOKPJtx084950; Thu, 24 Nov 2005 21:25:19 +0100 (CET) Date: Thu, 24 Nov 2005 21:25:19 +0100 From: Thiemo Nordenholz To: "M. Warner Losh" Message-ID: <20051124202519.GA84564@mygiea.ham01.thiemo.net> References: <20051123092045.GA48216@mygiea.ham01.thiemo.net> <20051124.021747.02300237.imp@bsdimp.com> <20051124111241.GB75190@mygiea.ham01.thiemo.net> <20051124.112632.65222526.imp@bsdimp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20051124.112632.65222526.imp@bsdimp.com> User-Agent: Mutt/1.4.1i Cc: freebsd-hackers@freebsd.org Subject: Re: Writing a driver for a card reader controller - how? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Nov 2005 23:10:27 -0000 > how to setup the base address for each of the sets of registers > without actually talking about the sets of registers themselves. Nor > can I find in the document a pointer to the different register sets. > Do you have one of those as well? It looks fairly easy to program As far as I have understood what I have seen so far, this chip will just handle the communication between "the computer" and the SD/MMC (both seem to be very similar to access, unfortunately the SD standard is not publicly available) card. I think once this controller has been programmed to use IRQ, DRQ and register base address, what one wants to access are those resources in the card itself, which can happen through those resources. My plan therefore was to first be able to make those settings and then talk to the card as defined in the MMC standard... Finding out if a card is in the slot, though, should work first as that's done by the controller. Cheers, Thiemo -- Query a PGP key server (e.g. http://www.pgp.net/) for my public key 41068629. Strange sender address? Please see http://www.thiemo.net/misc/list-mail.shtml From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 25 00:15:56 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D716616A422 for ; Fri, 25 Nov 2005 00:15:56 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 985B843D60 for ; Fri, 25 Nov 2005 00:15:34 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [127.0.0.1] (may be forged)) by harmony.bsdimp.com (8.13.3/8.13.3) with ESMTP id jAP0ExoZ010567; Thu, 24 Nov 2005 17:14:59 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Thu, 24 Nov 2005 17:15:18 -0700 (MST) Message-Id: <20051124.171518.102581285.imp@bsdimp.com> To: listmember@thiemo.net From: "M. Warner Losh" In-Reply-To: <20051124202519.GA84564@mygiea.ham01.thiemo.net> References: <20051124111241.GB75190@mygiea.ham01.thiemo.net> <20051124.112632.65222526.imp@bsdimp.com> <20051124202519.GA84564@mygiea.ham01.thiemo.net> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Thu, 24 Nov 2005 17:15:00 -0700 (MST) Cc: freebsd-hackers@freebsd.org Subject: Re: Writing a driver for a card reader controller - how? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Nov 2005 00:15:57 -0000 In message: <20051124202519.GA84564@mygiea.ham01.thiemo.net> Thiemo Nordenholz writes: : > how to setup the base address for each of the sets of registers : > without actually talking about the sets of registers themselves. Nor : > can I find in the document a pointer to the different register sets. : > Do you have one of those as well? It looks fairly easy to program : : As far as I have understood what I have seen so far, this chip will just : handle the communication between "the computer" and the SD/MMC (both seem to : be very similar to access, unfortunately the SD standard is not publicly : available) card. I understand that. However, there are 8 bytes that are consumed by the device. Even if it was just one byte, what are the bit patterns in it? Given that it has a DRQ associated with it, one would need to setup addresses and such for DMA. The SD/MMC cards are a serial interface where you give it commands and things happen. There are variations on this theme (SD has a nibble mode, while MMC doesn't). The SD standard is available publicly, it is just really expensive and comes with significant NDA requirements. The MMC standard is also available for a more modest $500 or so (still a little too pricy for me to buy on my own) and has much less restricive license restrictions. There's reduced versions of both standards available, but they are useless to actually program device with. They tell you the basics, but not enough to do anything useful. : I think once this controller has been programmed to use IRQ, DRQ and : register base address, what one wants to access are those resources in the : card itself, which can happen through those resources. Yes. things will happen through those resources, but without knowing the layout of the registers, it would be impossible to actually use them. : My plan therefore was to first be able to make those settings and then : talk to the card as defined in the MMC standard... Finding out if a card is : in the slot, though, should work first as that's done by the controller. Do you have a copy of the MMC standard? Does the MMC standard actually define a standard host interface? Warner From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 25 10:20:09 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3767616A41F for ; Fri, 25 Nov 2005 10:20:09 +0000 (GMT) (envelope-from cristiano.deana@gmail.com) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.201]) by mx1.FreeBSD.org (Postfix) with ESMTP id B86A143D45 for ; Fri, 25 Nov 2005 10:20:08 +0000 (GMT) (envelope-from cristiano.deana@gmail.com) Received: by wproxy.gmail.com with SMTP id 71so271342wra for ; Fri, 25 Nov 2005 02:20:08 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=Dv+UE34kMcWSXBg4/kWO2X/UKsgNfe05YRktZfQZ4nJX0WHlMhOOGy+4mSopUuD1HHpMKQ+35r3V8Z3NJgGv9ytsJY5rfTWu2GtTyEOe/czXzQp1N1JhTwrKoJyNJEg2cYxbN1yBk2Hkp7S2y7DF7gCls8NWtZ33vx0fCO85j7s= Received: by 10.54.101.20 with SMTP id y20mr4976906wrb; Fri, 25 Nov 2005 02:20:07 -0800 (PST) Received: by 10.54.123.7 with HTTP; Fri, 25 Nov 2005 02:20:07 -0800 (PST) Message-ID: Date: Fri, 25 Nov 2005 11:20:07 +0100 From: Cristiano Deana To: freebsd-hackers@freebsd.org In-Reply-To: <200511242138.03152.root@solink.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <200511242138.03152.root@solink.ru> Subject: Re: ZyXEL usb wifi X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Nov 2005 10:20:09 -0000 2005/11/24, Bachilo Dmitry : > > I got a ZyXEL ZyAIR G-220, dongle usb wi-fi. > > FreeBSD (-CURRENT) shows it as ugen0, what can i do to help somebody > > to include support for this product in FreeBSD? > What for? It will work with NDIS compatibility just fine, i am shure. So = why > bother? It will not: # ndiscvt -i ZD1211U.inf -s ZD11UXP.sys -o ndis_driver_data.h ndiscvt: line 65: %Manufacturer%: syntax error. (toshi# head -67 ZD1211U.inf | tail -5 HKR,NDIS, MajorNdisVersion, 1, 03 HKR,NDIS, MinorNdisVersion, 1, 0A HKR,NDIS, LogDriverName, 0, %CustomServiceName%(%Manufactu= rer%) ; Interfaces Info # ndiscvt -s ZD11UXP.sys -o ndis_driver_data.h runs fine, but: # tail -1 /var/log/messages Nov 25 10:13:43 toshi kernel: ugen0: ZyXEL ZyAIR G-220, rev 2.00/48.10, add= r 2 Any ideas? -- Cris, member of G.U.F.I Italian FreeBSD User Group http://www.gufi.org/ From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 25 10:56:40 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4284216A41F for ; Fri, 25 Nov 2005 10:56:40 +0000 (GMT) (envelope-from nz@thiemo.net) Received: from excalibur.ronald.org (excalibur.ronald.org [83.120.8.12]) by mx1.FreeBSD.org (Postfix) with ESMTP id 513BA43D55 for ; Fri, 25 Nov 2005 10:56:38 +0000 (GMT) (envelope-from nz@thiemo.net) Received: from styx.ham01.thiemo.net (port-212-202-20-213.dynamic.qsc.de [212.202.20.213]) by excalibur.ronald.org (8.12.10/8.12.10) with ESMTP id jAPAuals005692 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 25 Nov 2005 11:56:37 +0100 (CET) Received: from mygiea.ham01.thiemo.net (localhost [127.0.0.1]) by styx.ham01.thiemo.net (8.13.3/8.13.3) with ESMTP id jAPAuQkW099830 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 25 Nov 2005 11:56:26 +0100 (CET) Received: (from thiemo@localhost) by mygiea.ham01.thiemo.net (8.13.3/8.13.3/Submit) id jAPAuQCR099829 for freebsd-hackers@freebsd.org; Fri, 25 Nov 2005 11:56:26 +0100 (CET) Date: Fri, 25 Nov 2005 11:56:26 +0100 From: Thiemo Nordenholz To: freebsd-hackers@freebsd.org Message-ID: <20051125105626.GA99656@mygiea.ham01.thiemo.net> References: <20051124111241.GB75190@mygiea.ham01.thiemo.net> <20051124.112632.65222526.imp@bsdimp.com> <20051124202519.GA84564@mygiea.ham01.thiemo.net> <20051124.171518.102581285.imp@bsdimp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20051124.171518.102581285.imp@bsdimp.com> User-Agent: Mutt/1.4.1i Subject: Re: Writing a driver for a card reader controller - how? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Nov 2005 10:56:40 -0000 > Do you have a copy of the MMC standard? Let's say, I have access to one. > Does the MMC standard actually define a standard host interface? It seems to describe a set of registers, their sizes and possible content, but I have yet to find out how to send the commands to the card that are defined by the standard. It seems like this must be done by the controller. Thiemo -- Query a PGP key server (e.g. http://www.pgp.net/) for my public key 41068629. Strange sender address? Please see http://www.thiemo.net/misc/list-mail.shtml From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 25 13:12:28 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CB66616A41F for ; Fri, 25 Nov 2005 13:12:28 +0000 (GMT) (envelope-from cristiano.deana@gmail.com) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.201]) by mx1.FreeBSD.org (Postfix) with ESMTP id 211FF43D53 for ; Fri, 25 Nov 2005 13:12:28 +0000 (GMT) (envelope-from cristiano.deana@gmail.com) Received: by wproxy.gmail.com with SMTP id 71so296380wra for ; Fri, 25 Nov 2005 05:12:26 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=GGnrt3Ln0PY5FrNiRtwVWMcwb0ddaRvw0JS09uwBL2/jEDgCqte/fHfnNRvofypRqyzapzDJmmYa8qIcPVr/L7cwzykkq54IACoQNvd/4wKgus1gSIe/yV0d0RcxoffRdg8QvlrzXWCe61SR+mKeOeJXXR0Nq8QvPjWOq9Ge25c= Received: by 10.54.114.17 with SMTP id m17mr6030746wrc; Fri, 25 Nov 2005 05:12:26 -0800 (PST) Received: by 10.54.123.7 with HTTP; Fri, 25 Nov 2005 05:12:26 -0800 (PST) Message-ID: Date: Fri, 25 Nov 2005 14:12:26 +0100 From: Cristiano Deana To: freebsd-hackers@freebsd.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <200511242138.03152.root@solink.ru> Subject: Re: ZyXEL usb wifi X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Nov 2005 13:12:28 -0000 2005/11/25, Cristiano Deana : > # ndiscvt -i ZD1211U.inf -s ZD11UXP.sys -o ndis_driver_data.h Here http://www.gufi.org/~cris/ you can find both files. Files are distributed from zyxel site in .exe format, so here you can find them already extracted. -- Cris, member of G.U.F.I Italian FreeBSD User Group http://www.gufi.org/ From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 25 16:34:38 2005 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8FB4116A41F for ; Fri, 25 Nov 2005 16:34:38 +0000 (GMT) (envelope-from therbelot@dibcom.fr) Received: from smtp3-g19.free.fr (smtp3-g19.free.fr [212.27.42.29]) by mx1.FreeBSD.org (Postfix) with ESMTP id B14AC43D62 for ; Fri, 25 Nov 2005 16:34:37 +0000 (GMT) (envelope-from therbelot@dibcom.fr) Received: from dibcom94.dibcom.fr (bau91-1-82-239-244-158.fbx.proxad.net [82.239.244.158]) by smtp3-g19.free.fr (Postfix) with ESMTP id 1CF51361A9 for ; Fri, 25 Nov 2005 17:34:35 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by dibcom94.dibcom.fr (Postfix) with ESMTP id 10F7D1DB18A for ; Fri, 25 Nov 2005 17:34:39 +0100 (CET) Received: from dibcom94.dibcom.fr ([127.0.0.1]) by localhost (dibcom94.dibcom.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 07598-03 for ; Fri, 25 Nov 2005 17:34:37 +0100 (CET) Received: from dibcom109.dibcom.fr (dibcom109.dibcom.fr [192.168.200.109]) by dibcom94.dibcom.fr (Postfix) with ESMTP id 6D9921DB178 for ; Fri, 25 Nov 2005 17:34:37 +0100 (CET) Received: by dibcom109.dibcom.fr (Postfix, from userid 1000) id 671B0C623B; Fri, 25 Nov 2005 17:34:37 +0100 (MET) Received: from dibcom62 (dibcom62 [192.168.200.62]) by dibcom109.dibcom.fr (Postfix) with ESMTP id 0F676C4026 for ; Fri, 25 Nov 2005 17:34:37 +0100 (MET) From: Thierry Herbelot To: hackers@freebsd.org Date: Fri, 25 Nov 2005 17:34:36 +0100 User-Agent: KMail/1.8 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200511251734.36605.therbelot@dibcom.fr> X-Virus-Scanned: amavisd-new at example.com X-Mailman-Approved-At: Fri, 25 Nov 2005 16:57:25 +0000 Cc: Subject: Promise FastTrak RAID 5 support ? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Nov 2005 16:34:38 -0000 Hello, I've been googling for some time and I can't seem to find out whether the ata subsystem of FreeBSD supports the RAID5 feature of the Promise boards. Two boards seem interesting : (by Promise) FastTrak S150 SX4-M and FastTrak SX4100 (I haven't exactly seen the differences, though) from the ATA mkIII update commit log, it seems that the RAID support for Promises is fairly good, but even after a glimpse at the ata-raid src in cvsweb, I'm not sure of anything. Has any one a hint on a cost-effective, FreeBSD-supported RAID-5 SATA disk controller ? TfH From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 25 17:42:27 2005 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 12E8F16A41F for ; Fri, 25 Nov 2005 17:42:27 +0000 (GMT) (envelope-from chris@haakonia.hitnet.rwth-aachen.de) Received: from ms-dienst.rz.rwth-aachen.de (ms-1.rz.RWTH-Aachen.DE [134.130.3.130]) by mx1.FreeBSD.org (Postfix) with ESMTP id E559443D5F for ; Fri, 25 Nov 2005 17:42:25 +0000 (GMT) (envelope-from chris@haakonia.hitnet.rwth-aachen.de) Received: from r220-1 (r220-1.rz.RWTH-Aachen.DE [134.130.3.31]) by ms-dienst.rz.rwth-aachen.de (iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004)) with ESMTP id <0IQI00KDTUINA6@ms-dienst.rz.rwth-aachen.de> for hackers@freebsd.org; Fri, 25 Nov 2005 18:42:24 +0100 (MET) Received: from relay.rwth-aachen.de ([134.130.3.1]) by r220-1 (MailMonitor for SMTP v1.2.2 ) ; Fri, 25 Nov 2005 18:42:23 +0100 (MET) Received: from bigboss.hitnet.rwth-aachen.de (bigspace.hitnet.RWTH-Aachen.DE [137.226.181.2]) by relay.rwth-aachen.de (8.13.3/8.13.3/1) with ESMTP id jAPHgNxw029977; Fri, 25 Nov 2005 18:42:23 +0100 (MET) Received: from lorien.hitnet.rwth-aachen.de ([137.226.181.92] helo=haakonia.hitnet.rwth-aachen.de) by bigboss.hitnet.rwth-aachen.de with esmtp (Exim 3.35 #1 (Debian)) id 1EfhaZ-0003Jp-00; Fri, 25 Nov 2005 18:42:23 +0100 Received: by haakonia.hitnet.rwth-aachen.de (Postfix, from userid 1001) id B55763F428; Fri, 25 Nov 2005 18:42:21 +0100 (CET) Date: Fri, 25 Nov 2005 18:42:21 +0100 From: Christian Brueffer In-reply-to: <200511251734.36605.therbelot@dibcom.fr> To: Thierry Herbelot Message-id: <20051125174221.GD1851@unixpages.org> MIME-version: 1.0 Content-type: multipart/signed; boundary="2/5bycvrmDh4d1IB"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-disposition: inline User-Agent: Mutt/1.5.11 X-Operating-System: FreeBSD 6.0-STABLE X-PGP-Key: http://people.FreeBSD.org/~brueffer/brueffer.key.asc X-PGP-Fingerprint: A5C8 2099 19FF AACA F41B B29B 6C76 178C A0ED 982D References: <200511251734.36605.therbelot@dibcom.fr> Cc: hackers@freebsd.org Subject: Re: Promise FastTrak RAID 5 support ? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Nov 2005 17:42:27 -0000 --2/5bycvrmDh4d1IB Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Nov 25, 2005 at 05:34:36PM +0100, Thierry Herbelot wrote: > Hello, >=20 > I've been googling for some time and I can't seem to find out whether the= ata=20 > subsystem of FreeBSD supports the RAID5 feature of the Promise boards. >=20 > Two boards seem interesting : (by Promise) FastTrak S150 SX4-M and =20 > FastTrak SX4100 (I haven't exactly seen the differences, though) >=20 > from the ATA mkIII update commit log, it seems that the RAID support for= =20 > Promises is fairly good, but even after a glimpse at the ata-raid src in= =20 > cvsweb, I'm not sure of anything. >=20 > Has any one a hint on a cost-effective, FreeBSD-supported RAID-5 SATA di= sk=20 > controller ? >=20 To quote from the commit log of src/sys/deb/ata/ata-raid.c, rev. 1.98.2.4: =3D=3D=3D Disable RAID5 for the release. The RAID5 code is not complete, it does not use nor maintain the parity, so it does actually only do RAID0. This is not wanted for a production release. =3D=3D=3D Take a look at e.g. the amr(4), aac(4) or arcmsr(4) manpages for a list of hardware that's closer to what you're looking for. (I'll add something about RAID5 to ataraid(4) the next couple of days) - Christian --=20 Christian Brueffer chris@unixpages.org brueffer@FreeBSD.org GPG Key: http://people.freebsd.org/~brueffer/brueffer.key.asc GPG Fingerprint: A5C8 2099 19FF AACA F41B B29B 6C76 178C A0ED 982D --2/5bycvrmDh4d1IB Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQFDh0z9bHYXjKDtmC0RAotoAKCqhKHbopUC4i4H+FVmyIPkyXsitACdGJx6 +qJdGRfLojr5WxdSVAE2btM= =lIeQ -----END PGP SIGNATURE----- --2/5bycvrmDh4d1IB-- From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 25 18:09:16 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2D02C16A41F for ; Fri, 25 Nov 2005 18:09:16 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id B5BAD43D60 for ; Fri, 25 Nov 2005 18:09:15 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [127.0.0.1] (may be forged)) by harmony.bsdimp.com (8.13.3/8.13.3) with ESMTP id jAPI7CPn022193; Fri, 25 Nov 2005 11:07:14 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Fri, 25 Nov 2005 11:07:30 -0700 (MST) Message-Id: <20051125.110730.117920119.imp@bsdimp.com> To: root@solink.ru From: "M. Warner Losh" In-Reply-To: <200511242138.03152.root@solink.ru> References: <200511242138.03152.root@solink.ru> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=koi8-r Content-Transfer-Encoding: quoted-printable X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Fri, 25 Nov 2005 11:07:15 -0700 (MST) Cc: freebsd-hackers@freebsd.org Subject: Re: ZyXEL usb wifi X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Nov 2005 18:09:16 -0000 In message: <200511242138.03152.root@solink.ru> Bachilo Dmitry writes: : =F7 =D3=CF=CF=C2=DD=C5=CE=C9=C9 =CF=D4 =FE=C5=D4=D7=C5=D2=C7 24 =EE=CF= =D1=C2=D2=D8 2005 21:18 Cristiano Deana =CE=C1=D0=C9=D3=C1=CC(a): : > Hi, : > : > I got a ZyXEL ZyAIR G-220, dongle usb wi-fi. : > FreeBSD (-CURRENT) shows it as ugen0, what can i do to help somebod= y : > to include support for this product in FreeBSD? : > : What for? It will work with NDIS compatibility just fine, i am shure.= So why = : bother? ndis + usb isn't yet working. Warner From owner-freebsd-hackers@FreeBSD.ORG Sat Nov 26 06:39:21 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3BE8816A41F for ; Sat, 26 Nov 2005 06:39:21 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7394243D5A for ; Sat, 26 Nov 2005 06:39:20 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [127.0.0.1] (may be forged)) by harmony.bsdimp.com (8.13.3/8.13.3) with ESMTP id jAQ6c3P6027483; Fri, 25 Nov 2005 23:38:04 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Fri, 25 Nov 2005 23:38:21 -0700 (MST) Message-Id: <20051125.233821.59680423.imp@bsdimp.com> To: listmember@thiemo.net From: "M. Warner Losh" In-Reply-To: <20051125105626.GA99656@mygiea.ham01.thiemo.net> References: <20051124202519.GA84564@mygiea.ham01.thiemo.net> <20051124.171518.102581285.imp@bsdimp.com> <20051125105626.GA99656@mygiea.ham01.thiemo.net> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Fri, 25 Nov 2005 23:38:04 -0700 (MST) Cc: freebsd-hackers@freebsd.org Subject: Re: Writing a driver for a card reader controller - how? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Nov 2005 06:39:21 -0000 In message: <20051125105626.GA99656@mygiea.ham01.thiemo.net> Thiemo Nordenholz writes: : > Do you have a copy of the MMC standard? : Let's say, I have access to one. I have access to the sanitized versions of the standard as well, but not the full standard. : > Does the MMC standard actually define a standard host interface? : : It seems to describe a set of registers, their sizes and possible content, : but I have yet to find out how to send the commands to the card that are : defined by the standard. It seems like this must be done by the controller. There's two sets of registers that I've been able to find. One is the set of hardware registers on the host which the host uses to interact with the card. This is the critical one to discover, because without it, we cannot hope to make things work with the card. Looks like Linux has a few different mmc bridges that they support. The second set is described in the sub-set of the standard I was able to find on the mmc web site. These registers are standard, and I anticipate that FreeBSD will have a mmc-bus layer that interacts with these things. My initial take on the newbus hierarchy will look something like: winbondmmcbr timmcbr atmmcbr | | | mmcbus mmcbus mmcbus | | | mmcf mmcf mmcf Where each bridge driver takes care of providing a standard inteface to the mmcbus layer. That layer would provide the means to do transfers and the like. mmcf would be the interface presented to the user for mmc flash cards. There's also new mmc I/O cards that have been defined. I don't know if they are in use yet or not, but web searches for mmc + bluetooth will show some results. I'd imagine that we'd have a mmcbt driver that attaches to mmcbus if such devices ever become mainstream. mmc slots can also support sd slots (well, most sd/mmc slots are really sd slots, but since mmc is a subset of sd in many ways, support for both is often paired). sd has some potentially probelmatical intellectual property issues, but we should design a framework that would allow a sdbus, mgatebus, etc to also attach to the above bridges. Warner From owner-freebsd-hackers@FreeBSD.ORG Sat Nov 26 15:14:31 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 997DE16A422 for ; Sat, 26 Nov 2005 15:14:31 +0000 (GMT) (envelope-from matthew@digitalstratum.com) Received: from mail.mundomateo.com (static-24-56-193-117.chrlmi.cablespeed.com [24.56.193.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3AA8843DB6 for ; Sat, 26 Nov 2005 15:14:22 +0000 (GMT) (envelope-from matthew@digitalstratum.com) Received: from [10.0.81.12] (ws12.mundomateo.com [10.0.81.12]) by mail.mundomateo.com (Postfix) with ESMTP id B070164FD for ; Sat, 26 Nov 2005 10:14:10 -0500 (EST) Message-ID: <43887BC0.7000501@digitalstratum.com> Date: Sat, 26 Nov 2005 10:14:08 -0500 From: Matthew Hagerty Organization: Digital Stratum User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716) X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Running a shell script on becoming the CARP master? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: matthew@digitalstratum.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Nov 2005 15:14:31 -0000 Greetings, Are there any hooks into CARP to run a shell script when a machine becomes the master? Also, is there a way to force a machine to become the master without powering off the current master (for example to do maintenance on the current master)? Thanks, Matthew From owner-freebsd-hackers@FreeBSD.ORG Sat Nov 26 15:34:33 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 39FF716A41F for ; Sat, 26 Nov 2005 15:34:33 +0000 (GMT) (envelope-from dom@goodforbusiness.co.uk) Received: from mail.helenmarks.co.uk (mail.helenmarks.co.uk [82.68.196.22]) by mx1.FreeBSD.org (Postfix) with ESMTP id 120BE43D53 for ; Sat, 26 Nov 2005 15:34:31 +0000 (GMT) (envelope-from dom@goodforbusiness.co.uk) Received: from localhost (localhost [127.0.0.1]) by mail.helenmarks.co.uk (Postfix) with ESMTP id 458DE17190; Sat, 26 Nov 2005 15:34:29 +0000 (GMT) Received: from mail.helenmarks.co.uk ([127.0.0.1]) by localhost (mail.helenmarks.co.uk [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 22089-01; Sat, 26 Nov 2005 15:34:28 +0000 (GMT) Received: from egg (img.leightondenny.com [192.168.15.3]) by mail.helenmarks.co.uk (Postfix) with ESMTP id 661A11713C; Sat, 26 Nov 2005 15:34:28 +0000 (GMT) From: Dominic Marks To: freebsd-hackers@freebsd.org, matthew@digitalstratum.com Date: Sat, 26 Nov 2005 15:34:28 +0000 User-Agent: KMail/1.8 References: <43887BC0.7000501@digitalstratum.com> In-Reply-To: <43887BC0.7000501@digitalstratum.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200511261534.29545.dom@goodforbusiness.co.uk> X-Virus-Scanned: By ClamAV 0.85.1 X-Mailman-Approved-At: Sat, 26 Nov 2005 15:46:19 +0000 Cc: Subject: Re: Running a shell script on becoming the CARP master? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Nov 2005 15:34:33 -0000 On Saturday 26 November 2005 15:14, Matthew Hagerty wrote: > Greetings, > > Are there any hooks into CARP to run a shell script when a machine > becomes the master? Also, is there a way to force a machine to become > the master without powering off the current master (for example to do > maintenance on the current master)? I believe there was supposed to be a utility for this sort of thing but I haven't seen or heard anything about it. In the mean time a program which read the data could probably be built from the ifconfig code quite simply. It would be really nice if there were kevent notifications for CARP events. > Thanks, > Matthew > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > -- Dominic Marks From owner-freebsd-hackers@FreeBSD.ORG Sat Nov 26 16:15:55 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BCB7C16A41F for ; Sat, 26 Nov 2005 16:15:55 +0000 (GMT) (envelope-from david@madole.net) Received: from a.omd3.com (a.omd3.com [69.90.174.36]) by mx1.FreeBSD.org (Postfix) with ESMTP id 67A3543D5F for ; Sat, 26 Nov 2005 16:15:52 +0000 (GMT) (envelope-from david@madole.net) Received: from dhcp-66-212-201-164.myeastern.com ([66.212.201.164] helo=david) by a.omd3.com with esmtpa (Exim 4.54) id 1Eg2iF-0007wZ-IJ; Sat, 26 Nov 2005 11:15:43 -0500 Message-ID: <05f401c5f2a4$a3da7ad0$c3e7a8c0@david> From: "David S. Madole" To: , References: <43887BC0.7000501@digitalstratum.com> Date: Sat, 26 Nov 2005 11:15:38 -0500 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=response Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2670 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670 Cc: Subject: Re: Running a shell script on becoming the CARP master? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Nov 2005 16:15:55 -0000 From: "Matthew Hagerty" > > Are there any hooks into CARP to run a shell script when a machine > becomes the master? Also, is there a way to force a machine to become > the master without powering off the current master (for example to do > maintenance on the current master)? I don't know of any way to do the former, but for the latter it's easy enough to temporarily adjust the advbase setting higher on the master until failover occurs. Set it to at least three times the setting on the slave. Or simply ifconfig down the carp interface on the master. David From owner-freebsd-hackers@FreeBSD.ORG Sat Nov 26 16:51:40 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DCD7216A41F for ; Sat, 26 Nov 2005 16:51:40 +0000 (GMT) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4E3B543D8B for ; Sat, 26 Nov 2005 16:51:26 +0000 (GMT) (envelope-from des@des.no) Received: from tim.des.no (localhost [127.0.0.1]) by spam.des.no (Postfix) with ESMTP id 18D2C2082; Sat, 26 Nov 2005 17:51:20 +0100 (CET) X-Spam-Tests: AWL,BAYES_00,FORGED_RCVD_HELO X-Spam-Learn: ham X-Spam-Score: -3.3/3.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on tim.des.no Received: from xps.des.no (des.no [80.203.243.180]) by tim.des.no (Postfix) with ESMTP id 984D42080; Sat, 26 Nov 2005 17:51:19 +0100 (CET) Received: by xps.des.no (Postfix, from userid 1001) id 7A91F33C1D; Sat, 26 Nov 2005 17:51:19 +0100 (CET) To: matthew@digitalstratum.com References: <43887BC0.7000501@digitalstratum.com> From: des@des.no (=?iso-8859-1?q?Dag-Erling_Sm=F8rgrav?=) Date: Sat, 26 Nov 2005 17:51:19 +0100 In-Reply-To: <43887BC0.7000501@digitalstratum.com> (Matthew Hagerty's message of "Sat, 26 Nov 2005 10:14:08 -0500") Message-ID: <86acfr4ak8.fsf@xps.des.no> User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org Subject: Re: Running a shell script on becoming the CARP master? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Nov 2005 16:51:41 -0000 Matthew Hagerty writes: > Are there any hooks into CARP to run a shell script when a machine > becomes the master? Have you tried using devd to catch the link up / down event on the carp interface? DES --=20 Dag-Erling Sm=F8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Sat Nov 26 21:39:52 2005 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AFA5616A41F for ; Sat, 26 Nov 2005 21:39:52 +0000 (GMT) (envelope-from spork@fasttrackmonkey.com) Received: from angryfist.fasttrackmonkey.com (angryfist.fasttrackmonkey.com [216.220.107.230]) by mx1.FreeBSD.org (Postfix) with ESMTP id DFD4B43D5F for ; Sat, 26 Nov 2005 21:39:51 +0000 (GMT) (envelope-from spork@fasttrackmonkey.com) Received: (qmail 1037 invoked by uid 2003); 26 Nov 2005 21:33:11 -0000 Received: from spork@fasttrackmonkey.com by angryfist.fasttrackmonkey.com by uid 1001 with qmail-scanner-1.20 (clamscan: 0.65. Clear:RC:1(216.220.116.154):. Processed in 0.05071 secs); 26 Nov 2005 21:33:11 -0000 Received: from unknown (HELO white.nat.fasttrackmonkey.com) (216.220.116.154) by 0 with (DHE-RSA-AES256-SHA encrypted) SMTP; 26 Nov 2005 21:33:11 -0000 Date: Sat, 26 Nov 2005 16:40:25 -0500 (EST) From: Charles Sprickman X-X-Sender: spork@white.nat.fasttrackmonkey.com To: Thierry Herbelot In-Reply-To: <200511251734.36605.therbelot@dibcom.fr> Message-ID: References: <200511251734.36605.therbelot@dibcom.fr> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: hackers@freebsd.org Subject: Re: Promise FastTrak RAID 5 support ? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Nov 2005 21:39:52 -0000 On Fri, 25 Nov 2005, Thierry Herbelot wrote: > Has any one a hint on a cost-effective, FreeBSD-supported RAID-5 SATA disk > controller ? I've got a handful of various low-end 3Ware cards scattered about in a few production boxes and I'm very happy with them. These are not "quasi-hardware-raid" like the onboard controllers. There is a cli management tool in the ports tree as well. You can probably still get the two port model for about $100. Charles > TfH > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" >