Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 75656 - net-dialup/slmodem fix for 2.6.10
Summary: net-dialup/slmodem fix for 2.6.10
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Gentoo Dialup Developers
URL:
Whiteboard:
Keywords: Inclusion
Depends on:
Blocks:
 
Reported: 2004-12-25 15:56 UTC by Daniel Drake (RETIRED)
Modified: 2005-01-18 06:00 UTC (History)
2 users (show)

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


Attachments
slmodem-2.9.10-fix-for-2.6.10.patch (slmodem-2.9.10-fix-for-2.6.10.patch,521 bytes, patch)
2004-12-25 15:56 UTC, Daniel Drake (RETIRED)
Details | Diff
slmodem license (license,1.63 KB, text/plain)
2005-01-03 06:22 UTC, Daniel Drake (RETIRED)
Details
slmodem-2.9.10-pci-workaround.patch (slmodem-2.9.10-pci-workaround.patch,872 bytes, patch)
2005-01-03 07:28 UTC, Daniel Drake (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Drake (RETIRED) gentoo-dev 2004-12-25 15:56:10 UTC
Please apply this patch for users who are running 2.6.10 or newer. Some in-kernel API has changed.
Comment 1 Daniel Drake (RETIRED) gentoo-dev 2004-12-25 15:56:24 UTC
Created attachment 46885 [details, diff]
slmodem-2.9.10-fix-for-2.6.10.patch
Comment 2 Stefan Schweizer (RETIRED) gentoo-dev 2004-12-25 23:21:05 UTC
The driver does not work for me:

slamr: module license 'Smart Link Ltd.' taints kernel.
slamr: Unknown symbol get_device
slamr: Unknown symbol put_device
slamr: Unknown symbol device_release_driver

so your fix is not really sufficient, any clue on this problem?

other thing is: should we not put your code change in ifdefs and apply it only when we detect a 2.6.10 kernel?
Comment 3 Daniel Drake (RETIRED) gentoo-dev 2004-12-26 02:16:45 UTC
Those functions are now only available to GPL modules :(
Greg, whats the way to approach this?
Comment 4 Alin Năstac (RETIRED) gentoo-dev 2004-12-29 14:08:45 UTC
For the time being, I've blocked the installation for kernels >= 2.6.10.
Usage of kernel exported symbols have been restricted to GPL modules: http://www.uwsg.iu.edu/hypermail/linux/kernel/0110.2/0369.html

I think this bug should be closed with UPSTREAM resolution. Opinions?
Comment 5 Stefan Schweizer (RETIRED) gentoo-dev 2004-12-29 14:20:45 UTC
Only slamr is affected, so we could simply remove that module for kernels >= 2.6.10

Slamr is fully replaced by snd-intel8x0m I think.

However slusb in the ebuild has no replacement, so please compile it for all kernels and do not bail out on >=2.6.10
Also the slmodemd is always needed .. so we really need that ebuild ..
Comment 6 Alin Năstac (RETIRED) gentoo-dev 2004-12-29 14:43:52 UTC
Ok, I've rolled back r[12] revisions and changed r3 as follows:
  - allow installation for kernels >= 2.6.10 but don't install slamr module
  - apply Daniel's patch if and only if kernel ver >= 2.6.10 

Are these changes ok?
Comment 7 Daniel Drake (RETIRED) gentoo-dev 2004-12-29 16:41:48 UTC
You can make one simplification in src_unpack

-	# http://marc.theaimsgroup.com/?l=gentoo-dev&m=109672618708314&w=2
-	if kernel_is ge 2 6 6; then
-		sed -i 's:SUBDIRS=:M=:g' drivers/Makefile
-	fi
+	convert_to_m drivers/Makefile
Comment 8 Alin Năstac (RETIRED) gentoo-dev 2004-12-30 00:42:12 UTC
patch applied. 
Comment 9 Jefferson San Juan 2005-01-02 06:05:28 UTC
It is not a bug, but what Alin Nastac pointed out. There are 2 controversial workarounds that will probably have to be applied by the user manually; 1) Change all entries to MODULE_LICENSE("GPL") in slmodem's source code, 2) Patch the kernel to export the required symbols to non-GPL drivers.
Comment 10 Daniel Drake (RETIRED) gentoo-dev 2005-01-02 06:16:14 UTC
Neither of those are suitable here. I also dont think slmodem using device_release_driver is correct (have not looked at the other 2). I think the slmodem source code can be worked in a better way.
Comment 11 Jefferson San Juan 2005-01-02 08:22:36 UTC
The main problem lies on "Unknown symbol" due to the required symbols are not exported (EXPORT_SYMBOL_GPL is used and not EXPORT_SYMBOL) because the slmodem driver is not licensed with GPL. A suitable fix, in terms of licensing and kernel developers' ideology, is to make a GPL licensed wrapper driver for the slmodem binary driver.
Comment 12 Daniel Drake (RETIRED) gentoo-dev 2005-01-02 08:34:30 UTC
That is not up to us to decide. Plus my last point still stands. I read something like device_release_driver should only be used if it was previously registered with device_register_driver, which it is not.
Comment 13 Jefferson San Juan 2005-01-02 09:14:10 UTC
I just read Smart Link's license (http://www.smlink.com/main/item.php?ln=en&item_id=24&main_id=20) and they prohibit any kind of modifications of their driver. So there is actually no point of fixing this driver if they will call you a criminal bt doing so.
I've also checked Nvidia's driver and they reimplemented the GPL only symbols.
Comment 14 Daniel Drake (RETIRED) gentoo-dev 2005-01-02 09:58:11 UTC
That does not apply to smartlinks glue code, which is released under a different (BSD-like) license. I have sent code fixes to smartlink in the past which are incorporated in these releases.
Comment 15 Greg Kroah-Hartman (RETIRED) gentoo-dev 2005-01-02 19:23:57 UTC
nvidia does not have wrappers around the gpl licensed functions, they merely
call different functions.

If such wrappers were created for this driver, it would be time to call
my employer's lawyers, as that is my code they are violating by doing so.

So please, either get upstream to use the proper kernel interfaces (that are not marked GPL only), or get them to change their license of the code, not much we can
do here about this (nor do I want to have gentoo make such changes, as it is not
legal for us to do so, as has been pointed out.)
Comment 16 Daniel Drake (RETIRED) gentoo-dev 2005-01-03 06:22:59 UTC
Created attachment 47478 [details]
slmodem license

This is the slmodem license as included in the source code. It's not GPL
compatible but is fairly "open" at the same time. And they didn't seem to have
a problem with me hacking the source the last time around.
Comment 17 Daniel Drake (RETIRED) gentoo-dev 2005-01-03 07:28:22 UTC
Created attachment 47481 [details, diff]
slmodem-2.9.10-pci-workaround.patch

The init function currently scans the hardware, and if any supported hardware
has been claimed by another driver, it tries to unregister it frmo that driver
before claiming it itself. This seems rather messy, dropping that code
altogether is a good workaround for this problem.
Comment 18 Alin Năstac (RETIRED) gentoo-dev 2005-01-06 15:13:07 UTC
patch applied in r4
Comment 19 Paul Kronenwetter 2005-01-11 15:33:56 UTC
In response to comment #5, slamr is not fully replaced by snd-intel8x0.  I have a modem that works 99% with slamr but is completely unrecognized by snd-intel8x0.  Any suggestions?
Comment 20 Paul Kronenwetter 2005-01-11 16:12:13 UTC
Stupid user error...

1. Insert snd-intel8x0m
2. Use slmodem and hw:1, not modem:0 or modem:1.

Continue life in a happy and joyous way...
Many apologies.
Comment 21 Master One 2005-01-17 10:24:46 UTC
Can someone point out, which way to go now?

Is it fully working by using just snd-intel8x0m, without the use of the slamr module?

If the problem with the slmodem-archive, so building the slamr module on a 2.6.10 kernel got fixed, what is it about "-r4" since slmodem-2.9.10-r1.ebuild is still the last one showing up in portage?
Comment 22 Daniel Drake (RETIRED) gentoo-dev 2005-01-17 12:47:09 UTC
You need snd-intel8x0m, not slamr. But I think you also need the slmodemd program from this package (maybe you could confirm or deny this? I don't think any of us own this hardware...)

The newest version is 2.9.9a (yes, even newer than 2.9.10)
Comment 23 Georgios E. Kylafas 2005-01-18 00:12:07 UTC
Version 2.9.9a may be newer than 2.9.10, but this is not how portage
sees it:

# emerge -pv slmodem

These are the packages that I would merge, in order:

Calculating dependencies  ...done!
[ebuild     U ] net-dialup/slmodem-2.9.10-r1 [2.9.9a] -alsa -usb 0 kB

This is solved only if I add:
">=net-dialup/slmodem-2.9.10" to /etc/portage/package.mask, and "net-dialup/slmodem ~x86" to /etc/portage/package.keywords.
Comment 24 Daniel Drake (RETIRED) gentoo-dev 2005-01-18 06:00:22 UTC
2.9.10 will be removed soon due to licensing issues