List Info

Thread: hdaps (accelerator) driver for thinkpads




hdaps (accelerator) driver for thinkpads
country flaguser name
Germany
2008-03-25 17:35:39
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=3

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 
......=....=....
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 
......=....=....
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 
......=....=....
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 
......=....=....
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 


-- 
ciao,
lev
Re: hdaps (accelerator) driver for thinkpads
country flaguser name
Germany
2008-04-17 16:15:16
hi tofig,

On Sun, 6 Apr 2008 14:10:20 +0500
"Tofig Suleymanov" <tofigfreebsd.az> wrote:

> sorry for being so late.

i'm sorry too. have been on vacation for the last weeks and
had no time
to check my email.

> Looking at accelraw_dev.c around line 128 I've noticed
that you do not
> initialize the mutex before acquiring a lock with
mtx_lock. I've made
> a simple patch which adds a mtx_init before locking
operations. Please
> download it to your accel source root directory from
here
> http://www.fr
eebsd.az/other/accel.patch and execute: patch <
> accel.patch

thank you very much for your help! your patch showed me
where the error
really was. i forgot to init the mutex in the accel_attach()
function,
because the old lock was destroyed after exiting
accel_probe()...
now all devices seem to work fine 

> I can confirm that accelgraph display tool and X mouse
interface are
> working. X mouse movement seem to be too sensitive
though.

yes you are right, i adjusted the default sensitivity and
the mouse is
very smoothy now ;)
i also plan to have a sysctl for this or is there any
default location
for general mouse device sensitivity?

now here you can find the current snapshot location:

  http://www.nup
fel.de/data/hdaps.tar.gz

there is also a svn repository, but this is not public at
the moment
(will be soon):

  https://svn.nupfel.d
e/x60t/hdaps

my next step will be to improve the shock detection
algorithm and to
implement instant hard drive head parking... let's see what
i get
done, every help is welcome 

happy testing!


-- 
ciao,
lev
_______________________________________________
freebsd-driversfreebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-drive
rs
To unsubscribe, send any mail to
"freebsd-drivers-unsubscribefreebsd.org"

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )