From owner-freebsd-hackers@FreeBSD.ORG Sun Aug 12 12:39:15 2007 Return-Path: Delivered-To: FreeBSD-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F16E316A417 for ; Sun, 12 Aug 2007 12:39:15 +0000 (UTC) (envelope-from gouders@et.bocholt.fh-gelsenkirchen.de) Received: from alice.et.bocholt.fh-ge.de (alice.et.bocholt.fh-gelsenkirchen.de [193.175.197.63]) by mx1.freebsd.org (Postfix) with ESMTP id 78E0E13C459 for ; Sun, 12 Aug 2007 12:39:14 +0000 (UTC) (envelope-from gouders@et.bocholt.fh-gelsenkirchen.de) Received: from musashi.et.bocholt.fh-gelsenkirchen.de (musashi.et.bocholt.fh-gelsenkirchen.de [193.175.197.95]) by alice.et.bocholt.fh-ge.de (8.13.7/8.13.7) with ESMTP id l7CCcUMP030986 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 12 Aug 2007 14:38:30 +0200 Received: from sora.hank.home ([10.8.0.6]) by musashi.et.bocholt.fh-gelsenkirchen.de (8.14.1/8.14.1) with ESMTP id l7CCcDZZ082948; Sun, 12 Aug 2007 14:38:13 +0200 (CEST) (envelope-from hank@et.bocholt.fh-gelsenkirchen.de) Received: from localhost (localhost.hank.home [127.0.0.1]) by sora.hank.home (8.14.1/8.14.1) with ESMTP id l7CCgfQc060307; Sun, 12 Aug 2007 14:42:41 +0200 (CEST) (envelope-from hank@sora.hank.home) Message-Id: <200708121242.l7CCgfQc060307@sora.hank.home> To: David Wolfskill In-reply-to: <20070811151054.GE77008@bunrab.catwhisker.org> References: <46BC49DB.8060509@latnet.lv> <20070810161318.GX77008@bunrab.catwhisker.org> <1064.192.168.100.227.1186841549.squirrel@jodocus.org> <200708111439.l7BEdgAr045640@sora.hank.home> <20070811151054.GE77008@bunrab.catwhisker.org> Comments: In-reply-to David Wolfskill message dated "Sat, 11 Aug 2007 08:10:54 -0700." MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----- =_aaaaaaaaaa0" Content-ID: <60275.1186922359.0@sora.hank.home> Date: Sun, 12 Aug 2007 14:42:41 +0200 From: Dirk GOUDERS X-Bounce: 0/8 X-Scanned-By: MIMEDefang 2.57 on 192.168.0.63 Cc: Joost Bekkers , FreeBSD-hackers@freebsd.org Subject: Re: [PATCH] newsyslog - don't compress first log file 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, 12 Aug 2007 12:39:16 -0000 ------- =_aaaaaaaaaa0 Content-Type: text/plain; charset="us-ascii" Content-ID: <60275.1186922359.1@sora.hank.home> > Ah -- well, then: by all means. I'm even more willing to test other > folks' work than I am to hack away at code. :-} > > And since I had tested my own Perl script, I think I should be able to > help out with this. :-) > > And "after Sunday" is not a problem at all: thank you! I tested the changes that allow to specify that n logfiles should not be compressed and attach a patch for version 1.107 of newsyslog.c to this mail. The changes do not handle cases of changes to the configfile while compressed and uncompressed logfiles already exist. Again, here is a configfile example: # logfilename [owner:group] mode count size when flags [/pid_file] [sig_num] /var/log/example.log 644 89 100 * J39 Then, I have a question concerning the code: (void) snprintf(file1, sizeof(file1), "%s.%d", ent->log, ent->numlogs); (void) snprintf(zfile1, sizeof(zfile1), "%s%s", file1, COMPRESS_POSTFIX); snprintf(jfile1, sizeof(jfile1), "%s%s", file1, BZCOMPRESS_POSTFIX); Is there a reason why the third call of snprintf is not casted to (void)? Dirk ------- =_aaaaaaaaaa0 Content-Type: text/plain; name="newsyslog.patch"; charset="us-ascii" Content-ID: <60275.1186922359.2@sora.hank.home> Content-Description: newsyslog.patch --- newsyslog.c.orig Sun Aug 12 14:13:38 2007 +++ newsyslog.c Sun Aug 12 14:36:51 2007 @@ -127,6 +127,8 @@ struct ptime_data *trim_at; /* Specific time to do trimming */ unsigned int permissions; /* File permissions on the log */ int flags; /* CE_COMPACT, CE_BZCOMPACT, CE_BINARY */ + int nuncompact; /* number of rotations that should not + * be compressed; -1 turns this off */ int sig; /* Signal to send */ int def_cfg; /* Using the rule for this file */ struct conf_entry *next;/* Linked list pointer */ @@ -1187,6 +1189,11 @@ } for (; q && *q && !isspacech(*q); q++) { + if (isdigit(*q)) { + working->nuncompact = strtol(q, NULL, 10); + while(isdigit(*(q+1))) q++; + continue; + } switch (tolowerch(*q)) { case 'b': working->flags |= CE_BINARY; @@ -1456,6 +1463,12 @@ (void)rename(zfile1, zfile2); } change_attrs(zfile2, ent); + if ((flags & (CE_COMPACT | CE_BZCOMPACT)) && + (ent->nuncompact != -1) && + (numlogs_c == ent->nuncompact)) { + free_or_keep = KEEP_ENT; + save_zipwork(ent, NULL, ent->fsize, file2); + } } if (ent->numlogs > 0) { @@ -1494,7 +1507,8 @@ swork = NULL; if (ent->pid_file != NULL) swork = save_sigwork(ent); - if (ent->numlogs > 0 && (flags & (CE_COMPACT | CE_BZCOMPACT))) { + if (ent->numlogs > 0 && (flags & (CE_COMPACT | CE_BZCOMPACT)) + && ent->nuncompact == -1) { /* * The zipwork_entry will include a pointer to this * conf_entry, so the conf_entry should not be freed. ------- =_aaaaaaaaaa0-- From owner-freebsd-hackers@FreeBSD.ORG Sun Aug 12 12:41:08 2007 Return-Path: Delivered-To: FreeBSD-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4C49716A418 for ; Sun, 12 Aug 2007 12:41:08 +0000 (UTC) (envelope-from david@catwhisker.org) Received: from bunrab.catwhisker.org (adsl-63-193-123-122.dsl.snfc21.pacbell.net [63.193.123.122]) by mx1.freebsd.org (Postfix) with ESMTP id 0370413C474 for ; Sun, 12 Aug 2007 12:41:07 +0000 (UTC) (envelope-from david@catwhisker.org) Received: from bunrab.catwhisker.org (localhost [127.0.0.1]) by bunrab.catwhisker.org (8.13.3/8.13.3) with ESMTP id l7CCf7k8045758; Sun, 12 Aug 2007 05:41:07 -0700 (PDT) (envelope-from david@bunrab.catwhisker.org) Received: (from david@localhost) by bunrab.catwhisker.org (8.13.3/8.13.1/Submit) id l7CCf7k4045757; Sun, 12 Aug 2007 05:41:07 -0700 (PDT) (envelope-from david) Date: Sun, 12 Aug 2007 05:41:07 -0700 From: David Wolfskill To: Artis Caune , FreeBSD-hackers@freebsd.org Message-ID: <20070812124107.GF77008@bunrab.catwhisker.org> Mail-Followup-To: David Wolfskill , Artis Caune , FreeBSD-hackers@freebsd.org References: <46BC49DB.8060509@latnet.lv> <20070810161318.GX77008@bunrab.catwhisker.org> <20070812122420.GC1438@roadrunner.spoerlein.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="nJFBJCcSkptt2CoF" Content-Disposition: inline In-Reply-To: <20070812122420.GC1438@roadrunner.spoerlein.net> User-Agent: Mutt/1.4.2.1i Cc: Subject: Re: [PATCH] newsyslog - don't compress first log file 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, 12 Aug 2007 12:41:08 -0000 --nJFBJCcSkptt2CoF Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Aug 12, 2007 at 02:24:20PM +0200, Ulrich Spoerlein wrote: > ... > > We have a requirement to retain some number of logfiles, but only > > compress those older than the Nth generation. > >=20 > > Thus, we might retain 90 "rotated" generations of the log file, of which > > the oldest 50 are compressed, while the newest 40 are not. >=20 > Sorry, to be so blunt, but I think this .N suffix is a stupid approach > for archival purposes. You never know which time span is included in the > file foo.17.gz. First, no problem with being blunt; it facilitates communication. :-) That said, we're not keeping the files for particularly long, so "archival" isn't an issue for us. It's merely that the files are extremely compressible (compressed size is about 12% the original), but for various reasons outside the control of those of us who run the machines, we need to keep some number of the most recent of them uncompressed. > I'd rather see an extension for newsyslog which would rotate foo to > foo.2007-08-12.gz, iff rotation is done every day at midnight. >=20 > That way, you get a 'stable' name, which makes it easier to find the > logfile for 1999-12-31 or 2000-01-01 some years from now. And on the other hand, to find the log for 3 days ago, you need to have a better idea of the current date than I generally do unless I check (either my watch or `date`). :-} So there are trade-offs. :-} Then again, I'm rather in the habit of using "ls -ltr ...." when I'm interested in the more recent of a set of files. > Right now, I have to use syslog-ng for that purpose. Well, I certainly wouldn't object to the existence of such a feature, whether or not I'd use it myself. :-) Peace, david --=20 David H. Wolfskill david@catwhisker.org Anything and everything is a (potential) cat toy. See http://www.catwhisker.org/~david/publickey.gpg for my public key. --nJFBJCcSkptt2CoF Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (FreeBSD) iEYEARECAAYFAka+/+IACgkQmprOCmdXAD0xqQCeLnABUKXUDuGSSPj9S++vJYIp 5lQAn3yVbJ2lSekx0KPUmJZ6JMmOOzkp =2Vwp -----END PGP SIGNATURE----- --nJFBJCcSkptt2CoF-- From owner-freebsd-hackers@FreeBSD.ORG Sun Aug 12 12:50:01 2007 Return-Path: Delivered-To: FreeBSD-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4057816A41A for ; Sun, 12 Aug 2007 12:50:01 +0000 (UTC) (envelope-from uspoerlein@gmail.com) Received: from fk-out-0910.google.com (fk-out-0910.google.com [209.85.128.188]) by mx1.freebsd.org (Postfix) with ESMTP id 8FADF13C49D for ; Sun, 12 Aug 2007 12:50:00 +0000 (UTC) (envelope-from uspoerlein@gmail.com) Received: by fk-out-0910.google.com with SMTP id b27so1386985fka for ; Sun, 12 Aug 2007 05:49:59 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:received:received:date:from:to:subject:message-id:mail-followup-to:references:mime-version:content-type:content-disposition:in-reply-to:user-agent; b=L3Xdx1xpa6lk+TQlQdCmjO2Ln5yNKkkLbAKUh4wibkvc01qG0mRICFtP24jCSqKCgXwXifrGNWJeQaLkkU705r39VPwdsA2jTdWlpyrqpRgJdUtVOsLohCKj2ONoYDqZhxmMsErCXvslKR7OPvytUp9euMvpo8v2qxiT3+SqDrY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:date:from:to:subject:message-id:mail-followup-to:references:mime-version:content-type:content-disposition:in-reply-to:user-agent; b=HWf9tf4Dxc3vp8CFhwSJetU3O5kOmEv7h5d7INzHJDo6KYdpNC4o9RGjV0j0E0DrrBAH8HeKncNTo4QqZqttBn3yh7jjoNEAkRs9mFjZzJ8et/0FXe/qrWKVzAfxpVctdgrGTOnaEQ8Ye+AnfpvWDas37H/QklAL6jlnt+1G2Wc= Received: by 10.86.60.7 with SMTP id i7mr3893599fga.1186921468019; Sun, 12 Aug 2007 05:24:28 -0700 (PDT) Received: from roadrunner.spoerlein.net ( [85.180.189.180]) by mx.google.com with ESMTPS id 31sm9334009fkt.2007.08.12.05.24.27 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 12 Aug 2007 05:24:27 -0700 (PDT) Received: from roadrunner.spoerlein.net (localhost [127.0.0.1]) by roadrunner.spoerlein.net (8.14.1/8.14.1) with ESMTP id l7CCOLLS002839; Sun, 12 Aug 2007 14:24:21 +0200 (CEST) (envelope-from uspoerlein@gmail.com) Received: (from q@localhost) by roadrunner.spoerlein.net (8.14.1/8.14.1/Submit) id l7CCOLbi002838; Sun, 12 Aug 2007 14:24:21 +0200 (CEST) (envelope-from uspoerlein@gmail.com) Date: Sun, 12 Aug 2007 14:24:20 +0200 From: Ulrich Spoerlein To: David Wolfskill , Artis Caune , FreeBSD-hackers@freebsd.org Message-ID: <20070812122420.GC1438@roadrunner.spoerlein.net> Mail-Followup-To: David Wolfskill , Artis Caune , FreeBSD-hackers@freebsd.org References: <46BC49DB.8060509@latnet.lv> <20070810161318.GX77008@bunrab.catwhisker.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070810161318.GX77008@bunrab.catwhisker.org> User-Agent: Mutt/1.5.15 (2007-04-06) Cc: Subject: Re: [PATCH] newsyslog - don't compress first log file 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, 12 Aug 2007 12:50:01 -0000 On Fri, 10.08.2007 at 09:13:18 -0700, David Wolfskill wrote: > On Fri, Aug 10, 2007 at 02:19:55PM +0300, Artis Caune wrote: > > How about aditional flag ("X") to newsyslog, which don't compress first > > log file? > >... > > Interesting idea, but it still falls short of something we recently > needed to do at work: > > We have a requirement to retain some number of logfiles, but only > compress those older than the Nth generation. > > Thus, we might retain 90 "rotated" generations of the log file, of which > the oldest 50 are compressed, while the newest 40 are not. Sorry, to be so blunt, but I think this .N suffix is a stupid approach for archival purposes. You never know which time span is included in the file foo.17.gz. I'd rather see an extension for newsyslog which would rotate foo to foo.2007-08-12.gz, iff rotation is done every day at midnight. That way, you get a 'stable' name, which makes it easier to find the logfile for 1999-12-31 or 2000-01-01 some years from now. Right now, I have to use syslog-ng for that purpose. Cheers, Ulrich Spoerlein -- It is better to remain silent and be thought a fool, than to speak, and remove all doubt. From owner-freebsd-hackers@FreeBSD.ORG Sun Aug 12 16:54:57 2007 Return-Path: Delivered-To: FreeBSD-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 71CE116A41B for ; Sun, 12 Aug 2007 16:54:57 +0000 (UTC) (envelope-from drue@therub.org) Received: from nest.therub.org (mn-69-68-192-216.sta.embarqhsd.net [69.68.192.216]) by mx1.freebsd.org (Postfix) with ESMTP id 4C5AD13C458 for ; Sun, 12 Aug 2007 16:54:57 +0000 (UTC) (envelope-from drue@therub.org) Received: by nest.therub.org (Postfix, from userid 1001) id 01B6173053; Sun, 12 Aug 2007 11:38:51 -0500 (CDT) Date: Sun, 12 Aug 2007 11:38:51 -0500 From: Dan Rue To: David Wolfskill , Artis Caune , FreeBSD-hackers@freebsd.org Message-ID: <20070812163851.GC40395@therub.org> References: <46BC49DB.8060509@latnet.lv> <20070810161318.GX77008@bunrab.catwhisker.org> <20070812122420.GC1438@roadrunner.spoerlein.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070812122420.GC1438@roadrunner.spoerlein.net> User-Agent: Mutt/1.5.13 (2006-08-11) Cc: Subject: Re: [PATCH] newsyslog - archive logs with a timestamp 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, 12 Aug 2007 16:54:57 -0000 On Sun, Aug 12, 2007 at 02:24:20PM +0200, Ulrich Spoerlein wrote: > I'd rather see an extension for newsyslog which would rotate foo to > foo.2007-08-12.gz, iff rotation is done every day at midnight. Sorry to hijack the thread, but this is something that I've been looking for for a long time as well. There's even a patch that's been sitting in purgatory since 2001. http://www.freebsd.org/cgi/query-pr.cgi?pr=30654&cat= Dan From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 13 04:57:11 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1F47516A41A for ; Mon, 13 Aug 2007 04:57:11 +0000 (UTC) (envelope-from weongyo.jeong@gmail.com) Received: from rv-out-0910.google.com (rv-out-0910.google.com [209.85.198.189]) by mx1.freebsd.org (Postfix) with ESMTP id E06CC13C459 for ; Mon, 13 Aug 2007 04:57:10 +0000 (UTC) (envelope-from weongyo.jeong@gmail.com) Received: by rv-out-0910.google.com with SMTP id f1so951350rvb for ; Sun, 12 Aug 2007 21:57:10 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:received:date:to:cc:subject:message-id:mail-followup-to:references:mime-version:content-type:content-disposition:in-reply-to:user-agent:organization:x-operation-sytem:from; b=d3OJmpEnK5UjFZZ6W+ZkGR+k8ef4+jekOOTmkWsV3Ys7f9fodWiV84BK4yq7g+3qwKpQDB8DlNRz2gYmh1Bwl+Xvgn+893j8oKoMZlZ9cyqxV3VS5P9DJkgM4nH1EAG9+FKaP8AS91UU/jBUTlomIy82m0jGV7qvNmZn0PC/f/s= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:date:to:cc:subject:message-id:mail-followup-to:references:mime-version:content-type:content-disposition:in-reply-to:user-agent:organization:x-operation-sytem:from; b=b78oE/H4QNrQy4D3MQgsMvnCt1AZiO3cF1zInZqgKqayAe+y0eWoRef5JgdCu69k8LwaHxhuZqg298e1hyd7bdUjqcm7Fo1Vl//iUKdPsdoEfDrMkXKEBMrWgQ0cOcJxEplyEaT8zzA/M+sqI03DIDs9Xe3AqnVvs8E/pOi2S5s= Received: by 10.140.147.5 with SMTP id u5mr2391499rvd.1186981030587; Sun, 12 Aug 2007 21:57:10 -0700 (PDT) Received: from freebsd.weongyo.org ( [211.53.35.67]) by mx.google.com with ESMTPS id 2sm11218767rvi.2007.08.12.21.57.07 (version=SSLv3 cipher=OTHER); Sun, 12 Aug 2007 21:57:08 -0700 (PDT) Received: by freebsd.weongyo.org (sSMTP sendmail emulation); Mon, 13 Aug 2007 13:56:50 +0900 Date: Mon, 13 Aug 2007 13:56:50 +0900 To: Hans Petter Selasky Message-ID: <20070813045650.GD88684@freebsd.weongyo.org> Mail-Followup-To: Hans Petter Selasky , freebsd-hackers@freebsd.org, freebsd-drivers@freebsd.org References: <20070805060921.GA2858@freebsd.weongyo.org> <200708091203.47000.hselasky@c2i.net> <20070809.104439.-365731007.imp@bsdimp.com> <200708101210.21431.hselasky@c2i.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200708101210.21431.hselasky@c2i.net> User-Agent: Mutt/1.4.2.3i Organization: CDNetworks. X-Operation-Sytem: FreeBSD From: Weongyo Jeong Cc: freebsd-hackers@freebsd.org, freebsd-drivers@freebsd.org Subject: Re: finished? porting ZyDAS zb1211/zb1211b driver for 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, 13 Aug 2007 04:57:11 -0000 Ok. I would try to port the zyd driver to the HPS USB stack when I have spare time. When some progress is made, I will let you know about it. Best Regards, Weongyo Jeong On Fri, Aug 10, 2007 at 12:10:20PM +0200, Hans Petter Selasky wrote: > On Thursday 09 August 2007, M. Warner Losh wrote: > > In message: <200708091203.47000.hselasky@c2i.net> > > > > Hans Petter Selasky writes: > > : On Sunday 05 August 2007, Weongyo Jeong wrote: > > : > Hello, > > : > > > : > I just finished to port zyd(4) from NetBSD for FreeBSD and it works > > : > well in my environment without any panic ;-) (In zb1211b, RF AL2230, > > : > open auth, 54M). But It's not perfect and not be tested on another RF > > : > controllers and not on zb1211. IMO, it would work too. > > : > > > : > A patch which is for CURRENT is available at > > : > http://weongyo.org/patches/freebsd/if_zyd-CURRENT-20070805.diff > > : > > > : > Comments, questions and feedbacks always welcome. > > : > > > : > PS. special thanks to Pyun YongHyeon. > > : > > : Hi, > > : > > : Is it possible that you could spend some time porting your ZYD driver to > > : the HPS USB stack aswell ? > > > > Isn't zyd already in the hps stack? > > > > Warner > > Yes it is, but the version I ported was not functional at that time. > > --HPS > _______________________________________________ > 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 Aug 13 08:22:25 2007 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0037C16A418 for ; Mon, 13 Aug 2007 08:22:24 +0000 (UTC) (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 B21AF13C46B for ; Mon, 13 Aug 2007 08:22:22 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (localhost [127.0.0.1]) by spam.des.no (Postfix) with ESMTP id D1AB220B2 for ; Mon, 13 Aug 2007 10:22:17 +0200 (CEST) X-Spam-Tests: AWL X-Spam-Learn: disabled X-Spam-Score: 0.0/3.0 X-Spam-Checker-Version: SpamAssassin 3.2.1 (2007-05-02) on tim.des.no Received: from ds4.des.no (des.no [80.203.243.180]) by smtp.des.no (Postfix) with ESMTP id C61AF20B1 for ; Mon, 13 Aug 2007 10:22:17 +0200 (CEST) Received: by ds4.des.no (Postfix, from userid 1001) id AF4C38447F; Mon, 13 Aug 2007 10:22:17 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: hackers@freebsd.org References: <86myx0pa9i.fsf@ds4.des.no> Date: Mon, 13 Aug 2007 10:22:17 +0200 In-Reply-To: <86myx0pa9i.fsf@ds4.des.no> ("Dag-Erling =?utf-8?Q?Sm=C3=B8rg?= =?utf-8?Q?rav=22's?= message of "Fri\, 10 Aug 2007 01\:18\:33 +0200") Message-ID: <867inz7sjq.fsf@ds4.des.no> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.1 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: Subject: Re: Core temperature 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, 13 Aug 2007 08:22:25 -0000 Dag-Erling Sm=C3=B8rgrav writes: > I've written a quick-and-dirty driver for the built-in digital > temperature sensor in Intel's Core and Core 2 CPUs (and Xeons built on > the Core architecture). Rui Paolo (SoC student) already had a driver which was far better than mine, and I am working with him to get it imported. You can download his driver from my software page: http://people.freebsd.org/~des/software/coretemp-20070813.diff DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 14 09:40:14 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 50AA616A4D5 for ; Tue, 14 Aug 2007 09:40:14 +0000 (UTC) (envelope-from sven-freebsd@hazejager.nl) Received: from chainsoftware.nl (hazejager.demon.nl [83.160.136.100]) by mx1.freebsd.org (Postfix) with ESMTP id 7F85913C4A6 for ; Tue, 14 Aug 2007 09:40:13 +0000 (UTC) (envelope-from sven-freebsd@hazejager.nl) Received: from chainsoftware.nl (localhost [127.0.0.1]) by chainsoftware.nl (8.13.8/8.13.8) with ESMTP id l7E9SJD9033217 for ; Tue, 14 Aug 2007 11:28:19 +0200 (CEST) (envelope-from sven-freebsd@hazejager.nl) Received: from localhost (sven@localhost) by chainsoftware.nl (8.13.8/8.13.8/Submit) with ESMTP id l7E9SJk5033214 for ; Tue, 14 Aug 2007 11:28:19 +0200 (CEST) (envelope-from sven-freebsd@hazejager.nl) X-Authentication-Warning: proxy.chain.loc: sven owned process doing -bs Date: Tue, 14 Aug 2007 11:28:19 +0200 (CEST) From: Sven Hazejager To: freebsd-hackers@freebsd.org Message-ID: <07081411265549.-1077952816@somehost.domainz.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Spam-Status: No, hits=-3.977 tests=ALL_TRUSTED,BAYES_00 X-Scanned-By: MIMEDefang 2.56 on 192.168.0.1 Subject: How to stop attached USB device / send IRP_MN_REMOVE_DEVICE? 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, 14 Aug 2007 09:40:14 -0000 Hi all, Is there a tool under FreeBSD 6.2 that properly stops a USB device, equivalent to Windows XPs Safely Remove Hardware? I noticed that Windows sends a IRP_MN_REMOVE_DEVICE command, after which my LaCie external HDD spins down. Same applies to any USB stick: the light goes out on the stick. I would like to do this under FreeBSD too. camcontrol eject or stop don't do anything. So, the question really is: how to send a IRP_MN_REMOVE_DEVICE command? Thanks, Sven From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 14 11:08:32 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 81C5E16A41B for ; Tue, 14 Aug 2007 11:08:32 +0000 (UTC) (envelope-from soralx@cydem.org) Received: from pd3mo3so.prod.shaw.ca (shawidc-mo1.cg.shawcable.net [24.71.223.10]) by mx1.freebsd.org (Postfix) with ESMTP id 61D3A13C474 for ; Tue, 14 Aug 2007 11:08:32 +0000 (UTC) (envelope-from soralx@cydem.org) Received: from pd4mr2so.prod.shaw.ca (pd4mr2so-qfe3.prod.shaw.ca [10.0.141.213]) by l-daemon (Sun ONE Messaging Server 6.0 HotFix 1.01 (built Mar 15 2004)) with ESMTP id <0JMR001PVDI81R20@l-daemon> for freebsd-hackers@freebsd.org; Tue, 14 Aug 2007 04:08:32 -0600 (MDT) Received: from pn2ml9so.prod.shaw.ca ([10.0.121.7]) by pd4mr2so.prod.shaw.ca (Sun Java System Messaging Server 6.2-7.05 (built Sep 5 2006)) with ESMTP id <0JMR002VYDI95Y30@pd4mr2so.prod.shaw.ca> for freebsd-hackers@freebsd.org; Tue, 14 Aug 2007 04:08:33 -0600 (MDT) Received: from soralx ([24.87.3.133]) by l-daemon (Sun ONE Messaging Server 6.0 HotFix 1.01 (built Mar 15 2004)) with ESMTP id <0JMR009M2DI77441@l-daemon> for freebsd-hackers@freebsd.org; Tue, 14 Aug 2007 04:08:32 -0600 (MDT) Date: Tue, 14 Aug 2007 03:08:33 -0700 From: soralx@cydem.org In-reply-to: <07081411265549.-1077952816@somehost.domainz.com> To: sven-freebsd@hazejager.nl Message-id: <20070814030833.49a7a030@soralx> MIME-version: 1.0 X-Mailer: Claws Mail 2.10.0 (GTK+ 2.10.14; i386-portbld-freebsd6.2) Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7bit References: <07081411265549.-1077952816@somehost.domainz.com> Cc: freebsd-hackers@freebsd.org Subject: Re: How to stop attached USB device / send IRP_MN_REMOVE_DEVICE? 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, 14 Aug 2007 11:08:32 -0000 > Is there a tool under FreeBSD 6.2 that properly stops a USB device, > equivalent to Windows XPs Safely Remove Hardware? I noticed that > Windows sends a IRP_MN_REMOVE_DEVICE command, after which my LaCie > external HDD spins down. Same applies to any USB stick: the light > goes out on the stick. I would like to do this under FreeBSD too. > camcontrol eject or stop don't do anything. > > So, the question really is: how to send a IRP_MN_REMOVE_DEVICE > command? `camcontrol da? stop` seemed to do the trick before (5.2.1-R, AFAIR), but now I'm not sure (looks like it doesn't) tested with SCSI hard drives and Adaptec 29160 > Sven [SorAlx] ridin' VS1400 From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 14 11:17:37 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 076AE16A419 for ; Tue, 14 Aug 2007 11:17:37 +0000 (UTC) (envelope-from soralx@cydem.org) Received: from pd2mo1so.prod.shaw.ca (shawidc-mo1.cg.shawcable.net [24.71.223.10]) by mx1.freebsd.org (Postfix) with ESMTP id DB76D13C45A for ; Tue, 14 Aug 2007 11:17:36 +0000 (UTC) (envelope-from soralx@cydem.org) Received: from pd3mr3so.prod.shaw.ca (pd3mr3so-qfe3.prod.shaw.ca [10.0.141.179]) by l-daemon (Sun ONE Messaging Server 6.0 HotFix 1.01 (built Mar 15 2004)) with ESMTP id <0JMR006U2GPCDD80@l-daemon> for freebsd-hackers@freebsd.org; Tue, 14 Aug 2007 05:17:36 -0600 (MDT) Received: from pn2ml2so.prod.shaw.ca ([10.0.121.146]) by pd3mr3so.prod.shaw.ca (Sun Java System Messaging Server 6.2-7.05 (built Sep 5 2006)) with ESMTP id <0JMR00K3OGPC3Q60@pd3mr3so.prod.shaw.ca> for freebsd-hackers@freebsd.org; Tue, 14 Aug 2007 05:17:36 -0600 (MDT) Received: from soralx ([24.87.3.133]) by l-daemon (Sun ONE Messaging Server 6.0 HotFix 1.01 (built Mar 15 2004)) with ESMTP id <0JMR002S4GPB8YM1@l-daemon> for freebsd-hackers@freebsd.org; Tue, 14 Aug 2007 05:17:35 -0600 (MDT) Date: Tue, 14 Aug 2007 04:17:36 -0700 From: soralx@cydem.org In-reply-to: <20070814030833.49a7a030@soralx> To: sven-freebsd@hazejager.nl Message-id: <20070814041736.4c16f41e@soralx> MIME-version: 1.0 X-Mailer: Claws Mail 2.10.0 (GTK+ 2.10.14; i386-portbld-freebsd6.2) Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7bit References: <07081411265549.-1077952816@somehost.domainz.com> <20070814030833.49a7a030@soralx> Cc: freebsd-hackers@freebsd.org Subject: Re: How to stop attached USB device / send IRP_MN_REMOVE_DEVICE? 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, 14 Aug 2007 11:17:37 -0000 On Tue, 14 Aug 2007 03:08:33 -0700 soralx@cydem.org wrote: > > > Is there a tool under FreeBSD 6.2 that properly stops a USB device, > > equivalent to Windows XPs Safely Remove Hardware? I noticed that > > Windows sends a IRP_MN_REMOVE_DEVICE command, after which my LaCie > > external HDD spins down. Same applies to any USB stick: the light > > goes out on the stick. I would like to do this under FreeBSD too. > > camcontrol eject or stop don't do anything. > > > > So, the question really is: how to send a IRP_MN_REMOVE_DEVICE > > command? > > `camcontrol da? stop` seemed to do the trick before (5.2.1-R, AFAIR), > but now I'm not sure (looks like it doesn't) sorry, I meant to say that `camcontrol da? stop` does not power down the device anymore; nonetheless, it is probably safe to disconnect it > tested with SCSI hard drives and Adaptec 29160 > > > Sven > > [SorAlx] ridin' VS1400 [SorAlx] ridin' VS1400 From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 14 14:14:18 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 26CA516A421 for ; Tue, 14 Aug 2007 14:14:18 +0000 (UTC) (envelope-from sven-freebsd@hazejager.nl) Received: from chainsoftware.nl (hazejager.demon.nl [83.160.136.100]) by mx1.freebsd.org (Postfix) with ESMTP id B54FC13C4A3 for ; Tue, 14 Aug 2007 14:14:17 +0000 (UTC) (envelope-from sven-freebsd@hazejager.nl) Received: from chainsoftware.nl (localhost [127.0.0.1]) by chainsoftware.nl (8.13.8/8.13.8) with ESMTP id l7EEE7Mm036276; Tue, 14 Aug 2007 16:14:07 +0200 (CEST) (envelope-from sven-freebsd@hazejager.nl) Received: from localhost (sven@localhost) by chainsoftware.nl (8.13.8/8.13.8/Submit) with ESMTP id l7EEE6oi036273; Tue, 14 Aug 2007 16:14:07 +0200 (CEST) (envelope-from sven-freebsd@hazejager.nl) X-Authentication-Warning: proxy.chain.loc: sven owned process doing -bs Date: Tue, 14 Aug 2007 16:14:06 +0200 (CEST) From: Sven Hazejager To: soralx@cydem.org In-Reply-To: <20070814041736.4c16f41e@soralx> Message-ID: <07081416114656.-1077948560@somehost.domainz.com> References: <07081411265549.-1077952816@somehost.domainz.com> <20070814030833.49a7a030@soralx> <20070814041736.4c16f41e@soralx> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Spam-Status: No, hits=-3.977 tests=ALL_TRUSTED,BAYES_00 X-Scanned-By: MIMEDefang 2.56 on 192.168.0.1 Cc: freebsd-hackers@freebsd.org Subject: Re: How to stop attached USB device / send IRP_MN_REMOVE_DEVICE? 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, 14 Aug 2007 14:14:18 -0000 >>> So, the question really is: how to send a IRP_MN_REMOVE_DEVICE >>> command? >> >> `camcontrol da? stop` seemed to do the trick before (5.2.1-R, AFAIR), >> but now I'm not sure (looks like it doesn't) > > sorry, I meant to say that `camcontrol da? stop` does not power down > the device anymore; nonetheless, it is probably safe to disconnect it No, camcontrol does not support this over USB. Windows XP demonstrates it is technically possible, and I do not believe it is fully safe to disconnect the drive (even when unmounted), as the drive then is not able to park its heads, which it DOES do under XP. So, we come back to the original question: how to send an IRP_MN_REMOVE_DEVICE event? Regards, Sven From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 14 14:30:00 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7E45516A421 for ; Tue, 14 Aug 2007 14:30:00 +0000 (UTC) (envelope-from anderson@freebsd.org) Received: from ns.trinitel.com (186.161.36.72.static.reverse.ltdomains.com [72.36.161.186]) by mx1.freebsd.org (Postfix) with ESMTP id 5786513C461 for ; Tue, 14 Aug 2007 14:30:00 +0000 (UTC) (envelope-from anderson@freebsd.org) Received: from proton.local (209-163-168-124.static.twtelecom.net [209.163.168.124]) (authenticated bits=0) by ns.trinitel.com (8.14.1/8.14.1) with ESMTP id l7EETtaL074528; Tue, 14 Aug 2007 09:29:55 -0500 (CDT) (envelope-from anderson@freebsd.org) Message-ID: <46C1BC60.5000801@freebsd.org> Date: Tue, 14 Aug 2007 09:29:52 -0500 From: Eric Anderson User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070728) MIME-Version: 1.0 To: Sven Hazejager References: <07081411265549.-1077952816@somehost.domainz.com> <20070814030833.49a7a030@soralx> <20070814041736.4c16f41e@soralx> <07081416114656.-1077948560@somehost.domainz.com> In-Reply-To: <07081416114656.-1077948560@somehost.domainz.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.5 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.1.8 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on ns.trinitel.com Cc: freebsd-hackers@freebsd.org Subject: Re: How to stop attached USB device / send IRP_MN_REMOVE_DEVICE? 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, 14 Aug 2007 14:30:00 -0000 Sven Hazejager wrote: >>>> So, the question really is: how to send a IRP_MN_REMOVE_DEVICE >>>> command? >>> >>> `camcontrol da? stop` seemed to do the trick before (5.2.1-R, AFAIR), >>> but now I'm not sure (looks like it doesn't) >> >> sorry, I meant to say that `camcontrol da? stop` does not power down >> the device anymore; nonetheless, it is probably safe to disconnect it > > No, camcontrol does not support this over USB. Windows XP demonstrates > it is technically possible, and I do not believe it is fully safe to > disconnect the drive (even when unmounted), as the drive then is not > able to park its heads, which it DOES do under XP. > > So, we come back to the original question: how to send an > IRP_MN_REMOVE_DEVICE event? Maybe this helps? man camcontrol ? : cmd Allows the user to send an arbitrary SCSI CDB to any device. The cmd function requires the -c argument to specify the CDB. Other arguments are optional, depending on the command type. The command and data specification syntax is documented in cam_cdbparse(3). NOTE: If the CDB specified causes data to be transfered to or from the SCSI device in question, you MUST specify either -i or -o. -c cmd [args] This specifies the SCSI CDB. CDBs may be 6, 10, 12 or 16 bytes. -i len fmt This specifies the amount of data to read, and how it should be displayed. If the format is `-', len bytes of data will be read from the device and written to stan- dard output. -o len fmt [args] This specifies the amount of data to be written to a device, and the data that is to be written. If the format is `-', len bytes of data will be read from standard input and written to the device. From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 14 15:13:05 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E6A7A16A419 for ; Tue, 14 Aug 2007 15:13:05 +0000 (UTC) (envelope-from ticso@cicely12.cicely.de) Received: from raven.bwct.de (raven.bwct.de [85.159.14.73]) by mx1.freebsd.org (Postfix) with ESMTP id 7CE1C13C480 for ; Tue, 14 Aug 2007 15:13:05 +0000 (UTC) (envelope-from ticso@cicely12.cicely.de) Received: from cicely5.cicely.de ([10.1.1.7]) by raven.bwct.de (8.13.4/8.13.4) with ESMTP id l7EElFdh062845; Tue, 14 Aug 2007 16:47:15 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (cicely12.cicely.de [10.1.1.14]) by cicely5.cicely.de (8.13.4/8.13.4) with ESMTP id l7EEl6Zc093205 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 14 Aug 2007 16:47:07 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (localhost [127.0.0.1]) by cicely12.cicely.de (8.13.4/8.13.3) with ESMTP id l7EEl6PB076989; Tue, 14 Aug 2007 16:47:06 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: (from ticso@localhost) by cicely12.cicely.de (8.13.4/8.13.3/Submit) id l7EEl5wg076988; Tue, 14 Aug 2007 16:47:05 +0200 (CEST) (envelope-from ticso) Date: Tue, 14 Aug 2007 16:47:05 +0200 From: Bernd Walter To: Sven Hazejager Message-ID: <20070814144705.GN72415@cicely12.cicely.de> References: <07081411265549.-1077952816@somehost.domainz.com> <20070814030833.49a7a030@soralx> <20070814041736.4c16f41e@soralx> <07081416114656.-1077948560@somehost.domainz.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <07081416114656.-1077948560@somehost.domainz.com> X-Operating-System: FreeBSD cicely12.cicely.de 5.4-STABLE alpha User-Agent: Mutt/1.5.9i X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED=-1.8, BAYES_00=-2.599 autolearn=ham version=3.1.7 X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on cicely12.cicely.de Cc: freebsd-hackers@freebsd.org Subject: Re: How to stop attached USB device / send IRP_MN_REMOVE_DEVICE? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ticso@cicely.de List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Aug 2007 15:13:06 -0000 On Tue, Aug 14, 2007 at 04:14:06PM +0200, Sven Hazejager wrote: > >>>So, the question really is: how to send a IRP_MN_REMOVE_DEVICE > >>>command? > >> > >>`camcontrol da? stop` seemed to do the trick before (5.2.1-R, AFAIR), > >>but now I'm not sure (looks like it doesn't) > > > >sorry, I meant to say that `camcontrol da? stop` does not power down > >the device anymore; nonetheless, it is probably safe to disconnect it > > No, camcontrol does not support this over USB. Windows XP demonstrates it > is technically possible, and I do not believe it is fully safe to > disconnect the drive (even when unmounted), as the drive then is not able > to park its heads, which it DOES do under XP. Why do you think it is not safe? You either don't physically move the drive when disconneting it or it's not a mechanical drive at all. > So, we come back to the original question: how to send an > IRP_MN_REMOVE_DEVICE event? You don't have to, there is nothing more than not using the device you are about to remove. This is different in windows where every device available is automatically mounted, polled for media change, or whatever. -- B.Walter http://www.bwct.de http://www.fizon.de bernd@bwct.de info@bwct.de support@fizon.de From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 14 16:09:17 2007 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E63C216A419 for ; Tue, 14 Aug 2007 16:09:17 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (lurza.secnetix.de [IPv6:2001:1b20:1:3::1]) by mx1.freebsd.org (Postfix) with ESMTP id 69F5513C46C for ; Tue, 14 Aug 2007 16:09:17 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (idqfmh@localhost [127.0.0.1]) by lurza.secnetix.de (8.13.4/8.13.4) with ESMTP id l7EG9As8094433; Tue, 14 Aug 2007 18:09:16 +0200 (CEST) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.13.4/8.13.1/Submit) id l7EG9A69094432; Tue, 14 Aug 2007 18:09:10 +0200 (CEST) (envelope-from olli) Date: Tue, 14 Aug 2007 18:09:10 +0200 (CEST) Message-Id: <200708141609.l7EG9A69094432@lurza.secnetix.de> From: Oliver Fromme To: freebsd-hackers@FreeBSD.ORG, sven-freebsd@hazejager.nl In-Reply-To: <07081416114656.-1077948560@somehost.domainz.com> X-Newsgroups: list.freebsd-hackers User-Agent: tin/1.8.2-20060425 ("Shillay") (UNIX) (FreeBSD/4.11-STABLE (i386)) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.1.2 (lurza.secnetix.de [127.0.0.1]); Tue, 14 Aug 2007 18:09:16 +0200 (CEST) Cc: Subject: Re: How to stop attached USB device / send IRP_MN_REMOVE_DEVICE? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-hackers@FreeBSD.ORG, sven-freebsd@hazejager.nl List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Aug 2007 16:09:18 -0000 Sven Hazejager wrote: > No, camcontrol does not support this over USB. Windows XP demonstrates it > is technically possible, and I do not believe it is fully safe to > disconnect the drive (even when unmounted), as the drive then is not able > to park its heads, which it DOES do under XP. Every hard disk parks its head when power is switched off. Last time I saw a hard disk which required a command to park its heads was about 20 years ago on a DOS machine. Best regards Oliver -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M. Handelsregister: Registergericht Muenchen, HRA 74606, Geschäftsfuehrung: secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün- chen, HRB 125758, Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd "With sufficient thrust, pigs fly just fine. However, this is not necessarily a good idea. It is hard to be sure where they are going to land, and it could be dangerous sitting under them as they fly overhead." -- RFC 1925 From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 14 16:51:53 2007 Return-Path: Delivered-To: FreeBSD-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C30BD16A420 for ; Tue, 14 Aug 2007 16:51:53 +0000 (UTC) (envelope-from david@catwhisker.org) Received: from bunrab.catwhisker.org (adsl-63-193-123-122.dsl.snfc21.pacbell.net [63.193.123.122]) by mx1.freebsd.org (Postfix) with ESMTP id 9F3D313C46C for ; Tue, 14 Aug 2007 16:51:53 +0000 (UTC) (envelope-from david@catwhisker.org) Received: from bunrab.catwhisker.org (localhost [127.0.0.1]) by bunrab.catwhisker.org (8.13.3/8.13.3) with ESMTP id l7EGprQG005348 for ; Tue, 14 Aug 2007 09:51:53 -0700 (PDT) (envelope-from david@bunrab.catwhisker.org) Received: (from david@localhost) by bunrab.catwhisker.org (8.13.3/8.13.1/Submit) id l7EGprth005347 for FreeBSD-hackers@freebsd.org; Tue, 14 Aug 2007 09:51:53 -0700 (PDT) (envelope-from david) Date: Tue, 14 Aug 2007 09:51:53 -0700 From: David Wolfskill To: FreeBSD-hackers@freebsd.org Message-ID: <20070814165153.GB1181@bunrab.catwhisker.org> Mail-Followup-To: David Wolfskill , FreeBSD-hackers@freebsd.org References: <46BC49DB.8060509@latnet.lv> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="BwCQnh7xodEAoBMC" Content-Disposition: inline In-Reply-To: <46BC49DB.8060509@latnet.lv> User-Agent: Mutt/1.4.2.1i Cc: Subject: Re: [PATCH] newsyslog - don't compress first log file 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, 14 Aug 2007 16:51:53 -0000 --BwCQnh7xodEAoBMC Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Aug 10, 2007 at 02:19:55PM +0300, Artis Caune wrote: > How about aditional flag ("X") to newsyslog, which don't compress first= =20 > log file? > This is useful for apache. >... After a bit of discussion here, and using a patch to newsyslog.c supplied by Dirk GOUDERS (which I tested), I've filed a PR with the patches which may be accessed at . I encourage folks interested in the issue to follow up to the PR. I'm confident that the supplied patches (against newsyslog.c rev. 1.107) will address the above-cited issue. Peace, david --=20 David H. Wolfskill david@catwhisker.org Anything and everything is a (potential) cat toy. See http://www.catwhisker.org/~david/publickey.gpg for my public key. --BwCQnh7xodEAoBMC Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (FreeBSD) iEYEARECAAYFAkbB3agACgkQmprOCmdXAD13qwCeNQPzaoK3NLwUNEPNLNQph8ND bKYAn0rgZWX/JDf2QZj7Iq0Cg9tSQqF2 =TZVI -----END PGP SIGNATURE----- --BwCQnh7xodEAoBMC-- From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 14 19:49:53 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 687AE16A419 for ; Tue, 14 Aug 2007 19:49:53 +0000 (UTC) (envelope-from davej@codemonkey.org.uk) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by mx1.freebsd.org (Postfix) with ESMTP id 32BB013C4B5 for ; Tue, 14 Aug 2007 19:49:53 +0000 (UTC) (envelope-from davej@codemonkey.org.uk) Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.1/8.13.1) with ESMTP id l7EJnq4x017134 for ; Tue, 14 Aug 2007 15:49:52 -0400 Received: from gelk.kernelslacker.org (vpn-248-3.boston.redhat.com [10.13.248.3]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l7EJnpDF012374 for ; Tue, 14 Aug 2007 15:49:51 -0400 Received: from gelk.kernelslacker.org (localhost.localdomain [127.0.0.1]) by gelk.kernelslacker.org (8.14.1/8.13.8) with ESMTP id l7EJnpPR009807 for ; Tue, 14 Aug 2007 15:49:51 -0400 Received: (from davej@localhost) by gelk.kernelslacker.org (8.14.1/8.14.1/Submit) id l7EJnoLe009806 for freebsd-hackers@freebsd.org; Tue, 14 Aug 2007 15:49:50 -0400 X-Authentication-Warning: gelk.kernelslacker.org: davej set sender to davej@codemonkey.org.uk using -f Date: Tue, 14 Aug 2007 15:49:50 -0400 From: Dave Jones To: freebsd-hackers@freebsd.org Message-ID: <20070814194950.GA19943@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.14 (2007-02-12) X-Mailman-Approved-At: Tue, 14 Aug 2007 20:09:59 +0000 Subject: memset bugs. 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, 14 Aug 2007 19:49:53 -0000 A grep I crafted to pick up on some common bugs happened upon a copy of the FreeBSD CVS tree that I happened to have handy and found the bugs below where the 2nd & 3rd arguments to memset calls have been swapped. I'm unfamiliar with how patch submission works in FreeBSD, but hopefully someone can eyeball this for correctness and get it committed, or forward it on to the right people. Thanks, Dave --- src/sys/netinet/sctp_output.c~ 2007-08-14 15:44:11.000000000 -0400 +++ src/sys/netinet/sctp_output.c 2007-08-14 15:44:27.000000000 -0400 @@ -6331,7 +6331,7 @@ out_gu: rcv_flags |= SCTP_DATA_UNORDERED; } /* clear out the chunk before setting up */ - memset(chk, sizeof(*chk), 0); + memset(chk, 0, sizeof(*chk)); chk->rec.data.rcv_flags = rcv_flags; if (SCTP_BUF_IS_EXTENDED(sp->data)) { chk->copy_by_ref = 1; --- src/usr.sbin/nscd/agents/services.c~ 2007-08-14 15:44:33.000000000 -0400 +++ src/usr.sbin/nscd/agents/services.c 2007-08-14 15:44:41.000000000 -0400 @@ -171,7 +171,7 @@ services_lookup_func(const char *key, si if (size > 0) { proto = (char *)malloc(size + 1); assert(proto != NULL); - memset(proto, size + 1, 0); + memset(proto, 0, size + 1); memcpy(proto, key + sizeof(enum nss_lookup_type) + sizeof(int), size); } --- src/usr.sbin/cached/agents/services.c~ 2007-08-14 15:44:45.000000000 -0400 +++ src/usr.sbin/cached/agents/services.c 2007-08-14 15:44:52.000000000 -0400 @@ -171,7 +171,7 @@ services_lookup_func(const char *key, si if (size > 0) { proto = (char *)malloc(size + 1); assert(proto != NULL); - memset(proto, size + 1, 0); + memset(proto, 0, size + 1); memcpy(proto, key + sizeof(enum nss_lookup_type) + sizeof(int), size); } --- src/contrib/gdb/gdb/std-regs.c~ 2007-08-14 15:44:56.000000000 -0400 +++ src/contrib/gdb/gdb/std-regs.c 2007-08-14 15:45:22.000000000 -0400 @@ -61,7 +61,7 @@ value_of_builtin_frame_reg (struct frame val = allocate_value (builtin_type_frame_reg); VALUE_LVAL (val) = not_lval; buf = VALUE_CONTENTS_RAW (val); - memset (buf, TYPE_LENGTH (VALUE_TYPE (val)), 0); + memset (buf, 0, TYPE_LENGTH (VALUE_TYPE (val))); /* frame.base. */ if (frame != NULL) ADDRESS_TO_POINTER (builtin_type_void_data_ptr, buf, @@ -87,7 +87,7 @@ value_of_builtin_frame_fp_reg (struct fr struct value *val = allocate_value (builtin_type_void_data_ptr); char *buf = VALUE_CONTENTS_RAW (val); if (frame == NULL) - memset (buf, TYPE_LENGTH (VALUE_TYPE (val)), 0); + memset (buf, 0, TYPE_LENGTH (VALUE_TYPE (val))); else ADDRESS_TO_POINTER (builtin_type_void_data_ptr, buf, get_frame_base_address (frame)); @@ -105,7 +105,7 @@ value_of_builtin_frame_pc_reg (struct fr struct value *val = allocate_value (builtin_type_void_data_ptr); char *buf = VALUE_CONTENTS_RAW (val); if (frame == NULL) - memset (buf, TYPE_LENGTH (VALUE_TYPE (val)), 0); + memset (buf, 0, TYPE_LENGTH (VALUE_TYPE (val))); else ADDRESS_TO_POINTER (builtin_type_void_data_ptr, buf, get_frame_pc (frame)); --- src/contrib/gdb/gdb/remote.c~ 2007-08-14 15:45:25.000000000 -0400 +++ src/contrib/gdb/gdb/remote.c 2007-08-14 15:45:37.000000000 -0400 @@ -3463,7 +3463,7 @@ remote_store_registers (int regnum) { int i; regs = alloca (rs->sizeof_g_packet); - memset (regs, rs->sizeof_g_packet, 0); + memset (regs, 0, rs->sizeof_g_packet); for (i = 0; i < NUM_REGS + NUM_PSEUDO_REGS; i++) { struct packet_reg *r = &rs->regs[i]; -- http://www.codemonkey.org.uk From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 14 21:56:33 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 398C316A417 for ; Tue, 14 Aug 2007 21:56:33 +0000 (UTC) (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 ED15713C45D for ; Tue, 14 Aug 2007 21:56:32 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (localhost [127.0.0.1]) by spam.des.no (Postfix) with ESMTP id 74F8220B0; Tue, 14 Aug 2007 23:56:28 +0200 (CEST) X-Spam-Tests: AWL X-Spam-Learn: disabled X-Spam-Score: 0.0/3.0 X-Spam-Checker-Version: SpamAssassin 3.2.1 (2007-05-02) on tim.des.no Received: from ds4.des.no (des.no [80.203.243.180]) by smtp.des.no (Postfix) with ESMTP id E3556208A; Tue, 14 Aug 2007 23:56:27 +0200 (CEST) Received: by ds4.des.no (Postfix, from userid 1001) id BE4418444F; Tue, 14 Aug 2007 23:56:27 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Sven Hazejager References: <07081411265549.-1077952816@somehost.domainz.com> <20070814030833.49a7a030@soralx> <20070814041736.4c16f41e@soralx> <07081416114656.-1077948560@somehost.domainz.com> Date: Tue, 14 Aug 2007 23:56:27 +0200 In-Reply-To: <07081416114656.-1077948560@somehost.domainz.com> (Sven Hazejager's message of "Tue\, 14 Aug 2007 16\:14\:06 +0200 \(CEST\)") Message-ID: <86r6m5231w.fsf@ds4.des.no> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.1 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org Subject: Re: How to stop attached USB device / send IRP_MN_REMOVE_DEVICE? 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, 14 Aug 2007 21:56:33 -0000 Sven Hazejager writes: > No, camcontrol does not support this over USB. Windows XP demonstrates > it is technically possible, and I do not believe it is fully safe to > disconnect the drive (even when unmounted), as the drive then is not > able to park its heads, which it DOES do under XP. All modern disks (since at least the early 1990s) automatically park their heads when they lose power. There is no need to do it in software. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 14 22:01:41 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 28EBC16A419 for ; Tue, 14 Aug 2007 22:01:41 +0000 (UTC) (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 A498813C483 for ; Tue, 14 Aug 2007 22:01:40 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (localhost [127.0.0.1]) by spam.des.no (Postfix) with ESMTP id 73E6F20B2; Wed, 15 Aug 2007 00:01:34 +0200 (CEST) X-Spam-Tests: AWL X-Spam-Learn: disabled X-Spam-Score: 0.0/3.0 X-Spam-Checker-Version: SpamAssassin 3.2.1 (2007-05-02) on tim.des.no Received: from ds4.des.no (des.no [80.203.243.180]) by smtp.des.no (Postfix) with ESMTP id B2895208A; Wed, 15 Aug 2007 00:01:33 +0200 (CEST) Received: by ds4.des.no (Postfix, from userid 1001) id 9BCB084437; Wed, 15 Aug 2007 00:01:33 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Dave Jones References: <20070814194950.GA19943@redhat.com> Date: Wed, 15 Aug 2007 00:01:33 +0200 In-Reply-To: <20070814194950.GA19943@redhat.com> (Dave Jones's message of "Tue\, 14 Aug 2007 15\:49\:50 -0400") Message-ID: <86mywt22te.fsf@ds4.des.no> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.1 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: bushman@freebsd.org, freebsd-hackers@freebsd.org, rrs@freebsd.org Subject: Re: memset bugs. 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, 14 Aug 2007 22:01:41 -0000 Dave Jones writes: > A grep I crafted to pick up on some common bugs happened upon > a copy of the FreeBSD CVS tree that I happened to have handy > and found the bugs below where the 2nd & 3rd arguments to > memset calls have been swapped. > [...] > --- src/sys/netinet/sctp_output.c~ 2007-08-14 15:44:11.000000000 -0400 > +++ src/sys/netinet/sctp_output.c 2007-08-14 15:44:27.000000000 -0400 > @@ -6331,7 +6331,7 @@ out_gu: > rcv_flags |=3D SCTP_DATA_UNORDERED; > } > /* clear out the chunk before setting up */ > - memset(chk, sizeof(*chk), 0); > + memset(chk, 0, sizeof(*chk)); > chk->rec.data.rcv_flags =3D rcv_flags; > if (SCTP_BUF_IS_EXTENDED(sp->data)) { > chk->copy_by_ref =3D 1; Pointy hat to rrs@. > --- src/usr.sbin/nscd/agents/services.c~ 2007-08-14 15:44:33.000000000 -0= 400 > +++ src/usr.sbin/nscd/agents/services.c 2007-08-14 15:44:41.000000000 -04= 00 > @@ -171,7 +171,7 @@ services_lookup_func(const char *key, si > if (size > 0) { > proto =3D (char *)malloc(size + 1); > assert(proto !=3D NULL); > - memset(proto, size + 1, 0); > + memset(proto, 0, size + 1); > memcpy(proto, key + sizeof(enum nss_lookup_type) + > sizeof(int), size); > } > --- src/usr.sbin/cached/agents/services.c~ 2007-08-14 15:44:45.000000000 = -0400 > +++ src/usr.sbin/cached/agents/services.c 2007-08-14 15:44:52.000000000 -= 0400 > @@ -171,7 +171,7 @@ services_lookup_func(const char *key, si > if (size > 0) { > proto =3D (char *)malloc(size + 1); > assert(proto !=3D NULL); > - memset(proto, size + 1, 0); > + memset(proto, 0, size + 1); > memcpy(proto, key + sizeof(enum nss_lookup_type) + > sizeof(int), size); > } These two are actually the same file - cached is in the process of being renamed to nscd. Pointy hat to bushman@. > --- src/contrib/gdb/gdb/std-regs.c~ 2007-08-14 15:44:56.000000000 -0400 > +++ src/contrib/gdb/gdb/std-regs.c 2007-08-14 15:45:22.000000000 -0400 > @@ -61,7 +61,7 @@ value_of_builtin_frame_reg (struct frame > val =3D allocate_value (builtin_type_frame_reg); > VALUE_LVAL (val) =3D not_lval; > buf =3D VALUE_CONTENTS_RAW (val); > - memset (buf, TYPE_LENGTH (VALUE_TYPE (val)), 0); > + memset (buf, 0, TYPE_LENGTH (VALUE_TYPE (val))); > /* frame.base. */ > if (frame !=3D NULL) > ADDRESS_TO_POINTER (builtin_type_void_data_ptr, buf, > @@ -87,7 +87,7 @@ value_of_builtin_frame_fp_reg (struct fr > struct value *val =3D allocate_value (builtin_type_void_data_ptr); > char *buf =3D VALUE_CONTENTS_RAW (val); > if (frame =3D=3D NULL) > - memset (buf, TYPE_LENGTH (VALUE_TYPE (val)), 0); > + memset (buf, 0, TYPE_LENGTH (VALUE_TYPE (val))); > else > ADDRESS_TO_POINTER (builtin_type_void_data_ptr, buf, > get_frame_base_address (frame)); > @@ -105,7 +105,7 @@ value_of_builtin_frame_pc_reg (struct fr > struct value *val =3D allocate_value (builtin_type_void_data_ptr); > char *buf =3D VALUE_CONTENTS_RAW (val); > if (frame =3D=3D NULL) > - memset (buf, TYPE_LENGTH (VALUE_TYPE (val)), 0); > + memset (buf, 0, TYPE_LENGTH (VALUE_TYPE (val))); > else > ADDRESS_TO_POINTER (builtin_type_void_data_ptr, buf, > get_frame_pc (frame)); > --- src/contrib/gdb/gdb/remote.c~ 2007-08-14 15:45:25.000000000 -0400 > +++ src/contrib/gdb/gdb/remote.c 2007-08-14 15:45:37.000000000 -0400 > @@ -3463,7 +3463,7 @@ remote_store_registers (int regnum) > { > int i; > regs =3D alloca (rs->sizeof_g_packet); > - memset (regs, rs->sizeof_g_packet, 0); > + memset (regs, 0, rs->sizeof_g_packet); > for (i =3D 0; i < NUM_REGS + NUM_PSEUDO_REGS; i++) > { > struct packet_reg *r =3D &rs->regs[i]; These should go upstream to the gdb maintainers (bug-gdb@gnu.org). DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 14 22:52:11 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A04C116A417; Tue, 14 Aug 2007 22:52:11 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from sj-iport-1.cisco.com (sj-iport-1-in.cisco.com [171.71.176.70]) by mx1.freebsd.org (Postfix) with ESMTP id 78A8213C45D; Tue, 14 Aug 2007 22:52:11 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from sj-dkim-4.cisco.com ([171.71.179.196]) by sj-iport-1.cisco.com with ESMTP; 14 Aug 2007 15:23:42 -0700 X-IronPort-AV: i="4.19,261,1183359600"; d="scan'208"; a="13464393:sNHT26084082" Received: from sj-core-5.cisco.com (sj-core-5.cisco.com [171.71.177.238]) by sj-dkim-4.cisco.com (8.12.11/8.12.11) with ESMTP id l7EMNfnr015302; Tue, 14 Aug 2007 15:23:41 -0700 Received: from xbh-sjc-221.amer.cisco.com (xbh-sjc-221.cisco.com [128.107.191.63]) by sj-core-5.cisco.com (8.12.10/8.12.6) with ESMTP id l7EMNdiX024675; Tue, 14 Aug 2007 22:23:40 GMT Received: from xfe-sjc-211.amer.cisco.com ([171.70.151.174]) by xbh-sjc-221.amer.cisco.com with Microsoft SMTPSVC(6.0.3790.1830); Tue, 14 Aug 2007 15:23:30 -0700 Received: from [127.0.0.1] ([171.68.225.134]) by xfe-sjc-211.amer.cisco.com with Microsoft SMTPSVC(6.0.3790.1830); Tue, 14 Aug 2007 15:23:30 -0700 Message-ID: <46C22B79.5010306@cisco.com> Date: Tue, 14 Aug 2007 18:23:53 -0400 From: Randall Stewart User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.13) Gecko/20070601 X-Accept-Language: en-us, en MIME-Version: 1.0 To: =?ISO-8859-1?Q?Dag-Erling_Sm=F8rgrav?= References: <20070814194950.GA19943@redhat.com> <86mywt22te.fsf@ds4.des.no> In-Reply-To: <86mywt22te.fsf@ds4.des.no> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-OriginalArrivalTime: 14 Aug 2007 22:23:30.0481 (UTC) FILETIME=[BE390210:01C7DEC1] DKIM-Signature: v=0.5; a=rsa-sha256; q=dns/txt; l=4285; t=1187130221; x=1187994221; c=relaxed/simple; s=sjdkim4002; h=Content-Type:From:Subject:Content-Transfer-Encoding:MIME-Version; d=cisco.com; i=rrs@cisco.com; z=From:=20Randall=20Stewart=20 |Subject:=20Re=3A=20memset=20bugs. |Sender:=20; bh=kbv1LUgQvomGnOGuvWePTCVHr0gOtDw6nISlUzEWaOU=; b=VfMSZtamkSI4dkNdsr6is3irYyAXBZZ4YSld074gtGLGV6QdAf5yl3v6f2eAwCtA2ca2+snj 4dA6GzeeXWxeqERxO9d35267TJmiTbo+L/4qgVuO4wVM7PaafjG9S/zr; Authentication-Results: sj-dkim-4; header.From=rrs@cisco.com; dkim=pass (sig from cisco.com/sjdkim4002 verified; ); X-Mailman-Approved-At: Wed, 15 Aug 2007 00:48:06 +0000 Cc: bushman@freebsd.org, Dave Jones , rrs@freebsd.org, freebsd-hackers@freebsd.org Subject: Re: memset bugs. 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, 14 Aug 2007 22:52:11 -0000 Thanks for the pointer... Julian and Sam also sent this to me on the SCTP side. The local CVS repository on lakerest.net now has this fix in it.. and others... I have added this to the queue to go in to patchset 15.. (I am still waiting on re for patchset 14). R Dag-Erling Smørgrav wrote: > Dave Jones writes: > >>A grep I crafted to pick up on some common bugs happened upon >>a copy of the FreeBSD CVS tree that I happened to have handy >>and found the bugs below where the 2nd & 3rd arguments to >>memset calls have been swapped. >>[...] >>--- src/sys/netinet/sctp_output.c~ 2007-08-14 15:44:11.000000000 -0400 >>+++ src/sys/netinet/sctp_output.c 2007-08-14 15:44:27.000000000 -0400 >>@@ -6331,7 +6331,7 @@ out_gu: >> rcv_flags |= SCTP_DATA_UNORDERED; >> } >> /* clear out the chunk before setting up */ >>- memset(chk, sizeof(*chk), 0); >>+ memset(chk, 0, sizeof(*chk)); >> chk->rec.data.rcv_flags = rcv_flags; >> if (SCTP_BUF_IS_EXTENDED(sp->data)) { >> chk->copy_by_ref = 1; > > > Pointy hat to rrs@. > > >>--- src/usr.sbin/nscd/agents/services.c~ 2007-08-14 15:44:33.000000000 -0400 >>+++ src/usr.sbin/nscd/agents/services.c 2007-08-14 15:44:41.000000000 -0400 >>@@ -171,7 +171,7 @@ services_lookup_func(const char *key, si >> if (size > 0) { >> proto = (char *)malloc(size + 1); >> assert(proto != NULL); >>- memset(proto, size + 1, 0); >>+ memset(proto, 0, size + 1); >> memcpy(proto, key + sizeof(enum nss_lookup_type) + >> sizeof(int), size); >> } >>--- src/usr.sbin/cached/agents/services.c~ 2007-08-14 15:44:45.000000000 -0400 >>+++ src/usr.sbin/cached/agents/services.c 2007-08-14 15:44:52.000000000 -0400 >>@@ -171,7 +171,7 @@ services_lookup_func(const char *key, si >> if (size > 0) { >> proto = (char *)malloc(size + 1); >> assert(proto != NULL); >>- memset(proto, size + 1, 0); >>+ memset(proto, 0, size + 1); >> memcpy(proto, key + sizeof(enum nss_lookup_type) + >> sizeof(int), size); >> } > > > These two are actually the same file - cached is in the process of being > renamed to nscd. Pointy hat to bushman@. > > > >>--- src/contrib/gdb/gdb/std-regs.c~ 2007-08-14 15:44:56.000000000 -0400 >>+++ src/contrib/gdb/gdb/std-regs.c 2007-08-14 15:45:22.000000000 -0400 >>@@ -61,7 +61,7 @@ value_of_builtin_frame_reg (struct frame >> val = allocate_value (builtin_type_frame_reg); >> VALUE_LVAL (val) = not_lval; >> buf = VALUE_CONTENTS_RAW (val); >>- memset (buf, TYPE_LENGTH (VALUE_TYPE (val)), 0); >>+ memset (buf, 0, TYPE_LENGTH (VALUE_TYPE (val))); >> /* frame.base. */ >> if (frame != NULL) >> ADDRESS_TO_POINTER (builtin_type_void_data_ptr, buf, >>@@ -87,7 +87,7 @@ value_of_builtin_frame_fp_reg (struct fr >> struct value *val = allocate_value (builtin_type_void_data_ptr); >> char *buf = VALUE_CONTENTS_RAW (val); >> if (frame == NULL) >>- memset (buf, TYPE_LENGTH (VALUE_TYPE (val)), 0); >>+ memset (buf, 0, TYPE_LENGTH (VALUE_TYPE (val))); >> else >> ADDRESS_TO_POINTER (builtin_type_void_data_ptr, buf, >> get_frame_base_address (frame)); >>@@ -105,7 +105,7 @@ value_of_builtin_frame_pc_reg (struct fr >> struct value *val = allocate_value (builtin_type_void_data_ptr); >> char *buf = VALUE_CONTENTS_RAW (val); >> if (frame == NULL) >>- memset (buf, TYPE_LENGTH (VALUE_TYPE (val)), 0); >>+ memset (buf, 0, TYPE_LENGTH (VALUE_TYPE (val))); >> else >> ADDRESS_TO_POINTER (builtin_type_void_data_ptr, buf, >> get_frame_pc (frame)); >>--- src/contrib/gdb/gdb/remote.c~ 2007-08-14 15:45:25.000000000 -0400 >>+++ src/contrib/gdb/gdb/remote.c 2007-08-14 15:45:37.000000000 -0400 >>@@ -3463,7 +3463,7 @@ remote_store_registers (int regnum) >> { >> int i; >> regs = alloca (rs->sizeof_g_packet); >>- memset (regs, rs->sizeof_g_packet, 0); >>+ memset (regs, 0, rs->sizeof_g_packet); >> for (i = 0; i < NUM_REGS + NUM_PSEUDO_REGS; i++) >> { >> struct packet_reg *r = &rs->regs[i]; > > > These should go upstream to the gdb maintainers (bug-gdb@gnu.org). > > DES -- Randall Stewart NSSTG - Cisco Systems Inc. 803-345-0369 803-317-4952 (cell) From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 14 23:35:48 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B35BE16A418 for ; Tue, 14 Aug 2007 23:35:48 +0000 (UTC) (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 9A70E13C494 for ; Tue, 14 Aug 2007 23:35:48 +0000 (UTC) (envelope-from linimon@lonesome.com) Received: by mail.soaustin.net (Postfix, from userid 502) id 05732E90; Tue, 14 Aug 2007 18:14:33 -0500 (CDT) Date: Tue, 14 Aug 2007 18:14:33 -0500 To: Dave Jones Message-ID: <20070814231433.GB26661@soaustin.net> References: <20070814194950.GA19943@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070814194950.GA19943@redhat.com> User-Agent: Mutt/1.5.9i From: linimon@lonesome.com (Mark Linimon) X-Mailman-Approved-At: Wed, 15 Aug 2007 00:48:06 +0000 Cc: freebsd-hackers@freebsd.org Subject: Re: memset bugs. 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, 14 Aug 2007 23:35:48 -0000 On Tue, Aug 14, 2007 at 03:49:50PM -0400, Dave Jones wrote: > I'm unfamiliar with how patch submission works in FreeBSD, > but hopefully someone can eyeball this for correctness > and get it committed, or forward it on to the right people. The way to make sure your patch doesn't just get lost in the mailing list noise is to send a Problem Report (PR). There's no guarantee that it will be handled promptly, however, as we have a large backlog (more people willing to report bugs than to do some of the dirty work :-/ Many of the developers are already stretched thin.) The documentation is available at http://www.freebsd.org/doc/en_US.ISO8859-1/articles/problem-reports/. If anything is unclear, you can email bugmeister@FreeBSD.org and we'll try to clarify things. mcl From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 15 06:53:14 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0F84416A419 for ; Wed, 15 Aug 2007 06:53:14 +0000 (UTC) (envelope-from sugarfreemonkey@gmail.com) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.188]) by mx1.freebsd.org (Postfix) with ESMTP id 98BED13C4A5 for ; Wed, 15 Aug 2007 06:53:13 +0000 (UTC) (envelope-from sugarfreemonkey@gmail.com) Received: by nf-out-0910.google.com with SMTP id b2so852463nfb for ; Tue, 14 Aug 2007 23:53:12 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type; b=ZGFX25puLqCFqfizhS16aFPFTZ3Zthk0JxjKSokLRM/qnsVGMNhAJeT++LdutgvjxIRzEXg1PLuIGN3T5fQOrAHGftOMxr0AWrtIYGilbawBFsibclWlnfLz98dD4k9WP0nyZax15DLBjxSMhh2f0EHjL+hYB1m40gVIa7sJTlg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type; b=WEUdNsSeFJbnl/OzcVdl74nkPL/mDntNOpU82dMQwEV5Adz1AYMrODNNUAqJpbOX/JSIHkGBW5ro1tdw7/3rOq+wgw0wFr/ncnfUM5b1qw0vsMQoFWaKl0LhVzYu6E5Ne1ggO7F63amqNvRkOxLz3cdRlPs0fYcsLKDQ/eDTBCk= Received: by 10.78.168.1 with SMTP id q1mr41650hue.1187159276317; Tue, 14 Aug 2007 23:27:56 -0700 (PDT) Received: by 10.78.171.12 with HTTP; Tue, 14 Aug 2007 23:27:56 -0700 (PDT) Message-ID: <1fc8a2a60708142327p3f9ff079l345d47f9ceb6f489@mail.gmail.com> Date: Wed, 15 Aug 2007 14:27:56 +0800 From: "Nex Mon" To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: questions on nonsleepable lock 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, 15 Aug 2007 06:53:14 -0000 Hello All, Can someone point me out or explain the technical details of this kernel panic: sleeping thread (tid 100093, pid 2676) owns nonsleepable lock panic: sleeping thread -- -- Is this caused by incorrect use of mutex or semaphores? Is this related to kernel scheduling? Can this be addressed at the user process? I've tried looking throught the freebsd mailing list archives and documentations but coudn't find a real good answer to solve or prevent this problem. Im using freebsd 6.1 with SMP enabled on a Xeon dual core hardware. The system has several busy applications running, But the load average is very minimal, around 8.55 and no process hogging the CPU. So I expect my system should be running smoothly without in problem. I appreciate any help. Thanks a lot, Mon From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 15 08:19:27 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0EEAB16A4AB for ; Wed, 15 Aug 2007 08:19:27 +0000 (UTC) (envelope-from corecode@fs.ei.tum.de) Received: from stella.fs.ei.tum.de (stella.fs.ei.tum.de [IPv6:2001:4ca0:22ff:10::7]) by mx1.freebsd.org (Postfix) with ESMTP id 2626713C4A3 for ; Wed, 15 Aug 2007 08:19:25 +0000 (UTC) (envelope-from corecode@fs.ei.tum.de) Received: from localhost (localhost [127.0.0.1]) by localhost.fs.ei.tum.de (Postfix) with ESMTP id 84E43280E5; Wed, 15 Aug 2007 10:19:22 +0200 (CEST) X-Virus-Scanned: by amavisd-new at fs.ei.tum.de Received: from stella.fs.ei.tum.de ([127.0.0.1]) by localhost (stella.fs.ei.tum.de [127.0.0.1]) (amavisd-new, port 10024) with LMTP id o81wJkAxRmg4; Wed, 15 Aug 2007 10:19:22 +0200 (CEST) Received: from sweatshorts.home.corecode.ath.cx (85-218-3-9.dclient.lsne.ch [85.218.3.9]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by stella.fs.ei.tum.de (Postfix) with ESMTP id 26296280D5; Wed, 15 Aug 2007 10:19:22 +0200 (CEST) Message-ID: <46C2B709.20604@fs.ei.tum.de> Date: Wed, 15 Aug 2007 10:19:21 +0200 From: Simon 'corecode' Schubert User-Agent: Thunderbird 2.0.0.4 (X11/20070627) MIME-Version: 1.0 To: =?UTF-8?B?RGFnLUVybGluZyBTbcO4cmdyYXY=?= References: <07081411265549.-1077952816@somehost.domainz.com> <20070814030833.49a7a030@soralx> <20070814041736.4c16f41e@soralx> <07081416114656.-1077948560@somehost.domainz.com> <86r6m5231w.fsf@ds4.des.no> In-Reply-To: <86r6m5231w.fsf@ds4.des.no> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Cc: freebsd-hackers@freebsd.org, Sven Hazejager Subject: Re: How to stop attached USB device / send IRP_MN_REMOVE_DEVICE? 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, 15 Aug 2007 08:19:27 -0000 Dag-Erling Smørgrav wrote: > Sven Hazejager writes: >> No, camcontrol does not support this over USB. Windows XP demonstrates >> it is technically possible, and I do not believe it is fully safe to >> disconnect the drive (even when unmounted), as the drive then is not >> able to park its heads, which it DOES do under XP. > All modern disks (since at least the early 1990s) automatically park > their heads when they lose power. There is no need to do it in > software. So it seems that windows is switching off the power of the devices when you select "eject". I can see that some users might feel more comfortable with this behaviour. cheers simon -- Serve - BSD +++ RENT this banner advert +++ ASCII Ribbon /"\ Work - Mac +++ space for low €€€ NOW!1 +++ Campaign \ / Party Enjoy Relax | http://dragonflybsd.org Against HTML \ Dude 2c 2 the max ! http://golden-apple.biz Mail + News / \ From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 15 08:48:36 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DA7C116A41B for ; Wed, 15 Aug 2007 08:48:36 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from vlakno.cz (vlk.vlakno.cz [62.168.28.247]) by mx1.freebsd.org (Postfix) with ESMTP id 938C513C491 for ; Wed, 15 Aug 2007 08:48:36 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from localhost (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 95ED18C107E; Wed, 15 Aug 2007 10:28:58 +0200 (CEST) X-Virus-Scanned: amavisd-new at vlakno.cz Received: from vlakno.cz ([127.0.0.1]) by localhost (vlk.vlakno.cz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id WCaXx3WxU-RQ; Wed, 15 Aug 2007 10:28:57 +0200 (CEST) Received: from vlk.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id A25E28C0F54; Wed, 15 Aug 2007 10:28:57 +0200 (CEST) Received: (from rdivacky@localhost) by vlk.vlakno.cz (8.13.8/8.13.8/Submit) id l7F8SvM3059092; Wed, 15 Aug 2007 10:28:57 +0200 (CEST) (envelope-from rdivacky) Date: Wed, 15 Aug 2007 10:28:57 +0200 From: Roman Divacky To: Nex Mon Message-ID: <20070815082857.GA59064@freebsd.org> References: <1fc8a2a60708142327p3f9ff079l345d47f9ceb6f489@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1fc8a2a60708142327p3f9ff079l345d47f9ceb6f489@mail.gmail.com> User-Agent: Mutt/1.4.2.3i Cc: freebsd-hackers@freebsd.org Subject: Re: questions on nonsleepable lock 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, 15 Aug 2007 08:48:36 -0000 On Wed, Aug 15, 2007 at 02:27:56PM +0800, Nex Mon wrote: > Hello All, > > Can someone point me out or explain the technical details of this kernel > panic: > > sleeping thread (tid 100093, pid 2676) owns nonsleepable lock > panic: sleeping thread it just says that some thread owns a nonsleepable lock and went sleeping. are you using WITNESS? From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 15 09:10:50 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 88D6116A41A for ; Wed, 15 Aug 2007 09:10:50 +0000 (UTC) (envelope-from sugarfreemonkey@gmail.com) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.190]) by mx1.freebsd.org (Postfix) with ESMTP id 191C913C45A for ; Wed, 15 Aug 2007 09:10:49 +0000 (UTC) (envelope-from sugarfreemonkey@gmail.com) Received: by nf-out-0910.google.com with SMTP id b2so862647nfb for ; Wed, 15 Aug 2007 02:10:49 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=nqkwZ9qzQ9cGsKXzJVx6VJ1Cm7crjU3wCxdKXGheIaa06KA6LzjboViU0ZyEZ/L2Sp/ciEPGT8bJjT1PemxutaxgSQ5g/Py2gQ0IWYwDmYn/Nk4pb1AxPo+spZnjY7OyVVXJHOBaEkFSUVUxVjLsRXZHEOGP7dbyhI6iTC4AsA8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=qZVZ5DtSW1rjoULTuFCh7/dssypKhFbLnCSWaiuoS89AHgQLqucRzixDvL0ZBkQwsm9RIGZeWVEdGSl/Ch+zZsM9Pd7T9UBUgLoUW53gXuhuC9dQqmT+0tVGRgsx7n+OMNCAUBikCFKrbnG+Kx7TF+E0mBbqTiSvhxbl3kAIAU8= Received: by 10.78.201.10 with SMTP id y10mr91176huf.1187169048496; Wed, 15 Aug 2007 02:10:48 -0700 (PDT) Received: by 10.78.171.12 with HTTP; Wed, 15 Aug 2007 02:10:48 -0700 (PDT) Message-ID: <1fc8a2a60708150210i73f8cb9evd60747bc3fb314e3@mail.gmail.com> Date: Wed, 15 Aug 2007 17:10:48 +0800 From: "Nex Mon" To: "Roman Divacky" In-Reply-To: <20070815082857.GA59064@freebsd.org> MIME-Version: 1.0 References: <1fc8a2a60708142327p3f9ff079l345d47f9ceb6f489@mail.gmail.com> <20070815082857.GA59064@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-hackers@freebsd.org Subject: Re: questions on nonsleepable lock 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, 15 Aug 2007 09:10:50 -0000 thanks for your reply. i didn't use WITNESS. it is disabled. is their a list a list of which locks are sleepable and non-sleepable in FreeBSD6.2? is sleeping triggered by a call to "sleep", IO operation or a result of context switching by kernel? thanks On 8/15/07, Roman Divacky wrote: > > On Wed, Aug 15, 2007 at 02:27:56PM +0800, Nex Mon wrote: > > Hello All, > > > > Can someone point me out or explain the technical details of this kernel > > panic: > > > > sleeping thread (tid 100093, pid 2676) owns nonsleepable lock > > panic: sleeping thread > > it just says that some thread owns a nonsleepable lock and went sleeping. > are you using WITNESS? > From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 15 09:18:04 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 68F9E16A418 for ; Wed, 15 Aug 2007 09:18:04 +0000 (UTC) (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 23D8F13C457 for ; Wed, 15 Aug 2007 09:18:03 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (localhost [127.0.0.1]) by spam.des.no (Postfix) with ESMTP id 94C1120B0; Wed, 15 Aug 2007 11:18:00 +0200 (CEST) X-Spam-Tests: AWL X-Spam-Learn: disabled X-Spam-Score: 0.0/3.0 X-Spam-Checker-Version: SpamAssassin 3.2.1 (2007-05-02) on tim.des.no Received: from ds4.des.no (des.no [80.203.243.180]) by smtp.des.no (Postfix) with ESMTP id E82BC208A; Wed, 15 Aug 2007 11:17:59 +0200 (CEST) Received: by ds4.des.no (Postfix, from userid 1001) id BD3DB8444A; Wed, 15 Aug 2007 11:17:59 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Simon 'corecode' Schubert References: <07081411265549.-1077952816@somehost.domainz.com> <20070814030833.49a7a030@soralx> <20070814041736.4c16f41e@soralx> <07081416114656.-1077948560@somehost.domainz.com> <86r6m5231w.fsf@ds4.des.no> <46C2B709.20604@fs.ei.tum.de> Date: Wed, 15 Aug 2007 11:17:59 +0200 In-Reply-To: <46C2B709.20604@fs.ei.tum.de> (Simon Schubert's message of "Wed\, 15 Aug 2007 10\:19\:21 +0200") Message-ID: <86fy2lgnqw.fsf@ds4.des.no> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.1 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org, Sven Hazejager Subject: Re: How to stop attached USB device / send IRP_MN_REMOVE_DEVICE? 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, 15 Aug 2007 09:18:04 -0000 Simon 'corecode' Schubert writes: > Dag-Erling Sm=C3=B8rgrav writes: > > All modern disks (since at least the early 1990s) automatically park > > their heads when they lose power. There is no need to do it in > > software. > So it seems that windows is switching off the power of the devices > when you select "eject". I can see that some users might feel more > comfortable with this behaviour. Yes, if only because it saves power and reduces noise (for USB-attached mechanical drives at least). Note that this also requires logic in the enclosure to cut power to the drive when the device is detached; not all enclosures do this. Brand name drives (Maxtor OneTouch, Western Digital Passport etc.) usually do, while cheap DIY enclosures usually don't. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 15 06:44:17 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8239C16A419 for ; Wed, 15 Aug 2007 06:44:17 +0000 (UTC) (envelope-from vk7rb@internode.on.net) Received: from mail.internode.on.net (bld-mail07.adl2.internode.on.net [203.16.214.71]) by mx1.freebsd.org (Postfix) with ESMTP id BD75413C459 for ; Wed, 15 Aug 2007 06:44:16 +0000 (UTC) (envelope-from vk7rb@internode.on.net) Received: from acer.vk7rb.homeunix.org (unverified [121.44.218.91]) by mail.internode.on.net (SurgeMail 3.8f2) with ESMTP id 7698936-1849793 for ; Wed, 15 Aug 2007 15:59:11 +0930 (CST) Message-ID: <46C29D35.60301@internode.on.net> Date: Wed, 15 Aug 2007 16:29:09 +1000 From: Robert McKenzie User-Agent: Thunderbird 2.0.0.6 (X11/20070809) MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Wed, 15 Aug 2007 11:33:53 +0000 Subject: Australian cvs repository 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, 15 Aug 2007 06:44:17 -0000 Has anyone noted that the Australian cvs repository seems to be so hopelessly out of sink that you cannot do a clean build using a clean cvsup. I have just tried to cvsup from cvsup.au.FreeBSD.org after deleting all of the src tree and also any cvs log/check files so that it was basically a clean cvs. After repeatedly trying to buildkernel and having constant failures at different points I did a little more digging and found in one case that the .h file was adrift of the matching .c file and after getting a later version of the .h file which fixed one error, it then broke somewhere else in the build. So back to the drawing board and start again with a fresh cvs, this time from cvsup17.FreeBSD.org. Problem fixed, buildkernel went through without missing a beat. After having done all that I then remembered why I gave up on the Australian cvs repository years ago although I had forgotten why until now, it was exactly because of the above problem. Regards, Robert McKenzie. From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 15 15:24:06 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0F29216A41B for ; Wed, 15 Aug 2007 15:24:06 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from vlakno.cz (vlk.vlakno.cz [62.168.28.247]) by mx1.freebsd.org (Postfix) with ESMTP id B854413C4F3 for ; Wed, 15 Aug 2007 15:24:03 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from localhost (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id E722A8C0FE6; Wed, 15 Aug 2007 17:24:01 +0200 (CEST) X-Virus-Scanned: amavisd-new at vlakno.cz Received: from vlakno.cz ([127.0.0.1]) by localhost (vlk.vlakno.cz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vTAoZoV1wLb2; Wed, 15 Aug 2007 17:24:00 +0200 (CEST) Received: from vlk.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id D9EC08C0FDE; Wed, 15 Aug 2007 17:24:00 +0200 (CEST) Received: (from rdivacky@localhost) by vlk.vlakno.cz (8.13.8/8.13.8/Submit) id l7FFO0TP069976; Wed, 15 Aug 2007 17:24:00 +0200 (CEST) (envelope-from rdivacky) Date: Wed, 15 Aug 2007 17:24:00 +0200 From: Roman Divacky To: Nex Mon Message-ID: <20070815152400.GA69914@freebsd.org> References: <1fc8a2a60708142327p3f9ff079l345d47f9ceb6f489@mail.gmail.com> <20070815082857.GA59064@freebsd.org> <1fc8a2a60708150210i73f8cb9evd60747bc3fb314e3@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1fc8a2a60708150210i73f8cb9evd60747bc3fb314e3@mail.gmail.com> User-Agent: Mutt/1.4.2.3i Cc: freebsd-hackers@freebsd.org Subject: Re: questions on nonsleepable lock 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, 15 Aug 2007 15:24:06 -0000 On Wed, Aug 15, 2007 at 05:10:48PM +0800, Nex Mon wrote: > thanks for your reply. > > i didn't use WITNESS. it is disabled. > > is their a list a list of which locks are sleepable and non-sleepable > in FreeBSD6.2? is sleeping triggered by a call to "sleep", IO operation > or a result of context switching by kernel? all locks except sx and Giant are nonsleepable, sleeping can be triggered by calling foo_sleep() and/or by calling a sleeping function (like io etc.) From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 15 15:28:43 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4427A16A46B for ; Wed, 15 Aug 2007 15:28:43 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from speedfactory.net (mail6.speedfactory.net [66.23.216.219]) by mx1.freebsd.org (Postfix) with ESMTP id BDB6313C4B7 for ; Wed, 15 Aug 2007 15:28:42 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (unverified [66.23.211.162]) by speedfactory.net (SurgeMail 3.8k) with ESMTP id 203479465-1834499 for multiple; Wed, 15 Aug 2007 11:28:31 -0400 Received: from localhost.corp.yahoo.com (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.13.8/8.13.8) with ESMTP id l7FFSOkE035638; Wed, 15 Aug 2007 11:28:24 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Tue, 14 Aug 2007 15:33:01 -0400 User-Agent: KMail/1.9.6 References: <200708111611.22644.mario.lobo@ipad.com.br> In-Reply-To: <200708111611.22644.mario.lobo@ipad.com.br> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200708141533.01594.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Wed, 15 Aug 2007 11:28:26 -0400 (EDT) X-Virus-Scanned: ClamAV 0.88.3/3963/Wed Aug 15 08:46:37 2007 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-3.8 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00, DATE_IN_PAST_12_24 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: Mario Lobo Subject: Re: IDE ultraDMA problem (hackers WAS via IDE controller problem) - SOLVED !! 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, 15 Aug 2007 15:28:43 -0000 On Saturday 11 August 2007 12:11:21 pm Mario Lobo wrote: > after a long,long search, I found that chip id 0x53371106 belongs to SATA150 > controller, not PATA !! Then I enabled all mass storage controllers on the > board ( although no SATA drives present ), then two more ids showed up: > > chip=0x016a10de (jmicron SATA300) > chip=0x05711106 <- thats it !! > > Then I went iinto /usr/src/sys/dev/ata/ata-pci.h and changed the line > > from > #define ATA_VIA8237A 0x05911106 > to > #define ATA_VIA8237A 0x05711106 > > recompiled, install and BANG! 6.x already has support for this ID as: #define ATA_VIA82C571 0x05711106 so you shouldn't have needed to change the code at all. -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 15 16:07:53 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 55A6916A417; Wed, 15 Aug 2007 16:07:53 +0000 (UTC) (envelope-from mario.lobo@ipad.com.br) Received: from recife.ipad.com.br (recife.ipadnet.com.br [200.249.204.129]) by mx1.freebsd.org (Postfix) with ESMTP id B787213C474; Wed, 15 Aug 2007 16:07:52 +0000 (UTC) (envelope-from mario.lobo@ipad.com.br) Received: from lobo.ipad.com.br ([192.168.64.1]) (authenticated bits=0) by recife.ipad.com.br (8.12.8/8.12.8) with ESMTP id l7FG7nTi008876; Wed, 15 Aug 2007 13:07:49 -0300 From: Mario Lobo Organization: IPAD To: freebsd-hackers@freebsd.org Date: Wed, 15 Aug 2007 16:07:46 +0000 User-Agent: KMail/1.9.4 References: <200708111611.22644.mario.lobo@ipad.com.br> <200708141533.01594.jhb@freebsd.org> In-Reply-To: <200708141533.01594.jhb@freebsd.org> X-Face: "j9,S@~?m[/.]/lb=?utf-8?q?S=5D=2EI=0A=09ITlWP=3A-?=" MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200708151607.48696.mario.lobo@ipad.com.br> Cc: freebsd-questions@freebsd.org Subject: Re: IDE ultraDMA problem (hackers WAS via IDE controller problem) - SOLVED !! 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, 15 Aug 2007 16:07:53 -0000 On Tuesday 14 August 2007 19:33, John Baldwin wrote: > On Saturday 11 August 2007 12:11:21 pm Mario Lobo wrote: > > after a long,long search, I found that chip id 0x53371106 belongs to > > SATA150 controller, not PATA !! Then I enabled all mass storage > > controllers on the board ( although no SATA drives present ), then two > > more ids showed up: > > > > chip=3D0x016a10de (jmicron SATA300) > > chip=3D0x05711106 <- thats it !! > > > > Then I went iinto /usr/src/sys/dev/ata/ata-pci.h and changed the line > > > > from > > #define ATA_VIA8237A 0x05911106 > > to > > #define ATA_VIA8237A 0x05711106 > > > > recompiled, install and BANG! > > 6.x already has support for this ID as: > > #define ATA_VIA82C571 0x05711106 > > so you shouldn't have needed to change the code at all. sounds right but it isn't. Look at e the code from /usr/src/sys/dev/ata/ata-chpset.c =2D------------------------------------------------------------------------- if (pci_get_devid(dev) =3D=3D ATA_VIA82C571) { if (!(idx =3D ata_find_chip(dev, ids, -99)))=20 return ENXIO; } else { if (!(idx =3D ata_match_chip(dev, new_ids)))=20 return ENXIO; } =2D------------------------------------------------------------------------- new_ids doesn't have an id for ATA_VIA8237A (ata-pci.h defines ATA_VIA8237A= as=20 0x0591, which is not what my mobo gives out !) . Besides, the VIA8237A SATA150 controllers ids itself as 0x5337, which is no= t=20 even in the data base at http://pci-ids.ucw.cz/iii/?i=3D1106 So I added a new id to ata-pci.h: #define ATA_VIA8237AS 0x53371106 and added this line to ata-chipset.c: { ATA_VIA8237AS, 0x00, 7, 0x00, ATA_SA150, "8237A" }, now, all my controllers get properly identified and work !. my mobo is an ASUS P5VD2-X. DEFINETLY ( at least for the mobo I have at home), the ids ARE: 5337 is for VT8237A SATA150 0571 is for VT8237A Bus Master IDE 016a is for=A0jmicron SATA300 And these ids are confirmed by the XP drivers downloade from ASUS! Either ASUS played around with ids in this mobo or the database is screwed = up. =2D-=20 ********************************************************** //| //| Mario Lobo // |// | http://www.ipad.com.br // // ||||||| FreeBSD since 2.2.8 - 100% Rwindows-free ********************************************************** From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 15 18:15:31 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9C74816A417 for ; Wed, 15 Aug 2007 18:15:31 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from speedfactory.net (mail6.speedfactory.net [66.23.216.219]) by mx1.freebsd.org (Postfix) with ESMTP id 4D51213C48A for ; Wed, 15 Aug 2007 18:15:31 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (unverified [66.23.211.162]) by speedfactory.net (SurgeMail 3.8k) with ESMTP id 203510357-1834499 for multiple; Wed, 15 Aug 2007 14:15:24 -0400 Received: from localhost.corp.yahoo.com (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.13.8/8.13.8) with ESMTP id l7FIFHI7036918; Wed, 15 Aug 2007 14:15:18 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Wed, 15 Aug 2007 12:41:29 -0400 User-Agent: KMail/1.9.6 References: <1fc8a2a60708142327p3f9ff079l345d47f9ceb6f489@mail.gmail.com> In-Reply-To: <1fc8a2a60708142327p3f9ff079l345d47f9ceb6f489@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200708151241.29534.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Wed, 15 Aug 2007 14:15:18 -0400 (EDT) X-Virus-Scanned: ClamAV 0.88.3/3964/Wed Aug 15 10:21:53 2007 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: Nex Mon Subject: Re: questions on nonsleepable lock 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, 15 Aug 2007 18:15:31 -0000 On Wednesday 15 August 2007 02:27:56 am Nex Mon wrote: > Hello All, > > Can someone point me out or explain the technical details of this kernel > panic: > > sleeping thread (tid 100093, pid 2676) owns nonsleepable lock > panic: sleeping thread > -- > -- > > > Is this caused by incorrect use of mutex or semaphores? Is this > related to kernel scheduling? Can this be addressed at the > user process? I've tried looking throught the freebsd mailing list > archives and documentations but coudn't find a real good answer to > solve or prevent this problem. > > Im using freebsd 6.1 with SMP enabled on a Xeon dual core hardware. The > system has several busy applications running, But the load average is very > minimal, around 8.55 and no process hogging the CPU. So I expect my system > should be running smoothly without in problem. > > I appreciate any help. I know there was at least one bug that could result in this, but the root cause was either a deadlock or use after free, etc. It should be fixed in 6-stable. I can't recall further what it is though. -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 15 22:26:51 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2A7A216A418; Wed, 15 Aug 2007 22:26:50 +0000 (UTC) (envelope-from mario.lobo@ipad.com.br) Received: from recife.ipad.com.br (recife.ipadnet.com.br [200.249.204.129]) by mx1.freebsd.org (Postfix) with ESMTP id 5F82713C428; Wed, 15 Aug 2007 22:26:49 +0000 (UTC) (envelope-from mario.lobo@ipad.com.br) Received: from lobo.ipad.com.br ([192.168.64.1]) (authenticated bits=0) by recife.ipad.com.br (8.12.8/8.12.8) with ESMTP id l7FMQlTi029948; Wed, 15 Aug 2007 19:26:47 -0300 From: Mario Lobo Organization: IPAD To: freebsd-hackers@freebsd.org Date: Wed, 15 Aug 2007 22:26:46 +0000 User-Agent: KMail/1.9.4 References: <200708111611.22644.mario.lobo@ipad.com.br> <200708141533.01594.jhb@freebsd.org> <200708151607.48696.mario.lobo@ipad.com.br> In-Reply-To: <200708151607.48696.mario.lobo@ipad.com.br> X-Face: "j9,S@~?m[/.]/lb=?utf-8?q?S=5D=2EI=0A=09ITlWP=3A-?=" MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200708152226.46950.mario.lobo@ipad.com.br> Cc: freebsd-questions@freebsd.org Subject: Re: IDE ultraDMA problem (hackers WAS via IDE controller problem) - SOLVED !! 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, 15 Aug 2007 22:26:51 -0000 On Wednesday 15 August 2007 16:07, Mario Lobo wrote: > Besides, the VIA8237A SATA150 controllers ids itself as 0x5337, which is > not even in the data base at http://pci-ids.ucw.cz/iii/?i=3D1106 > > So I added a new id to ata-pci.h: > #define ATA_VIA8237AS 0x53371106 > > and added this line to ata-chipset.c: > { ATA_VIA8237AS, 0x00, 7, 0x00, ATA_SA150, "8237A" }, > > now, all my controllers get properly identified and work !. > > my mobo is an ASUS P5VD2-X. > > DEFINETLY ( at least for the mobo I have at home), the ids ARE: > > 5337 is for VT8237A SATA150 > 0571 is for VT8237A Bus Master IDE > 016a is for=A0jmicron SATA300 > > And these ids are confirmed by the XP drivers downloade from ASUS! > > Either ASUS played around with ids in this mobo or the database is screwed > up. I really ment VIA on the last statement. sorry. =2D-=20 ********************************************************** //| //| Mario Lobo // |// | http://www.ipad.com.br // // ||||||| FreeBSD since 2.2.8 - 100% Rwindows-free ********************************************************** From owner-freebsd-hackers@FreeBSD.ORG Thu Aug 16 00:32:35 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 04EDB16A419 for ; Thu, 16 Aug 2007 00:32:35 +0000 (UTC) (envelope-from janm@transactionware.com) Received: from mail.transactionware.com (mail.transactionware.com [203.14.245.7]) by mx1.freebsd.org (Postfix) with SMTP id 086D313C46C for ; Thu, 16 Aug 2007 00:32:33 +0000 (UTC) (envelope-from janm@transactionware.com) Received: (qmail 7162 invoked from network); 16 Aug 2007 00:05:48 -0000 Received: from midgard.transactionware.com (192.168.1.55) by dm.transactionware.com with SMTP; 16 Aug 2007 00:05:48 -0000 Received: (qmail 76916 invoked by uid 907); 16 Aug 2007 00:05:50 -0000 Received: from [192.168.1.51] (HELO janmxp) (192.168.1.51) by midgard.transactionware.com (qpsmtpd/0.32) with ESMTP; Thu, 16 Aug 2007 10:05:50 +1000 From: "Jan Mikkelsen" To: "'Robert McKenzie'" , References: <46C29D35.60301@internode.on.net> In-Reply-To: <46C29D35.60301@internode.on.net> Date: Thu, 16 Aug 2007 10:05:49 +1000 Organization: Transactionware Message-ID: <001101c7df99$342e0510$9c8a0f30$@com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: AcffMEkHjhUGalgPRDKIfA3yd7gU9QAaLCVA Content-Language: en-au X-Mailman-Approved-At: Thu, 16 Aug 2007 00:51:28 +0000 Cc: Subject: RE: Australian cvs repository 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, 16 Aug 2007 00:32:35 -0000 Hi, Robert McKenzie wrote: > Has anyone noted that the Australian cvs repository seems to > be so > hopelessly out of sink that you cannot do a clean build using > a clean cvsup. Yes, I've noticed this too. I'm using mirror.pacific.net.au at the moment, and it seems fine. Pacific Internet is our ISP; I don't know if it is accessible from outside their network. Regards, Jan Mikkelsen From owner-freebsd-hackers@FreeBSD.ORG Thu Aug 16 02:05:59 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 968FA16A41A for ; Thu, 16 Aug 2007 02:05:59 +0000 (UTC) (envelope-from rmaglasang@infoweapons.com) Received: from ironmail.infoweapons.com (ironmail.infoweapons.com [58.71.34.140]) by mx1.freebsd.org (Postfix) with ESMTP id B327813C46C for ; Thu, 16 Aug 2007 02:05:58 +0000 (UTC) (envelope-from rmaglasang@infoweapons.com) Received: (qmail 95374 invoked by uid 98); 16 Aug 2007 01:39:14 -0000 Received: from 10.3.1.41 by ironmail.cebu.infoweapons.com (envelope-from , uid 82) with qmail-scanner-1.25 (clamdscan: 0.86.1/959. spamassassin: 3.0.4. Clear:RC:1(10.3.1.41):. Processed in 0.056547 secs); 16 Aug 2007 01:39:14 -0000 X-Qmail-Scanner-Mail-From: rmaglasang@infoweapons.com via ironmail.cebu.infoweapons.com X-Qmail-Scanner: 1.25 (Clear:RC:1(10.3.1.41):. Processed in 0.056547 secs) Received: from sho.cebu.infoweapons.com (HELO ?10.3.1.41?) (10.3.1.41) by www.infoweapons.net with AES256-SHA encrypted SMTP; 16 Aug 2007 01:39:13 -0000 Message-ID: <46C3A75B.1070005@infoweapons.com> Date: Thu, 16 Aug 2007 09:24:43 +0800 From: "Ronnel P. Maglasang" User-Agent: Thunderbird 1.5 (X11/20060613) MIME-Version: 1.0 To: Roman Divacky References: <1fc8a2a60708142327p3f9ff079l345d47f9ceb6f489@mail.gmail.com> <20070815082857.GA59064@freebsd.org> <1fc8a2a60708150210i73f8cb9evd60747bc3fb314e3@mail.gmail.com> <20070815152400.GA69914@freebsd.org> In-Reply-To: <20070815152400.GA69914@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Nex Mon , freebsd-hackers@freebsd.org Subject: Re: questions on nonsleepable lock 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, 16 Aug 2007 02:05:59 -0000 this is getting to be a serious problem in freebsd. i'm also encountering the same panic problem. my box runs on freebsd 6.1 with ipfw, pf, forwarding/routing enabled and several network-based applications. the panic occurs when the system is subjected to a very high traffic load and some applications are busy doing disk IO, system and socket calls. i think this was already asked in this thread. i just want to clarify if this problem is caused by user-applications (non-kernel). or possibly a system/ioctl call from user-application. i don't see mtx_*, giant or mutex use in any of my user-applications, so probably this is something underneath the kernel. also, is their a list or documentation of which freebsd application, program or component has this problem? thanks Roman Divacky wrote: > On Wed, Aug 15, 2007 at 05:10:48PM +0800, Nex Mon wrote: > >> thanks for your reply. >> >> i didn't use WITNESS. it is disabled. >> >> is their a list a list of which locks are sleepable and non-sleepable >> in FreeBSD6.2? is sleeping triggered by a call to "sleep", IO operation >> or a result of context switching by kernel? >> > > all locks except sx and Giant are nonsleepable, sleeping can be triggered > by calling foo_sleep() and/or by calling a sleeping function (like io etc.) > _______________________________________________ > 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 Thu Aug 16 02:42:49 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8471716A417 for ; Thu, 16 Aug 2007 02:42:49 +0000 (UTC) (envelope-from anderson@freebsd.org) Received: from ns.trinitel.com (186.161.36.72.static.reverse.ltdomains.com [72.36.161.186]) by mx1.freebsd.org (Postfix) with ESMTP id 487D613C468 for ; Thu, 16 Aug 2007 02:42:49 +0000 (UTC) (envelope-from anderson@freebsd.org) Received: from proton.local (r74-193-81-203.pfvlcmta01.grtntx.tl.dh.suddenlink.net [74.193.81.203]) (authenticated bits=0) by ns.trinitel.com (8.14.1/8.14.1) with ESMTP id l7G2gluE067643 for ; Wed, 15 Aug 2007 21:42:48 -0500 (CDT) (envelope-from anderson@freebsd.org) Message-ID: <46C3B9A4.4000304@freebsd.org> Date: Wed, 15 Aug 2007 21:42:44 -0500 From: Eric Anderson User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070728) MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=failed version=3.1.8 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on ns.trinitel.com Subject: Modifying bridged traffic 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, 16 Aug 2007 02:42:49 -0000 What is the easiest way to play with modifying data in-transit within an ethernet bridge? For instance, say I have something like this: [BOX 1] <----> [ BOX 2 ] <----> [ BOX 3 ] And BOX 2 is a FreeBSD box with bridging enabled between two ethernet interfaces, how can I parse/modify the ethernet frames as they pass through? Eric From owner-freebsd-hackers@FreeBSD.ORG Thu Aug 16 02:55:29 2007 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 907CB16A418 for ; Thu, 16 Aug 2007 02:55:29 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from sj-iport-6.cisco.com (sj-iport-6.cisco.com [171.71.176.117]) by mx1.freebsd.org (Postfix) with ESMTP id 6B42213C45E for ; Thu, 16 Aug 2007 02:55:29 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from sj-dkim-4.cisco.com ([171.71.179.196]) by sj-iport-6.cisco.com with ESMTP; 15 Aug 2007 19:27:02 -0700 X-IronPort-AV: i="4.19,268,1183359600"; d="scan'208"; a="200835670:sNHT50425785" Received: from sj-core-1.cisco.com (sj-core-1.cisco.com [171.71.177.237]) by sj-dkim-4.cisco.com (8.12.11/8.12.11) with ESMTP id l7G2R2Mq000977; Wed, 15 Aug 2007 19:27:02 -0700 Received: from xbh-sjc-211.amer.cisco.com (xbh-sjc-211.cisco.com [171.70.151.144]) by sj-core-1.cisco.com (8.12.10/8.12.6) with ESMTP id l7G2R2F4025179; Thu, 16 Aug 2007 02:27:02 GMT Received: from xfe-sjc-212.amer.cisco.com ([171.70.151.187]) by xbh-sjc-211.amer.cisco.com with Microsoft SMTPSVC(6.0.3790.1830); Wed, 15 Aug 2007 19:27:01 -0700 Received: from [127.0.0.1] ([171.68.225.134]) by xfe-sjc-212.amer.cisco.com with Microsoft SMTPSVC(6.0.3790.1830); Wed, 15 Aug 2007 19:27:01 -0700 Message-ID: <46C3B5DF.8070804@cisco.com> Date: Wed, 15 Aug 2007 22:26:39 -0400 From: Randall Stewart User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.13) Gecko/20070601 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Max Laier , hackers@freebsd.org References: <200708160151.l7G1pMmo080481@repoman.freebsd.org> <200708160403.40779.max@love2party.net> In-Reply-To: <200708160403.40779.max@love2party.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 16 Aug 2007 02:27:01.0558 (UTC) FILETIME=[ED842D60:01C7DFAC] DKIM-Signature: v=0.5; a=rsa-sha256; q=dns/txt; l=3321; t=1187231222; x=1188095222; c=relaxed/simple; s=sjdkim4002; h=Content-Type:From:Subject:Content-Transfer-Encoding:MIME-Version; d=cisco.com; i=rrs@cisco.com; z=From:=20Randall=20Stewart=20 |Subject:=20Re=3A=20cvs=20commit=3A=20src/sys/netinet=20sctp_asconf.c=20s ctp_input.c=20sctp_output.c=0A=20sctp_pcb.c=20sctp_timer.c=20sctp_usrreq.c =20sctputil.c |Sender:=20; bh=TCdeU3kezoZUHoOuETZH/SFbVqMtdu9ETeABN+zAkwA=; b=li1rlO69RbwczWvzmpttra15iCWP84SDSsukkTTSKiLgu2ghgg9Bdf7a9PpKnhCf1OiRnBgC 258sFjvjaFV9vDjxhMAJQJmJbYVOrZYz3a5mXMrk4tZezVTloVgK4APm; Authentication-Results: sj-dkim-4; header.From=rrs@cisco.com; dkim=pass (sig from cisco.com/sjdkim4002 verified; ); X-Mailman-Approved-At: Thu, 16 Aug 2007 03:13:47 +0000 Cc: Subject: Re: cvs commit: src/sys/netinet sctp_asconf.c sctp_input.c sctp_output.c sctp_pcb.c sctp_timer.c sctp_usrreq.c sctputil.c 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, 16 Aug 2007 02:55:29 -0000 Max Laier wrote: > On Thursday 16 August 2007, you wrote: > >>rrs 2007-08-16 01:51:22 UTC >> >> FreeBSD src repository >> >> Modified files: >> sys/netinet sctp_asconf.c sctp_input.c sctp_output.c >> sctp_pcb.c sctp_timer.c sctp_usrreq.c >> sctputil.c >> Log: >> - Remove extra comment for 7.0 (no GIANT here). >> - Remove unneeded WLOCK/UNLOCK of inp for getting TCB lock. >> - Fix panic that may occur when freeing an assoc that has partial >> delivery in progress (may dereference null socket pointer when >> queuing partial delivery aborted notification) >> - Some spacing and comment fixes. >> - Fix address add handling to clear cached routes and source >>addresses when peer acks the add in case the routing table changes. >> Approved by: re@freebsd.org (Bruce Mah) >> >> Revision Changes Path >> 1.24 +49 -2 src/sys/netinet/sctp_asconf.c >> 1.56 +3 -7 src/sys/netinet/sctp_input.c >> 1.49 +48 -41 src/sys/netinet/sctp_output.c >> 1.52 +1 -4 src/sys/netinet/sctp_pcb.c >> 1.26 +0 -2 src/sys/netinet/sctp_timer.c >> 1.42 +1 -2 src/sys/netinet/sctp_usrreq.c >> 1.55 +4 -5 src/sys/netinet/sctputil.c > > > This doesn't include the memset reversion fix on -hackers recently. Just > makeing sure it's not forgotten as I happen to remember just now. No.. this patch was one I submitted 8/7... I did not have the memset patch then.. The patch you speak of is already incorporated into the main CVS tree we (the sctp team) use to support the three O/S's we work on (FreeBSD/MAC-OSX/IOS-XR).... The next patch that is building, patch 15, currently looks as follows: ***************************************************** bash-stewlap: cat list_of_updates - Fix address add handling to clear cached routes and source addresses when peer acks the add in case the routing table changes. - Fix sctp_lower_sosend to send shutdown chunk for mbuf send case when sndlen = 0 and sinfoflag = SCTP_EOF - Fix sctp_lower_sosend for SCTP_ABORT mbuf send case with null data, So that it does not send the "null" data mbuf out and cause it to get freed twice. - Fix so auto-asconf sysctl actually effect the socket's asconf state. - Do not allow SCTP_AUTO_ASCONF option to be used on subset bound sockets. - Memset bug in sctp_output.c (arguments were reversed) submitted found and reported by Dave Jones (davej@codemonkey.org.uk). - PD-API point needs to be invoked >= not just > to conform to socket api draft this fixes sctp_indata.c in the two places need to be >=. ************************************** As you can see Dave's patch is there.. but I have not submitted this yet. The next SCTP-Interop starts Sunday (I am in Japan helping setup for this now) and I think it is best I wait to see what other bugs surface at the interop before queuing the next patch to re... Unless you want me to speed the sending of this up.. if so I can start my make universe builds and begin patch prep.. but if not.. I will wait .. let me know if you want me to do so.. :-D R -- Randall Stewart NSSTG - Cisco Systems Inc. 803-345-0369 803-317-4952 (cell) From owner-freebsd-hackers@FreeBSD.ORG Thu Aug 16 04:47:56 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2124E16A419 for ; Thu, 16 Aug 2007 04:47:56 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from smtp1.yandex.ru (smtp1.yandex.ru [213.180.223.87]) by mx1.freebsd.org (Postfix) with ESMTP id 61C3A13C469 for ; Thu, 16 Aug 2007 04:47:55 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from ns.kirov.so-cdu.ru ([77.72.136.145]:39412 "EHLO [127.0.0.1]" smtp-auth: "bu7cher" TLS-CIPHER: "DHE-RSA-AES256-SHA keybits 256/256 version TLSv1/SSLv3" TLS-PEER-CN1: ) by mail.yandex.ru with ESMTP id S8372712AbXHPEa1 (ORCPT ); Thu, 16 Aug 2007 08:30:27 +0400 X-Comment: RFC 2476 MSA function at smtp1.yandex.ru logged sender identity as: bu7cher Message-ID: <46C3D2DF.6000009@yandex.ru> Date: Thu, 16 Aug 2007 08:30:23 +0400 From: "Andrey V. Elsukov" User-Agent: Mozilla Thunderbird 1.5 (FreeBSD/20051231) MIME-Version: 1.0 To: "Ronnel P. Maglasang" References: <1fc8a2a60708142327p3f9ff079l345d47f9ceb6f489@mail.gmail.com> <20070815082857.GA59064@freebsd.org> <1fc8a2a60708150210i73f8cb9evd60747bc3fb314e3@mail.gmail.com> <20070815152400.GA69914@freebsd.org> <46C3A75B.1070005@infoweapons.com> In-Reply-To: <46C3A75B.1070005@infoweapons.com> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: questions on nonsleepable lock 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, 16 Aug 2007 04:47:56 -0000 Ronnel P. Maglasang wrote: > this is getting to be a serious problem in freebsd. i'm also encountering > the same panic problem. my box runs on freebsd 6.1 with ipfw, pf, > forwarding/routing enabled and several network-based applications. the > panic > occurs when the system is subjected to a very high traffic load and some > applications are busy doing disk IO, system and socket calls. First of, try to enable dump kernel memory after panic. See the chapter 11 of FreeBSD Developers' Handbook: http://www.freebsd.org/doc/en_US.ISO8859-1/books/developers-handbook/kerneldebug.html > i think this was already asked in this thread. i just want to clarify if > this problem is caused by user-applications (non-kernel). or possibly > a system/ioctl call from user-application. i don't see mtx_*, giant or This problem can be caused by a system call, as well by the high network or IO load. -- WBR, Andrey V. Elsukov From owner-freebsd-hackers@FreeBSD.ORG Thu Aug 16 08:40:26 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2DC4316A417 for ; Thu, 16 Aug 2007 08:40:26 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outA.internet-mail-service.net (outA.internet-mail-service.net [216.240.47.224]) by mx1.freebsd.org (Postfix) with ESMTP id 1AA3E13C45A for ; Thu, 16 Aug 2007 08:40:26 +0000 (UTC) (envelope-from julian@elischer.org) Received: from mx0.idiom.com (HELO idiom.com) (216.240.32.160) by out.internet-mail-service.net (qpsmtpd/0.40) with ESMTP; Thu, 16 Aug 2007 01:40:25 -0700 Received: from julian-mac.elischer.org (home.elischer.org [216.240.48.38]) by idiom.com (Postfix) with ESMTP id 09311125FEA; Thu, 16 Aug 2007 01:40:25 -0700 (PDT) Message-ID: <46C40D7C.5010207@elischer.org> Date: Thu, 16 Aug 2007 01:40:28 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070728) MIME-Version: 1.0 To: Eric Anderson References: <46C3B9A4.4000304@freebsd.org> In-Reply-To: <46C3B9A4.4000304@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: Modifying bridged traffic 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, 16 Aug 2007 08:40:26 -0000 Eric Anderson wrote: > What is the easiest way to play with modifying data in-transit within an > ethernet bridge? > > For instance, say I have something like this: > > [BOX 1] <----> [ BOX 2 ] <----> [ BOX 3 ] > > And BOX 2 is a FreeBSD box with bridging enabled between two ethernet > interfaces, how can I parse/modify the ethernet frames as they pass > through? a netgraph bridge can do that (you can hook two ng_bridges together and capture all the packets that flow between them... There are also some patches that allow divert sockets to be attached to a bridging ipfw firewall. > > Eric > > _______________________________________________ > 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 Thu Aug 16 08:56:24 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CE0DA16A41B; Thu, 16 Aug 2007 08:56:24 +0000 (UTC) (envelope-from ganbold@micom.mng.net) Received: from publicd.ub.mng.net (publicd.ub.mng.net [202.179.0.88]) by mx1.freebsd.org (Postfix) with ESMTP id 19D2E13C4A6; Thu, 16 Aug 2007 08:56:23 +0000 (UTC) (envelope-from ganbold@micom.mng.net) Received: from [202.179.0.164] (helo=daemon.micom.mng.net) by publicd.ub.mng.net with esmtpa (Exim 4.67 (FreeBSD)) (envelope-from ) id 1ILajx-000LrV-H3; Thu, 16 Aug 2007 16:30:01 +0800 Message-ID: <46C40B09.9030402@micom.mng.net> Date: Thu, 16 Aug 2007 16:30:01 +0800 From: Ganbold User-Agent: Thunderbird 2.0.0.6 (X11/20070809) MIME-Version: 1.0 To: Eric Anderson References: <46C3B9A4.4000304@freebsd.org> In-Reply-To: <46C3B9A4.4000304@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: Modifying bridged traffic 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, 16 Aug 2007 08:56:24 -0000 Eric Anderson wrote: > What is the easiest way to play with modifying data in-transit within > an ethernet bridge? > > For instance, say I have something like this: > > [BOX 1] <----> [ BOX 2 ] <----> [ BOX 3 ] > > And BOX 2 is a FreeBSD box with bridging enabled between two ethernet > interfaces, how can I parse/modify the ethernet frames as they pass > through? > maybe with the help of netgraph... (ng_ether, ng_tee etc). > Eric > > _______________________________________________ > 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" > > > -- Liar, n.: A lawyer with a roving commission. -- Ambrose Bierce, "The Devil's Dictionary" From owner-freebsd-hackers@FreeBSD.ORG Thu Aug 16 18:36:46 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 62E3016A420 for ; Thu, 16 Aug 2007 18:36:46 +0000 (UTC) (envelope-from tonymaher@optusnet.com.au) Received: from fallbackmx02.syd.optusnet.com.au (fallbackmx02.syd.optusnet.com.au [211.29.133.72]) by mx1.freebsd.org (Postfix) with ESMTP id D3B9213C481 for ; Thu, 16 Aug 2007 18:36:45 +0000 (UTC) (envelope-from tonymaher@optusnet.com.au) Received: from mail01.syd.optusnet.com.au (mail01.syd.optusnet.com.au [211.29.132.182]) by fallbackmx02.syd.optusnet.com.au (8.12.11.20060308/8.12.11) with ESMTP id l7FMnNba003798 for ; Thu, 16 Aug 2007 08:49:23 +1000 Received: from localhost.localdomain (webmail15.syd.optusnet.com.au [211.29.132.102]) by mail01.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id l7FMnLOl030507; Thu, 16 Aug 2007 08:49:21 +1000 Message-Id: <200708152249.l7FMnLOl030507@mail01.syd.optusnet.com.au> Content-Type: text/plain Content-Disposition: inline Content-Transfer-Encoding: binary Mime-Version: 1.0 X-Mailer: MIME-tools 5.420 (Entity 5.420) Received: from ([138.25.81.112]) by webmail15.syd.optusnet.com.au with http (user=tonymaher@optusnet.com.au); Thu, 16 Aug 2007 08:49:21 +1000 From: tonymaher@optusnet.com.au To: Robert McKenzie Date: Thu, 16 Aug 2007 08:49:21 +1000 X-Mailman-Approved-At: Thu, 16 Aug 2007 18:47:56 +0000 Cc: freebsd-hackers@freebsd.org Subject: Re: Australian cvs repository 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, 16 Aug 2007 18:36:46 -0000 Robert McKenzie wrote: > Has anyone noted that the Australian cvs repository seems to be so > hopelessly out of sink that you cannot do a clean build using a clean > cvsup. Because we are so far away it is hard to keep things sinkronized. -- tonym From owner-freebsd-hackers@FreeBSD.ORG Thu Aug 16 20:24:49 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3088816A420 for ; Thu, 16 Aug 2007 20:24:49 +0000 (UTC) (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 1A14013C480 for ; Thu, 16 Aug 2007 20:24:49 +0000 (UTC) (envelope-from kris@obsecurity.org) Received: from rot26.obsecurity.org (elvis.mu.org [192.203.228.196]) by elvis.mu.org (Postfix) with ESMTP id 6E7531A3C1A; Thu, 16 Aug 2007 13:23:16 -0700 (PDT) Received: by rot26.obsecurity.org (Postfix, from userid 1001) id AE88FC3AE; Thu, 16 Aug 2007 16:24:47 -0400 (EDT) Date: Thu, 16 Aug 2007 16:24:46 -0400 From: Kris Kennaway To: tonymaher@optusnet.com.au Message-ID: <20070816202446.GA14534@rot26.obsecurity.org> References: <200708152249.l7FMnLOl030507@mail01.syd.optusnet.com.au> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="9jxsPFA5p3P2qPhR" Content-Disposition: inline In-Reply-To: <200708152249.l7FMnLOl030507@mail01.syd.optusnet.com.au> User-Agent: Mutt/1.4.2.3i Cc: freebsd-hackers@freebsd.org, Robert McKenzie Subject: Re: Australian cvs repository 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, 16 Aug 2007 20:24:49 -0000 --9jxsPFA5p3P2qPhR Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Aug 16, 2007 at 08:49:21AM +1000, tonymaher@optusnet.com.au wrote: > Robert McKenzie wrote: > > Has anyone noted that the Australian cvs repository seems to be so > > hopelessly out of sink that you cannot do a clean build using a clean= =20 > > cvsup. >=20 > Because we are so far away it is hard to keep things sinkronized. How is that the case? Kris --9jxsPFA5p3P2qPhR Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) iD8DBQFGxLKOWry0BWjoQKURAnhlAJ9ZfAoqvkg/tqAnr/4h3Ry5AMxG1gCfXj/O cFOGUdxHQVeicxe1PKZEBHc= =OG9o -----END PGP SIGNATURE----- --9jxsPFA5p3P2qPhR-- From owner-freebsd-hackers@FreeBSD.ORG Thu Aug 16 21:04:40 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BFC4516A419 for ; Thu, 16 Aug 2007 21:04:40 +0000 (UTC) (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 7A86813C45A for ; Thu, 16 Aug 2007 21:04:40 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (localhost [127.0.0.1]) by spam.des.no (Postfix) with ESMTP id 2513C20B3; Thu, 16 Aug 2007 23:04:34 +0200 (CEST) X-Spam-Tests: AWL X-Spam-Learn: disabled X-Spam-Score: 0.0/3.0 X-Spam-Checker-Version: SpamAssassin 3.2.1 (2007-05-02) on tim.des.no Received: from ds4.des.no (des.no [80.203.243.180]) by smtp.des.no (Postfix) with ESMTP id 1578A20B1; Thu, 16 Aug 2007 23:04:34 +0200 (CEST) Received: by ds4.des.no (Postfix, from userid 1001) id F36378447D; Thu, 16 Aug 2007 23:04:33 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Kris Kennaway References: <200708152249.l7FMnLOl030507@mail01.syd.optusnet.com.au> <20070816202446.GA14534@rot26.obsecurity.org> Date: Thu, 16 Aug 2007 23:04:33 +0200 In-Reply-To: <20070816202446.GA14534@rot26.obsecurity.org> (Kris Kennaway's message of "Thu\, 16 Aug 2007 16\:24\:46 -0400") Message-ID: <86ps1n5gym.fsf@ds4.des.no> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.1 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: tonymaher@optusnet.com.au, Robert McKenzie , freebsd-hackers@freebsd.org Subject: Re: Australian cvs repository 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, 16 Aug 2007 21:04:40 -0000 Kris Kennaway writes: > tonymaher@optusnet.com.au writes: > > Robert McKenzie writes: > > > Has anyone noted that the Australian cvs repository seems to be so > > > hopelessly out of sink that you cannot do a clean build using a > > > clean cvsup. > > Because we are so far away it is hard to keep things sinkronized. > How is that the case? Humor detector on the fritz again, Kris? :) DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 17 01:29:45 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EFA4416A421 for ; Fri, 17 Aug 2007 01:29:45 +0000 (UTC) (envelope-from boris@brooknet.com.au) Received: from pecan.exetel.com.au (pecan.exetel.com.au [220.233.0.17]) by mx1.freebsd.org (Postfix) with ESMTP id 7A79813C48A for ; Fri, 17 Aug 2007 01:29:45 +0000 (UTC) (envelope-from boris@brooknet.com.au) Received: from 28.201.233.220.exetel.com.au ([220.233.201.28] helo=[192.168.100.148]) by pecan.exetel.com.au with esmtp (Exim 4.63) (envelope-from ) id 1ILlvi-0001Au-Pm; Fri, 17 Aug 2007 06:26:54 +1000 In-Reply-To: <200708152249.l7FMnLOl030507@mail01.syd.optusnet.com.au> References: <200708152249.l7FMnLOl030507@mail01.syd.optusnet.com.au> Mime-Version: 1.0 (Apple Message framework v752.3) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: Sam Lawrance Date: Fri, 17 Aug 2007 06:26:54 +1000 To: tonymaher@optusnet.com.au X-Mailer: Apple Mail (2.752.3) Cc: freebsd-hackers@freebsd.org, Robert McKenzie Subject: Re: Australian cvs repository 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, 17 Aug 2007 01:29:46 -0000 On 16/08/2007, at 8:49 AM, tonymaher@optusnet.com.au wrote: > Robert McKenzie wrote: >> Has anyone noted that the Australian cvs repository seems to be so >> hopelessly out of sink that you cannot do a clean build using a clean >> cvsup. > > Because we are so far away it is hard to keep things sinkronized. We really need to plug those holes. Aaargh! From owner-freebsd-hackers@FreeBSD.ORG Thu Aug 16 23:10:19 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3936E16A41B for ; Thu, 16 Aug 2007 23:10:19 +0000 (UTC) (envelope-from cerny@icomvision.com) Received: from mohinder.icomvision.com (icom.casablanca.cz [81.0.254.115]) by mx1.freebsd.org (Postfix) with ESMTP id AB87C13C45E for ; Thu, 16 Aug 2007 23:10:18 +0000 (UTC) (envelope-from cerny@icomvision.com) Received: by mohinder.icomvision.com (Postfix, from userid 503) id 7F011F197A; Fri, 17 Aug 2007 00:53:44 +0200 (CEST) Date: Fri, 17 Aug 2007 00:53:44 +0200 From: Marian Cerny To: freebsd-hackers@freebsd.org Message-ID: <20070816225344.GA67058@icomvision.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.3i X-Mailman-Approved-At: Fri, 17 Aug 2007 03:36:54 +0000 Subject: pccard0: Card has no functions! 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, 16 Aug 2007 23:10:19 -0000 Hi, I have Nokia Card Phone 2.0 (on a supported HW list) in a PCMCIA to PCI adapter. I have used this combination some time ago (2-3 years) and it worked without any problems. I don't remember what FreeBSD version I used that time. I tried to get it working under FreeBSD 6.2R today but was not successful. I can see those messages after boot: Status is 0x30000410 cbb0: card inserted: event=0x00000000, state=30000410 pccard0: chip_socket_enable cbb_pcic_socket_enable: cbb0: cbb_power: 5V pccard0: read_cis cis mem map 0xe7286000 (resource: 0xfe310000) pccard0: CIS tuple chain: CISTPL_END ff cis mem map e7286000 CISTPL_LINKTARGET expected, code ff observed pccard0: check_cis_quirks pccard0: Card has no functions! cbb0: PC Card card activation failed I have spent hours on google trying to find any solution how to make it work. I have played with the hw.cbb.start_memory, tried to disable acpi, recompiled a GENERIC kernel... Any help would be wellcomed. Relevant messages from dmesg (full dmesg at http://artax.karlin.mff.cuni.cz/~cernm0bm/claire.dmesg.txt): acpi0: on motherboard pcib0: port 0xcf8-0xcff on acpi0 pci0: on pcib0 pcib5: at device 30.0 on pci0 pci5: on pcib5 cbb0: irq 23 at device 2.0 on pci5 cbb0: Found memory at fe300000 cbb0: Secondary bus is 6 cardbus0: on cbb0 pccard0: <16-bit PCCard bus> on cbb0 /boot/loader.conf: hw.pci.allow_unsupported_io_range="1" hw.cbb.start_memory="0x86000000" hw.cbb.debug="1" hw.cardbus.debug="1" hw.cardbus.cis_debug="1" hw.pccard.debug="1" hw.pccard.cis_debug="1" pciconf -lv: cbb0@pci5:2:0: class=0x060700 card=0x010114ef chip=0x04751180 rev=0x80 hdr=0x02 vendor = 'Ricoh Co Ltd' device = 'RL5c475 CardBus Controller' class = bridge subclass = PCI-CardBus Regards, Marian Cerny From owner-freebsd-hackers@FreeBSD.ORG Thu Aug 16 23:16:16 2007 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D566816A41A for ; Thu, 16 Aug 2007 23:16:16 +0000 (UTC) (envelope-from nox@saturn.kn-bremen.de) Received: from gwyn.kn-bremen.de (gwyn.kn-bremen.de [212.63.36.242]) by mx1.freebsd.org (Postfix) with ESMTP id 9171A13C442 for ; Thu, 16 Aug 2007 23:16:16 +0000 (UTC) (envelope-from nox@saturn.kn-bremen.de) Received: by gwyn.kn-bremen.de (Postfix, from userid 10) id 384B220C188; Fri, 17 Aug 2007 00:46:47 +0200 (CEST) Received: from saturn.kn-bremen.de (nox@localhost [127.0.0.1]) by saturn.kn-bremen.de (8.13.8/8.13.6) with ESMTP id l7GMixYX018178 for ; Fri, 17 Aug 2007 00:44:59 +0200 (CEST) (envelope-from nox@saturn.kn-bremen.de) Received: (from nox@localhost) by saturn.kn-bremen.de (8.13.8/8.13.6/Submit) id l7GMixO4018177 for freebsd-hackers@FreeBSD.org; Fri, 17 Aug 2007 00:44:59 +0200 (CEST) (envelope-from nox) From: Juergen Lock Date: Fri, 17 Aug 2007 00:44:59 +0200 To: freebsd-hackers@FreeBSD.org Message-ID: <20070816224459.GA18002@saturn.kn-bremen.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.16 (2007-06-09) X-Mailman-Approved-At: Fri, 17 Aug 2007 03:36:54 +0000 Cc: Subject: debug kernels + -fomit-frame-pointer == unhappy gdb 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, 16 Aug 2007 23:16:16 -0000 Just got reminded of this... I noticed some kernel builds use -fomit-frame-pointer by default, even if you do a debug kernel. That kinda defeats the purpose since gdb uses the frame pointer when examining the stack, like, when doing backtraces, i.e. you lose function calls in backtraces when the kernel is built like that. So, should this be changed? Juergen From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 17 03:16:55 2007 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E515516A417; Fri, 17 Aug 2007 03:16:55 +0000 (UTC) (envelope-from alex.kovalenko@verizon.net) Received: from vms048pub.verizon.net (vms048pub.verizon.net [206.46.252.48]) by mx1.freebsd.org (Postfix) with ESMTP id C936113C459; Fri, 17 Aug 2007 03:16:55 +0000 (UTC) (envelope-from alex.kovalenko@verizon.net) Received: from [10.0.3.231] ([70.21.128.114]) by vms048.mailsrvcs.net (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) with ESMTPA id <0JMW00B73EG199V0@vms048.mailsrvcs.net>; Thu, 16 Aug 2007 22:16:51 -0500 (CDT) Date: Thu, 16 Aug 2007 23:16:50 -0400 From: "Alexandre \"Sunny\" Kovalenko" In-reply-to: <20070802.221327.1783981813.imp@bsdimp.com> To: "M. Warner Losh" Message-id: <1187320610.1176.4.camel@RabbitsDen> MIME-version: 1.0 X-Mailer: Evolution 2.10.3 FreeBSD GNOME Team Port Content-type: text/plain Content-transfer-encoding: 7bit References: <20070801.211718.1683324313.imp@bsdimp.com> <46B20F91.5080709@root.org> <1186101359.846.12.camel@RabbitsDen> <20070802.221327.1783981813.imp@bsdimp.com> X-Mailman-Approved-At: Fri, 17 Aug 2007 03:36:54 +0000 Cc: acpi@FreeBSD.org, freebsd-hackers@FreeBSD.org, gahr@gahr.ch, ume@FreeBSD.org, nate@root.org Subject: Re: [patch] enhance powerd(8) to handle max temperature 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, 17 Aug 2007 03:16:56 -0000 On Thu, 2007-08-02 at 22:13 -0600, M. Warner Losh wrote: > In message: <1186101359.846.12.camel@RabbitsDen> > "Alexandre \"Sunny\" Kovalenko" writes: > : On Thu, 2007-08-02 at 10:08 -0700, Nate Lawson wrote: > : > M. Warner Losh wrote: > : > > In message: <46AE8F78.1060203@root.org> > : > > Nate Lawson writes: > : > > : Hajimu UMEMOTO wrote: > : > > : >>>>>> On Mon, 30 Jul 2007 23:31:33 +0200 > : > > : >>>>>> Pietro Cerutti said: > : > > : > gahr> My patch is really just a first draft that I wrote in order to have > : > > : > gahr> feedbacks on the general idea to implement a temperature controlling > : > > : > gahr> system inside powerd, and doesn't implement hysteresis as you noted, and > : > > : > gahr> your feedback is that it's not a good idea, which I respect. > : > > : > > : > > : > It is rather backward, IMHO. I did implement a passive cooling > : > > : > feature as an enhancement of powerd(8) like you did, during initial > : > > : > phases. Then, I implemented it in our kernel as a result. > : > > : > : > > : I'll take a look at your patch. Umemoto-san is right in that you really > : > > : want the kernel to control cooling. What happens if powerd dies/hangs > : > > : and your system burns up? Passive cooling is often a last resort to > : > > : keep the system from overheating. > : > > > : > > I keep getting the system shutting down on my HP by FreeBSD because > : > > the temperature exceeds the _CRT value. Maybe there's something wrong > : > > with my values, since it happens a lot: > : > > > : > > hw.acpi.thermal.min_runtime: 0 > : > > hw.acpi.thermal.polling_rate: 10 > : > > hw.acpi.thermal.user_override: 0 > : > > hw.acpi.thermal.tz0.temperature: 0.0C > : > > hw.acpi.thermal.tz0.active: -1 > : > > hw.acpi.thermal.tz0.passive_cooling: 1 > : > > hw.acpi.thermal.tz0.thermal_flags: 0 > : > > hw.acpi.thermal.tz0._PSV: 90.0C > : > > hw.acpi.thermal.tz0._HOT: -1 > : > > hw.acpi.thermal.tz0._CRT: 94.0C > : > > hw.acpi.thermal.tz0._ACx: 40.0C -1 -1 -1 -1 -1 -1 -1 -1 -1 > : > > > : > > Note: temperature is always 0.0C. > : > > > : > > What can I do to help my situation, if I really want the kernel doing > : > > the cooling? > : > > : > Your embedded controller is timing out. Thus you're getting a bogus > : > value for _TMP. > : I have sort of picked up this thread in the middle... was it determined > : that EC is timing out? The reason for asking is -- I used to have a > : laptop where _TMP would just read value from the memory location, which > : was never populated anywhere else in ASL. Call to _PSV method would go > : figure current temperature and start fan, if necessary. Ugly... > : > : Dumping ASL (using instructions from handbook) and looking for something > : like > : > : Method (_TMP, 0, NotSerialized) > : > : might be a real eye opener. > : > : If you would like me to take a look at your ASL, send it to me privately > : -- I've only done it for one laptop, so no claims of the great skill > : there, but maybe it is as simple as the other one ;) It just dawned on me that I have hit Reply, not Reply All previously, which has likely caused my reply to be buried somewhere in the bowels of your SPAM filtering software. So, here it goes again: > > Method (_TMP, 0, NotSerialized) > { > If (\_SB.PCI0.LPC0.ECOK ()) > { > Multiply (\_SB.PCI0.LPC0.EC0.THEM, 0x0A, Local0) > Add (Local0, 0x0AAC, Local0) > Return (Local0) > } > > Return (DTMP) > } Could you, please, change Return(DTMP) in the snippet above to Return(0x0B10) compile your ASL, overwrite it on boot and let me know what temperature reading is -- it either will stay at 0.0C or at 10.0C, which is not at all useful for day-to-day operation but will tell me which code path has been taken. Also, please, either send me *all* of your ASL or put it up somewhere for download. -- Alexandre "Sunny" Kovalenko From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 17 10:59:42 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0DA9516A417 for ; Fri, 17 Aug 2007 10:59:42 +0000 (UTC) (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 B8F4513C46C for ; Fri, 17 Aug 2007 10:59:41 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (localhost [127.0.0.1]) by spam.des.no (Postfix) with ESMTP id 385FB20B0; Fri, 17 Aug 2007 12:59:37 +0200 (CEST) X-Spam-Tests: AWL X-Spam-Learn: disabled X-Spam-Score: 0.0/3.0 X-Spam-Checker-Version: SpamAssassin 3.2.1 (2007-05-02) on tim.des.no Received: from ds4.des.no (des.no [80.203.243.180]) by smtp.des.no (Postfix) with ESMTP id 4EBEA208A; Fri, 17 Aug 2007 12:59:36 +0200 (CEST) Received: by ds4.des.no (Postfix, from userid 1001) id 266658444F; Fri, 17 Aug 2007 12:59:36 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Sam Lawrance References: <200708152249.l7FMnLOl030507@mail01.syd.optusnet.com.au> Date: Fri, 17 Aug 2007 12:59:36 +0200 In-Reply-To: (Sam Lawrance's message of "Fri\, 17 Aug 2007 06\:26\:54 +1000") Message-ID: <86fy2iifzb.fsf@ds4.des.no> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.1 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: tonymaher@optusnet.com.au, Robert McKenzie , freebsd-hackers@freebsd.org Subject: Re: Australian cvs repository 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, 17 Aug 2007 10:59:42 -0000 Sam Lawrance writes: > tonymaher@optusnet.com.au writes: > > Robert McKenzie writes: > > > Has anyone noted that the Australian cvs repository seems to be so > > > hopelessly out of sink that you cannot do a clean build using a clean > > > cvsup. > > Because we are so far away it is hard to keep things sinkronized. > We really need to plug those holes. sinkholes? *ducks* *runs* DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 17 14:12:20 2007 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6765916A41A for ; Fri, 17 Aug 2007 14:12:20 +0000 (UTC) (envelope-from scf@FreeBSD.org) Received: from mail.farley.org (farley.org [67.64.95.201]) by mx1.freebsd.org (Postfix) with ESMTP id 319D013C465 for ; Fri, 17 Aug 2007 14:12:20 +0000 (UTC) (envelope-from scf@FreeBSD.org) Received: from thor.farley.org (thor.farley.org [192.168.1.5]) by mail.farley.org (8.14.1/8.14.1) with ESMTP id l7HECF4x011540 for ; Fri, 17 Aug 2007 09:12:15 -0500 (CDT) (envelope-from scf@FreeBSD.org) Date: Fri, 17 Aug 2007 09:12:15 -0500 (CDT) From: "Sean C. Farley" To: FreeBSD Hackers In-Reply-To: Message-ID: References: <200708152249.l7FMnLOl030507@mail01.syd.optusnet.com.au> <86fy2iifzb.fsf@ds4.des.no> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=us-ascii X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.1 X-Spam-Checker-Version: SpamAssassin 3.2.1 (2007-05-02) on mail.farley.org Cc: Subject: Re: Australian cvs repository 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, 17 Aug 2007 14:12:20 -0000 On Fri, 17 Aug 2007, Dave Horsfall wrote: >>>>> Has anyone noted that the Australian cvs repository seems to be so >>>>> hopelessly out of sink that you cannot do a clean build using a >>>>> clean cvsup. >>>> Because we are so far away it is hard to keep things sinkronized. >>> We really need to plug those holes. >> sinkholes? > > Well, everyone knows that the water rotates the opposite way > down-under, so this could explain the blockage. They could use more fiber for that blockage. Sean -- scf@FreeBSD.org From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 17 14:21:13 2007 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3687D16A41A; Fri, 17 Aug 2007 14:21:13 +0000 (UTC) (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 E554113C47E; Fri, 17 Aug 2007 14:21:12 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (localhost [127.0.0.1]) by spam.des.no (Postfix) with ESMTP id B3B8320B0; Fri, 17 Aug 2007 16:21:09 +0200 (CEST) X-Spam-Tests: AWL X-Spam-Learn: disabled X-Spam-Score: 0.0/3.0 X-Spam-Checker-Version: SpamAssassin 3.2.1 (2007-05-02) on tim.des.no Received: from ds4.des.no (des.no [80.203.243.180]) by smtp.des.no (Postfix) with ESMTP id 38B08208A; Fri, 17 Aug 2007 16:21:09 +0200 (CEST) Received: by ds4.des.no (Postfix, from userid 1001) id 280A58444F; Fri, 17 Aug 2007 16:21:09 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: "Sean C. Farley" References: <200708152249.l7FMnLOl030507@mail01.syd.optusnet.com.au> <86fy2iifzb.fsf@ds4.des.no> Date: Fri, 17 Aug 2007 16:21:09 +0200 In-Reply-To: (Sean C. Farley's message of "Fri\, 17 Aug 2007 09\:12\:15 -0500 \(CDT\)") Message-ID: <86mywqgs2y.fsf@ds4.des.no> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.1 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: FreeBSD Hackers Subject: Re: Australian cvs repository 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, 17 Aug 2007 14:21:13 -0000 "Sean C. Farley" writes: > On Fri, 17 Aug 2007, Dave Horsfall wrote: >>>>>> Has anyone noted that the Australian cvs repository seems to be so >>>>>> hopelessly out of sink that you cannot do a clean build using a >>>>>> clean cvsup. >>>>> Because we are so far away it is hard to keep things sinkronized. >>>> We really need to plug those holes. >>> sinkholes? >> Well, everyone knows that the water rotates the opposite way >> down-under, so this could explain the blockage. > They could use more fiber for that blockage. Bran muffin anyone? DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 17 14:33:36 2007 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2233C16A419 for ; Fri, 17 Aug 2007 14:33:36 +0000 (UTC) (envelope-from scf@FreeBSD.org) Received: from mail.farley.org (farley.org [67.64.95.201]) by mx1.freebsd.org (Postfix) with ESMTP id DADB613C4A6 for ; Fri, 17 Aug 2007 14:33:35 +0000 (UTC) (envelope-from scf@FreeBSD.org) Received: from thor.farley.org (thor.farley.org [192.168.1.5]) by mail.farley.org (8.14.1/8.14.1) with ESMTP id l7HEXVcw011848 for ; Fri, 17 Aug 2007 09:33:31 -0500 (CDT) (envelope-from scf@FreeBSD.org) Date: Fri, 17 Aug 2007 09:33:31 -0500 (CDT) From: "Sean C. Farley" To: FreeBSD Hackers In-Reply-To: <86mywqgs2y.fsf@ds4.des.no> Message-ID: References: <200708152249.l7FMnLOl030507@mail01.syd.optusnet.com.au> <86fy2iifzb.fsf@ds4.des.no> <86mywqgs2y.fsf@ds4.des.no> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="0-297779550-1187361211=:20958" X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.1 X-Spam-Checker-Version: SpamAssassin 3.2.1 (2007-05-02) on mail.farley.org Cc: Subject: Re: Australian cvs repository 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, 17 Aug 2007 14:33:36 -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-297779550-1187361211=:20958 Content-Type: TEXT/PLAIN; format=flowed; charset=iso-8859-15 Content-Transfer-Encoding: 8BIT On Fri, 17 Aug 2007, Dag-Erling Smørgrav wrote: > "Sean C. Farley" writes: >> On Fri, 17 Aug 2007, Dave Horsfall wrote: >>>>>>> Has anyone noted that the Australian cvs repository seems to be so >>>>>>> hopelessly out of sink that you cannot do a clean build using a >>>>>>> clean cvsup. >>>>>> Because we are so far away it is hard to keep things sinkronized. >>>>> We really need to plug those holes. >>>> sinkholes? >>> Well, everyone knows that the water rotates the opposite way >>> down-under, so this could explain the blockage. >> They could use more fiber for that blockage. > Bran muffin anyone? I was thinking the optical kind of fiber. :) Sean -- scf@FreeBSD.org --0-297779550-1187361211=:20958-- From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 17 20:18:53 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9AA3016A469 for ; Fri, 17 Aug 2007 20:18:53 +0000 (UTC) (envelope-from nilsbeyer@web.de) Received: from fmmailgate03.web.de (fmmailgate03.web.de [217.72.192.234]) by mx1.freebsd.org (Postfix) with ESMTP id 5A25513C50D for ; Fri, 17 Aug 2007 20:18:53 +0000 (UTC) (envelope-from nilsbeyer@web.de) Received: from smtp08.web.de (fmsmtp08.dlan.cinetic.de [172.20.5.216]) by fmmailgate03.web.de (Postfix) with ESMTP id 9D21193C0955 for ; Fri, 17 Aug 2007 21:50:43 +0200 (CEST) Received: from [62.226.73.227] (helo=nopwinme) by smtp08.web.de with smtp (WEB.DE 4.108 #197) id 1IM7qF-0003Zx-00 for freebsd-hackers@freebsd.org; Fri, 17 Aug 2007 21:50:43 +0200 Message-ID: <000901c7e107$c8cfc9f0$01081bac@nopwinme> From: "Nils Beyer" To: Date: Fri, 17 Aug 2007 21:49:54 +0200 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 Sender: nilsbeyer@web.de X-Sender: nilsbeyer@web.de X-Provags-ID: V01U2FsdGVkX18aSeJOXSUBWs68Z62yZrHoHyrU1Nxjh1zmyYU1 fgmWDNhhahy6OHy1jrr3wtIuBLLp4Tp1qsoTuQ2weEzGHwsZkX uccVKTHww= X-Mailman-Approved-At: Fri, 17 Aug 2007 20:57:52 +0000 Subject: Re: finished? porting ZyDAS zb1211/zb1211b driver for 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: Fri, 17 Aug 2007 20:18:53 -0000 Weongyo Jeong wrote: > I just finished to port zyd(4) from NetBSD for FreeBSD and it works well[...] > A patch which is for CURRENT is available at[...] That's great to read. Is that driver also possible for 6.2-RELEASE and 6-STABLE? Regards, Nils From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 17 20:19:01 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0801E16A41A for ; Fri, 17 Aug 2007 20:19:01 +0000 (UTC) (envelope-from nilsbeyer@web.de) Received: from fmmailgate03.web.de (fmmailgate03.web.de [217.72.192.234]) by mx1.freebsd.org (Postfix) with ESMTP id BCD4F13C500 for ; Fri, 17 Aug 2007 20:19:00 +0000 (UTC) (envelope-from nilsbeyer@web.de) Received: from smtp05.web.de (fmsmtp05.dlan.cinetic.de [172.20.4.166]) by fmmailgate03.web.de (Postfix) with ESMTP id AB79B93C0873 for ; Fri, 17 Aug 2007 21:53:16 +0200 (CEST) Received: from [62.226.73.227] (helo=nopwinme) by smtp05.web.de with asmtp (WEB.DE 4.108 #197) id 1IM7sh-0001xB-00 for freebsd-hackers@freebsd.org; Fri, 17 Aug 2007 21:53:15 +0200 Message-ID: <000901c7e108$2385d5b0$01081bac@nopwinme> From: "Nils Beyer" To: Date: Fri, 17 Aug 2007 21:52:26 +0200 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 Sender: nilsbeyer@web.de X-Sender: nilsbeyer@web.de X-Provags-ID: V01U2FsdGVkX1+HsWjIWhe7wm8SowFkyf8CXLXT0FBM5zo5dYkT RC2oVjd3GKoO+5c2Ov5DC2cjdrtSwZIsAUdOO9Bva5rFt81fVF QOLcQiLIM= X-Mailman-Approved-At: Fri, 17 Aug 2007 20:57:52 +0000 Subject: Re: finished? porting ZyDAS zb1211/zb1211b driver for 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: Fri, 17 Aug 2007 20:19:01 -0000 Weongyo Jeong wrote: > I just finished to port zyd(4) from NetBSD for FreeBSD and it works well [...] > A patch which is for CURRENT is available at [...] That's great to read. Is that driver also possible for 6.2-RELEASE and 6-STABLE? Regards, Nils From owner-freebsd-hackers@FreeBSD.ORG Sat Aug 18 01:05:21 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 942CB16A537 for ; Sat, 18 Aug 2007 01:05:21 +0000 (UTC) (envelope-from weongyo.jeong@gmail.com) Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.177]) by mx1.freebsd.org (Postfix) with ESMTP id 3481313C494 for ; Sat, 18 Aug 2007 01:05:21 +0000 (UTC) (envelope-from weongyo.jeong@gmail.com) Received: by wa-out-1112.google.com with SMTP id m33so26509wag for ; Fri, 17 Aug 2007 18:05:20 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:received:date:to:cc:subject:message-id:mail-followup-to:references:mime-version:content-type:content-disposition:in-reply-to:user-agent:organization:x-operation-sytem:from; b=FUB/JX4N9+IWDC1KrQ+WZNRJs6aJW3ZFgQIaI0UGkkRtY8cAxAcyTn+bT1XIWOoLNlYThScdB1SYD2Gf1enG0Aam6OMVI3qMf6r3LIfvGqPKESXwEy+84rKhHLtxoM/TWgv1AC0FuTXOzrwz0UPNUsloAQhNpm3eMEOg6sTY4CQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:date:to:cc:subject:message-id:mail-followup-to:references:mime-version:content-type:content-disposition:in-reply-to:user-agent:organization:x-operation-sytem:from; b=AqWmd9NZiqwve7HL+/3jtGzAh01Wet6YFVJm0W496ax9ct1K3nC833XBunQoIfKI+43G5YoPkqdLR35fFit2zbs9IkyHBjC4tHqdozWB5tFsAIt1SpfCLHd8Oyy7z9bNXPTl1M1jO8EKdx6y2w762VgnjoqFH6vY6gNV0tEm4Y8= Received: by 10.115.76.1 with SMTP id d1mr138995wal.1187399120621; Fri, 17 Aug 2007 18:05:20 -0700 (PDT) Received: from freebsd.weongyo.org ( [211.53.35.67]) by mx.google.com with ESMTPS id y11sm4593451pod.2007.08.17.18.05.17 (version=SSLv3 cipher=OTHER); Fri, 17 Aug 2007 18:05:19 -0700 (PDT) Received: by freebsd.weongyo.org (sSMTP sendmail emulation); Sat, 18 Aug 2007 10:04:54 +0900 Date: Sat, 18 Aug 2007 10:04:53 +0900 To: Nils Beyer Message-ID: <20070818010453.GC40733@freebsd.weongyo.org> Mail-Followup-To: Nils Beyer , freebsd-hackers@freebsd.org References: <000901c7e107$c8cfc9f0$01081bac@nopwinme> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <000901c7e107$c8cfc9f0$01081bac@nopwinme> User-Agent: Mutt/1.4.2.3i Organization: CDNetworks. X-Operation-Sytem: FreeBSD From: Weongyo Jeong Cc: freebsd-hackers@freebsd.org Subject: Re: finished? porting ZyDAS zb1211/zb1211b driver for 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: Sat, 18 Aug 2007 01:05:21 -0000 On Fri, Aug 17, 2007 at 09:49:54PM +0200, Nils Beyer wrote: > Weongyo Jeong wrote: > >I just finished to port zyd(4) from NetBSD for FreeBSD and it works > >well[...] > >A patch which is for CURRENT is available at[...] > > That's great to read. Is that driver also possible for 6.2-RELEASE and > 6-STABLE? This driver isn't tested on FreeBSD 6.2-RELEASE and 6-STABLE and I'm not sure it works on it. However, I also hope this driver works on FreeBSD 6.2-RELEASE and 6-STABLE, so I have a plan to release the patch for them. Best Regards, Weongyo Jeong From owner-freebsd-hackers@FreeBSD.ORG Sat Aug 18 07:26:11 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DFB6A16A417 for ; Sat, 18 Aug 2007 07:26:10 +0000 (UTC) (envelope-from cerny@icomvision.com) Received: from mohinder.icomvision.com (icom.casablanca.cz [81.0.254.115]) by mx1.freebsd.org (Postfix) with ESMTP id 85BE713C478 for ; Sat, 18 Aug 2007 07:26:07 +0000 (UTC) (envelope-from cerny@icomvision.com) Received: by mohinder.icomvision.com (Postfix, from userid 503) id 6866FF197A; Sat, 18 Aug 2007 09:26:06 +0200 (CEST) Date: Sat, 18 Aug 2007 09:26:06 +0200 From: Marian Cerny To: freebsd-hackers@freebsd.org Message-ID: <20070818072606.GA10833@icomvision.com> References: <20070816225344.GA67058@icomvision.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070816225344.GA67058@icomvision.com> User-Agent: Mutt/1.4.2.3i X-Mailman-Approved-At: Sat, 18 Aug 2007 11:31:30 +0000 Subject: Re: pccard0: Card has no functions! 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, 18 Aug 2007 07:26:11 -0000 On 2007-08-17 00:53 +0200, Marian Cerny wrote: > I have Nokia Card Phone 2.0 (on a supported HW list) in a PCMCIA to PCI > adapter. I have used this combination some time ago (2-3 years) and it worked > without any problems. I don't remember what FreeBSD version I used that time. > > I tried to get it working under FreeBSD 6.2R today but was not > successful. I can see those messages after boot: > > pcib5: pccard0 requested memory range 0xfe300000-0xfeafffff: good > cis mem map 0xe6e2c000 (resource: 0xfe310000) > pccard0: CIS tuple chain: > CISTPL_END > ff > cis mem map e6e2c000 > CISTPL_LINKTARGET expected, code ff observed > pccard0: check_cis_quirks > pccard0: Card has no functions! > cbb0: PC Card card activation failed I have tried the Card Phone in a laptop and there it works. Problem seems to be in the "CIS tuple chain". In the laptop I get this (full verbose dmesg at http://artax.karlin.mff.cuni.cz/~cernm0bm/acer3692.dmesg.verbose.txt): pcib5: pccard0 requested memory range 0x86000000-0xffffffff: good cis mem map 0xcc8ab000 (resource: 0x86000000) pccard0: CIS tuple chain: CISTPL_DEVICE type=null speed=null 01 03 00 00 ff CISTPL_VERS_1 15 28 05 00 4e 6f 6b 69 61 20 4d 6f 62 69 6c 65 20 50 68 6f 6e 65 73 00 4e 6f 6b 69 61 20 43 61 72 64 20 50 68 6f 6e 65 00 ff CISTPL_MANFID 20 04 24 01 00 09 CISTPL_FUNCID 21 02 02 01 CISTPL_FUNCE 22 04 00 02 0f 1c CISTPL_FUNCE 22 09 01 1f 3f 00 10 00 00 10 00 CISTPL_FUNCE 22 0c 02 06 00 26 1c 03 03 3f 07 00 01 b5 CISTPL_FUNCE 22 08 13 06 00 1f 00 ea 00 b5 CISTPL_FUNCE 22 08 23 06 00 1f 00 ea 00 b5 CISTPL_CONFIG 1a 05 01 03 f6 01 13 CISTPL_CFTABLE_ENTRY 1b 12 c3 41 19 3f 55 c5 4b d5 19 36 36 56 a4 40 0f 30 ff ff unhandled CISTPL 14 CISTPL_NO_LINK 14 00 CISTPL_END ff pccard0: check_cis_quirks pccard0: CIS version PC Card Standard 5.0 pccard0: CIS info: Nokia Mobile Phones, Nokia Card Phone > Relevant messages from dmesg (full dmesg at > http://artax.karlin.mff.cuni.cz/~cernm0bm/claire.dmesg.txt): I have uploaded the full verbose dmesg at http://artax.karlin.mff.cuni.cz/~cernm0bm/claire.dmesg.verbose.txt > acpi0: on motherboard > pcib0: port 0xcf8-0xcff on acpi0 > pci0: on pcib0 > pcib5: at device 30.0 on pci0 > pci5: on pcib5 > cbb0: irq 23 at device 2.0 on pci5 > cbb0: Found memory at fe300000 > cbb0: Secondary bus is 6 > cardbus0: on cbb0 > pccard0: <16-bit PCCard bus> on cbb0 > > /boot/loader.conf: > hw.pci.allow_unsupported_io_range="1" > hw.cbb.start_memory="0x86000000" > hw.cbb.debug="1" > hw.cardbus.debug="1" > hw.cardbus.cis_debug="1" > hw.pccard.debug="1" > hw.pccard.cis_debug="1" > > pciconf -lv: > cbb0@pci5:2:0: class=0x060700 card=0x010114ef chip=0x04751180 rev=0x80 hdr=0x02 > vendor = 'Ricoh Co Ltd' > device = 'RL5c475 CardBus Controller' > class = bridge > subclass = PCI-CardBus The Cardbus bridge in the laptop is: cbb0@pci6:4:0: class=0x060700 card=0x00901025 chip=0x14121524 rev=0x10 hdr=0x02 vendor = 'ENE Technology Inc' device = 'CB-712/714 CardBus Controller' class = bridge subclass = PCI-CardBuscbb0@pci6:4:0: class=0x060700 So now it looks like the problem is in the PCMCIA to PCI adapter. But it should be supported (according to cbb(4)) - and it was working some time ago. The other differences are FreeBSD 6.2R vs 6-STABLE, RAM 2GB vs 256 MB. Any idea what I could try next? Could a different PCMCIA to PCI adapter help? Regards, Marian Cerny From owner-freebsd-hackers@FreeBSD.ORG Sat Aug 18 10:26:39 2007 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4A2E816A421 for ; Sat, 18 Aug 2007 10:26:39 +0000 (UTC) (envelope-from yuriy.tsibizov@gmail.com) Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.235]) by mx1.freebsd.org (Postfix) with ESMTP id 0AC8013C428 for ; Sat, 18 Aug 2007 10:26:38 +0000 (UTC) (envelope-from yuriy.tsibizov@gmail.com) Received: by wx-out-0506.google.com with SMTP id i29so669593wxd for ; Sat, 18 Aug 2007 03:26:38 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type; b=WZoZ8gzPUcFnIwZh3DxK42kAtGuGLcJB8nJxuJi7YtsZORCcqDHnE/0Tf51uwMU8g6wiEJiDgBFgW7EG0VU554ZrUfUK0JKJx5omkWccY2vhYg2K9PNNERgQk5AIuyxwmLtTCTEzICLQ0467d2XwDu+H4xf9B0Ph2DvZOFe5NN8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type; b=qqnPh0YghMh/CBjyOjA4v0jWQ+HiNGUtYOa33G/iTPmni5pRk+jYTOs2r7fU3H4N8MXWW+Lm0BWZI9IP2tv+3zlJQV6nqh8gOGnPL++dcAgr4/fl+8xc6kdT26lsUTTCCZh8VvoGPM4Q/x2tvE+ynlCG96d/eWwOrHfxGDtxz7Y= Received: by 10.90.81.14 with SMTP id e14mr5672001agb.1187431286248; Sat, 18 Aug 2007 03:01:26 -0700 (PDT) Received: by 10.90.84.15 with HTTP; Sat, 18 Aug 2007 03:01:26 -0700 (PDT) Message-ID: Date: Sat, 18 Aug 2007 14:01:26 +0400 From: "Yuriy Tsibizov" To: hackers@freebsd.org MIME-Version: 1.0 X-Mailman-Approved-At: Sat, 18 Aug 2007 11:31:30 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Subject: modify syscall nr on-the-fly 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, 18 Aug 2007 10:26:39 -0000 I'm trying to get user-mode Linux to run under FreeBSD Linux emulation (on i386). User-mode Linux in it's start-up tests tries to modify syscall number (to be called by kernel) on-the-fly (http://fxr.watson.org/fxr/source/arch/um/os-Linux/start_up.c?v=linux-2.6). It forks a child thread that stops (using SIGSTOP), calls getpid() (that will be intercepted by parent thread using PTRACE_SYSCALL) and return some value based on getpid() results. Main thread waits for SIGSTOP in child process and enables PTRACE_SYSCALL (I have some code that implements it. It makes some incompatible changes to PT_SYSCALL that will break FreeBSD applications, but works for Linux apps). When main thread catches SIGTRAP (generated by ptrace) it tries to modify EAX of child thread (with PTRACE_PEEKUSR and PTRACE_POKEUSR) to replace getpid syscall with getppid. is it possible to get updated EAX (and other registers as well) in syscall(...) after ptracestop(...) in PTRACESTOP_SC(...) returns? Hope for your help, Yuriy.