From owner-freebsd-questions@FreeBSD.ORG Tue Mar 25 23:07:47 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9B72C106566B; Tue, 25 Mar 2008 23:07:47 +0000 (UTC) (envelope-from lev@nupfel.de) Received: from schatten.darksystem.net (schatten.darksystem.net [88.198.51.7]) by mx1.freebsd.org (Postfix) with ESMTP id 086168FC20; Tue, 25 Mar 2008 23:07:46 +0000 (UTC) (envelope-from lev@nupfel.de) Received: from schatten.darksystem.net (localhost [127.0.0.1]) by schatten.darksystem.net (Postfix) with ESMTP id 59620F5C3C0; Tue, 25 Mar 2008 23:42:47 +0100 (CET) X-Spam-Status: No, hits=1.1 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DSBL, RCVD_IN_PBL, RCVD_IN_SORBS_DUL, RDNS_DYNAMIC X-Spam-Check-By: schatten.darksystem.net Received: from port-212-202-192-115.dynamic.qsc.de (HELO mail.nupfel.de) (212.202.192.115) (smtp-auth username lev, mechanism plain) by schatten.darksystem.net (qpsmtpd/0.32) with ESMTP; Tue, 25 Mar 2008 23:35:47 +0100 Received: from localhost (localhost [127.0.0.1]) by mail.nupfel.de (Postfix) with ESMTP id DA4C01A214CF; Tue, 25 Mar 2008 23:35:40 +0100 (CET) X-Virus-Scanned: amavisd-new at nupfel.de Received: from mail.nupfel.de ([127.0.0.1]) by localhost (mail.nupfel.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id E2M5h2OxuWKm; Tue, 25 Mar 2008 23:35:39 +0100 (CET) Received: by mail.nupfel.de (Postfix, from userid 1000) id 542F31A214CC; Tue, 25 Mar 2008 23:35:39 +0100 (CET) Date: Tue, 25 Mar 2008 23:35:39 +0100 From: Tobias Kirschstein To: freebsd-drivers@freebsd.org Message-ID: <20080325223539.GH4783@nupfel.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="FUaywKC54iCcLzqT" Content-Disposition: inline User-Agent: Mutt/1.5.16 (2007-06-09) Cc: freebsd-current@freebsd.org, freebsd-questions@freebsd.org Subject: hdaps (accelerator) driver for thinkpads X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Mar 2008 23:07:47 -0000 --FUaywKC54iCcLzqT Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable hi there, i have an ibm x60t thinkpad and want to have this nice feature of (mostly all) thinkpads: the hdaps acceleration support. i found only an old implementaton of 2005 and decided to update the driver. as this is the first time i put my fingers on kernel drivers please be kind :) here is what i got at the moment: http://www.nupfel.de/data/accel-0.6.tar.gz i took the original driver from the old linux hdaps project: http://hdaps.sourceforge.net/index.php?page=3D3 added support for my x60t and fixed some kthread -> kproc renaming issues since 8-CURRENT. the driver compiles and loads fine on my system (8-CURRENT, also tested on 7-RELEASE), but if i try to get some values through the sysctl "hw.accel" or one of the /dev/accel* device nodes my machine (amd64) completely freezes and rebootes after some seconds. bulding and loading the module with DEBUG defined it dumps the raw values of the io ports correctly to the kernel message buffer. --------------------------------------------- accel0: Found Accelerometer, type 0x5, starting init.. (max. 10 seconds) accel0: Init finished successful accel0: Time needed: 2 s 25142 ns accel0: at port 0x1600-0x162f on isa0 accel0: calibration: xzero: 508 yzero: 510 accel0: initstate: 0x5 ppc0: cannot reserve I/O port range --------------------------------------------- --------------------------------------------- -> entering _accel_getdata -> entering _accel_request_refresh io port dump: 0x1600: 14 ff ff ff 00 ff ff ff ff ff ff ff ff ff ff ff ................ 0x1610: 11 02 9c 01 03 02 3d 9b 01 03 02 3d 02 80 00 00 ......=3D....=3D..= =2E. 0x1620: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ <- exiting _accel_request_refresh value 0x1 (refresh success) wait: 0x1 io port dump: 0x1600: 14 ff ff ff 50 ff ff ff ff ff ff ff ff ff ff ff ....P........... 0x1610: 11 02 9b 01 04 02 3d 9b 01 04 02 3d 04 a0 00 00 ......=3D....=3D..= =2E. 0x1620: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ <- exiting _accel_getdata value 0x1 io port dump: 0x1600: 14 ff ff ff 00 ff ff ff ff ff ff ff ff ff ff ff ................ 0x1610: 11 02 9b 01 04 02 3d 9b 01 04 02 3d 04 a0 00 00 ......=3D....=3D..= =2E. 0x1620: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ -> entering _accel_request_refresh io port dump: 0x1600: 14 ff ff ff 00 ff ff ff ff ff ff ff ff ff ff ff ................ 0x1610: 11 02 9b 01 04 02 3d 9b 01 04 02 3d 04 a0 00 00 ......=3D....=3D..= =2E. 0x1620: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ <- exiting _accel_request_refresh value 0x1 (refresh success) wait: 0x0 --------------------------------------------- unloading the module also works find and frees all ressources unless you don't try to use the devices... --------------------------------------------- accel0: waiting for kthread to teminate.. accel0: Done. sysctlfree retval: 0 accel0: detached --------------------------------------------- the full dmesg: http://www.nupfel.de/data/dmesg.txt it would be great if some thinkpad users could try the code and help me debugging the problem :) --=20 ciao, lev --FUaywKC54iCcLzqT Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.7 (GNU/Linux) iGwEARECACwFAkfpfjslGmh0dHA6Ly93d3cubnVwZmVsLmRlL3BncC9wb2xpY3ku aHRtbAAKCRCkm1fv1t7QABvGAJwKtREA9goLO8NKau+iZIlLxR2ZRwCfbNR7wHJd iLNwsgojAiFpJkPuE9g= =PSdC -----END PGP SIGNATURE----- --FUaywKC54iCcLzqT--