[ltp] Re: [ANN] tp_smapi - a new Linux SMAPI driver

Shem Multinymous linux-thinkpad@linux-thinkpad.org
Mon, 5 Dec 2005 02:30:29 +0200


Hi,

On 12/5/05, Jiang Qian <qian2@fas.harvard.edu> wrote:
> cat /sys/devices/platform/smapi/*_charge_thresh
> Shows nothing

Nothing in dmesg? But it doesn't do anything interesting before the
first printk! Very strange. Can you try addng some printk() calls in
start_charge_thresh_show() and get_thresh() and whether it even gets
there and seeing how far its?

> echo 40 > /sys/devices/platform/smapi/start_charge_thresh
[snip]
> Call Trace:
>  [<c01bbf9f>] sscanf+0x1f/0x30
>  [<f8bd4620>] start_charge_thresh_store+0x20/0xd0 [tp_smapi]
>  [<c01bca76>] copy_from_user+0x46/0x80
>  [<c021f36a>] dev_attr_store+0x3a/0x40
>  [<c01a03de>] flush_write_buffer+0x3e/0x50
>  [<c01a0444>] sysfs_write_file+0x54/0x80
>  [<c015e155>] vfs_write+0xe5/0x160
>  [<c015e2a1>] sys_write+0x51/0x80
>  [<c01031fb>] sysenter_past_esp+0x54/0x75

That's very strange too. Doesn't the sysfs driver system take care of
providing a nice NULL-terminated buffer?! Almost all the drivers I
looked at assume that.

Still kernel 2.4.12.4, right? Do you mind trying a newer one?

  Shem