Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Linux Drivers for Motorola SM56 Speakerphone modem 1

Status
Not open for further replies.

amiq

Technical User
Jul 18, 2003
1
0
0
IR
Hi there :)

Dose any one has any idea about instaling Motorola SM56 speakerphone (sound/fax/data) modem in RedHat Linux 9.0?

The drivers provided by Motorola are for SM56 (Data/fax) but I couldn't use them with SM56 (Data/Fax/Sound) modem.
 
SM56 Motorola internal modem users with Linux may well
be aware of the problem
that the sm56 driver does not work on newer Linux
kernels. I got it to work on
2.4.18 by doing a patch on the kernel. Well now I've
made it work without the
kernel tampering :)

>>Tested with 2.4.18 and 2.4.19<<

Getting straight to the stuff - in your driver file,
i.e., sm56.o in
/lib/modules/2.4.x/kernel/driver/char/, make the
following changes:

(Better to do it in sm56.lib in the driver file you got
and then running their setup program...makes it portable :)

At offsets 0x4e210+5 change the byte 0x07 to 0x11
0x4e220+4 change from 0x07 to 0x11
0x4e820+9 change from 0x0f to 0x11

For doing these changes any binary editor will do. I
recommend &quot;khexedit&quot; for
its ease.

Now try accessing the modem, it should work :). All
that remains of the old
problem is the message that the module sm56.o will
taint the kernel. You can
remove this too, but it is purely aesthetic and only
for those who have a
problem with &quot;Tainted kernels&quot; (like me ;-).

To fix this in khexedit (or something else) go to
0x11dde6 and add the text
&quot;license=GPL&quot; from the text view.


WHY all this works?

Well, if you have tried to use the original driver
you would have
noticed that the driver got stuck while &quot;Initialising&quot;
and dmesg showed

kernel BUG at slab.c:1099
(if u had BUG messages enabled in kernel)

and also a stack trace and register dump. If you
looked at the kernel symtab
with

$ nm vmlinux|sort|less

you would find the EIP matches with the function
kmem_cache_grow() exactly
what the BUG dump said (Linux is cool right :). The
sources show this to
be a result of the 'flags' argument not matching. So
we 'grep' the kernel
headers for the hex values of these flags.

Now for the driver sm56.o.

( This was a really stupid job by Mot@rola. First the
driver is not open source
that's why kernel got &quot;Tainted&quot;. Second they withdraw
support for sm56.)

We infer from above that the problem is probably a
wrong flag param passed to
some mm routine. This is not intentional but the
result of the fast pace
of development of Linux and the SM56 driver being
proprietary. So we look up
the external references in sm56.o

$ objdump -t sm56.o|grep '\ U\ '

We find kmalloc() and __vmalloc() are the only mm
routines and get their
addresses too. Now we inspect the assembly code.

$ objdump -S sm56.o|less

Go to the required address and we find &quot;push 0x7&quot;
corresponding to the second
param of kmalloc and __vmalloc(). Since no valid flag
combination gives us
this value...BINGO, problem identified. It's just a
matter of going and
correcting.


******************************************************************************
Now that it's done, I would like to request anyone
with SM56 to try this
and send me their results, also any other problem
with sm56.

P.S. One more thing the flags I asked you to
substitute are only intelligent
guesses at best. To be sure I need these files -

&quot;mm.h & slab.h&quot; from Linux 2.4.2 and check out the
combination for 0x7 and find
the corresponding here. Your help is welcomed here
:)


Your replies to:

jimmy_b@softhome.net

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top