From owner-freebsd-mobile@FreeBSD.ORG Sun Jun 17 01:58:13 2007 Return-Path: X-Original-To: mobile@freebsd.org Delivered-To: freebsd-mobile@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7CAA516A46B for ; Sun, 17 Jun 2007 01:58:13 +0000 (UTC) (envelope-from freebsd@gm.nunu.org) Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.177]) by mx1.freebsd.org (Postfix) with ESMTP id 3194313C457 for ; Sun, 17 Jun 2007 01:58:13 +0000 (UTC) (envelope-from freebsd@gm.nunu.org) Received: by py-out-1112.google.com with SMTP id a29so2421925pyi for ; Sat, 16 Jun 2007 18:58:12 -0700 (PDT) Received: by 10.35.47.10 with SMTP id z10mr7996942pyj.1182045492484; Sat, 16 Jun 2007 18:58:12 -0700 (PDT) Received: by 10.35.71.8 with HTTP; Sat, 16 Jun 2007 18:58:12 -0700 (PDT) Message-ID: <626eb4530706161858l5f60d67ej55874cb9348e649b@mail.gmail.com> Date: Sun, 17 Jun 2007 10:58:12 +0900 From: "Hidetoshi Shimokawa" Sender: freebsd@gm.nunu.org To: "M. Warner Losh" , "Paolo Pisati" In-Reply-To: <20070616.173002.-457443410.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=GB2312; format=flowed Content-Transfer-Encoding: base64 Content-Disposition: inline References: <46734A3E.3010903@gddsn.org.cn> <626eb4530706160525o54234621s2de098e64cdeb4fe@mail.gmail.com> <20070616.173002.-457443410.imp@bsdimp.com> X-Google-Sender-Auth: ce9a66bb8262e9ee Cc: current@freebsd.org, wsk@gddsn.org.cn, mobile@freebsd.org Subject: Re: kernel panic with pccard insert on recent 7.0 CURRENT X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jun 2007 01:58:13 -0000 SSBkb24ndCBrbm93LiBXZSBzaG91bGQgYXNrIHRvIHBpc28uCgpBcyBmYXIgYXMgSSB1bmRlcnN0 YW5kLCBJTlRSX0ZJTFRFUiBjb2RlIGlzIGFuIGF0dGVtcHQgdG8KaW1wcm92ZSBNRC9NSSBzZXBh cmF0aW9uIGFuZCBpdCBpcyBpbnRlbnRlZCB0byBwcm92aWRlCnNhbWUgZnVuY3Rpb24gYXMgbm9u LUlOVFJfRklMVEVSIGNhc2UuCkFuZCBJTlRSX0ZJTFRFUiBkb2Vzbid0IHNlZW0gd2VsbC10ZXN0 ZWQgYXQgbGVhc3QgZm9yCmhhbmRsaW5nIG9mIHN0cmF5IGludGVycnVwdHMgZm9yIGZpbHRlciBv bmx5IElSUXMuCkkgbmVlZCB0aGUgZm9sbG93aW5nIHBhdGNoIHRvIHdvcmthcm91bmcgdGhlIHBy b2JsZW0uCgpodHRwOi8vcGVvcGxlLmZyZWVic2Qub3JnL35zaW1va2F3YS90bXAva2Vybl9pbnRy LmMtMjAwNzA2MTcucGF0Y2gKCk9uIDYvMTcvMDcsIE0uIFdhcm5lciBMb3NoIDxpbXBAYnNkaW1w LmNvbT4gd3JvdGU6Cj4gSXMgdGhlcmUgc29tZSByZWFzb24gd2UgZG9uJ3QgY29tcGlsZSBJTlRS X0ZJTFRFUiBieSBkZWZhdWx0Pwo+Cj4gV2FybmVyCj4KPgo+IEluIG1lc3NhZ2U6IDw2MjZlYjQ1 MzA3MDYxNjA1MjVvNTQyMzQ2MjFzMmRlMDk4ZTY0Y2RlYjRmZUBtYWlsLmdtYWlsLmNvbT4KPiAg ICAgICAgICAgICAiSGlkZXRvc2hpIFNoaW1va2F3YSIgPHNpbW9rYXdhQGZyZWVic2Qub3JnPiB3 cml0ZXM6Cj4gOiBJIHRoaW5rIHRoZSBmb2xsb3dpbmcgcGF0Y2ggZml4IHRoZSBwcm9ibGVtLgo+ IDoKPiA6IFJDUyBmaWxlOiAvaG9tZS9uY3ZzL3NyYy9zeXMvZGV2L3BjY2FyZC9wY2NhcmQuYyx2 Cj4gOiByZXRyaWV2aW5nIHJldmlzaW9uIDEuMTE4Cj4gOiBkaWZmIC11IC1yMS4xMTggcGNjYXJk LmMKPiA6IC0tLSBwY2NhcmQuYyAgICAzMSBNYXkgMjAwNyAxOToyOToyMCAtMDAwMCAgICAgIDEu MTE4Cj4gOiArKysgcGNjYXJkLmMgICAgMTYgSnVuIDIwMDcgMTI6MjM6MzUgLTAwMDAKPiA6IEBA IC0xMjM4LDcgKzEyMzgsNyBAQAo+IDogICAgICAgICBpZiAocGYtPmludHJfZmlsdGVyICE9IE5V TEwgfHwgcGYtPmludHJfaGFuZGxlciAhPSBOVUxMKQo+IDogICAgICAgICAgICAgICAgIHBhbmlj KCJPbmx5IG9uZSBpbnRlcnJ1cHQgaGFuZGxlciBwZXIgZnVuY3Rpb24gYWxsb3dlZCIpOwo+IDog ICAgICAgICBlcnIgPSBidXNfZ2VuZXJpY19zZXR1cF9pbnRyKGRldiwgY2hpbGQsIGlycSwgZmxh Z3MsIHBjY2FyZF9maWx0ZXIsCj4gOiAtICAgICAgICAgICBwY2NhcmRfaW50ciwgcGYsIGNvb2tp ZXApOwo+IDogKyAgICAgICAgICAgaW50ciA/IHBjY2FyZF9pbnRyIDogTlVMTCwgcGYsIGNvb2tp ZXApOwo+IDogICAgICAgICBpZiAoZXJyICE9IDApCj4gOiAgICAgICAgICAgICAgICAgcmV0dXJu IChlcnIpOwo+IDogICAgICAgICBwZi0+aW50cl9maWx0ZXIgPSBmaWx0Owo+IDoKPiA6Cj4gOiBP biA2LzE2LzA3LCDO4srlwKQgPHdza0BnZGRzbi5vcmcuY24+IHdyb3RlOgo+IDogPiBoaSwgbGlz dHMKPiA6ID4gaSBhbHdheXMgZ2V0IEZhdGFsIHRyYXAgd2hpbGUgaW5zZXJ0IGEgcGNjYXJkIHdp dGggcmVjZW50IDcuMCBjdXJyZW50Lgo+IDogPiBJdCBzZWVtcyB0aGF0IENhbid0IHJlY29nbml6 ZSB0aGUgcGNjYXJkIGFkZHJlc3M/Cj4gOiA+IHRoYW5rcyB3aXRoIGFueSByZXBseS4KPiA6ID4K PiA6ID4gcGNjYXJkMDpBbGxvY2F0aW9uIGZhaWxlZCBmb3IgY2ZlIDEzCj4gOiA+IHBjY2FyZDA6 QWxsb2NhdGlvbiBmYWlsZWQgZm9yIGNmZSAyMQo+IDogPiB1YXJ0MDogPEJvcmEgVGVsZWNvbSBJ bmMgQm9yYSAzNjAwIFJldiAxLjE+IGF0IHBvcnQgMHgzZTgtMHgzZWYgaXJxIDExCj4gOiA+IGZ1 bmN0aW9uIDAgY29uZmlnIDI5IG9uIHBjY2FyZDAKPiA6ID4gdWFydDA6W0ZJTFRFUl0KPiA6ID4K PiA6ID4gRmF0YWwgdHJhcCAxMjogcGFnZSBmYXVsdCB3aGlsZSBpbiBrZXJuZWwgbW9kZQo+IDog PiBjcHVpZCA9IDA7IGFwaWMgaWQgPSAwMAo+IDogPiBmYXVsdCB2aXJ0dWFsIGFkZHJlc3MgPSAw eDAKPiA6ID4gZmF1bHQgY29kZSA9IHN1cGVydmlzb3IgcmVhZCwgcGFnZSBub3QgcHJlc2VudAo+ IDogPiBpbnN0cnVjdGlvbiBwb2ludGVyID0gMHgyMDoweDAKPiA6ID4gc3RhY2sgcG9pbnRlciA9 IDB4Mjg6MHhlMjk5NmNiMAo+IDogPiBmcmFtZSBwb2ludGVyID0gMHgyODoweGUyOTk2Y2I4Cj4g OiA+IGNvZGUgc2VnbWVudCA9IGJhc2UgMHgwLCBsaW1pdCAweGZmZmZmLCB0eXBlIDB4MWIKPiA6 ID4gPSBEUEwgMCwgcHJlcyAxLCBkZWYzMiAxLCBncmFuIDEKPiA6ID4gcHJvY2Vzc29yIGVmbGFn cyA9IGludGVycnVwdCBlbmFibGUsIHJlc3VtZSwgSU9QTCA9IDAKPiA6ID4gY3VycmVudCBwcm9j ZXNzID0gMjEgKGlycTExOiBjYmIwIGNiYjErKikKPiA6ID4gW3RocmVhZCBwaWQgMjEgdGlkIDEw MDAxMyBdCj4gOiA+IFN0b3BwZWQgYXQgMDogKioqIGVycm9yIHJlYWRpbmcgZnJvbSBhZGRyZXNz IDAgKioqCj4gOiA+IGRiPmJ0Cj4gOiA+IFRyYWNpbmcgcGlkIDIxIHRpZCAxMDAwMTMgdGQgMHhj M2YwNWMwMAo+IDogPiBwY2NhcmRfaW50cihjNDI4NWUwMCkgYXQgcGNjYXJkX2ludHIrMHgxMgo+ IDogPiBjYmJfZnVuY19pbnRyKGM0MTAzMTQwLDAsYzBhNDkzYWUsNDBiLGMzZjAwMDY0LC4uLikg YXQgY2JiX2Z1bmNfaW50cnwweDUxCj4gOiA+IGl0aHJlYWRfbG9vcChjNDA0ZmFiMCxlMjk5NmQz OCw4M2ZiNWJlOCxmZjA2ZmM0NixjM2Y0YjgwNCwuLi4pIGF0Cj4gOiA+IGl0aHJlYWRfbG9vcCsw Cj4gOiA+IHgxYjUKPiA6ID4gZm9ya19leGl0KGMwNzRjY2QwLGM0MDRmYWIwLGUyOTk2ZDM4KSBh dCBmb3JrX2V4aXQrMHg1Nwo+IDogPiBmb3JrX3RyYW1wb2xpbmUoKSBhdCBmb3JrX3RyYW1wb2xp bmUrMHg4Cj4gOiA+IC0tLSB0cmFwIDAsIGVpcCA9IDAsIGVzcCA9IDB4ZTI5OTZkNzAsIGVicCA9 IDAgLS0tCj4gOiA+Cj4gOiA+IF9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fCj4gOiA+IGZyZWVic2QtY3VycmVudEBmcmVlYnNkLm9yZyBtYWlsaW5nIGxpc3QK PiA6ID4gaHR0cDovL2xpc3RzLmZyZWVic2Qub3JnL21haWxtYW4vbGlzdGluZm8vZnJlZWJzZC1j dXJyZW50Cj4gOiA+IFRvIHVuc3Vic2NyaWJlLCBzZW5kIGFueSBtYWlsIHRvICJmcmVlYnNkLWN1 cnJlbnQtdW5zdWJzY3JpYmVAZnJlZWJzZC5vcmciCj4gOiA+Cj4gOgo+IDoKPiA6IC0tCj4gOiAv XCBIaWRldG9zaGkgU2hpbW9rYXdhCj4gOiBcLyAgc2ltb2thd2FARnJlZUJTRC5PUkcKPgoKCi0t IAovXCBIaWRldG9zaGkgU2hpbW9rYXdhClwvICBzaW1va2F3YUBGcmVlQlNELk9SRwo= From owner-freebsd-mobile@FreeBSD.ORG Sun Jun 17 03:14:59 2007 Return-Path: X-Original-To: mobile@freebsd.org Delivered-To: freebsd-mobile@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B98FF16A468; Sun, 17 Jun 2007 03:14:59 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 6608D13C45E; Sun, 17 Jun 2007 03:14:59 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.13.8/8.13.4) with ESMTP id l5H3CR7A032852; Sat, 16 Jun 2007 21:12:28 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Sat, 16 Jun 2007 21:12:57 -0600 (MDT) Message-Id: <20070616.211257.1585999818.imp@bsdimp.com> To: gurney_j@resnet.uoregon.edu From: "M. Warner Losh" In-Reply-To: <20070617024935.GU4602@funkthat.com> References: <626eb4530706160525o54234621s2de098e64cdeb4fe@mail.gmail.com> <20070616.173306.199376574.imp@bsdimp.com> <20070617024935.GU4602@funkthat.com> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Sat, 16 Jun 2007 21:12:33 -0600 (MDT) Cc: simokawa@freebsd.org, current@freebsd.org, wsk@gddsn.org.cn, mobile@freebsd.org Subject: Re: kernel panic with pccard insert on recent 7.0 CURRENT X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jun 2007 03:14:59 -0000 In message: <20070617024935.GU4602@funkthat.com> John-Mark Gurney writes: : Warner Losh wrote this message on Sat, Jun 16, 2007 at 17:33 -0600: : > Also, I'm unclear on the difference between FILTER_STRAY and : > FILTER_HANDLED. : : The interrupt filter is suppose to return one of FILTER_STRAY or : FILTER_HANDLED... If you _HANDLED it return that, otherwise return : _STRAY... If you need to schedule the ithread, return _HANDLED or'd : with _SCHEDULE_THREAD... Will _HANDLED cause all the other handlers to not get called, or just the stray interrupt code from not happening? : I thought piso fixed the comments, but apparently he hasn't (or hasn't : finished committing the patch that includes the comment fixes)... The : comments in bus.h are incorrect... : : > In message: <626eb4530706160525o54234621s2de098e64cdeb4fe@mail.gmail.com> : > "Hidetoshi Shimokawa" writes: : > : I think the following patch fix the problem. : > : : > : RCS file: /home/ncvs/src/sys/dev/pccard/pccard.c,v : > : retrieving revision 1.118 : > : diff -u -r1.118 pccard.c : > : --- pccard.c 31 May 2007 19:29:20 -0000 1.118 : > : +++ pccard.c 16 Jun 2007 12:23:35 -0000 : > : @@ -1238,7 +1238,7 @@ : > : if (pf->intr_filter != NULL || pf->intr_handler != NULL) : > : panic("Only one interrupt handler per function allowed"); : > : err = bus_generic_setup_intr(dev, child, irq, flags, pccard_filter, : > : - pccard_intr, pf, cookiep); : > : + intr ? pccard_intr : NULL, pf, cookiep); : > : if (err != 0) : > : return (err); : > : pf->intr_filter = filt; : > : : > : : > : On 6/16/07, ?????? wrote: : > : > hi, lists : > : > i always get Fatal trap while insert a pccard with recent 7.0 current. : > : > It seems that Can't recognize the pccard address? : > : > thanks with any reply. : > : > : > : > pccard0:Allocation failed for cfe 13 : > : > pccard0:Allocation failed for cfe 21 : > : > uart0: at port 0x3e8-0x3ef irq 11 : > : > function 0 config 29 on pccard0 : > : > uart0:[FILTER] : > : > : > : > Fatal trap 12: page fault while in kernel mode : > : > cpuid = 0; apic id = 00 : > : > fault virtual address = 0x0 : > : > fault code = supervisor read, page not present : > : > instruction pointer = 0x20:0x0 : > : > stack pointer = 0x28:0xe2996cb0 : > : > frame pointer = 0x28:0xe2996cb8 : > : > code segment = base 0x0, limit 0xfffff, type 0x1b : > : > = DPL 0, pres 1, def32 1, gran 1 : > : > processor eflags = interrupt enable, resume, IOPL = 0 : > : > current process = 21 (irq11: cbb0 cbb1+*) : > : > [thread pid 21 tid 100013 ] : > : > Stopped at 0: *** error reading from address 0 *** : > : > db>bt : > : > Tracing pid 21 tid 100013 td 0xc3f05c00 : > : > pccard_intr(c4285e00) at pccard_intr+0x12 : > : > cbb_func_intr(c4103140,0,c0a493ae,40b,c3f00064,...) at cbb_func_intr|0x51 : > : > ithread_loop(c404fab0,e2996d38,83fb5be8,ff06fc46,c3f4b804,...) at : > : > ithread_loop+0 : > : > x1b5 : > : > fork_exit(c074ccd0,c404fab0,e2996d38) at fork_exit+0x57 : > : > fork_trampoline() at fork_trampoline+0x8 : > : > --- trap 0, eip = 0, esp = 0xe2996d70, ebp = 0 --- : : -- : John-Mark Gurney Voice: +1 415 225 5579 : : "All that I will do, has been done, All that I have, has not." : : From owner-freebsd-mobile@FreeBSD.ORG Sun Jun 17 03:20:09 2007 Return-Path: X-Original-To: mobile@freebsd.org Delivered-To: freebsd-mobile@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CCC5916A400; Sun, 17 Jun 2007 03:20:09 +0000 (UTC) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (gate.funkthat.com [69.17.45.168]) by mx1.freebsd.org (Postfix) with ESMTP id 4E5E313C45A; Sun, 17 Jun 2007 03:20:09 +0000 (UTC) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (pc1pay1rpkvkfs3k@localhost.funkthat.com [127.0.0.1]) by hydrogen.funkthat.com (8.13.6/8.13.3) with ESMTP id l5H2nbul030592; Sat, 16 Jun 2007 19:49:37 -0700 (PDT) (envelope-from jmg@hydrogen.funkthat.com) Received: (from jmg@localhost) by hydrogen.funkthat.com (8.13.6/8.13.3/Submit) id l5H2nZOl030591; Sat, 16 Jun 2007 19:49:35 -0700 (PDT) (envelope-from jmg) Date: Sat, 16 Jun 2007 19:49:35 -0700 From: John-Mark Gurney To: "M. Warner Losh" Message-ID: <20070617024935.GU4602@funkthat.com> Mail-Followup-To: "M. Warner Losh" , simokawa@freebsd.org, current@freebsd.org, wsk@gddsn.org.cn, mobile@freebsd.org References: <46734A3E.3010903@gddsn.org.cn> <626eb4530706160525o54234621s2de098e64cdeb4fe@mail.gmail.com> <20070616.173306.199376574.imp@bsdimp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070616.173306.199376574.imp@bsdimp.com> User-Agent: Mutt/1.4.2.1i X-Operating-System: FreeBSD 5.4-RELEASE-p6 i386 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html Cc: simokawa@freebsd.org, current@freebsd.org, wsk@gddsn.org.cn, mobile@freebsd.org Subject: Re: kernel panic with pccard insert on recent 7.0 CURRENT X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: John-Mark Gurney List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jun 2007 03:20:09 -0000 Warner Losh wrote this message on Sat, Jun 16, 2007 at 17:33 -0600: > Also, I'm unclear on the difference between FILTER_STRAY and > FILTER_HANDLED. The interrupt filter is suppose to return one of FILTER_STRAY or FILTER_HANDLED... If you _HANDLED it return that, otherwise return _STRAY... If you need to schedule the ithread, return _HANDLED or'd with _SCHEDULE_THREAD... I thought piso fixed the comments, but apparently he hasn't (or hasn't finished committing the patch that includes the comment fixes)... The comments in bus.h are incorrect... > In message: <626eb4530706160525o54234621s2de098e64cdeb4fe@mail.gmail.com> > "Hidetoshi Shimokawa" writes: > : I think the following patch fix the problem. > : > : RCS file: /home/ncvs/src/sys/dev/pccard/pccard.c,v > : retrieving revision 1.118 > : diff -u -r1.118 pccard.c > : --- pccard.c 31 May 2007 19:29:20 -0000 1.118 > : +++ pccard.c 16 Jun 2007 12:23:35 -0000 > : @@ -1238,7 +1238,7 @@ > : if (pf->intr_filter != NULL || pf->intr_handler != NULL) > : panic("Only one interrupt handler per function allowed"); > : err = bus_generic_setup_intr(dev, child, irq, flags, pccard_filter, > : - pccard_intr, pf, cookiep); > : + intr ? pccard_intr : NULL, pf, cookiep); > : if (err != 0) > : return (err); > : pf->intr_filter = filt; > : > : > : On 6/16/07, ?????? wrote: > : > hi, lists > : > i always get Fatal trap while insert a pccard with recent 7.0 current. > : > It seems that Can't recognize the pccard address? > : > thanks with any reply. > : > > : > pccard0:Allocation failed for cfe 13 > : > pccard0:Allocation failed for cfe 21 > : > uart0: at port 0x3e8-0x3ef irq 11 > : > function 0 config 29 on pccard0 > : > uart0:[FILTER] > : > > : > Fatal trap 12: page fault while in kernel mode > : > cpuid = 0; apic id = 00 > : > fault virtual address = 0x0 > : > fault code = supervisor read, page not present > : > instruction pointer = 0x20:0x0 > : > stack pointer = 0x28:0xe2996cb0 > : > frame pointer = 0x28:0xe2996cb8 > : > code segment = base 0x0, limit 0xfffff, type 0x1b > : > = DPL 0, pres 1, def32 1, gran 1 > : > processor eflags = interrupt enable, resume, IOPL = 0 > : > current process = 21 (irq11: cbb0 cbb1+*) > : > [thread pid 21 tid 100013 ] > : > Stopped at 0: *** error reading from address 0 *** > : > db>bt > : > Tracing pid 21 tid 100013 td 0xc3f05c00 > : > pccard_intr(c4285e00) at pccard_intr+0x12 > : > cbb_func_intr(c4103140,0,c0a493ae,40b,c3f00064,...) at cbb_func_intr|0x51 > : > ithread_loop(c404fab0,e2996d38,83fb5be8,ff06fc46,c3f4b804,...) at > : > ithread_loop+0 > : > x1b5 > : > fork_exit(c074ccd0,c404fab0,e2996d38) at fork_exit+0x57 > : > fork_trampoline() at fork_trampoline+0x8 > : > --- trap 0, eip = 0, esp = 0xe2996d70, ebp = 0 --- -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-freebsd-mobile@FreeBSD.ORG Sun Jun 17 05:37:55 2007 Return-Path: X-Original-To: mobile@freebsd.org Delivered-To: freebsd-mobile@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8AD0716A46C; Sun, 17 Jun 2007 05:37:55 +0000 (UTC) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (gate.funkthat.com [69.17.45.168]) by mx1.freebsd.org (Postfix) with ESMTP id 5207413C45E; Sun, 17 Jun 2007 05:37:55 +0000 (UTC) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (ibee8hqa1aj5s28m@localhost.funkthat.com [127.0.0.1]) by hydrogen.funkthat.com (8.13.6/8.13.3) with ESMTP id l5H5blfH033108; Sat, 16 Jun 2007 22:37:48 -0700 (PDT) (envelope-from jmg@hydrogen.funkthat.com) Received: (from jmg@localhost) by hydrogen.funkthat.com (8.13.6/8.13.3/Submit) id l5H5bkJK033107; Sat, 16 Jun 2007 22:37:46 -0700 (PDT) (envelope-from jmg) Date: Sat, 16 Jun 2007 22:37:46 -0700 From: John-Mark Gurney To: "M. Warner Losh" Message-ID: <20070617053746.GV4602@funkthat.com> Mail-Followup-To: "M. Warner Losh" , simokawa@freebsd.org, current@freebsd.org, wsk@gddsn.org.cn, mobile@freebsd.org References: <626eb4530706160525o54234621s2de098e64cdeb4fe@mail.gmail.com> <20070616.173306.199376574.imp@bsdimp.com> <20070617024935.GU4602@funkthat.com> <20070616.211257.1585999818.imp@bsdimp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070616.211257.1585999818.imp@bsdimp.com> User-Agent: Mutt/1.4.2.1i X-Operating-System: FreeBSD 5.4-RELEASE-p6 i386 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html Cc: simokawa@freebsd.org, current@freebsd.org, wsk@gddsn.org.cn, mobile@freebsd.org Subject: Re: kernel panic with pccard insert on recent 7.0 CURRENT X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: John-Mark Gurney List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jun 2007 05:37:55 -0000 Warner Losh wrote this message on Sat, Jun 16, 2007 at 21:12 -0600: > In message: <20070617024935.GU4602@funkthat.com> > John-Mark Gurney writes: > : Warner Losh wrote this message on Sat, Jun 16, 2007 at 17:33 -0600: > : > Also, I'm unclear on the difference between FILTER_STRAY and > : > FILTER_HANDLED. > : > : The interrupt filter is suppose to return one of FILTER_STRAY or > : FILTER_HANDLED... If you _HANDLED it return that, otherwise return > : _STRAY... If you need to schedule the ithread, return _HANDLED or'd > : with _SCHEDULE_THREAD... > > Will _HANDLED cause all the other handlers to not get called, or just > the stray interrupt code from not happening? It will cause the remaining (not yet called) handlers not to get called... intr_event_handle calls intr_filter_loop which will return on the first non-_STRAY handler and return it... Which intr_event_handle eoi's... It looks like this code is designed for level triggered interrupts and not edge triggered... > : I thought piso fixed the comments, but apparently he hasn't (or hasn't > : finished committing the patch that includes the comment fixes)... The > : comments in bus.h are incorrect... > : > : > In message: <626eb4530706160525o54234621s2de098e64cdeb4fe@mail.gmail.com> > : > "Hidetoshi Shimokawa" writes: > : > : I think the following patch fix the problem. > : > : > : > : RCS file: /home/ncvs/src/sys/dev/pccard/pccard.c,v > : > : retrieving revision 1.118 > : > : diff -u -r1.118 pccard.c > : > : --- pccard.c 31 May 2007 19:29:20 -0000 1.118 > : > : +++ pccard.c 16 Jun 2007 12:23:35 -0000 > : > : @@ -1238,7 +1238,7 @@ > : > : if (pf->intr_filter != NULL || pf->intr_handler != NULL) > : > : panic("Only one interrupt handler per function allowed"); > : > : err = bus_generic_setup_intr(dev, child, irq, flags, pccard_filter, > : > : - pccard_intr, pf, cookiep); > : > : + intr ? pccard_intr : NULL, pf, cookiep); > : > : if (err != 0) > : > : return (err); > : > : pf->intr_filter = filt; > : > : > : > : > : > : On 6/16/07, ?????? wrote: > : > : > hi, lists > : > : > i always get Fatal trap while insert a pccard with recent 7.0 current. > : > : > It seems that Can't recognize the pccard address? > : > : > thanks with any reply. > : > : > > : > : > pccard0:Allocation failed for cfe 13 > : > : > pccard0:Allocation failed for cfe 21 > : > : > uart0: at port 0x3e8-0x3ef irq 11 > : > : > function 0 config 29 on pccard0 > : > : > uart0:[FILTER] > : > : > > : > : > Fatal trap 12: page fault while in kernel mode > : > : > cpuid = 0; apic id = 00 > : > : > fault virtual address = 0x0 > : > : > fault code = supervisor read, page not present > : > : > instruction pointer = 0x20:0x0 > : > : > stack pointer = 0x28:0xe2996cb0 > : > : > frame pointer = 0x28:0xe2996cb8 > : > : > code segment = base 0x0, limit 0xfffff, type 0x1b > : > : > = DPL 0, pres 1, def32 1, gran 1 > : > : > processor eflags = interrupt enable, resume, IOPL = 0 > : > : > current process = 21 (irq11: cbb0 cbb1+*) > : > : > [thread pid 21 tid 100013 ] > : > : > Stopped at 0: *** error reading from address 0 *** > : > : > db>bt > : > : > Tracing pid 21 tid 100013 td 0xc3f05c00 > : > : > pccard_intr(c4285e00) at pccard_intr+0x12 > : > : > cbb_func_intr(c4103140,0,c0a493ae,40b,c3f00064,...) at cbb_func_intr|0x51 > : > : > ithread_loop(c404fab0,e2996d38,83fb5be8,ff06fc46,c3f4b804,...) at > : > : > ithread_loop+0 > : > : > x1b5 > : > : > fork_exit(c074ccd0,c404fab0,e2996d38) at fork_exit+0x57 > : > : > fork_trampoline() at fork_trampoline+0x8 > : > : > --- trap 0, eip = 0, esp = 0xe2996d70, ebp = 0 --- -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-freebsd-mobile@FreeBSD.ORG Sun Jun 17 05:57:17 2007 Return-Path: X-Original-To: mobile@FreeBSD.org Delivered-To: freebsd-mobile@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EF68516A468; Sun, 17 Jun 2007 05:57:16 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 9B55D13C468; Sun, 17 Jun 2007 05:57:16 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.13.8/8.13.4) with ESMTP id l5H5uTjk033772; Sat, 16 Jun 2007 23:56:29 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Sat, 16 Jun 2007 23:56:59 -0600 (MDT) Message-Id: <20070616.235659.-1947354616.imp@bsdimp.com> To: gurney_j@resnet.uoregon.edu From: "M. Warner Losh" In-Reply-To: <20070617053746.GV4602@funkthat.com> References: <20070617024935.GU4602@funkthat.com> <20070616.211257.1585999818.imp@bsdimp.com> <20070617053746.GV4602@funkthat.com> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Sat, 16 Jun 2007 23:56:29 -0600 (MDT) Cc: simokawa@FreeBSD.org, current@FreeBSD.org, wsk@gddsn.org.cn, mobile@FreeBSD.org Subject: Re: kernel panic with pccard insert on recent 7.0 CURRENT X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jun 2007 05:57:17 -0000 In message: <20070617053746.GV4602@funkthat.com> John-Mark Gurney writes: : Warner Losh wrote this message on Sat, Jun 16, 2007 at 21:12 -0600: : > In message: <20070617024935.GU4602@funkthat.com> : > John-Mark Gurney writes: : > : Warner Losh wrote this message on Sat, Jun 16, 2007 at 17:33 -0600: : > : > Also, I'm unclear on the difference between FILTER_STRAY and : > : > FILTER_HANDLED. : > : : > : The interrupt filter is suppose to return one of FILTER_STRAY or : > : FILTER_HANDLED... If you _HANDLED it return that, otherwise return : > : _STRAY... If you need to schedule the ithread, return _HANDLED or'd : > : with _SCHEDULE_THREAD... : > : > Will _HANDLED cause all the other handlers to not get called, or just : > the stray interrupt code from not happening? : : It will cause the remaining (not yet called) handlers not to get called... I'm not sure that's right, especially for edge triggered devices. : intr_event_handle calls intr_filter_loop which will return on the first : non-_STRAY handler and return it... Which intr_event_handle eoi's... : : It looks like this code is designed for level triggered interrupts and : not edge triggered... Yes. I'm pretty sure that's wrong. All ISA and PC Card devices use edge triggered interrupts. Also, it is inefficient for level triggered interrupts, since two interrupt sources on the same interrupt may trigger at about the same time... Warner : > : I thought piso fixed the comments, but apparently he hasn't (or hasn't : > : finished committing the patch that includes the comment fixes)... The : > : comments in bus.h are incorrect... : > : : > : > In message: <626eb4530706160525o54234621s2de098e64cdeb4fe@mail.gmail.com> : > : > "Hidetoshi Shimokawa" writes: : > : > : I think the following patch fix the problem. : > : > : : > : > : RCS file: /home/ncvs/src/sys/dev/pccard/pccard.c,v : > : > : retrieving revision 1.118 : > : > : diff -u -r1.118 pccard.c : > : > : --- pccard.c 31 May 2007 19:29:20 -0000 1.118 : > : > : +++ pccard.c 16 Jun 2007 12:23:35 -0000 : > : > : @@ -1238,7 +1238,7 @@ : > : > : if (pf->intr_filter != NULL || pf->intr_handler != NULL) : > : > : panic("Only one interrupt handler per function allowed"); : > : > : err = bus_generic_setup_intr(dev, child, irq, flags, pccard_filter, : > : > : - pccard_intr, pf, cookiep); : > : > : + intr ? pccard_intr : NULL, pf, cookiep); : > : > : if (err != 0) : > : > : return (err); : > : > : pf->intr_filter = filt; : > : > : : > : > : : > : > : On 6/16/07, ?????? wrote: : > : > : > hi, lists : > : > : > i always get Fatal trap while insert a pccard with recent 7.0 current. : > : > : > It seems that Can't recognize the pccard address? : > : > : > thanks with any reply. : > : > : > : > : > : > pccard0:Allocation failed for cfe 13 : > : > : > pccard0:Allocation failed for cfe 21 : > : > : > uart0: at port 0x3e8-0x3ef irq 11 : > : > : > function 0 config 29 on pccard0 : > : > : > uart0:[FILTER] : > : > : > : > : > : > Fatal trap 12: page fault while in kernel mode : > : > : > cpuid = 0; apic id = 00 : > : > : > fault virtual address = 0x0 : > : > : > fault code = supervisor read, page not present : > : > : > instruction pointer = 0x20:0x0 : > : > : > stack pointer = 0x28:0xe2996cb0 : > : > : > frame pointer = 0x28:0xe2996cb8 : > : > : > code segment = base 0x0, limit 0xfffff, type 0x1b : > : > : > = DPL 0, pres 1, def32 1, gran 1 : > : > : > processor eflags = interrupt enable, resume, IOPL = 0 : > : > : > current process = 21 (irq11: cbb0 cbb1+*) : > : > : > [thread pid 21 tid 100013 ] : > : > : > Stopped at 0: *** error reading from address 0 *** : > : > : > db>bt : > : > : > Tracing pid 21 tid 100013 td 0xc3f05c00 : > : > : > pccard_intr(c4285e00) at pccard_intr+0x12 : > : > : > cbb_func_intr(c4103140,0,c0a493ae,40b,c3f00064,...) at cbb_func_intr|0x51 : > : > : > ithread_loop(c404fab0,e2996d38,83fb5be8,ff06fc46,c3f4b804,...) at : > : > : > ithread_loop+0 : > : > : > x1b5 : > : > : > fork_exit(c074ccd0,c404fab0,e2996d38) at fork_exit+0x57 : > : > : > fork_trampoline() at fork_trampoline+0x8 : > : > : > --- trap 0, eip = 0, esp = 0xe2996d70, ebp = 0 --- : : -- : John-Mark Gurney Voice: +1 415 225 5579 : : "All that I will do, has been done, All that I have, has not." : : From owner-freebsd-mobile@FreeBSD.ORG Sun Jun 17 07:44:59 2007 Return-Path: X-Original-To: mobile@freebsd.org Delivered-To: freebsd-mobile@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 80C3316A41F for ; Sun, 17 Jun 2007 07:44:59 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 3154F13C4BD for ; Sun, 17 Jun 2007 07:44:59 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.13.8/8.13.4) with ESMTP id l5H7gZST034508 for ; Sun, 17 Jun 2007 01:42:35 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Sun, 17 Jun 2007 01:43:05 -0600 (MDT) Message-Id: <20070617.014305.1899944383.imp@bsdimp.com> To: mobile@freebsd.org From: "M. Warner Losh" X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Multipart/Mixed; boundary="--Next_Part(Sun_Jun_17_01_43_05_2007_915)--" Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Sun, 17 Jun 2007 01:42:36 -0600 (MDT) Cc: Subject: Fw: cvs commit: src/sys/dev/usb usb_subr.c X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jun 2007 07:44:59 -0000 ----Next_Part(Sun_Jun_17_01_43_05_2007_915)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit I think this might be the cause of woe for some people who are using CardBus cards that are really usb host controller + usb hub + usb device for things like 3G wireless. If this sounds like you, can you please try this patch? Warner ----Next_Part(Sun_Jun_17_01_43_05_2007_915)-- Content-Type: Message/Rfc822 Content-Transfer-Encoding: 7bit Content-Disposition: inline Return-Path: owner-src-committers@FreeBSD.ORG Delivery-Date: Sun, 17 Jun 2007 01:39:31 -0600 X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on harmony.bsdimp.com X-Spam-Level: X-Spam-Status: No, score=-2.6 required=3.5 tests=BAYES_00 autolearn=ham version=3.1.7 Received: from mx2.freebsd.org (mx2.freebsd.org [69.147.83.53]) by harmony.bsdimp.com (8.13.8/8.13.4) with ESMTP id l5H7ZxNm034399 for ; Sun, 17 Jun 2007 01:36:00 -0600 (MDT) (envelope-from owner-src-committers@FreeBSD.org) Received: from hub.freebsd.org (hub.freebsd.org [69.147.83.54]) by mx2.freebsd.org (Postfix) with ESMTP id 6F489B85A7 for ; Sun, 17 Jun 2007 07:34:03 +0000 (UTC) (envelope-from owner-src-committers@FreeBSD.org) Received: by hub.freebsd.org (Postfix) id 9DD9716A4E7; Sun, 17 Jun 2007 07:34:02 +0000 (UTC) Delivered-To: imp@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 538) id 4374716A46B; Sun, 17 Jun 2007 07:34:02 +0000 (UTC) X-Original-To: src-committers@FreeBSD.org Delivered-To: src-committers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0DE2216A47A; Sun, 17 Jun 2007 07:34:01 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.freebsd.org (Postfix) with ESMTP id C096213C457; Sun, 17 Jun 2007 07:34:00 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.8/8.13.8) with ESMTP id l5H7Y0tt040452; Sun, 17 Jun 2007 07:34:00 GMT (envelope-from imp@repoman.freebsd.org) Received: (from imp@localhost) by repoman.freebsd.org (8.13.8/8.13.8/Submit) id l5H7Y0E4040442; Sun, 17 Jun 2007 07:34:00 GMT (envelope-from imp) Message-Id: <200706170734.l5H7Y0E4040442@repoman.freebsd.org> From: Warner Losh Date: Sun, 17 Jun 2007 07:34:00 +0000 (UTC) To: src-committers@FreeBSD.ORG, cvs-src@FreeBSD.ORG, cvs-all@FreeBSD.ORG Subject: cvs commit: src/sys/dev/usb usb_subr.c X-FreeBSD-CVS-Branch: HEAD Sender: owner-src-committers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG X-Greylist: Sender e-mail whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [10.0.0.6]); Sun, 17 Jun 2007 01:36:00 -0600 (MDT) imp 2007-06-17 07:34:00 UTC FreeBSD src repository Modified files: sys/dev/usb usb_subr.c Log: Expand USB_DO_ATTACH inline. Remove device_t dv, since it is no longer needed. Add sizeof(device_t) to replace sizeof dv. Change device_detach(dev) to device_detach(dev->subdevs[i]) since the type of dev isn't right! Not sure when this was introduced, but it likely would lead to a crash on disconnect. MFC After: 1 week Revision Changes Path 1.93 +8 -12 src/sys/dev/usb/usb_subr.c http://cvsweb.FreeBSD.ORG/src/sys/dev/usb/usb_subr.c ----Next_Part(Sun_Jun_17_01_43_05_2007_915)---- From owner-freebsd-mobile@FreeBSD.ORG Sun Jun 17 07:54:47 2007 Return-Path: X-Original-To: mobile@freebsd.org Delivered-To: freebsd-mobile@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EA4E916A46B; Sun, 17 Jun 2007 07:54:47 +0000 (UTC) (envelope-from wsk@gddsn.org.cn) Received: from gddsn.org.cn (gddsn.org.cn [218.19.164.145]) by mx1.freebsd.org (Postfix) with ESMTP id 9C16313C4BB; Sun, 17 Jun 2007 07:54:17 +0000 (UTC) (envelope-from wsk@gddsn.org.cn) Received: from [127.0.0.1] (unknown [10.44.99.158]) by gddsn.org.cn (Postfix) with ESMTP id 9141038CB99; Sun, 17 Jun 2007 15:53:57 +0800 (CST) Message-ID: <4674E892.8020201@gddsn.org.cn> Date: Sun, 17 Jun 2007 15:53:54 +0800 From: =?GB2312?B?zuLK5cCk?= User-Agent: Thunderbird 1.5.0.2 (Windows/20060308) MIME-Version: 1.0 To: Hidetoshi Shimokawa , current@freebsd.org, mobile@freebsd.org References: <46734A3E.3010903@gddsn.org.cn> <626eb4530706160525o54234621s2de098e64cdeb4fe@mail.gmail.com> In-Reply-To: <626eb4530706160525o54234621s2de098e64cdeb4fe@mail.gmail.com> Content-Type: text/plain; charset=GB2312 Content-Transfer-Encoding: 7bit Cc: Subject: Re: kernel panic with pccard insert on recent 7.0 CURRENT X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jun 2007 07:54:48 -0000 Hidetoshi Shimokawa Wrote: > I think the following patch fix the problem. > > RCS file: /home/ncvs/src/sys/dev/pccard/pccard.c,v > retrieving revision 1.118 > diff -u -r1.118 pccard.c > --- pccard.c 31 May 2007 19:29:20 -0000 1.118 > +++ pccard.c 16 Jun 2007 12:23:35 -0000 > @@ -1238,7 +1238,7 @@ > if (pf->intr_filter != NULL || pf->intr_handler != NULL) > panic("Only one interrupt handler per function allowed"); > err = bus_generic_setup_intr(dev, child, irq, flags, pccard_filter, > - pccard_intr, pf, cookiep); > + intr ? pccard_intr : NULL, pf, cookiep); > if (err != 0) > return (err); > pf->intr_filter = filt; > yup, It work for me with your patch anyway. thanks for your patch and help ;-) From owner-freebsd-mobile@FreeBSD.ORG Sun Jun 17 16:50:21 2007 Return-Path: X-Original-To: mobile@freebsd.org Delivered-To: freebsd-mobile@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BAD3016A47E for ; Sun, 17 Jun 2007 16:50:21 +0000 (UTC) (envelope-from jhs@berklix.org) Received: from thin.berklix.org (thin.berklix.org [194.246.123.68]) by mx1.freebsd.org (Postfix) with ESMTP id 083C513C465 for ; Sun, 17 Jun 2007 16:50:20 +0000 (UTC) (envelope-from jhs@berklix.org) Received: from js.berklix.org (p549A7EC6.dip.t-dialin.net [84.154.126.198]) (authenticated bits=128) by thin.berklix.org (8.12.11/8.12.11) with ESMTP id l5HGo95f090441; Sun, 17 Jun 2007 18:50:09 +0200 (CEST) (envelope-from jhs@berklix.org) Received: from fire.js.berklix.net (fire.js.berklix.net [192.168.91.41]) by js.berklix.org (8.13.6/8.13.6) with ESMTP id l5HGo4hb004381; Sun, 17 Jun 2007 18:50:05 +0200 (CEST) (envelope-from jhs@berklix.org) Received: from fire.js.berklix.net (localhost.js.berklix.net [127.0.0.1]) by fire.js.berklix.net (8.13.6/8.13.6) with ESMTP id l5HGo8mV052937; Sun, 17 Jun 2007 18:50:08 +0200 (CEST) (envelope-from jhs@fire.js.berklix.net) Message-Id: <200706171650.l5HGo8mV052937@fire.js.berklix.net> To: mobile@freebsd.org In-reply-to: <200706132127.l5DLRZag094742@fire.jhs.private> References: <200706091602.l59G2psm042173@fire.jhs.private> <200706122029.l5CKTQ3n071855@fire.jhs.private> <7AEB6780-A5CB-4D96-9F0E-9179692D6E4B@ultra-secure.de> <200706132127.l5DLRZag094742@fire.jhs.private> Comments: In-reply-to "Julian H. Stacey" message dated "Wed, 13 Jun 2007 23:27:35 +0200." Date: Sun, 17 Jun 2007 18:50:08 +0200 From: "Julian H. Stacey" Cc: ghozzy , Rainer Duffner Subject: Re: FreeBSD-6 fails to install on too many old laptops. X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jun 2007 16:50:21 -0000 > Could you & others please look at list > http://berklix.org/~jhs/hardware/laptops/#loader.conf > Which of those & other options should I add to "bootsafekey" in > /usr/src/sys/boot/forth/beastie.4th > to help a "Safe" boot ? > Then I'll send-pr a diff to extend chance of other older laptops booting. > & will roll new floppies(*) & put up for ftp; (no prob, done releases before). If any replied privately to me between maybe Sat 14:00 & Sun Jun 17 18:10 CEST 2007, please resend as I lost mail (my typo. in .procmailrc). I did earlier get a private reply from Tuc at Beach House But there was no next in thread on: http://docs.freebsd.org/cgi/getmsg.cgi?fetch=20493+0+archive/2007/freebsd-mobile/20070617.freebsd-mobile I want to make a diff & send-pr it, but advice needed please, what should one leave on & off for a maximum chance of a slow safe boot of old legacy hardware. Please correct my notes extracted from here, Thanks: http://berklix.org/~jhs/hardware/laptops/#loader.conf --------------------------------- Things That May Help Force Old Machines To Boot / Install * boot_verbose="yes" * verbose_loading="yes" * debug.bootverbose=1 * hint.acpi.0.disabled="1" # set to boot with acpi disabled. Dell_Latitude_XPi_P133ST Above is set by forth/beastie.4th:bootsafekey * loader.acpi_disabled_by_user=1 # Dell_Latitude_XPi_P133ST Above is set by forth/beastie.4th:bootsafekey * hint.apm.0.disabled="1" # found on host=fire with kenv. Dell_Latitude_XPi_P133ST * hint.apic.0.disabled="1" # set to boot in safe mode Dell_Latitude_XPi_P133ST Above set by forth/beastie.4th:bootsafekey * hw.ata.ata_dma=0 # ATA disk DMA mode control Dell_Latitude_XPi_P133ST needed by Dell Latitude XPi P133ST says Ian Freilich , 07.10.2004 Above referenced by forth/beastie.4th:bootsafekey * hw.ata.atapi_dma=0 # ATAPI device DMA mode control Dell_Latitude_XPi_P133ST Above referenced by forth/beastie.4th:bootsafekey * hw.ata.wc=0 # ATA disk write caching Dell_Latitude_XPi_P133ST Above referenced by forth/beastie.4th:bootsafekey * hw.eisa_slots=0 # Dell_Latitude_XPi_P133ST Above referenced by forth/beastie.4th:bootsafekey * hint.kbdmux.0.disabled=1 Above is referenced by forth/beastie.4th:bootsafekey * hw.pci.enable_io_modes=0 # use if boot hangs after AGP * hw.pcic.ignore_pci=1 # ignore pci cardbus bridges Dell_Latitude_XPi_P133ST * hw.pcic.intr_path="1" # Needed by host=lapa Dell_Latitude_XPi_P133ST Normally interrupts for cardbus bridges are routed over the PCI bus (2). However, some laptops will hang when using PCI interrupts due to bugs in this code. Those bugs can be worked around by forcing ISA interrupts (1). Warner wrote: Libretto-50 and Libretto-70 machines have only ISA PCMCIA bridges * hw.pcic.irq="0" # Needed by host=lapa Dell_Latitude_XPi_P133ST Override IRQ configured by system for all pcic devices * hw.pcic.pd6729_intr_path Determine interrupt path or method for Cirrus Logic PD6729 and similar I/O space based pcmcia bridge. Chips on a PCI expansion card need a value of 2, while chips installed in a laptop need a value of 1 (which is also the default). This is similar to hw.pcic.intr_path, but separate so that it can default to ISA when intr_path defaults to PCI. * hw.pcic.ti12xx_enable_pci_clock Some TI-12xx parts need to have the PCI clock enabled. These designs do not provide a clock themselves. Most of the reference boards have the required oscillator parts, so the number of machines that needs this to be set is vanishingly small. * machdep.bios.pci=disable # Dell_Latitude_XPi_P133ST * machdep.bios.pnp=disable # Dell_Latitude_XPi_P133ST * machdep.pccard.pcic_irq="0" # PCCARD controller IRQ (0=polled) Dell_Latitude_XPi_P133ST * machdep.pccard.pcic_irq=11 -- Julian Stacey. Munich Computer Consultant, BSD Unix C Linux. http://berklix.com HTML mail unseen. Ihr Rauch=mein allergischer Kopfschmerz. Dump cigs 4 snuff. From owner-freebsd-mobile@FreeBSD.ORG Mon Jun 18 15:33:48 2007 Return-Path: X-Original-To: freebsd-mobile@freebsd.org Delivered-To: freebsd-mobile@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 757E016A421 for ; Mon, 18 Jun 2007 15:33:48 +0000 (UTC) (envelope-from besko@msu.edu) Received: from sys29.mail.msu.edu (sys29.mail.msu.edu [35.9.75.129]) by mx1.freebsd.org (Postfix) with ESMTP id 4886313C457 for ; Mon, 18 Jun 2007 15:33:48 +0000 (UTC) (envelope-from besko@msu.edu) Received: from sector14.cl.msu.edu ([35.8.1.195]) by sys29.mail.msu.edu with esmtpsa (Exim 4.63 #1) (TLSv1:AES256-SHA:256) id 1I0Iii-00014y-QA; Mon, 18 Jun 2007 11:00:44 -0400 Message-ID: <46769E1B.7030509@msu.edu> Date: Mon, 18 Jun 2007 11:00:43 -0400 From: Lisa Besko User-Agent: Thunderbird 2.0.0.0 (X11/20070607) MIME-Version: 1.0 To: Michael Lestinsky References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus: None found by Clam AV Cc: freebsd-mobile@freebsd.org Subject: Re: i965GM / Dell Latitude D630 X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: besko@msu.edu List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Jun 2007 15:33:48 -0000 Michael Lestinsky wrote: > Hi, > > did anyone here already have success installing X11 on a system with > i965GM graphics? What I found out so far, is the xf86-video-intel driver > seems to be the right one, but it fails due to a missing /dev/agpgart. > Did anyone have success with this, yet? I was having issues with this on my Thinkpad Z61t. I cvsuped down a new version of stable last week and rebuilt world and was able to get things working again. I was getting errors about /dev/agpgart missing. This has the 954GM chipset and is using the i810 driver. I'm running FreeBSD 6.2-STABLE #4 now. From owner-freebsd-mobile@FreeBSD.ORG Mon Jun 18 18:36:44 2007 Return-Path: X-Original-To: mobile@FreeBSD.org Delivered-To: freebsd-mobile@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 07DAC16A4C7; Mon, 18 Jun 2007 18:36:44 +0000 (UTC) (envelope-from piso@newluxor.wired.org) Received: from mail.oltrelinux.com (krisma.oltrelinux.com [194.242.226.43]) by mx1.freebsd.org (Postfix) with ESMTP id 2608413C489; Mon, 18 Jun 2007 18:36:43 +0000 (UTC) (envelope-from piso@newluxor.wired.org) Received: from newluxor.wired.org (ip-67-154.sn2.eutelia.it [83.211.67.154]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.oltrelinux.com (Postfix) with ESMTP id 60FA911AE43; Mon, 18 Jun 2007 20:36:41 +0200 (CEST) Received: (from piso@localhost) by newluxor.wired.org (8.14.1/8.14.1/Submit) id l5IIaSFo002196; Mon, 18 Jun 2007 20:36:28 +0200 (CEST) (envelope-from piso) Date: Mon, 18 Jun 2007 20:36:27 +0200 From: Paolo Pisati To: Hidetoshi Shimokawa Message-ID: <20070618183627.GA2183@tin.it> References: <46734A3E.3010903@gddsn.org.cn> <626eb4530706160525o54234621s2de098e64cdeb4fe@mail.gmail.com> <20070616.173002.-457443410.imp@bsdimp.com> <626eb4530706161858l5f60d67ej55874cb9348e649b@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <626eb4530706161858l5f60d67ej55874cb9348e649b@mail.gmail.com> User-Agent: Mutt/1.4.2.2i X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at krisma.oltrelinux.com Cc: mobile@FreeBSD.org, wsk@gddsn.org.cn, Paolo Pisati , current@FreeBSD.org Subject: Re: kernel panic with pccard insert on recent 7.0 CURRENT X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Jun 2007 18:36:44 -0000 On Sun, Jun 17, 2007 at 10:58:12AM +0900, Hidetoshi Shimokawa wrote: > And INTR_FILTER doesn't seem well-tested at least for > handling of stray interrupts for filter only IRQs. > I need the following patch to workaroung the problem. > > http://people.freebsd.org/~simokawa/tmp/kern_intr.c-20070617.patch on which platform? cause, right now, if there's a stray interrupt we disable the irq line if the interrut disable function is hooked to ie_disab: kern_intr.c::intr_event_handle(): ... if (thread & FILTER_HANDLED) { if (ie->ie_eoi != NULL) ie->ie_eoi(ie->ie_source); } else { if (ie->ie_disab != NULL) ie->ie_disab(ie->ie_source); } ... bye, P. From owner-freebsd-mobile@FreeBSD.ORG Mon Jun 18 18:40:26 2007 Return-Path: X-Original-To: mobile@FreeBSD.org Delivered-To: freebsd-mobile@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0895D16A400; Mon, 18 Jun 2007 18:40:26 +0000 (UTC) (envelope-from piso@newluxor.wired.org) Received: from mail.oltrelinux.com (krisma.oltrelinux.com [194.242.226.43]) by mx1.freebsd.org (Postfix) with ESMTP id B946613C46A; Mon, 18 Jun 2007 18:40:25 +0000 (UTC) (envelope-from piso@newluxor.wired.org) Received: from newluxor.wired.org (ip-67-154.sn2.eutelia.it [83.211.67.154]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.oltrelinux.com (Postfix) with ESMTP id 66FC011AE43; Mon, 18 Jun 2007 20:22:32 +0200 (CEST) Received: (from piso@localhost) by newluxor.wired.org (8.14.1/8.14.1/Submit) id l5IIMCkD002111; Mon, 18 Jun 2007 20:22:12 +0200 (CEST) (envelope-from piso) Date: Mon, 18 Jun 2007 20:22:11 +0200 From: Paolo Pisati To: "M. Warner Losh" Message-ID: <20070618182211.GA2055@tin.it> References: <46734A3E.3010903@gddsn.org.cn> <626eb4530706160525o54234621s2de098e64cdeb4fe@mail.gmail.com> <20070616.173002.-457443410.imp@bsdimp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070616.173002.-457443410.imp@bsdimp.com> User-Agent: Mutt/1.4.2.2i X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at krisma.oltrelinux.com Cc: simokawa@FreeBSD.org, current@FreeBSD.org, wsk@gddsn.org.cn, mobile@FreeBSD.org Subject: Re: kernel panic with pccard insert on recent 7.0 CURRENT X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Jun 2007 18:40:26 -0000 On Sat, Jun 16, 2007 at 05:30:02PM -0600, M. Warner Losh wrote: > Is there some reason we don't compile INTR_FILTER by default? cause only i386 and amd64 are ready to use INTR_FILTER, all the others need some work on the low level bits. After 7.0 is shipped, i will turn it on. bye, P. From owner-freebsd-mobile@FreeBSD.ORG Mon Jun 18 18:54:39 2007 Return-Path: X-Original-To: mobile@freebsd.org Delivered-To: freebsd-mobile@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E3F5816A473; Mon, 18 Jun 2007 18:54:39 +0000 (UTC) (envelope-from piso@newluxor.wired.org) Received: from mail.oltrelinux.com (krisma.oltrelinux.com [194.242.226.43]) by mx1.freebsd.org (Postfix) with ESMTP id 9EA0B13C448; Mon, 18 Jun 2007 18:54:39 +0000 (UTC) (envelope-from piso@newluxor.wired.org) Received: from newluxor.wired.org (ip-67-154.sn2.eutelia.it [83.211.67.154]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.oltrelinux.com (Postfix) with ESMTP id DEF3511AE90; Mon, 18 Jun 2007 20:54:40 +0200 (CEST) Received: (from piso@localhost) by newluxor.wired.org (8.14.1/8.14.1/Submit) id l5IIsZvA002319; Mon, 18 Jun 2007 20:54:35 +0200 (CEST) (envelope-from piso) Date: Mon, 18 Jun 2007 20:54:34 +0200 From: Paolo Pisati To: "M. Warner Losh" , simokawa@freebsd.org, current@freebsd.org, wsk@gddsn.org.cn, mobile@freebsd.org Message-ID: <20070618185434.GB2183@tin.it> References: <46734A3E.3010903@gddsn.org.cn> <626eb4530706160525o54234621s2de098e64cdeb4fe@mail.gmail.com> <20070616.173306.199376574.imp@bsdimp.com> <20070617024935.GU4602@funkthat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070617024935.GU4602@funkthat.com> User-Agent: Mutt/1.4.2.2i X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at krisma.oltrelinux.com Cc: Subject: Re: kernel panic with pccard insert on recent 7.0 CURRENT X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Jun 2007 18:54:40 -0000 On Sat, Jun 16, 2007 at 07:49:35PM -0700, John-Mark Gurney wrote: > Warner Losh wrote this message on Sat, Jun 16, 2007 at 17:33 -0600: > > Also, I'm unclear on the difference between FILTER_STRAY and > > FILTER_HANDLED. > > The interrupt filter is suppose to return one of FILTER_STRAY or > FILTER_HANDLED... If you _HANDLED it return that, otherwise return > _STRAY... If you need to schedule the ithread, return _HANDLED or'd > with _SCHEDULE_THREAD... right. > I thought piso fixed the comments, but apparently he hasn't (or hasn't > finished committing the patch that includes the comment fixes)... The > comments in bus.h are incorrect... http://people.freebsd.org/~piso/bus.h.diff http://people.freebsd.org/~piso/BUS_SETUP_INTR.9.diff bye, P. From owner-freebsd-mobile@FreeBSD.ORG Mon Jun 18 21:02:29 2007 Return-Path: X-Original-To: freebsd-mobile@freebsd.org Delivered-To: freebsd-mobile@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A7C6A16A400 for ; Mon, 18 Jun 2007 21:02:29 +0000 (UTC) (envelope-from brian.hoort@gmail.com) Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.228]) by mx1.freebsd.org (Postfix) with ESMTP id 50F9113C4BE for ; Mon, 18 Jun 2007 21:02:29 +0000 (UTC) (envelope-from brian.hoort@gmail.com) Received: by wx-out-0506.google.com with SMTP id h28so1410080wxd for ; Mon, 18 Jun 2007 14:02:28 -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=YMhiZ5d9a4ghb46gqha9Fww5G//Pmh0JkUKYAyGGfe6ihXlcAmjfzT9KIIjayEfvwDQI8MfwC/IpGSU1UmrpTDEtH8PfVPlGEjCnofEgTkML6svbWWk5eBAphBR3Ll7KTevj/Slyem5YNG1NjTG7WjkKptUbf9GtmoQUwYrCVL0= 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=qm1zaLepmh6GxvNMONokKfKWnWZfwk3WlU2hxlqwyzbgdBGswcdx/tWOG6leJ6vm/creh9psAcBAbdc46U0gdEdCiH7dZz0npSOLTBsNe/M2G/fl+zqvm2qK39aBuKsuwFKakR43IcKmeTAiMpmR5+6CxbZjBuTvEHbqbog5eQ0= Received: by 10.70.29.2 with SMTP id c2mr10230822wxc.1182198940557; Mon, 18 Jun 2007 13:35:40 -0700 (PDT) Received: by 10.70.46.12 with HTTP; Mon, 18 Jun 2007 13:35:40 -0700 (PDT) Message-ID: <790c34130706181335n73fc48eeo15bddd1157db730a@mail.gmail.com> Date: Mon, 18 Jun 2007 16:35:40 -0400 From: "Brian Hoort" To: freebsd-mobile@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: pccard not working on old laptop X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Jun 2007 21:02:29 -0000 I've installed 6.2 on an old laptop. I've been unable to get it to detect the pccard bus, and therefore have no networking. It worked on this laptop in the BSD 4.x days. I've seen several posts in the archive mentioning that the fix prior to 6.x was to replace: device cbb device pccard device cardbus with: device pcic device card but that this old driver was removed in 6.x. Everything in the dmesg.boot appears successful until: ... vga0: at port 0x3c0--0x3df iomem 0xa0000-0xbffff on isa0 unknown: can't assign resources (port) unknown: can't assign resources (port) unknown: can't assign resources (port) unknown: can't assign resources (port) unknown: can't assign resources (memory) unknown: can't assign resources (port) unknown: can't assign resources (port) unknown: can't assign resources (irq) unknown: can't assign resources (port) unknown: can't assign resources (port) Timecounter "TSC" frequency 199310141 Hz quality 800 ... Any suggestions? Thank You, all -- Brian Hoort From owner-freebsd-mobile@FreeBSD.ORG Mon Jun 18 22:28:36 2007 Return-Path: X-Original-To: freebsd-mobile@freebsd.org Delivered-To: freebsd-mobile@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 60A7916A479 for ; Mon, 18 Jun 2007 22:28:35 +0000 (UTC) (envelope-from jhs@berklix.org) Received: from thin.berklix.org (thin.berklix.org [194.246.123.68]) by mx1.freebsd.org (Postfix) with ESMTP id 3B3BA13C4C1 for ; Mon, 18 Jun 2007 22:28:34 +0000 (UTC) (envelope-from jhs@berklix.org) Received: from js.berklix.org (p549A6B90.dip.t-dialin.net [84.154.107.144]) (authenticated bits=128) by thin.berklix.org (8.12.11/8.12.11) with ESMTP id l5ILodHi006164; Mon, 18 Jun 2007 23:50:40 +0200 (CEST) (envelope-from jhs@berklix.org) Received: from fire.js.berklix.net (fire.js.berklix.net [192.168.91.41]) by js.berklix.org (8.13.6/8.13.6) with ESMTP id l5ILoZFC009914; Mon, 18 Jun 2007 23:50:35 +0200 (CEST) (envelope-from jhs@berklix.org) Received: from fire.js.berklix.net (localhost.js.berklix.net [127.0.0.1]) by fire.js.berklix.net (8.13.6/8.13.6) with ESMTP id l5ILojH2013803; Mon, 18 Jun 2007 23:50:45 +0200 (CEST) (envelope-from jhs@fire.js.berklix.net) Message-Id: <200706182150.l5ILojH2013803@fire.js.berklix.net> To: "Brian Hoort" In-reply-to: <790c34130706181335n73fc48eeo15bddd1157db730a@mail.gmail.com> References: <790c34130706181335n73fc48eeo15bddd1157db730a@mail.gmail.com> Comments: In-reply-to "Brian Hoort" message dated "Mon, 18 Jun 2007 16:35:40 -0400." Date: Mon, 18 Jun 2007 23:50:45 +0200 From: "Julian H. Stacey" Cc: freebsd-mobile@freebsd.org Subject: Re: pccard not working on old laptop X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Jun 2007 22:28:36 -0000 "Brian Hoort" wrote: > I've installed 6.2 on an old laptop. I've been unable to get it to detect > the pccard bus, and therefore have no networking. It worked on this laptop > in the BSD 4.x days. I've seen several posts in the archive mentioning that > the fix prior to 6.x was to replace: > device cbb > device pccard > device cardbus > > with: > device pcic > device card > > but that this old driver was removed in 6.x. > > Everything in the dmesg.boot appears successful until: > .. > vga0: at port 0x3c0--0x3df iomem 0xa0000-0xbffff on isa0 > unknown: can't assign resources (port) > unknown: can't assign resources (port) > unknown: can't assign resources (port) > unknown: can't assign resources (port) > unknown: can't assign resources (memory) > unknown: can't assign resources (port) > unknown: can't assign resources (port) > unknown: can't assign resources (irq) > unknown: can't assign resources (port) > unknown: can't assign resources (port) > Timecounter "TSC" frequency 199310141 Hz quality 800 > .. > > Any suggestions? I wish you better luck than I. If no luck, Ref my earlier: Message-id: <200706122029.l5CKTQ3n071855@fire.jhs.private> Subject: FreeBSD-6 fails to install on too many old laptops. Date: Tue, 12 Jun 2007 22:29:26 +0200 After FreeBSD-4.11 worked, & 6.2 failed on my pcmcia, I tried NetBSD latest release: Worked fine, (except beware NetBSD's vampire teeth in the MBR, my FreeBSD-4.11 partition is still there I hope, but MBR can't boot it). Ref http://berklix.org/~jhs/hardware/laptops/#netbsd -- Julian Stacey. Munich Computer Consultant, BSD Unix C Linux. http://berklix.com HTML mail unseen. Ihr Rauch=mein allergischer Kopfschmerz. Dump cigs 4 snuff. From owner-freebsd-mobile@FreeBSD.ORG Mon Jun 18 23:24:12 2007 Return-Path: X-Original-To: freebsd-mobile@freebsd.org Delivered-To: freebsd-mobile@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D777F16A41F for ; Mon, 18 Jun 2007 23:24:12 +0000 (UTC) (envelope-from freebsd@meijome.net) Received: from sigma.octantis.com.au (ns2.octantis.com.au [207.44.189.124]) by mx1.freebsd.org (Postfix) with ESMTP id 8BB5613C448 for ; Mon, 18 Jun 2007 23:24:12 +0000 (UTC) (envelope-from freebsd@meijome.net) Received: (qmail 15731 invoked from network); 18 Jun 2007 18:24:12 -0500 Received: from 203-217-41-248.dyn.iinet.net.au (HELO localhost) (203.217.41.248) by sigma.octantis.com.au with (DHE-RSA-AES256-SHA encrypted) SMTP; 18 Jun 2007 18:24:12 -0500 Date: Tue, 19 Jun 2007 09:24:07 +1000 From: Norberto Meijome To: "Cristian KLEIN" Message-ID: <20070619092407.6af725d7@localhost> In-Reply-To: <61045.193.226.6.226.1182018891.squirrel@intranet.utcluj.ro> References: <61045.193.226.6.226.1182018891.squirrel@intranet.utcluj.ro> X-Mailer: Claws Mail 2.9.2 (GTK+ 2.10.13; i386-portbld-freebsd6.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: nork@FreeBSD.org, freebsd-mobile@freebsd.org Subject: Re: Synaptics and Xorg 7.2 X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Jun 2007 23:24:12 -0000 On Sat, 16 Jun 2007 21:34:51 +0300 (EEST) "Cristian KLEIN" wrote: > May I also suggest to move synaptics from x11-servers to > x11-drivers? I have to agree with you here - it seems odd to have it in -servers _________________________ {Beto|Norberto|Numard} Meijome If it's there, and you can see it, it's real. If it's not there, and you can see it, it's virtual. If it's there, and you can't see it, it's transparent. If it's not there, and you can't see it, you erased it. I speak for myself, not my employer. Contents may be hot. Slippery when wet. Reading disclaimers makes you go blind. Writing them is worse. You have been Warned. From owner-freebsd-mobile@FreeBSD.ORG Tue Jun 19 05:33:32 2007 Return-Path: X-Original-To: freebsd-mobile@freebsd.org Delivered-To: freebsd-mobile@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BA00716A421 for ; Tue, 19 Jun 2007 05:33:32 +0000 (UTC) (envelope-from bkoenig@alpha-tierchen.de) Received: from mail.liberty-hosting.de (mail.smartterra.de [195.225.132.203]) by mx1.freebsd.org (Postfix) with ESMTP id 79BE413C447 for ; Tue, 19 Jun 2007 05:33:32 +0000 (UTC) (envelope-from bkoenig@alpha-tierchen.de) Received: from mail.liberty-hosting.de ([195.225.132.203]) by localhost (liberty-mail [195.225.132.203]) (amavisd-new, port 10024) with ESMTP id 85301-04; Tue, 19 Jun 2007 07:14:33 +0200 (CEST) Received: from home.alpha-tierchen.de (port-212-202-42-120.dynamic.qsc.de [212.202.42.120]) by mail.liberty-hosting.de (Postfix) with ESMTP id 517021807D2; Tue, 19 Jun 2007 07:14:33 +0200 (CEST) Received: from webmail.alpha-tierchen.de (localhost [127.0.0.1]) by home.alpha-tierchen.de (Postfix) with ESMTP id 8015B45064; Tue, 19 Jun 2007 07:14:32 +0200 (CEST) Received: from 2001:6f8:101e:0:20e:cff:fe6d:6adb (SquirrelMail authenticated user bkoenig) by webmail.alpha-tierchen.de with HTTP; Tue, 19 Jun 2007 07:14:32 +0200 (CEST) Message-ID: <58413.2001:6f8:101e:0:20e:cff:fe6d:6adb.1182230072.squirrel@webmail.alpha-tierchen.de> In-Reply-To: <790c34130706181335n73fc48eeo15bddd1157db730a@mail.gmail.com> References: <790c34130706181335n73fc48eeo15bddd1157db730a@mail.gmail.com> Date: Tue, 19 Jun 2007 07:14:32 +0200 (CEST) From: =?iso-8859-1?Q?Bj=F6rn_K=F6nig?= To: "Brian Hoort" User-Agent: SquirrelMail/1.4.10a MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-Virus-Scanned: by amavisd-new at mail.smartterra.de Cc: freebsd-mobile@freebsd.org Subject: Re: pccard not working on old laptop X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jun 2007 05:33:32 -0000 Brian wrote: > I've installed 6.2 on an old laptop. I've been unable to get it > to detect the pccard bus, and therefore have no networking. > It worked on this laptop in the BSD 4.x days. I've seen several > posts in the archive mentioning that the fix prior to 6.x was > to replace: > device cbb > device pccard > device cardbus > > with: > device pcic > device card > > but that this old driver was removed in 6.x. You have to be patient. Support for old ISA pccard bridges will be reintroduced with 7.0, 7.1 or probably later. There are already signs of effort in the source code. Björn From owner-freebsd-mobile@FreeBSD.ORG Tue Jun 19 19:08:46 2007 Return-Path: X-Original-To: freebsd-mobile@freebsd.org Delivered-To: freebsd-mobile@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F2B5916A41F for ; Tue, 19 Jun 2007 19:08:46 +0000 (UTC) (envelope-from demodog@hotmail.com) Received: from bay0-omc3-s36.bay0.hotmail.com (bay0-omc3-s36.bay0.hotmail.com [65.54.246.236]) by mx1.freebsd.org (Postfix) with ESMTP id DD1B513C465 for ; Tue, 19 Jun 2007 19:08:46 +0000 (UTC) (envelope-from demodog@hotmail.com) Received: from hotmail.com ([65.55.153.103]) by bay0-omc3-s36.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.2668); Tue, 19 Jun 2007 11:56:45 -0700 Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Tue, 19 Jun 2007 11:56:44 -0700 Message-ID: Received: from 65.55.153.123 by by142fd.bay142.hotmail.msn.com with HTTP; Tue, 19 Jun 2007 18:56:40 GMT X-Originating-IP: [88.86.33.24] X-Originating-Email: [demodog@hotmail.com] X-Sender: demodog@hotmail.com From: "Jimmie A" To: freebsd-mobile@freebsd.org Date: Tue, 19 Jun 2007 18:56:40 +0000 Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed X-OriginalArrivalTime: 19 Jun 2007 18:56:45.0073 (UTC) FILETIME=[94E3F810:01C7B2A3] Subject: Pcmcia problem X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jun 2007 19:08:47 -0000 Hi I wonder if you can help me? Is it possible to get a 16 bit network card to work in freebsd 6.2? I get the following errors when I slip the card in: cbb alloc res fail cardbus1: Cant get memory for IO ports re0 couldnt map ports/memory r10 couldnt map ports/memory cardbus1: at device 0.0 (no driver attached) the card is an Unex Network card, chipset MD010C Would be thankful for any help. I kind of a newbie... Best regards // Jimmie
Med -liga hälsningar // Jimmie
_________________________________________________________________ Kolla in coola trailern till Die Hard 4 http://specials.se.msn.com/diehard4/default.aspx From owner-freebsd-mobile@FreeBSD.ORG Wed Jun 20 13:51:57 2007 Return-Path: X-Original-To: mobile@freebsd.org Delivered-To: freebsd-mobile@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6043D16A47B for ; Wed, 20 Jun 2007 13:51:57 +0000 (UTC) (envelope-from freebsd@gm.nunu.org) Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.180]) by mx1.freebsd.org (Postfix) with ESMTP id CDDF113C4CC for ; Wed, 20 Jun 2007 13:51:56 +0000 (UTC) (envelope-from freebsd@gm.nunu.org) Received: by py-out-1112.google.com with SMTP id a29so375157pyi for ; Wed, 20 Jun 2007 06:51:55 -0700 (PDT) Received: by 10.35.67.18 with SMTP id u18mr1252315pyk.1182347515559; Wed, 20 Jun 2007 06:51:55 -0700 (PDT) Received: by 10.35.71.8 with HTTP; Wed, 20 Jun 2007 06:51:55 -0700 (PDT) Message-ID: <626eb4530706200651s255e2ff2u80d70d2d887c8e4c@mail.gmail.com> Date: Wed, 20 Jun 2007 22:51:55 +0900 From: "Hidetoshi Shimokawa" Sender: freebsd@gm.nunu.org To: "Paolo Pisati" In-Reply-To: <20070618183627.GA2183@tin.it> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <46734A3E.3010903@gddsn.org.cn> <626eb4530706160525o54234621s2de098e64cdeb4fe@mail.gmail.com> <20070616.173002.-457443410.imp@bsdimp.com> <626eb4530706161858l5f60d67ej55874cb9348e649b@mail.gmail.com> <20070618183627.GA2183@tin.it> X-Google-Sender-Auth: a81d699bd8b52af7 Cc: mobile@freebsd.org, wsk@gddsn.org.cn, current@freebsd.org Subject: Re: kernel panic with pccard insert on recent 7.0 CURRENT X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jun 2007 13:51:57 -0000 On 6/19/07, Paolo Pisati wrote: > On Sun, Jun 17, 2007 at 10:58:12AM +0900, Hidetoshi Shimokawa wrote: > > And INTR_FILTER doesn't seem well-tested at least for > > handling of stray interrupts for filter only IRQs. > > I need the following patch to workaroung the problem. > > > > http://people.freebsd.org/~simokawa/tmp/kern_intr.c-20070617.patch > > on which platform? amd64 > cause, right now, if there's a stray interrupt we disable the > irq line if the interrut disable function is hooked to > ie_disab: My patch may be wrong. But it seems too restrictive to disable the interrupt forever only one stray interrupt. Drivers could return _STRAY even if it is the source. > kern_intr.c::intr_event_handle(): > > ... > if (thread & FILTER_HANDLED) { > if (ie->ie_eoi != NULL) > ie->ie_eoi(ie->ie_source); > } else { > if (ie->ie_disab != NULL) > ie->ie_disab(ie->ie_source); > } > ... > > bye, > P. > > -- /\ Hidetoshi Shimokawa \/ simokawa@FreeBSD.ORG From owner-freebsd-mobile@FreeBSD.ORG Wed Jun 20 15:34:13 2007 Return-Path: X-Original-To: mobile@freebsd.org Delivered-To: freebsd-mobile@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C779016A41F; Wed, 20 Jun 2007 15:34:13 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 7DEF413C448; Wed, 20 Jun 2007 15:34:13 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.13.8/8.13.4) with ESMTP id l5KFWBT5035563; Wed, 20 Jun 2007 09:32:12 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Wed, 20 Jun 2007 09:32:43 -0600 (MDT) Message-Id: <20070620.093243.-957832379.imp@bsdimp.com> To: simokawa@freebsd.org From: "M. Warner Losh" In-Reply-To: <626eb4530706200651s255e2ff2u80d70d2d887c8e4c@mail.gmail.com> References: <626eb4530706161858l5f60d67ej55874cb9348e649b@mail.gmail.com> <20070618183627.GA2183@tin.it> <626eb4530706200651s255e2ff2u80d70d2d887c8e4c@mail.gmail.com> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Wed, 20 Jun 2007 09:32:18 -0600 (MDT) Cc: mobile@freebsd.org, wsk@gddsn.org.cn, piso@freebsd.org, current@freebsd.org Subject: Re: kernel panic with pccard insert on recent 7.0 CURRENT X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jun 2007 15:34:13 -0000 In message: <626eb4530706200651s255e2ff2u80d70d2d887c8e4c@mail.gmail.com> "Hidetoshi Shimokawa" writes: : On 6/19/07, Paolo Pisati wrote: : > On Sun, Jun 17, 2007 at 10:58:12AM +0900, Hidetoshi Shimokawa wrote: : > > And INTR_FILTER doesn't seem well-tested at least for : > > handling of stray interrupts for filter only IRQs. : > > I need the following patch to workaroung the problem. : > > : > > http://people.freebsd.org/~simokawa/tmp/kern_intr.c-20070617.patch : > > on which platform? : : amd64 : : > cause, right now, if there's a stray interrupt we disable the : > irq line if the interrut disable function is hooked to : > ie_disab: : : My patch may be wrong. But it seems too restrictive to disable the : interrupt forever : only one stray interrupt. Drivers could return _STRAY even if it is the source. I've seen hardware cause spurious interrupts all the time. Part of this experience dates back to the 4.x behavior of ISRs, but sometimes hardware does just glitch. You get a lot of glitching with CardBus/PC Card insertion and removal events, even when one is very careful. The CardBus bridge is somewhat broken by design: if the card inserted asserts the interrupt, then we'll get an interrupt. During power up, this can easily happen, and would result in 'STRAY' interrupts happening. These are not ill-behaved cards, but rather a squishy part of the spec that some bridge makers have made good engineering decisions, while others have made good business decisions about gate counts.. While I can see the need to turn of an interrupt source that has boatloads of stray interrupts, 'one' doesn't count as a boatload. Warner From owner-freebsd-mobile@FreeBSD.ORG Thu Jun 21 05:45:55 2007 Return-Path: X-Original-To: mobile@freebsd.org Delivered-To: freebsd-mobile@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 34AFD16A421 for ; Thu, 21 Jun 2007 05:45:55 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 9EF0513C45E for ; Thu, 21 Jun 2007 05:45:54 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.13.8/8.13.4) with ESMTP id l5L5hlHh042151 for ; Wed, 20 Jun 2007 23:43:47 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Wed, 20 Jun 2007 23:44:19 -0600 (MDT) Message-Id: <20070620.234419.-1540389296.imp@bsdimp.com> To: mobile@freebsd.org From: "M. Warner Losh" X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Multipart/Mixed; boundary="--Next_Part(Wed_Jun_20_23_44_19_2007_461)--" Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Wed, 20 Jun 2007 23:43:47 -0600 (MDT) Cc: Subject: cbb patch: fixing the can't reinsert a card problem X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jun 2007 05:45:55 -0000 ----Next_Part(Wed_Jun_20_23_44_19_2007_461)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit I've converted the main cbb card status change interrupt from a ithread to a filter. It didn't make sense to schedule a thread to wakeup a thread to me, so I've modified the status and power change routines a little so that we use a filter (fast interrupt) instead of an ithread. To do this, I had to ditch a lot of mutex locking and condvars, and go to direct wakeup calls. This should make things more reliable. When we get real filters, this should cut down on the work done in the ithread. I believe that this also makes the detection of insert/removal more reliable. Before this change, if I was to insert a card that didnt attach, then I couldn't get future card insert/remove events to happen. Please test this and let me know what you think. I plan on committing this once I get some confirmation from the testers. If you could also review it too and let me know what you think... Warner ----Next_Part(Wed_Jun_20_23_44_19_2007_461)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="cbb-1.diff" Index: pccbb.c =================================================================== RCS file: /cache/ncvs/src/sys/dev/pccbb/pccbb.c,v retrieving revision 1.164 diff -u -r1.164 pccbb.c --- pccbb.c 4 Jun 2007 05:59:44 -0000 1.164 +++ pccbb.c 21 Jun 2007 05:21:55 -0000 @@ -344,7 +344,7 @@ sc->flags |= CBB_KTHREAD_DONE; while (sc->flags & CBB_KTHREAD_RUNNING) { DEVPRINTF((sc->dev, "Waiting for thread to die\n")); - cv_broadcast(&sc->cv); + wakeup(&sc->intrhand); msleep(sc->event_thread, &sc->mtx, PWAIT, "cbbun", 0); } mtx_unlock(&sc->mtx); @@ -353,8 +353,6 @@ bus_release_resource(brdev, SYS_RES_MEMORY, CBBR_SOCKBASE, sc->base_res); mtx_destroy(&sc->mtx); - cv_destroy(&sc->cv); - cv_destroy(&sc->powercv); return (0); } @@ -435,11 +433,8 @@ } free(devlist, M_TEMP); - if (wake > 0) { - mtx_lock(&sc->mtx); - cv_signal(&sc->cv); - mtx_unlock(&sc->mtx); - } + if (wake > 0) + wakeup(&sc->intrhand); } void @@ -519,12 +514,14 @@ * a chance to run. */ mtx_lock(&sc->mtx); - cbb_setb(sc, CBB_SOCKET_MASK, CBB_SOCKET_MASK_CD); - cv_wait(&sc->cv, &sc->mtx); + printf("Setting change request and waiting\n"); + cbb_setb(sc, CBB_SOCKET_MASK, CBB_SOCKET_MASK_CD | CBB_SOCKET_MASK_CSTS); + msleep(&sc->intrhand, &sc->mtx, PZERO, "-", 0); err = 0; + printf("Wokeup after change, debouncing\n"); while (err != EWOULDBLOCK && (sc->flags & CBB_KTHREAD_DONE) == 0) - err = cv_timedwait(&sc->cv, &sc->mtx, hz / 4); + err = msleep(&sc->intrhand, &sc->mtx, PZERO, "-", hz / 5); } DEVPRINTF((sc->dev, "Thread terminating\n")); sc->flags &= ~CBB_KTHREAD_RUNNING; @@ -800,7 +797,7 @@ sane = 10; while (!(cbb_get(sc, CBB_SOCKET_STATE) & CBB_STATE_POWER_CYCLE) && cnt == sc->powerintr && sane-- > 0) - cv_timedwait(&sc->powercv, &sc->mtx, hz / 20); + msleep(&sc->powerintr, &sc->mtx, PZERO, "-", hz / 20); mtx_unlock(&sc->mtx); /* * The TOPIC95B requires a little bit extra time to get @@ -1534,9 +1531,7 @@ cbb_setb(sc, CBB_SOCKET_MASK, CBB_SOCKET_MASK_CD); /* Signal the thread to wakeup. */ - mtx_lock(&sc->mtx); - cv_signal(&sc->cv); - mtx_unlock(&sc->mtx); + wakeup(&sc->intrhand); error = bus_generic_resume(self); Index: pccbb_pci.c =================================================================== RCS file: /cache/ncvs/src/sys/dev/pccbb/pccbb_pci.c,v retrieving revision 1.25 diff -u -r1.25 pccbb_pci.c --- pccbb_pci.c 4 Jun 2007 05:59:44 -0000 1.25 +++ pccbb_pci.c 21 Jun 2007 05:32:50 -0000 @@ -117,7 +117,7 @@ pci_read_config(DEV, REG, SIZE) MASK1) MASK2, SIZE) static void cbb_chipinit(struct cbb_softc *sc); -static void cbb_pci_intr(void *arg); +static int cbb_pci_filt(void *arg); static struct yenta_chipinfo { uint32_t yc_id; @@ -310,8 +310,6 @@ parent = device_get_parent(brdev); mtx_init(&sc->mtx, device_get_nameunit(brdev), "cbb", MTX_DEF); - cv_init(&sc->cv, "cbb cv"); - cv_init(&sc->powercv, "cbb cv"); sc->chipset = cbb_chipset(pci_get_devid(brdev), NULL); sc->dev = brdev; sc->cbdev = NULL; @@ -328,7 +326,6 @@ if (!sc->base_res) { device_printf(brdev, "Could not map register memory\n"); mtx_destroy(&sc->mtx); - cv_destroy(&sc->cv); return (ENOMEM); } else { DEVPRINTF((brdev, "Found memory at %08lx\n", @@ -410,7 +407,7 @@ } if (bus_setup_intr(brdev, sc->irq_res, INTR_TYPE_AV | INTR_MPSAFE, - NULL, cbb_pci_intr, sc, &sc->intrhand)) { + cbb_pci_filt, NULL, sc, &sc->intrhand)) { device_printf(brdev, "couldn't establish interrupt\n"); goto err; } @@ -445,7 +442,6 @@ sc->base_res); } mtx_destroy(&sc->mtx); - cv_destroy(&sc->cv); return (ENOMEM); } @@ -680,8 +676,9 @@ return (0); } -static void -cbb_pci_intr(void *arg) +#define DELTA (CBB_SOCKET_MASK_CD) +static int +cbb_pci_filt(void *arg) { struct cbb_softc *sc = arg; uint32_t sockevent; @@ -699,9 +696,6 @@ */ sockevent = cbb_get(sc, CBB_SOCKET_EVENT); if (sockevent != 0 && (sockevent & ~CBB_SOCKET_EVENT_VALID_MASK) == 0) { - /* ack the interrupt */ - cbb_set(sc, CBB_SOCKET_EVENT, sockevent); - /* * If anything has happened to the socket, we assume that * the card is no longer OK, and we shouldn't call its @@ -715,23 +709,22 @@ * of the pccard software used a similar trick and achieved * excellent results. */ - if (sockevent & CBB_SOCKET_EVENT_CD) { - mtx_lock(&sc->mtx); - cbb_clrb(sc, CBB_SOCKET_MASK, CBB_SOCKET_MASK_CD); + if (sockevent & DELTA) { + cbb_clrb(sc, CBB_SOCKET_MASK, DELTA); + cbb_set(sc, CBB_SOCKET_EVENT, DELTA); sc->cardok = 0; cbb_disable_func_intr(sc); - cv_signal(&sc->cv); - mtx_unlock(&sc->mtx); + wakeup(&sc->intrhand); } /* * If we get a power interrupt, wakeup anybody that might * be waiting for one. */ if (sockevent & CBB_SOCKET_EVENT_POWER) { - mtx_lock(&sc->mtx); + cbb_clrb(sc, CBB_SOCKET_MASK, CBB_SOCKET_EVENT_POWER); + cbb_set(sc, CBB_SOCKET_EVENT, CBB_SOCKET_EVENT_POWER); sc->powerintr++; - cv_signal(&sc->powercv); - mtx_unlock(&sc->mtx); + wakeup((void *)&sc->powerintr); } } /* @@ -747,6 +740,7 @@ * the event independent of the CBB_SOCKET_EVENT_CD above. */ exca_getb(&sc->exca[0], EXCA_CSC); + return FILTER_HANDLED; } /************************************************************************/ Index: pccbbvar.h =================================================================== RCS file: /cache/ncvs/src/sys/dev/pccbb/pccbbvar.h,v retrieving revision 1.31 diff -u -r1.31 pccbbvar.h --- pccbbvar.h 4 Jun 2007 05:59:44 -0000 1.31 +++ pccbbvar.h 21 Jun 2007 05:24:13 -0000 @@ -66,8 +66,6 @@ unsigned int secbus; unsigned int subbus; struct mtx mtx; - struct cv cv; - struct cv powercv; int cardok; u_int32_t flags; #define CBB_16BIT_CARD 0x20000000 @@ -88,7 +86,7 @@ device_t cbdev; struct proc *event_thread; void (*chipinit)(struct cbb_softc *); - volatile int powerintr; + int powerintr; }; /* result of detect_card */ ----Next_Part(Wed_Jun_20_23_44_19_2007_461)---- From owner-freebsd-mobile@FreeBSD.ORG Thu Jun 21 13:05:29 2007 Return-Path: X-Original-To: freebsd-mobile@freebsd.org Delivered-To: freebsd-mobile@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 72E5016A400 for ; Thu, 21 Jun 2007 13:05:29 +0000 (UTC) (envelope-from bounces@getitforfree.net) Received: from mail90.mrsmiley.com (mail90.mrsmiley.com [209.61.129.90]) by mx1.freebsd.org (Postfix) with ESMTP id 5AE1D13C46A for ; Thu, 21 Jun 2007 13:05:29 +0000 (UTC) (envelope-from bounces@getitforfree.net) Received: from www.getitfree.net (209.128.76.94) by mail90.mrsmiley.com id hf9rpi0e81kk for ; Thu, 21 Jun 2007 07:45:27 -0500 (envelope-from ) MIME-Version: 1.0 From: getitfree@getitfree.net Resent-From: getitfree@getitfree.net MID: 1182429927957749 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Message-ID: To: freebsd-mobile@freebsd.org Resent-Message-Id: <20070621130529.5AE1D13C46A@mx1.freebsd.org> Resent-Date: Thu, 21 Jun 2007 13:05:29 +0000 (UTC) Subject: Welcome - Important Next Step X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Thu, 21 Jun 2007 13:05:29 -0000 X-List-Received-Date: Thu, 21 Jun 2007 13:05:29 -0000 Thanks for joining GetItFree.net. Please take a moment to add our email to your address book. If you haven't already done so, post or send your personal link: http://www.getitfree.net/xruqhgvob to your friends and tell them about our site. Refer as many friends as you can! When you have referred some friends, you can check the status on your free Apple 4GB iPod nano at http://www.getitfree.net/index.php?target=account_gift&u=szcyris Best wishes, - Bryan getitfree@getitfree.net To stop getting getitfree updates, visit: http://www.getitfree.net/index.php?target=unsubscribe&u=ruqhgvob&mid=1182429927957749 Alternatively, you may send a written request to: www.getitfree.net PO Box 356 Austin, TX 78767-0356