Linux-Development-Sys Digest #684, Volume #8 Wed, 2 May 01 11:13:14 EDT
Contents:
Modem programing (Mr Zammler)
Re: buffer cache ("Zhiyong Xu")
How can I compile previous version of kernel ? ("������")
Help! GTK Segfault using PPDEV driver in a GTK callback ("Martin Miller")
Re: 2.2.19 freezes during strong gcc usage (Martin Kahlert)
Digital Signatures and File Security Ideas ([EMAIL PROTECTED])
Re: Is linux kernel preemptive?? ([EMAIL PROTECTED])
Re: IO system throughput ([EMAIL PROTECTED])
Re: Networking in Linux (Roberto Nibali)
ioremap() and request_regions() (Ronnie Arosa Carril)
Critical sections ("Dean Wakerley")
Re: How can I compile previous version of kernel ? (Kasper Dupont)
Re: Digital Signatures and File Security Ideas ([EMAIL PROTECTED])
Why is RedHat 7.1 so fast? (jtnews)
Re: Critical sections (jtnews)
Re: portable computation time estimation? (Rolf Magnus)
__buggy_fxr_alignment... (Bill Pringlemeir)
Re: Modem programing ("Nick Lockyer")
Re: ioremap() and request_regions() ("Nick Lockyer")
Re: Critical sections (Richard Heathfield)
Re: Writing a PCI device driver. ("Nick Lockyer")
Re: More on reading ethernet frames ("Nick Lockyer")
Re: How to associate memory with a PCI device ("Nick Lockyer")
Re: ("Nick Lockyer")
Re: Networking in Linux ("Nick Lockyer")
----------------------------------------------------------------------------
From: Mr Zammler <[EMAIL PROTECTED]>
Subject: Modem programing
Date: Wed, 2 May 2001 01:19:35 +0300
I like to find out more on how to do modem programing. I would like to be
able e.g. to receive a RING from the modem directly (i.e. not through a
term program).
I would also like to know how to send a *.wav sound down the phone line
through the modem.
Is there a guide somewhere I could read?
Thanks,
Mr Zammler
------------------------------
From: "Zhiyong Xu" <[EMAIL PROTECTED]>
Subject: Re: buffer cache
Date: Tue, 1 May 2001 22:55:09 -0700
So it means if I want to intercept all disk I/Os, it is not enough to
monitor all I/Os through buffer cache, but also need to monitor all I/Os
through page caches.
For traditional unix system, it seems all disk I/Os must go through buffer
cache, so that means in kernel 2.4.x, it is quite different compare to
traditional unix system?
Thanks in advance.
Karl Heyes <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> In article <9cg3id$hd$[EMAIL PROTECTED]>, "Zhiyong Xu"
> <[EMAIL PROTECTED]>
> wrote:
>
>
> > Does all disk I/O go through buffer cache? All superblcok, inodes and
data
> > block access must go thourgh buffer cache and can not pass it? So if OS
> want
> > to write some data to disk, it must copy to the corrsponding blocks in
> > buffer cache and mark it dirty, then at certain time, flush to disk?
> > Is there any possibility disk I/O passby buffer cache?
> >
>
> In 2.4, most of, if not all, the file I/O goes through the page cache, the
> buffer cache is used for the file metadata like filenames. The Raw IO
> driver provides a mechanism for no page caching. However it is really just
> a compatibility layer for older applications which require some guarentee
> of getting to disk.
>
> Use normal file I/O and use the fsync/fdatasync calls.
>
> karl.
------------------------------
From: "������" <[EMAIL PROTECTED]>
Subject: How can I compile previous version of kernel ?
Date: Wed, 2 May 2001 12:21:07 +0900
Hi all
I installed RedHat 7.0 and try to compile kernel 2.2.14 in
I relink /usr/include /srm, linux b ut
it failed.
In lib/chekcksum.S file, #define statement cause error.
I check the file if this is real bug and same file inkernel 2.4.2.
but i found file is correct.
How can i degrade kernel?
------------------------------
From: "Martin Miller" <[EMAIL PROTECTED]>
Subject: Help! GTK Segfault using PPDEV driver in a GTK callback
Crossposted-To: comp.os.linux.development.apps
Date: Wed, 02 May 2001 04:49:43 GMT
Hi,
I'm using the user-mode parport driver (ppdev on a 2.4.3 kernel) in a
little GTK test application and I've got a really bizarre problem!
I've set up a GTK item menu callback that should send commands and read
result from a device that is connected on my parallel port, in ECP mode.
The communication is working, and I make sure to release the port at the
end of the callback.
If I'm doing IO (using write and read from ppdev) *IN* a function which is
called from the callback, the communication will be ok, but GTK (i'm
pretty sure it is GTK) will segfault after the callback return.
I can initialize the port and close it in a function without problem. But
if I'm doing write and read in a function, it will segfault.
If I'm doing exactly the same things, but without putting the ppdev code
in some functions (so this code is right in the callback) everything will
be ok!
I hope someone can help me understand what kind of problem I have! I can
post a little example code if someone want to see that.
thank you,
Martin.
------------------------------
From: [EMAIL PROTECTED] (Martin Kahlert)
Subject: Re: 2.2.19 freezes during strong gcc usage
Date: 2 May 2001 05:59:15 GMT
Reply-To: [EMAIL PROTECTED]
In article <[EMAIL PROTECTED]>,
"Peter T. Breuer" <[EMAIL PROTECTED]> writes:
> Phil Ehrens <[EMAIL PROTECTED]> wrote:
>> Peter T. Breuer wrote:
>>>Martin Kahlert <[EMAIL PROTECTED]> wrote:
>>>> I can trigger an almost immidiate kernel freeze by using
>>>> make -j 2
>>>Then you have a hardware problem .. if you think otherwise refer it to
>>>the kernel list.
>>>> on my large java project, which is compiled by
>>>> gcj (the java compiler from gcc-3 snapshots)
>>>> on my dual Pentium III Linux system.
>>>> The only (and very last) message from syslogd is:
>>>> CPU 1: Machine Check Exception: 0000000000000004
>>>> (sometimes it's CPU 0, but that doesn't seem to matter here)
>>>disable various things. apm. See if you can change things.
>> Danger Will Robinson! Note "gcc-3 snapshots".
>> Lord knows what it's doing. Might replace the
>> kernel with a furby.
>
> Not if he's not running as root. That's a hardware or kernel problem
> then.
Just for clarification:
The machine is a production system. It usually works without reboot until
the next 2.2.* kernel is out (24h/day, 7 days/week).
I would never be such a fool to compile the kernel of that machine by a gcc
snapshot. The kernel is compiled by gcc-2.95.2 iirc (SuSE 6.4).
I work as a normal user on that system, but i need the new java compiler to
compile a large project. A compilation lasts for about half an hour and i
thought, it would be nice to use both CPUs for that.
Without make -j 2 the system works without problems. gcc itself can run
in parallel, since i usually compile C/Fortran code by make -j 2.
Only the java compiler gcj misbehaves on my machine.
This made me assume, that it could be a kernel problem.
I thought, i read on a kernel website, that there were problems with gcc and
some kernels (triggered by mmap or anything like that) on SMP systems,
but i don't know, where i read about that any more.
Perhaps somebody knows more about that.
Thanks,
Martin.
--
The early bird gets the worm. If you want something else for
breakfast, get up later.
------------------------------
From: [EMAIL PROTECTED]
Subject: Digital Signatures and File Security Ideas
Date: Wed, 02 May 2001 07:04:07 GMT
Hi.
I'm trying to implement a method to prevent unauthorized files from being
executed on a handheld embedded linux system.
I thought one way to do this is to implement some kind of digital signature
that would allow access to a special file attribute flag. This file attribute
flag would be set if the digital signature was valid and would allow
execution of the file.
If someone were to download an unauthorized file then the flag would not be
set and file could not be executed.
Are there existing methods on a linux system to do this kind of thing, or do I
have to do some modifications to the file manager?
TIA
Wendell
------------------------------
From: [EMAIL PROTECTED]
Subject: Re: Is linux kernel preemptive??
Date: Wed, 2 May 2001 08:33:02 +0000 (UTC)
Greg Copeland <[EMAIL PROTECTED]> wrote:
> Kasper Dupont <[EMAIL PROTECTED]> writes:
>> Greg Copeland wrote:
> [snip]
>> This is the point where you have misunderstood
>> something. A system call cannot preempt another
>> system call, no matter what the system looks like.
>>
>> When some code is running it keeps running until
>> it gives up control or an interrupt arrives. If
> And when an interrupt is processed, is it something
> magical, or rather, an interrupt handler which is
> pretty much a system call. Like I said, the mechanism
> has no value in this conversation. Please tell me
> why you'd think that there is something magical about
> interrupts that makes them significantly distinct
> from any other kernel function ("system call") other
> than them being asynchronously triggered.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This is precisely the point. It does your asynchronous stuff
automagically. Then the scheduler schedules something runnable.
I don't understand why you need something more than this perfectly
standard mechanism.
> That's correct. However, it doesn't validate or
> invalidate anything that I've stated, however, it
> does provide more detail. While I thank you for
> offering the additional details, it doesn't have
> anything to do with the topic at hand.
I think it is much relevant in fact. You prefer a mechanism in which
you schedule yourself your job, using a kernel notification mechanism,
instead of using the standard scheduler mechanism. Nothing proves
this would be more efficient.
--
Michel Talon
------------------------------
From: [EMAIL PROTECTED]
Subject: Re: IO system throughput
Date: Wed, 2 May 2001 08:35:47 +0000 (UTC)
Greg Copeland <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] writes:
> [snip]
>> What do you think of the following system call that exists under FreeBSD
>> and allows to do the thing you like, if i don't err:
>>
>> int
>> kqueue(void)
>>
> Ya, I read an article about this a number of months back. I think it's pretty
> cool. From that I've *read*, it is doing exactly what I've been talking about.
> My memory is a little fuzzy on this, but I think a similar project is underway
> for Linux. I don't remember if it was being built on the kqueue system or not.
> Sorry. As for how well the above implementation works, I honestly don't know,
> but from what I've read, they've done an excellent job.
>From what i have read also in FreeBSD mailing lists, this mechanisms
allows very good performance in some cases. Note that forking a new
process is extremely fast on Linux, more than in FreeBSD, so that
this mechanism is perhaps not as useful as in FreeBSD.
> --
> Greg Copeland, Principal Consultant
> Copeland Computer Consulting
> --------------------------------------------------
> PGP/GPG Key at http://www.keyserver.net
> DE5E 6F1D 0B51 6758 A5D7 7DFE D785 A386 BD11 4FCD
> --------------------------------------------------
--
Michel Talon
------------------------------
From: Roberto Nibali <[EMAIL PROTECTED]>
Subject: Re: Networking in Linux
Date: Wed, 02 May 2001 11:12:01 +0200
Chainsaws and Code wrote:
>
> Does anybody know where in the source the lowest level of handling network
> packets occurs? This question is asked disreguarding drivers for NICs and
> modems and such (as in the networking device has done its job, now what?)
> If you have an idea (or even know for sure), I'd love to hear what ya have
> to share!
Hmm, what OS? I assume Linux and kernel 2.2.x. So you might want to read:
http://kernelnewbies.org/documents/ipnetworking/linuxipnetworking.html
A few hints (simplyfied), so you don't have to look too hard:
drivers/net/<PACKET_DRIVER>.c
The packet driver calls netif_rx()
net/core/dev.c:netif_rx()
enqueue packet in backlog and calls the net_bh()
net/core/dev.c:net_bh()
dequeuing from backlog queue with skb_dequeue()
call ip_rcv() for IP protocol:
net/ipv4/ip_input.c:ip_rcv()
- defragmentation [ip_defrag(skb) if ip_always_defrag==1]
- starting from this point you have various code paths.
Explore yourself and get excited. HTH and best regards,
Roberto Nibali, ratz
--
mailto: `echo [EMAIL PROTECTED] | sed 's/[NOSPAM]//g'`
------------------------------
From: Ronnie Arosa Carril <[EMAIL PROTECTED]>
Subject: ioremap() and request_regions()
Date: Wed, 02 May 2001 11:33:56 +0200
What these functions really do? Why do these functions never appear
together?
------------------------------
From: "Dean Wakerley" <[EMAIL PROTECTED]>
Crossposted-To: comp.lang.c,gnu.glibc.bug,linux.dev.kernel
Subject: Critical sections
Date: Wed, 2 May 2001 11:26:15 +0100
Whats the standard way in C of enforcing mutual exclusion on a section of
code? I'm thinking of semaphores and the equivalent of java's synchronised
keyword, but can't find any info.
------------------------------
From: Kasper Dupont <[EMAIL PROTECTED]>
Subject: Re: How can I compile previous version of kernel ?
Date: Wed, 02 May 2001 10:32:26 +0000
������ wrote:
>
> Hi all
> I installed RedHat 7.0 and try to compile kernel 2.2.14 in
> I relink /usr/include /srm, linux b ut
> it failed.
> In lib/chekcksum.S file, #define statement cause error.
> I check the file if this is real bug and same file inkernel 2.4.2.
> but i found file is correct.
> How can i degrade kernel?
I think the problem is the compiler.
RedHat 7.0 uses gcc version 2.96, this gcc version
cannot compile a Linux kernel. Therefore RedHat 7.0
is shiped with another compiler, which have been
renamed to kgcc, this is egcs-2.91.66.
There are two solutions, either change the Makefile
to use kgcc instead of gcc, or downgrade gcc.
Downgrading gcc means removing the gcc and kgcc
packages and installing an older gcc package.
Sources shiped with RedHat 7.0 are also installed
as a mess. /usr/src/linux is a symbolic link to
/usr/src/linux-version and that is like it used to
be.
But in older versions /usr/include/asm and
/usr/include/linux were symbolic links to
/usr/src/linux/include/asm and
/usr/src/linux/include/linux, now theese are no
longer symbolic links, but directories containing
all headerfiles from another kernel version.
The header files is not a problem when compiling
the kernel, but it can be a problem when compiling
modules not in the standard kernel source tree. If
you need to do that you must either fix the includes
in /usr/include or ensure that they are compiled
agains /usr/src/linux/include instead.
There is also a problem with the linux-2.2.16
sources shipped with RedHat 7.0, they have a broken
patch that makes kernel and module be marked with an
incorrect version number. They are marked with the
version number of the runing kernel instead of the
kernel being compiled. But that will not be a
problem when you have choosen to install a completly
different kernel source tree.
I have not had time to look enough on RedHat 7.1,
hopefully some of theese problems have been fixed.
I think that at least the headers in
/usr/src/linux/include and /usr/include are the
same version.
--
Kasper Dupont
------------------------------
From: [EMAIL PROTECTED]
Subject: Re: Digital Signatures and File Security Ideas
Date: Wed, 02 May 2001 12:59:05 GMT
[EMAIL PROTECTED] writes:
> I'm trying to implement a method to prevent unauthorized files from
> being executed on a handheld embedded linux system.
There already seems to be a way of doing that, using the permission
flags that were implemented on Unix, 30 years ago, and very probably
previously on GCOS, some time before that.
> I thought one way to do this is to implement some kind of digital
> signature that would allow access to a special file attribute flag.
> This file attribute flag would be set if the digital signature was
> valid and would allow execution of the file.
> If someone were to download an unauthorized file then the flag would
> not be set and file could not be executed.
> Are there existing methods on a linux system to do this kind of
> thing, or do I have to do some modifications to the file manager?
What "file manager?"
Perhaps you should try describing a bit more about what you're trying
to prevent; you seem to be trying to get at mechanisms before there's
a clear picture of what it is that you're trying to prevent.
--
(reverse (concatenate 'string "gro.gultn@" "enworbbc"))
http://www.ntlug.org/~cbbrowne/resume.html
Perhaps there should be a new 'quantum' datatype; you would be able to
take its address or value, but not both simultaneously.
-- Michael Shields
------------------------------
From: jtnews <[EMAIL PROTECTED]>
Subject: Why is RedHat 7.1 so fast?
Date: Wed, 02 May 2001 14:15:24 GMT
I'm getting 5MB/sec dump transfer rates
across an NFS filesystem with RedHat 7.1
where I used to get only about 1.5MB/sec.
I have Linksys LNE100TX networking
cards, a Dell L600cx, a Dell L700cx,
and a Linksys 8 port switch.
I'm using the tulip driver in both cases.
The hardware didn't change at all.
Why the sudden performance increase?
Is it the new 2.4 kernel or the tulip
driver?
------------------------------
From: jtnews <[EMAIL PROTECTED]>
Crossposted-To: comp.lang.c,gnu.glibc.bug,linux.dev.kernel
Subject: Re: Critical sections
Date: Wed, 02 May 2001 14:16:17 GMT
man semctl
Dean Wakerley wrote:
>
> Whats the standard way in C of enforcing mutual exclusion on a section of
> code? I'm thinking of semaphores and the equivalent of java's synchronised
> keyword, but can't find any info.
------------------------------
From: Rolf Magnus <[EMAIL PROTECTED]>
Subject: Re: portable computation time estimation?
Date: Wed, 2 May 2001 16:30:50 +0200
Tim Roberts wrote:
> Juergen Hannappel <[EMAIL PROTECTED]> wrote:
>> ^^^
>>If you talk about the factor 900/733 = 1.227 in speed the estimation
>>1.6288 seconds should be fairly accurate. If you talk about a factor
>>1277 which you would get with a 900 Giga-Hertz CPU i would assume that
>>it would take longer than 1.6 milliseconds, but probably there will
>>never be a 900GHz PIII.
>
> If Moore's law continues to hold, just wait 15 years.
Who wants a PIII CPU in 15 years? It's only 32bit.
------------------------------
Crossposted-To: linux.sources.kernel,linux.dev.kernel
Subject: __buggy_fxr_alignment...
From: Bill Pringlemeir <[EMAIL PROTECTED]>
Date: Wed, 02 May 2001 14:33:55 GMT
[excuse the posts to linux.sources.kernel and
comp.os.linux.development.system. I frequent linux.dev.kernel,
but I haven't seen this mentioned.]
I have the 2.4.4 sources and I am trying to configure for an AMDK6-2.
I have excluded FP support. In the file `include/asm/bugs.', there is
a function `check_fpu' that has the following code,
/*
* Verify that the FXSAVE/FXRSTOR data will be 16-byte aligned.
*/
if (offsetof(struct task_struct, thread.i387.fxsave) & 15) {
extern void __buggy_fxsr_alignment(void);
__buggy_fxsr_alignment();
}
I think that the extern is a rouse to get the linker to complain about
the misaligned structure. Unfortunately, the source doesn't give a
comment about how to fix this.
tia,
Bill Pringlemeir
btw, Are there better list/groups to frequent for kernel bugs, etc?
--
Don't you realise that your source license is great? You make me
sick.
------------------------------
From: "Nick Lockyer" <[EMAIL PROTECTED]>
Subject: Re: Modem programing
Date: Wed, 2 May 2001 15:29:44 +0100
You can issue a simple 'open' to /dev/modem and use standard read commands
to look out for informaton, or use fopen and fgetc.
I use it at home for the following. My ISP which is free (0800 number) is
good and gives me 24x7, but they drop the line after 2 hours.
What I do is have a master program running, looking out for 'RING'. When it
gets this it starts up the ISP connection. The ISP program calls ip-up when
the link is up, and I use this to generate a bit of html with the dynamic IP
address in, and ftp it up to my web page.
The link drops after two hours, or 'x' seconds of inactivity.
Now all I have to do is dial my home phone, and about 30 seconds later I am
on line (from home). Going over to my web sight I get my IP address, so I
can access my machine from home.
Mr Zammler <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
>
> I like to find out more on how to do modem programing. I would like to be
> able e.g. to receive a RING from the modem directly (i.e. not through a
> term program).
>
> I would also like to know how to send a *.wav sound down the phone line
> through the modem.
>
> Is there a guide somewhere I could read?
>
> Thanks,
> Mr Zammler
------------------------------
From: "Nick Lockyer" <[EMAIL PROTECTED]>
Subject: Re: ioremap() and request_regions()
Date: Wed, 2 May 2001 15:26:35 +0100
As far as I can tell, the request_regions function is used to assign a range
of address to a program. Used in network drivers where the the device is on
the PCI bus, and therefore will not be mapped to a fixed location. When the
drivers wants to use the card, it determines the address and asks the kernel
to make that range of address appear to belong to the driver.
Ronnie Arosa Carril <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> What these functions really do? Why do these functions never appear
> together?
>
------------------------------
Date: Wed, 02 May 2001 15:43:59 +0100
From: Richard Heathfield <[EMAIL PROTECTED]>
Crossposted-To: comp.lang.c,linux.dev.kernel
Subject: Re: Critical sections
Dean Wakerley wrote:
>
> Whats the standard way in C of enforcing mutual exclusion on a section of
> code?
There is no standard way in ISO C.
> I'm thinking of semaphores and the equivalent of java's synchronised
> keyword, but can't find any info.
Consult your implementation's documentation, or find a newsgroup
appropriate to your platform (and, to be fair, it looks like you may
have done so already - but the comp.lang.c crosspost doesn't buy you
anything in this particular case).
--
Richard Heathfield : [EMAIL PROTECTED]
"Usenet is a strange place." - Dennis M Ritchie, 29 July 1999.
C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
K&R answers, C books, etc: http://users.powernet.co.uk/eton
------------------------------
From: "Nick Lockyer" <[EMAIL PROTECTED]>
Subject: Re: Writing a PCI device driver.
Date: Wed, 2 May 2001 15:36:06 +0100
Have a look at the via-rhine.c file in the kernel, it is the driver for the
PCI network card! Has helpful comments. Follow the links in the code to
find web pages as well. Also Linux Device Drivers by OReilly!
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]...
> In article <[EMAIL PROTECTED]>,
> Ronnie Arosa Carril <[EMAIL PROTECTED]> wrote:
>
> >If somebody has any device driver source
> >code (easy and for a PCI board if it's possible) that can lend me it
> >will be fantastic.
>
> What's wrong with all the PCI drivers in the kernel distribution?
>
> --
> http://www.spinics.net/linux
------------------------------
From: "Nick Lockyer" <[EMAIL PROTECTED]>
Subject: Re: More on reading ethernet frames
Date: Wed, 2 May 2001 15:34:15 +0100
TCP_IP Illustraed Volume 1 and 2 by W. Richard Stevens! Really good books
Cameron Kerr <[EMAIL PROTECTED]> wrote in message
news:38PG6.1822$[EMAIL PROTECTED]...
> Hello, I've happily got my program reading raw ethernet
> frames, using a socket( AF_PACKET, SOCK_RAW, ETH_P_ALL),
> but when decoding, I occasionally get bad packets, or
> possibly even network protocols that are unsupported.
>
> This is bad, since it means that I don't know where the
> next ethernet frame starts, and therefore have to abondon
> decoding the data.
>
> Does anyone know of either some real documentation for
> this, other than the man page for packet?
>
> Or does anyone know how I can distinguish the end of
> a frame from the socket, or how to read a whole frame
> at a time?
>
> Thanks in advance.
> --
> Cameron Kerr -- cameron.kerr @ paradise.net.nz
> Praise Slackware, our baud and saviour!
> --
------------------------------
From: "Nick Lockyer" <[EMAIL PROTECTED]>
Subject: Re: How to associate memory with a PCI device
Date: Wed, 2 May 2001 15:38:30 +0100
look at via-rhine.c in the kernel, it uses the function request_region()
function, it may be what you want
Grant Edwards <[EMAIL PROTECTED]> wrote in message
news:ydlF6.14043$[EMAIL PROTECTED]...
> In article <F0kF6.3710$[EMAIL PROTECTED]>, [EMAIL PROTECTED]
wrote:
>
> >I have a PCI demo card in one of the PCI slots in my P.C. I am
> >trying to associate some memory when I install (insmod
> >pcidriv.o) the PCI driver. Any ideas as to how I can do it.
>
> You'll have to explain what "associate some memory with a PCI
> device" means. If you're trying to allow the user to mmap() a
> region of PCI memory on the board, then there's a demo of how
> to do that at ftp://ftp.visi.com/users/grante/stuff/demomm.tar.gz
>
> --
> Grant Edwards grante Yow! Hmmm... an
arrogant
> at bouquet with a subtle
> visi.com suggestion of POLYVINYL
> CHLORIDE...
------------------------------
From: "Nick Lockyer" <[EMAIL PROTECTED]>
Subject: Re:
Date: Wed, 2 May 2001 15:32:06 +0100
Recommend the Linux Device Drivers book by OReilly!
<[EMAIL PROTECTED]> wrote in message news:...
> Subject: need info on, how to use dma_handle....
> Lines: 20
> Message-ID: <FQFH6.5890$[EMAIL PROTECTED]>
> X-Abuse-Info: When contacting newsranger.com regarding abuse please
> X-Abuse-Info: forward the entire news article including headers or
> X-Abuse-Info: else we will not be able to process your request
> X-Complaints-To: [EMAIL PROTECTED]
> NNTP-Posting-Date: Tue, 01 May 2001 17:24:53 EDT
> Organization: http://www.newsranger.com
> Date: Tue, 01 May 2001 21:24:53 GMT
> Xref: news.pace.co.uk comp.os.linux.development.system:31876
>
> void * cpu_addr;
> struct pci_dev *pci_dev;
> dma_addr_t dma_handle;
> int size=0xffff;
>
> /* allocate dma region of size and return dma_handle & cpu_addr */
> cpu_addr = pci_alloc_consistent(pci_dev, size, &dma_handle);
>
> My question is, how do I use the dma_handle to access the allocated dma
buffer
> (from the PCI interface card ). When I installed this driver I got the
following
> values:
> cpu_addr = 0xc7310000
> dma_handle = 0x7310000
>
> For example if I set the location pointed to by cpu_addr as:
> *(unsigned int *)0xc7310000 = 1122;
> Should, I be able to read it from the PCI card side, using the dma_handle.
If it
> is possible, how do I do it. Any help would be appreciated.
>
>
------------------------------
From: "Nick Lockyer" <[EMAIL PROTECTED]>
Subject: Re: Networking in Linux
Date: Wed, 2 May 2001 15:31:37 +0100
The lowest level is the network driver module/code. For example 3c509.o
This module waits for blocks of data 'from' the kernel and sends them out.
The kernel never gets a packet from the driver, rather the block comes in,
causes and interrupt and this posts the block to the kernel.
You need to know the difference between a char device, block device. A
network device has attributes of both!
Chainsaws and Code <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> Does anybody know where in the source the lowest level of handling network
> packets occurs? This question is asked disreguarding drivers for NICs and
> modems and such (as in the networking device has done its job, now what?)
> If you have an idea (or even know for sure), I'd love to hear what ya have
> to share!
>
> ~Dan
>
> +======---
> Dan Jarvis
>
> e-mail: [EMAIL PROTECTED]
> Internet: http://welcome.to/blufish
> ---======+
>
>
------------------------------
** FOR YOUR REFERENCE **
The service address, to which questions about the list itself and requests
to be added to or deleted from it should be directed, is:
Internet: [EMAIL PROTECTED]
You can send mail to the entire list by posting to the
comp.os.linux.development.system newsgroup.
Linux may be obtained via one of these FTP sites:
ftp.funet.fi pub/Linux
tsx-11.mit.edu pub/linux
sunsite.unc.edu pub/Linux
End of Linux-Development-System Digest
******************************