2001-12-21 18:16:25

by victor1 torres

[permalink] [raw]
Subject: Concerning a driver rewrite (NOT THE KERNEL)

No this isn?t a driver rewrite for the kernel I need help on rewriting some
code that I have to be only working with 2.4x kernel?s do you think you
could help. I would appericate it.

INFO:
I?m working on a Modem driver that run?s with kernel 2.4x I have got the
code running on a 2.2x system with no trouble. The driver is for a Ac?97
Modem (WINMODEM). The driver can find the modem and print out output but I
can?t seem to include DevFs, I would also like to implement Interrupt
Handling.
Here is the driver location:
DRIVER LOCATION IS
http://www.geocities.com/camel_10.geo/linux/ac97_modem20011221.tar.gz
Please
Thank you in advance

_________________________________________________________________
MSN Photos is the easiest way to share and print your photos:
http://photos.msn.com/support/worldwide.aspx


2001-12-21 18:34:50

by Alan

[permalink] [raw]
Subject: Re: Concerning a driver rewrite (NOT THE KERNEL)

> I?m working on a Modem driver that run?s with kernel 2.4x I have got the
> code running on a 2.2x system with no trouble. The driver is for a Ac?97
> Modem (WINMODEM). The driver can find the modem and print out output but I
> can?t seem to include DevFs, I would also like to implement Interrupt
> Handling.
> Here is the driver location:
> DRIVER LOCATION IS
> http://www.geocities.com/camel_10.geo/linux/ac97_modem20011221.tar.gz

If you are also loading the sound driver you are likely to get into a mess
with current 2.4 because the sound code sticks its nose into the codec bus
somewhat further nowdays. You driver also seems to be assuming the sound
driver has initialised the codec bus and codecs.

How do you intend the two pieces to interact ?

2001-12-21 18:45:49

by victor1 torres

[permalink] [raw]
Subject: Re: Concerning a driver rewrite (NOT THE KERNEL)

Alan-
(How do you intend the two pieces to interact ?)
I intend for the two pieces to interact with each other since they both have
access to the DSP. (DSP code will be aviable in late Janurary for the
Modem).
(If you are also loading the sound driver you are likely to get into a mess
with current 2.4 because the sound code sticks its nose into the codec bus
somewhat further nowdays. )
I understand that the codec sticks its nose into the codec bus but can?t I
add another (nose) into it also.
You driver also seems to be assuming the sound
driver has initialised the codec bus and codecs.) How could I fix it if the
sound codec is not initialised so that the modem codec could initialised
the codec bus and codecs?
Thank you


_________________________________________________________________
MSN Photos is the easiest way to share and print your photos:
http://photos.msn.com/support/worldwide.aspx

2001-12-22 00:17:17

by Alan

[permalink] [raw]
Subject: Re: Concerning a driver rewrite (NOT THE KERNEL)

> You driver also seems to be assuming the sound
> driver has initialised the codec bus and codecs.) How could I fix it if the
> sound codec is not initialised so that the modem codec could initialised
> the codec bus and codecs?

As far as I can tell from a scan of the docs you need the drivers to
co-operate because if that isn't done if the modem driver inits the AC97
then it will break running audio (and vice versa). The sound driver also
has the interrupt line and status handling so that appears to need to
become shared code - or with the sound driver calling out to the modem
driver.

My i810 board doesn't have a modem or an AMR slot but I can certainly help
integrate the pieces. Right now Doug Ledford is doing major reworking on
the i810 driver (and having tried to fix audio bugs in that before I
really appreciate him taking on that battle) but after that I'm happy to
give you a hand

2001-12-22 18:32:53

by victor1 torres

[permalink] [raw]
Subject: Re: Concerning a driver rewrite (NOT THE KERNEL)

Alan-
Than you in advance Alan.

> You driver also seems to be assuming the sound
> driver has initialised the codec bus and codecs.) How could I fix it if
the
> sound codec is not initialised so that the modem codec could initialised
> the codec bus and codecs?

As far as I can tell from a scan of the docs you need the drivers to
co-operate because if that isn't done if the modem driver inits the AC97
then it will break running audio (and vice versa). The sound driver also
has the interrupt line and status handling so that appears to need to
become shared code - or with the sound driver calling out to the modem
driver.

My i810 board doesn't have a modem or an AMR slot but I can certainly help
integrate the pieces. Right now Doug Ledford is doing major reworking on
the i810 driver (and having tried to fix audio bugs in that before I
really appreciate him taking on that battle) but after that I'm happy to
give you a hand


_________________________________________________________________
MSN Photos is the easiest way to share and print your photos:
http://photos.msn.com/support/worldwide.aspx

2001-12-22 18:33:33

by victor1 torres

[permalink] [raw]
Subject: Re: Concerning a driver rewrite (NOT THE KERNEL)

Alan-
Thank you in advance Alan. I would appreciate it.
Victor

> You driver also seems to be assuming the sound
> driver has initialised the codec bus and codecs.) How could I fix it if
the
> sound codec is not initialised so that the modem codec could initialised
> the codec bus and codecs?

As far as I can tell from a scan of the docs you need the drivers to
co-operate because if that isn't done if the modem driver inits the AC97
then it will break running audio (and vice versa). The sound driver also
has the interrupt line and status handling so that appears to need to
become shared code - or with the sound driver calling out to the modem
driver.

My i810 board doesn't have a modem or an AMR slot but I can certainly help
integrate the pieces. Right now Doug Ledford is doing major reworking on
the i810 driver (and having tried to fix audio bugs in that before I
really appreciate him taking on that battle) but after that I'm happy to
give you a hand


_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.

2001-12-25 09:51:06

by Pavel Machek

[permalink] [raw]
Subject: Re: Concerning a driver rewrite (NOT THE KERNEL)

Hi!

> (How do you intend the two pieces to interact ?)
> I intend for the two pieces to interact with each other since they both have
>
> access to the DSP. (DSP code will be aviable in late Janurary for the
> Modem).

Wow! Does that mean that this winmodem will be supported with linux
for data calls? Finally some winmodem manufacturer that saw the light
;-). Will DSP code be binary only or will it include source? [I guess
binary only, but...]
Pavel
--
(about SSSCA) "I don't say this lightly. However, I really think that the U.S.
no longer is classifiable as a democracy, but rather as a plutocracy." --hpa

2001-12-25 22:09:26

by Alan

[permalink] [raw]
Subject: Re: Concerning a driver rewrite (NOT THE KERNEL)

> Wow! Does that mean that this winmodem will be supported with linux
> for data calls? Finally some winmodem manufacturer that saw the light
> ;-). Will DSP code be binary only or will it include source? [I guess
> binary only, but...]

The line interface on the i810 chipset seems to be totally documented. Its
a dumb digitizer with AC97 2.0 modem on it.

Alan

2001-12-26 18:54:55

by victor1 torres

[permalink] [raw]
Subject: Re: Concerning a driver rewrite (NOT THE KERNEL)

To clarify something I am not the WINMODEM Manufacture that would be Intel.
Ian and I from linmodems.org have been working on building a AC97 Modem
driver.


_________________________________________________________________
Join the world?s largest e-mail service with MSN Hotmail.
http://www.hotmail.com

2001-12-26 19:03:05

by victor1 torres

[permalink] [raw]
Subject: Re: Concerning a driver rewrite (NOT THE KERNEL)

Alan-
What do you mean by this??
(The line interface on the i810 chipset seems to be totally documented. Its
a dumb digitizer with AC97 2.0 modem on it.)
Is the Modem just there or is it just able to transfer analog signal?

_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com

Subject: writing device drivers

Hello all ,
where can I find a good paper , or something good that could teach me how to
write device drivers ?? I really would like to know , mainly network device
drivers , for example , how could I re-write the rtl8139 driver ?
Please , if someone can help me ...
Tankx ...

2001-12-26 19:59:14

by DervishD

[permalink] [raw]
Subject: Re: writing device drivers

Hello Eliezer :)

>where can I find a good paper , or something good that could teach
>me how to write device drivers ??

Undoubtly, IMHO, the book from Rubini and Corbet, 'Linux Device
Drivers' (O'Reilly). Is available freely online, but it really worths
the price and I encourage you to buy it. A very good job ;)

Ra?l

2001-12-26 20:01:04

by Arnaldo Carvalho de Melo

[permalink] [raw]
Subject: Re: writing device drivers

Em Wed, Dec 26, 2001 at 05:42:16PM -0200, Eliezer dos Santos Magalh?es escreveu:
> where can I find a good paper , or something good that could teach me how to
> write device drivers ?? I really would like to know , mainly network device
> drivers , for example , how could I re-write the rtl8139 driver ?

http://www.xml.com/ldd/chapter/book/index.html

More specifically:

Chapter 14: Network Drivers
http://www.xml.com/ldd/chapter/book/ch14.html

- Arnaldo

2001-12-26 20:16:16

by Riley Williams

[permalink] [raw]
Subject: Re: writing device drivers

Hi Eliezer.

> where can I find a good paper , or something good that could teach
> me how to write device drivers ?? I really would like to know ,
> mainly network device drivers , for example , how could I re-write
> the rtl8139 driver ?

A good starting point is the book "Linux Device Drivers" published by
O'Reilly Associates (with which I have no relationship other than as a
satisfied customer, depite my name). Details can be found at...

http://www.oreilly.com/catalog/linuxdrive2/

...regarding the second edition thereof - I have the first edition
myself, which covers the 2.0 kernel series, but I believe the second
edition covers the 2.4 series kernels, SMP and USB, all of which were
missing from the original.

Best wishes from Riley.

2001-12-26 20:14:06

by Robert Szentmihalyi

[permalink] [raw]
Subject: Re: writing device drivers

On Wednesday, 26. December 2001 20:42, Eliezer dos Santos Magalh?es
wrote:
> Hello all ,
> where can I find a good paper , or something good that could
> teach me how to write device drivers ?? I really would like to
> know , mainly network device drivers , for example , how could I
> re-write the rtl8139 driver ? Please , if someone can help me ...
> Tankx ...

One of the best books on this topic is "Linux Device Drivers" by
Alessandro Rubini & Jonathan Corbet.
You may have a look at it at
http://www.xml.com/ldd/chapter/book/index.html
but I suggest buying the printed book. It's definately worth the
money.

hth,
Robert

--
Where do you want to be tomorrow?

Entracom. Building Linux systems.
http://www.entracom.de

2001-12-26 20:37:36

by Alan

[permalink] [raw]
Subject: Re: Concerning a driver rewrite (NOT THE KERNEL)

> Is the Modem just there or is it just able to transfer analog signal?

The codec is on the AML riser or motherboard, it digitizes the signal coming
in and converts the outgoing digital stream to analog. It also has a few
controls for the line signalling.

2001-12-26 22:42:15

by Jeff Garzik

[permalink] [raw]
Subject: Re: writing device drivers

On Wed, Dec 26, 2001 at 05:42:16PM -0200, Eliezer dos Santos Magalh?es wrote:
> where can I find a good paper , or something good that could teach me how to
> write device drivers ?? I really would like to know , mainly network device
> drivers , for example , how could I re-write the rtl8139 driver ?

For kernel 2.4, the -2nd- edition of _Linux Device Drivers_ is good, but
it doesn't cover nearly everything you need to know... your best
reference is existing network driver source code for recent PCI drivers.

And, are you having problems with rtl8139 or was that just an example? :)

Jeff


2001-12-27 14:57:21

by Arnaldo Carvalho de Melo

[permalink] [raw]
Subject: Re: writing device drivers

Em Thu, Dec 27, 2001 at 12:56:58PM -0200, Eliezer dos Santos Magalh?es escreveu:
> No , it was just an example , I would like to take a source of a device
> drive , and study the code ... well , I have got that book ... I think I
> need to read it very slowly ... thank for the help ...

Some tips: there's some IRC channels that you may find interesting, namely:

#kernelnewbies and #kernel-br, both at irc.openprojects.net, go there and
you'll find plenty of helpful people willing to help you to get into this
kernel hacking journey, join us! :)

- Arnaldo

Subject: Re: writing device drivers


----- Original Message -----
From: "Legacy Fishtank" <[email protected]>
To: "Eliezer dos Santos Magalh?es" <[email protected]>
Cc: <[email protected]>
Sent: Wednesday, December 26, 2001 8:41 PM
Subject: Re: writing device drivers


> On Wed, Dec 26, 2001 at 05:42:16PM -0200, Eliezer dos Santos Magalh?es
wrote:
> > where can I find a good paper , or something good that could teach me
how to
> > write device drivers ?? I really would like to know , mainly network
device
> > drivers , for example , how could I re-write the rtl8139 driver ?
>
> For kernel 2.4, the -2nd- edition of _Linux Device Drivers_ is good, but
> it doesn't cover nearly everything you need to know... your best
> reference is existing network driver source code for recent PCI drivers.
>
> And, are you having problems with rtl8139 or was that just an example? :)
>
> Jeff
>
No , it was just an example , I would like to take a source of a device
drive , and study the code ... well , I have got that book ... I think I
need to read it very slowly ... thank for the help ...