Date: Tue, 25 Mar 2008 23:35:39 +0100 From: Tobias Kirschstein <lev@nupfel.de> To: freebsd-drivers@freebsd.org Cc: freebsd-current@freebsd.org, freebsd-questions@freebsd.org Subject: hdaps (accelerator) driver for thinkpads Message-ID: <20080325223539.GH4783@nupfel.de>
next in thread | raw e-mail | index | archive | help
--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: <Accelerometer> 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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080325223539.GH4783>