What is the precision of usleep ?

2001-04-20 Thread Marcus Ramos

Hello,

I am using usleep in an application under RH7 kernel 2.4.2. However,
when I bring its argument down to 20 miliseconds (20.000 microseconds)
or less, this seems to be ignored by the function (or the machine's hw
timer), which behaves as if 20 ms where its lowest acceptable value. How
can I measure the precision of usleep in my box ? I am currently using
an Dell GX110 PIII 866 MHz.

Thanks in advance.
Marcus.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: Can't find modules after moving to 2.4.2

2001-03-29 Thread Marcus Ramos

Hello,

Thanks for those who replied telling me to upgrade modutils to 2.4.5.

I downloaded modutils-2.4.5.tar.gz and placed it in my /root directory. After
tar -xzvf, I got a new directory /root/modutils-2.4.5. Then I followed the
instructions in INSTALL:

cd modutils-2.4.5
./configure

But, from this point on, I wasn't able to finish the installation. What is
meant by "/paht/to/master/modutils/configure" ? Anyway, doing "make install"
doesn't cause any effect, as my modules still aren't loaded when I reboot
with kernel 2.4.2. Thanks in advance for your comments.

Best Regards,
Marcus.

Marcus Ramos wrote:

> Hello,
>
> I've moved from kernel 2.2.16 to 2.4.2 (RH7) and its boots OK, except
> for the fact that none of the modules in "/etc/modules.conf" are loaded
> anymore (although modules were enabled in kernel config). In
> "/lib/modules" I see two directories: 2.2.16 and 2.4.2 (which I assume
> is the default for modules.conf). However, the "/lib/modules/2.4.2"
> contains almost no files, differently from 2.2.16. I guess I've missed
> some important step during the installation of 2.4.2, but now I am
> confused and can't recover. Can anyboy point me what the missing step is
> ? I will be most grateful.
>
> Thanks in advance,
> Marcus.
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [EMAIL PROTECTED]
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Can't find modules after moving to 2.4.2

2001-03-28 Thread Marcus Ramos

Hello,

I've moved from kernel 2.2.16 to 2.4.2 (RH7) and its boots OK, except
for the fact that none of the modules in "/etc/modules.conf" are loaded
anymore (although modules were enabled in kernel config). In
"/lib/modules" I see two directories: 2.2.16 and 2.4.2 (which I assume
is the default for modules.conf). However, the "/lib/modules/2.4.2"
contains almost no files, differently from 2.2.16. I guess I've missed
some important step during the installation of 2.4.2, but now I am
confused and can't recover. Can anyboy point me what the missing step is
? I will be most grateful.

Thanks in advance,
Marcus.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Making changes to 3c90X.c

2001-03-05 Thread Marcus Ramos

Hello,

I am developing an application for which I need to make small changes to
the source code of 3c90x.c (3com ethernet driver). Indeed, I need to
access - and modify - the contents of the packets right before they are
sent on the wire. After examining sk_buff.h, function NICSendPacket of
3c90x.c and reading chapter 14 (Network Drivers) of the book Linux
Device Drivers, I concluded that SocketBuffer->data points to the first
octet of data in the packet.

My question is: can I access the contents of the buffer simply by

*(SocketBuffer->data)
*(SocketBuffer->data+1)
*(SocketBuffer->data+2) etc ?

What is the layout of the octets starting at data ? Eth header, IP
header, TCP header etc ,or ?

Can I write new contents back to the buffer the same way ?

Thanks in advance,
Marcus.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: Linux device driver writing

2001-02-23 Thread Marcus Ramos

Hello,

For Linux you can use the good and complete "Linux Device Drivers" by
Alessandro Rubini, O'Reilly, 1998. For other flavors of Unix, I am aware only
of old text books of little interest for present systems. Good luck.

Marcus.

Rahul wrote:

> Hi friends,
>
> I am new to this field of writing device drivers. I
> have done my course in Unix/C and presently working
> for a company in india in embedded systems. I am
> looking forward to write some device drivers in
> Linux/Unix/QNX can any one suggest me any good book
> which i can refer for my guidance.
>
> thx for your constant support.
> bye
> rahul
>
> 
> Do You Yahoo!?
> Get your free @yahoo.co.in address at http://mail.yahoo.co.in
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [EMAIL PROTECTED]
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Building a new module from an existing one

2001-02-22 Thread Marcus Ramos

Hello,

I plan to make a few changes to 3c90x.c (Ethhernet driver) located at
/usr/src/linux-2.2.16/drivers/net, in RH7. Since the correspondent
object file 3c90x.o resides in /lib/modules/2.2.16-20/net, I ask: how
shall I proceed in order to have the C file properly compiled and placed
in the right place, so that the modified version replaces the previous
one after system boot up ?

Thanks in advance,
Marcus.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: What does "device or resource busy" mean ?

2001-02-14 Thread Marcus Ramos

Hi,

For some unknown (to me) reason, this message has to do with X being
active. Leaving X causes the module to be correctly loaded. I guess X
should be using some resource that my module also wanted to use.

Marcus.

Marcus Ramos wrote:

> Hello,
>
> When I try to load module ttime.o - "insmod ttime.o" - I get the
> following message: "ttime.o: init_module: Device or resource busy".
> "lsmod" shows that ttime.o was effectively not loaded. I am using RH7
> with kernel 2.2.16-22. Does anyone have a guess on a possible reason for
> this and how to fix it, so the module can be normally loaded ?
>
> Thanks,
> Marcus.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



What does "device or resource busy" mean ?

2001-02-14 Thread Marcus Ramos

Hello,

When I try to load module ttime.o - "insmod ttime.o" - I get the
following message: "ttime.o: init_module: Device or resource busy".
"lsmod" shows that ttime.o was effectively not loaded. I am using RH7
with kernel 2.2.16-22. Does anyone have a guess on a possible reason for
this and how to fix it, so the module can be normally loaded ?

Thanks,
Marcus.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Problem with kernel-module version mismatch

2001-02-13 Thread Marcus Ramos

Hello,

After compiling files "ttime.c" and "ttime.h", I try to load them into
the kernel using the command /sbin/insmod ttime.o. However, the
following message suggests that a version conflict  has prevented the
loading to be performed correctly:

"kernel-module version mismatch. ttime.o was compiled for kernel
2.4.0-0.26 while this kernel is version 2.2.16-22".

My question is: since the source has been compiled on the same kernel as
it is going to be loaded into, how come this message ? What do I have to
do in order to avoid such problem ? Change the source code ? Where did
it learn about 2.4.0-0.26 if I am using 2.2.16-22 (Red Hat 7.0) ?

Thanks in advance,
Marcus.



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/