hamachi.c v0.13

Lawrence MacIntyre lpz@y12.doe.gov
Wed Apr 26 13:02:37 2000


This is a multi-part message in MIME format.
--------------240771052D304F43FDB10EA4
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Hi:

I downloaded the v0.13 hamachi driver from scyld and installed it on a
new machine.  I did it the hard way, grabbed hamachi.c, kern_compat.h,
pci-scan.c, pci-scan.h, compiled them, insmod pci-scan.o insmod
hamachi.o.  That all worked, but the driver didn't work.  ifconfig
showed this soon after bringing the interface up:

 eth1      Link encap:Ethernet  HWaddr 00:E0:B1:04:12:AA  
          inet addr:134.167.147.9  Bcast:134.167.147.15 
Mask:255.255.255.240
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:47 errors:36 dropped:0 overruns:0 frame:177
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100 
          Interrupt:11 Base address:0xa000 

As you can see, there are Rx frame errors and no Tx packets.  When I
tried to ifconfig the interface down, it hung the process, and I ended
up having to use the hardware reset, although the reboot command might
have worked if I hadn't used shutdown and that hung at the unloading
eth0 step, and at that point you can't login anymore...  I've also got
Eric Kasten's 0.14 driver, and it works normally (I get 430 Mbits/sec
using ttcp from an identical machine with a syskonnect card, and 350
Mbits/sec going from the GNIC-II to the SysKonnect).

Anyway, there was an oops, and I'm including the output from dmesg so
you can see it.  The machine uses the intel 840 chipset, there are two
coppermine 533 MHz processors, although I'm just using the uniprocessor
kernel now, as I have another driver that isn't SMP-ready yet.  I
plugged the hamachi into a 64bit slot.  This is interesting, as the
64bit slots are supposedly 66MHz, but the driver reports 33 MHz (that's
in the dmesg output as well).

I tried to compile the hamachi-diag, but that didn't work very well:-(

[root@charybdis /root]# cc -O -Wall -o etherdiag diag-dispatch.c
hamachi-diag.c
diag-dispatch.c:38: warning: type defaults to `int' in declaration of
`iopl'
diag-dispatch.c: In function `main':
diag-dispatch.c:146: warning: implicit declaration of function `strncmp'
diag-dispatch.c:254: warning: suggest explicit braces to avoid ambiguous
`else'
diag-dispatch.c: In function `read_eeprom_serial':
diag-dispatch.c:398: warning: statement with no effect
diag-dispatch.c:401: warning: statement with no effect
diag-dispatch.c:404: warning: statement with no effect
diag-dispatch.c:411: warning: statement with no effect
diag-dispatch.c:415: warning: statement with no effect
diag-dispatch.c: In function `write_eeprom_serial':
diag-dispatch.c:438: warning: statement with no effect
diag-dispatch.c:440: warning: statement with no effect
diag-dispatch.c: At top level:
diag-dispatch.c:386: warning: `read_eeprom_serial' defined but not used
diag-dispatch.c:426: warning: `write_eeprom_serial' defined but not used
diag-dispatch.c:464: warning: `write_eeprom' defined but not used
hamachi-diag.c: In function `hamachi_diag':
hamachi-diag.c:151: warning: implicit declaration of function `readl'
hamachi-diag.c:160: warning: implicit declaration of function `readb'
hamachi-diag.c:163: warning: implicit declaration of function `readw'
hamachi-diag.c:206: warning: implicit declaration of function `writel'
hamachi-diag.c: In function `read_eeprom':
hamachi-diag.c:216: warning: implicit declaration of function `writew'
hamachi-diag.c:217: warning: implicit declaration of function `writeb'
hamachi-diag.c: At top level:
hamachi-diag.c:227: warning: `write_eeprom' defined but not used
hamachi-diag.c:264: warning: `mdio_write' defined but not used
/tmp/ccuS00Ck.o: In function `hamachi_diag':
/tmp/ccuS00Ck.o(.text+0xc9): undefined reference to `readl'
/tmp/ccuS00Ck.o(.text+0x10b): undefined reference to `readb'
/tmp/ccuS00Ck.o(.text+0x12c): undefined reference to `readb'
/tmp/ccuS00Ck.o(.text+0x143): undefined reference to `readw'
/tmp/ccuS00Ck.o(.text+0x1af): undefined reference to `readw'
/tmp/ccuS00Ck.o(.text+0x2e3): undefined reference to `readl'
/tmp/ccuS00Ck.o(.text+0x2f9): undefined reference to `writel'
/tmp/ccuS00Ck.o(.text+0x305): undefined reference to `readl'
/tmp/ccuS00Ck.o: In function `read_eeprom':
/tmp/ccuS00Ck.o(.text+0x339): undefined reference to `writew'
/tmp/ccuS00Ck.o(.text+0x347): undefined reference to `writeb'
/tmp/ccuS00Ck.o(.text+0x35d): undefined reference to `readb'
/tmp/ccuS00Ck.o(.text+0x381): undefined reference to `readb'
/tmp/ccuS00Ck.o(.text+0x39e): undefined reference to `readb'
/tmp/ccuS00Ck.o: In function `write_eeprom':
/tmp/ccuS00Ck.o(.text+0x3c9): undefined reference to `readb'
/tmp/ccuS00Ck.o(.text+0x3de): undefined reference to `writeb'
/tmp/ccuS00Ck.o(.text+0x3ed): undefined reference to `writeb'
/tmp/ccuS00Ck.o(.text+0x3fc): undefined reference to `writew'
/tmp/ccuS00Ck.o(.text+0x417): undefined reference to `readb'
/tmp/ccuS00Ck.o(.text+0x42c): undefined reference to `writeb'
/tmp/ccuS00Ck.o(.text+0x447): undefined reference to `readb'
/tmp/ccuS00Ck.o(.text+0x45c): undefined reference to `writeb'
/tmp/ccuS00Ck.o: In function `mdio_read':
/tmp/ccuS00Ck.o(.text+0x4a6): undefined reference to `writew'
/tmp/ccuS00Ck.o(.text+0x4b4): undefined reference to `writew'
/tmp/ccuS00Ck.o(.text+0x4c8): undefined reference to `readw'
/tmp/ccuS00Ck.o(.text+0x4e0): undefined reference to `readw'
/tmp/ccuS00Ck.o: In function `mdio_write':
/tmp/ccuS00Ck.o(.text+0x509): undefined reference to `writew'
/tmp/ccuS00Ck.o(.text+0x516): undefined reference to `writew'
/tmp/ccuS00Ck.o(.text+0x52a): undefined reference to `readw'
collect2: ld returned 1 exit status

Is there more information that would help you?
-- 
                                 Lawrence
                                    ~
------------------------------------------------------------------------
Lawrence MacIntyre      Center for Information Infrastructure Technology
lpz@ciit.y12.doe.gov   http://www.ciit.y12.doe.gov/~lpz     865.574.8696
--------------240771052D304F43FDB10EA4
Content-Type: text/plain; charset=us-ascii;
 name="oops.hamachi"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="oops.hamachi"

Linux version 2.2.14 (root@charybdis.ciit.y12.doe.gov) (gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)) #17 Tue Apr 25 11:25:20 EDT 2000
Detected 533081965 Hz processor.
Console: colour VGA+ 80x25
Calibrating delay loop... 532.48 BogoMIPS
Memory: 257532k/262144k available (1204k kernel code, 416k reserved, 2912k data, 80k init)
Dentry hash table entries: 32768 (order 6, 256k)
Buffer cache hash table entries: 262144 (order 8, 1024k)
Page cache hash table entries: 65536 (order 6, 256k)
Pentium-III serial number disabled.
CPU: Intel Pentium III (Coppermine) stepping 01
Checking 386/387 coupling... OK, FPU using exception 16 error reporting.
Checking 'hlt' instruction... OK.
POSIX conformance testing by UNIFIX
mtrr: v1.35a (19990819) Richard Gooch (rgooch@atnf.csiro.au)
PCI: PCI BIOS revision 2.10 entry at 0xfdb91
PCI: Using configuration type 1
PCI: Probing PCI hardware
Linux NET4.0 for Linux 2.2
Based upon Swansea University Computer Society NET3.039
NET4: Unix domain sockets 1.0 for Linux NET4.0.
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP, IGMP
TCP: Hash tables configured (ehash 262144 bhash 65536)
Starting kswapd v 1.5 
parport0: PC-style at 0x378 (0x778) [SPP,ECP,ECPPS2]
parport0: detected irq 7; use procfs to enable interrupt-driven operation.
Detected PS/2 Mouse Port.
Serial driver version 4.27 with no serial options enabled
ttyS00 at 0x03f8 (irq = 4) is a 16550A
ttyS01 at 0x02f8 (irq = 3) is a 16550A
pty: 256 Unix98 ptys configured
lp0: using parport0 (polling).
Real Time Clock Driver v1.09
RAM disk driver initialized:  16 RAM disks of 4096K size
loop: registered device at major 7
Floppy drive(s): fd0 is 1.44M
FDC 0 is a post-1991 82077
sym53c8xx: at PCI bus 1, device 7, function 0
sym53c8xx: setting PCI_COMMAND_PARITY...(fix-up)
sym53c8xx: 53c895 detected with Symbios NVRAM
sym53c895-0: rev=0x02, base=0xff4fff00, io_port=0xa800, irq=10
sym53c895-0: Symbios format NVRAM, ID 7, Fast-40, Parity Checking
sym53c895-0: initial SCNTL3/DMODE/DCNTL/CTEST3/4/5 = (hex) 07/4e/a0/01/00/24
sym53c895-0: final   SCNTL3/DMODE/DCNTL/CTEST3/4/5 = (hex) 07/4e/80/00/08/24
sym53c895-0: on-chip RAM at 0xff4fe000
sym53c895-0: resetting, command processing suspended for 2 seconds
sym53c895-0: restart (scsi reset).
sym53c895-0: enabling clock multiplier
sym53c895-0: Downloading SCSI SCRIPTS.
ncr53c8xx: at PCI bus 1, device 7, function 0
ncr53c8xx: IO region 0xa800 to 0xa87f is in use
scsi0 : sym53c8xx - version 1.3g
scsi : 1 host.
sym53c895-0: command processing resumed
  Vendor: SEAGATE   Model: ST39103LW         Rev: 0002
  Type:   Direct-Access                      ANSI SCSI revision: 02
Detected scsi disk sda at scsi0, channel 0, id 0, lun 0
  Vendor: SEAGATE   Model: ST39103LW         Rev: 0002
  Type:   Direct-Access                      ANSI SCSI revision: 02
Detected scsi disk sdb at scsi0, channel 0, id 1, lun 0
  Vendor: TOSHIBA   Model: CD-ROM XM-6401TA  Rev: 1015
  Type:   CD-ROM                             ANSI SCSI revision: 02
Detected scsi CD-ROM sr0 at scsi0, channel 0, id 4, lun 0
sym53c895-0-<0,0>: tagged command queue depth set to 4
sym53c895-0-<1,0>: tagged command queue depth set to 4
scsi : detected 1 SCSI cdrom 2 SCSI disks total.
sym53c895-0-<4,*>: FAST-20 SCSI 20.0 MB/s (50 ns, offset 16)
Uniform CDROM driver Revision: 2.56
sym53c895-0-<0,*>: WIDE SCSI (16 bit) enabled.
sym53c895-0-<0,*>: FAST-40 WIDE SCSI 80.0 MB/s (25 ns, offset 15)
SCSI device sda: hdwr sector= 512 bytes. Sectors= 17783240 [8683 MB] [8.7 GB]
sym53c895-0-<1,*>: WIDE SCSI (16 bit) enabled.
sym53c895-0-<1,*>: FAST-40 WIDE SCSI 80.0 MB/s (25 ns, offset 15)
SCSI device sdb: hdwr sector= 512 bytes. Sectors= 17783240 [8683 MB] [8.7 GB]
Partition check:
 sda: sda1 sda2 sda3
 sdb: sdb1
VFS: Mounted root (ext2 filesystem) readonly.
Freeing unused kernel memory: 80k freed
Adding Swap: 1052248k swap-space (priority -1)
eth0: Invalid EEPROM checksum 0x47c0, check settings before activating this device!
eth0: OEM i82557/i82558 10/100 Ethernet at 0xaf00, 00:30:48:10:06:8D, IRQ 11.
  Receiver lock-up bug exists -- enabling work-around.
  Board assembly 000d80-134, Physical connectors present:
  Primary interface chip i82553-A/B PHY #2.
  General self-test: passed.
  Serial sub-system self-test: passed.
  Internal registers self-test: passed.
  ROM checksum self-test: passed (0x04f4518b).
  Receiver lock-up workaround activated.
Found Hamachi GNIC-II at PCI address 0xff7fe004, IRQ 11.
hamachi.c:v0.14 3/11/1999  Written by Donald Becker
  	Some modifications by Eric kasten <kasten@nscl.msu.edu>
  	Support by many others
  	http://www.tidalwave.net/~becker/hamachi.html
eth1: Hamachi GNIC-II type 10911 at 0x90898000, 00:e0:b1:04:12:aa, IRQ 11.
eth1:  64-bit 33 Mhz PCI bus (60), Virtual Jumpers 30, LPA 0000.
hamachi.c:v0.13 4/14/2000  Written by Donald Becker <becker@scyld.com>
  http://www.scyld.com/network/hamachi.html
eth1: Packet Engines GNIC-II "Hamachi" type 10911 at 0x9089a000, 00:e0:b1:04:12:aa, IRQ 11.
eth1:  64-bit 33 Mhz PCI bus (60), Virtual Jumpers 30, LPA 4020.
Unable to handle kernel paging request at virtual address f0000678
current->tss.cr3 = 0ce65000, %cr3 = 0ce65000
*pde = 00000000
Oops: 0002
CPU:    0
EIP:    0010:[<90897627>]
EFLAGS: 00010282
eax: 00000000   ebx: 00000000   ecx: 8ca63004   edx: f0000608
esi: 00000000   edi: 8ca63600   ebp: 8ca63000   esp: 8ea37ea0
ds: 0018   es: 0018   ss: 0018
Process ifconfig (pid: 1106, process nr: 29, stackpage=8ea37000)
Stack: 00000000 00001042 8ffecb60 801672fc 8ca63004 9089a000 801639a6 8ffec5c0 
       00001043 8ffec5c0 80164354 8ffec5c0 8ffe05c0 00001042 8ffe05e4 7ffffa34 
       8017b060 8ffec5c0 00001042 00008914 00008914 7ffffa34 8f347440 8ea37f40 
Call Trace: [<801672fc>] [<9089a000>] [<801639a6>] [<80164354>] [<8017b060>] [<8016486d>] [<8017c883>] 
       [<80160081>] [<8012d179>] [<80109008>] 
Code: ff 4a 70 0f 94 c0 84 c0 74 09 52 e8 3d aa 8c ef 83 c4 04 c7 

--------------240771052D304F43FDB10EA4--

 | To unsubscribe, send mail to Majordomo@cesdis.gsfc.nasa.gov, and within the
 |  body of the mail, include only the text:
 |   unsubscribe this-list-name youraddress@wherever.org
 | You will be unsubscribed as speedily as possible.