OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [rc203soc/] [sw/] [uClinux/] [drivers/] [net/] [README.rcpci] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1626 jcastillo
 
2
Application Information
3
 
4
 
5
The included application, called "rcc" (for RedCreek Control), is an
6
example of a user-space application (i.e., not running within kernel
7
space).  It issues ioctl commands to communicate with the PCI driver.
8
It can currently report any of the following information:
9
 
10
   - PCI driver information ("getinfo")
11
   - card statistics ("getstats")
12
   - card's ip address & netmask ("getipnmask")
13
   - card's mac address ("getmac")
14
   - current speed ("getspeed")
15
   - firmware version string ("getfirmware")
16
   - status of the link (up or down) ("getstatus")
17
 
18
Also, it can "set" the following parameters:
19
 
20
   - IP and mask
21
   - mac address
22
   - link speed
23
   - promiscuous mode
24
 
25
Example:  rcc eth1 setipnmask="192.168.254.254 255.255.255.0"
26
 
27
Note: rcc's command line parser is very basic. If you type the
28
command incorrectly, it might result in a core dump.
29
 
30
This program needs to run as root, to avoid encountering permission
31
problems.  An alternative is to change the permission and ownership
32
so that it runs as a setuid root process (for example, "chown
33
root.root rcc; chmod u+s rcc").
34
 
35
 
36
 
37
Quick PCI driver background
38
 
39
 
40
The adapter has its own IP and mac addresses which you have to
41
assign using the RedCreek manager (assuming the adapter is
42
running 3.X firmware).  Your linux box will not know anything
43
about the adapter's IP address -- ie, the adapter will show up
44
as a regular nic.  You will assign the linux box IP address using
45
the "ifconfig" command, as mentioned below.
46
 
47
 
48
To compile the driver, simply type "make".
49
This, of course, assumes that you have GNU compiler environment
50
already setup on a linux box.  The .c and .h files were copied
51
to a dos filesystem (the floppy), so you may have to use "dos2unix" to
52
convert it back to a unix text file.  Keep in mind that the driver
53
currently works with kernels 2.0.X only.  Furthermore, it was only
54
tested with kernel 2.0.34.
55
 
56
To load the driver:
57
 
58
"insmod rcpci"
59
 
60
The adapter will show up as a regular nic.  Thus, if you have only
61
one nic (the pci card) in your box, you would at this point configure
62
it with the following commands:
63
 
64
mandatory:
65
"ifconfig eth0 
66
                adapter!>"
67
"route add -net  eth0"
68
 
69
optional (if you want to be able to access other networks):
70
"route add default gw  eth0"
71
 
72
Done.  Type "ifconfig" to see "eth0" and the packet count, as well
73
as the IP address, net mask, etc.
74
 
75
To unload the driver, you first have to shutdown the interface:
76
 
77
"ifconfig eth0 down"
78
 
79
Then you unload the driver with "rmmod rcpci".

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.