Vijaynarayanan Subramanian | 1 Apr 01:25 2003
Picon

Basic driver/kernel question

Hi ,

I was wondering how one can figure out which source file is being used for a particular driver in the running kernel.

for example,

several file in /drivers/char look like they could be the source for the keyboard and mouse driver. how can I find out which source file is being used. the makefile seems to compile a lot of similar drivers.

/etc/sys/hwconfig does not contain anything relevant about this.

also, it looks like my ps/2 mouse is controlled by the keyboard driver. how can I use my own mouse driver while keeping the keyboard driver intact.( looks like both use the same i/o ports though)

thaks a bunch in advance.all help is appreciated.

vijay


Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
Curran, Dominic | 1 Apr 04:42 2003
Picon

Tools to help find potential driver memory leaks ?


Hi

Are there any tools / special libraries to help find potential memory leaks
in Linux device driver modules ?

I know there are special libraries/tools in usermode (MEMWATCH) to help
there, but what about kernel mode ?

Thanks
dom

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/

madsys | 1 Apr 05:50 2003
Picon

question about ".previous" directive in EXPORT_NO_SYMBOLS

hi all
	
	could anyone tell me what's the meaning of the ".previous" directive in EXPORT_NO_SYMBOLS ?
	the macro is below:

	#define EXPORT_NO_SYMBOLS __asm__(".section __ksymtab\n.previous") 

	
	thanx in advance

  madsys

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/

alok kumar | 1 Apr 06:03 2003
Picon

mmap for pci memory

Hi All,

I am trying to implement mmap call for high pci memory. I could find out the pci

region using  pci_resource_start() and pci_resource_len() functions.

i found out that for region 0 the start address is 0x20000000 and length is 4MB

Now i want to implement mmap for this memory space so that from user space i can write directly on this memory.

I found out the system RAM top address using __pa(high_memory) function. It gives

me the address 0xA000000. I know that pci memory is very high memory and

i tried to use

 remap_page_range(vma->vm_start,0x20000000, 4M, PAGE_SHARED)

But from user space memory appears to be fragmented and mmap call does not work properly. Exactly how to mmap high PCI memory. I know that remap_page_range generates page table but i doubt whether this function is doing its required job??.

I understand that first high PCI memory has to be mapped to system memory and then i can go ahead for mmap. But how to do this exactly???

Please help

Regards,

Alok


Do you Yahoo!?
Yahoo! Tax Center - File online, calculators, forms, and more
Mohanasundaram C | 1 Apr 07:38 2003
Picon

Performance Statistics

Hi All,

	We would like to monitor the performance statistics of a linux system from a remote machine. We came to know
that rstatd daemon exposes some performance metrics. But we are not satisfied with the number of values
that we could get through rstatd. We are searching for ways which is more flexibilie and and could expose
large amount of system performance metrics. I would like to know is there any feature or mechanism that the
kernel can expose performance metrics to a remote system. Any idieas and suggestions would be of great help.

Thanks in advance,

Regards,
Mohan.

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/

Christophe Lucas | 1 Apr 09:26 2003

Re: waiting 100ms while in __init code

Florin Malita (mali <at> go.ro) wrote:
> On Mon, 2003-03-31 at 22:53, David Wuertele wrote:
> > I'm putting some code in ide_setup() (which is declared as __init)
> > that powers up a peripheral, then waits 100ms, then resets the
> > peripheral.  I'm having trouble doing the wait.  Here's what I'm
> > doing:
> > 
> >   unsigned long ulMillSecs = 100;
> >   unsigned long ulJiffies;
> >   current->state = TASK_INTERRUPTIBLE;
> >   ulJiffies = (ulMillSecs * HZ)/1000; // Convert ms to jiffies
> >   schedule_timeout(ulJiffies);
> > 
> > I guess the jiffies and scheduler aren't ready at this point?
> 
> Yup, doesn't make sense to call schedule at __init time. Try using
> mdelay (#include <linux/delay.h>).
> 

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

--

-- 
Cordialement/Regards
Iomeda SA (clucas <at> iomeda.fr)
Christophe Lucas -- Developpeur/Administrateur GNU/Linux
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/

shesha bhushan | 1 Apr 11:47 2003
Picon

Deactivating TCP checksumming


Hello all,
  I am trying to de-activate the TCP checksumming and allow hardware (GBE to 
compute it for me). But can any one let me know how to do it.

This is what I did.But Its not working for me.

In linux/net/ipv4/tcp.c there are function calls to 
csum_and_copy_from_user(). I replaced it from copy_from_user() and set the 
skb->ip_summed = CHECKSUM_HW and skb->csum = 1;. Is this correct. Since its 
not working there must be something more that has to be done. could any one 
please tell me what additional thinks I need to do.

All suggestion are highly apperciated.

Thanking You
Shesha

_________________________________________________________________
Say it now. Say it online. http://www.msn.co.in/ecards/ Send e-cards to your 
love

Matti Aarnio | 1 Apr 12:58 2003

Re: Deactivating TCP checksumming

On Tue, Apr 01, 2003 at 09:47:30AM +0000, shesha bhushan wrote:
> Hello all,
>  I am trying to de-activate the TCP checksumming and allow hardware (GBE to 
> compute it for me). But can any one let me know how to do it.

GBE ?  Likely device feature flags are wrong -- See examples
from   drivers/net/sunhme.c,  acenic.c,  tg3.c  for various ways
to use  NETIF_F_*_CSUM  feature flags.

For (some of) explanations:  include/linux/netdevice.h
(for NETIF_F_* flags)

> All suggestion are highly apperciated.
> 
> Thanking You
> Shesha

/Matti Aarnio
shesha bhushan | 1 Apr 14:12 2003
Picon

Re: Deactivating TCP checksumming

I get that. I can talk with the driver vendor. But to gain the usefulness of 
caculation of CSUM in HW we need to disable the software CSUM calculation in 
TCP layer in the kernel. Am I correct? I am trying to find that and I ma 
stuck there. How to disble the software TCP CSUM calculation? and later I 
can talk with driver vendor to enable it in hardware. I wanted help from 
linux gurus in disabling TCP csum calculation in the kernel.

Thanking You
Shesha

>From: Matti Aarnio <matti.aarnio <at> zmailer.org>
>To: shesha bhushan <bhushan_vadulas <at> hotmail.com>
>Subject: Re: Deactivating TCP checksumming
>Date: Tue, 1 Apr 2003 15:00:08 +0300
>
>On Tue, Apr 01, 2003 at 11:22:50AM +0000, shesha bhushan wrote:
> > Ok I will. Is there any other material which I can reffer?
> > I am using Intel pro1000 GBE
> >
> > Thank you very much for providing me the below information.
>
>You will need to talk with the driver author then.
>In 2.4.20 kernels (at least RedHat version) there is directory
>   drivers/net/e1000/
>in which the driver code resides.
>
>The  e1000_main.c  has:
>
>         if(adapter->hw.mac_type >= e1000_82543) {
>                 netdev->features = NETIF_F_SG |
>                                    NETIF_F_HW_CSUM |
>                                    NETIF_F_HW_VLAN_TX |
>                                    NETIF_F_HW_VLAN_RX |
>                                    NETIF_F_HW_VLAN_FILTER;
>         } else {
>                 netdev->features = NETIF_F_SG;
>         }
>
>
>   ... so, if your card isn't with that chip, then perhaps that is
>the reason for not doing checksums in HW ?
>
>Existence of that kind of test is telling to me, that "E1000" name
>is used to refer to a series of cards with varying properties.
>(Like there are a whole family of cards driven by  3c59x driver,
>  and even larger one referred as "tulip".)
>
>/Matti Aarnio
>
> > >From: Matti Aarnio <matti.aarnio <at> zmailer.org>
> > >To: shesha bhushan <bhushan_vadulas <at> hotmail.com>
> > >CC: linux-kernel <at> vger.kernel.org, kernelnewbies <at> nl.linux.org
> > >Subject: Re: Deactivating TCP checksumming
> > >Date: Tue, 1 Apr 2003 13:58:21 +0300
> > >
> > >On Tue, Apr 01, 2003 at 09:47:30AM +0000, shesha bhushan wrote:
> > >> Hello all,
> > >>  I am trying to de-activate the TCP checksumming and allow hardware 
>(GBE
> > >to
> > >> compute it for me). But can any one let me know how to do it.
> > >
> > >GBE ?  Likely device feature flags are wrong -- See examples
> > >from   drivers/net/sunhme.c,  acenic.c,  tg3.c  for various ways
> > >to use  NETIF_F_*_CSUM  feature flags.
> > >
> > >For (some of) explanations:  include/linux/netdevice.h
> > >(for NETIF_F_* flags)
> > >
> > >> All suggestion are highly apperciated.
> > >>
> > >> Thanking You
> > >> Shesha
> > >
> > >/Matti Aarnio

_________________________________________________________________

Matti Aarnio | 1 Apr 14:28 2003

Re: Deactivating TCP checksumming

On Tue, Apr 01, 2003 at 12:12:04PM +0000, shesha bhushan wrote:
> I get that. I can talk with the driver vendor. But to gain the usefulness 
> of caculation of CSUM in HW we need to disable the software CSUM 
> calculation in TCP layer in the kernel. Am I correct? I am trying to find 
> that and I ma stuck there. How to disble the software TCP CSUM calculation? 
> and later I can talk with driver vendor to enable it in hardware. I wanted 
> help from linux gurus in disabling TCP csum calculation in the kernel.

The kernel code is already smart enough of detect that the outbound
device will handle the checksum calculations all by itself, and not
do it in that case.

Testing of  dev->features   is done in files:
   net/core/dev.c
   net/ipv4/tcp.c
(depending what protocol is in question.)
in the latter case, actually in common tcp path with route-cached 
route_caps flags.

I did
   egrep 'NETIF_F_.._CSUM' net/*/*.c
to find those.
(and a number of other subset searches finding nothing)

Grep is your friend.

This whole "zero-copy" infastructure was implemented during
development in 2.3 series.

> Thanking You
> Shesha

/Matti Aarnio

Gmane