Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 127453 - app-laptop/thinkpad-5.9: linux-2.6.16 compatibility
Summary: app-laptop/thinkpad-5.9: linux-2.6.16 compatibility
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Steev Klimaszewski (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 126972
  Show dependency tree
 
Reported: 2006-03-24 10:38 UTC by TGL
Modified: 2006-12-02 13:27 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
thinkpad-5.9-remove-inter_module.patch (thinkpad-5.9-remove-inter_module.patch,5.83 KB, patch)
2006-03-24 10:39 UTC, TGL
Details | Diff
thinkpad-5.9-remove-thinkpadpm-argument.patch (thinkpad-5.9-remove-thinkpadpm-argument.patch,1.03 KB, patch)
2006-03-24 10:39 UTC, TGL
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description TGL 2006-03-24 10:38:20 UTC
I have encountered two issues with this module after switching to 2.6.16:

 - the first one is that inter_module* functions have finaly been removed from Linux, but thinkpad module was still using them. I will attach a patch to convert it to the EXPORT_SYMBOL scheme. I don't know whether this patch should be applied unconditionnaly, or only for >=2.6.16 (should work with older versions, sure, but why make the change if it is not required?), so i will leave you integration to the src_unpack().

 - the second one is that the thinkpadpm code is no more used in thinkpad-5.9, but the thinkpad module was still declaring an obsolete "enable_thinkpadpm" parameter, leading to this error:
  # modprobe thinkpad
  FATAL: Error inserting thinkpad (/lib/modules/2.6.16-archck1/thinkpad/thinkpad.ko): Invalid argument
  # dmesg | tail -n 1
  thinkpad: falsely claims to have parameter enable_thinkpadpm
Well, actually, this one i'm not sure whether it is specific to 2.6.16 kernel. I've also switched to gcc4 recently, so maybe that's him who optimize-out an unused variable, or something like that. I will report back later after trying a 2.6.15 again. Anyway, the patch for this one is simple too: it drops any mention of the obsolete parameter in the thinkpad module.
Comment 1 TGL 2006-03-24 10:39:05 UTC
Created attachment 83027 [details, diff]
thinkpad-5.9-remove-inter_module.patch

patch for issue #1
Comment 2 TGL 2006-03-24 10:39:32 UTC
Created attachment 83028 [details, diff]
thinkpad-5.9-remove-thinkpadpm-argument.patch

patch for issue #2
Comment 3 TGL 2006-03-24 11:06:10 UTC
(In reply to comment #0)
>
> Well, actually, this one i'm not sure whether it is specific to 2.6.16 kernel.

I have just tested on 2.6.15, and the unpatched module doesn't make kernel complain about this parameter. So it seems to be specific to 2.6.16, although i don't know where the difference comes from.

I have also tested both patches on 2.6.15, and they seems to work fine there too. So i still don't have a clue whether they should be applied only for `kernel_is gt 2 6 16` or not.

Comment 4 Steev Klimaszewski (RETIRED) gentoo-dev 2006-03-25 03:54:19 UTC
Tested here on my Thinkpad 600E, thanks for the patches, committed to CVS, please let me know if there are any problems.  Will try to 5.9-r1 stable in 2-3 weeks.
Comment 5 Petteri Räty (RETIRED) gentoo-dev 2006-05-01 05:43:11 UTC
(In reply to comment #4)
> Tested here on my Thinkpad 600E, thanks for the patches, committed to CVS,
> please let me know if there are any problems.  Will try to 5.9-r1 stable in 2-3
> weeks.
> 

Have you forgotten to stable the new version or are problems?
Comment 6 Steev Klimaszewski (RETIRED) gentoo-dev 2006-05-01 11:05:49 UTC
Yes I had forgotten to request stabelization.  Will open a bug shortly, unless you get to it before I get the chance
Comment 7 Peter Volkov (RETIRED) gentoo-dev 2006-12-02 13:27:09 UTC
TGL: I'm not kernel hacker, thus may be I'm wrong but it seems to me that it's better to use
  pxint_doSmapi = (pxint_do_t)symbol_request( smapi_do );
instead of, suggested in your patch
  pxint_doSuperio = (pxint_do_t)try_then_request_module( 
  __symbol_get("superio_do") , _szSuperioName );

symbol_request is defined include/linux/module.h and it's definition is very similar to the code you wrote, but there are some differences. FEX, it uses symbol_get instead of __symbol_get and thus takes into account MODULE_SYMBOL_PREFIX. What do you think about this?