Next-in-Thread Next Message

Angry HELP! *Still* can't get D-Link DFE-650TX going! (Day 5) 

Forum: PCMCIA Network Adapter Issues
Re: Question DFE-650 not always Linux-compatible? (Anthony Jameson)
Re: Agree NetGear FA410TXC Tool works for D-Link DE-650 (Ingo Ciechowski)
Date: 2000, Aug 18
From: Harold Boyer hboyer

Hi. I'm going absolutely crazy.

I've read all of this stuff, and I still can't get this D-Link going. It's the endless "found link beat" "lost link beat" crisis in /var/log/messages.

Funny thing is, it's not just the D-link, it happened with a 3com 656 modem+adapter card too. Same exact thing.

I have a Toshiba Satellite 2250CDT. I'm running RedHat 6.2, with pcmcia-cs 2.2.16-17 beta code (so the fixes aren't in the pcmcia upgrade yet). The same exact thing happened with pcmcia-cs 2.2.16-3, and the whole 2.2.14-x series. Ugh!

The card works perfectly at 10M or 100M in Windows 98 and 2000. I've tried PCIC card mode and Cardbus/16-bit in the BIOS.

I downloaded a binary for fa_select, but it doesn't run (must not be RedHat), and I downloaded the source for Jochen Friedrich's fix, but I don't know C, and can't get it to compile. If I type "make fa_select" it errors on "inline", and if I take the inline line out, it errors on the next line. I also typed "gcc fa_select" but that obviously didn't help either.

What else... I've bounced it from irq 3 to 5 to 9 to 10, and none of those worked.

Any ideas? I'm going mad. I don't care if the fix is slow, as long as it works. I've put literally 30+ hours into this, and I've already switched cards, and don't want to order another one.

If someone can send me a RedHat binary of fa_select, that might work, and could you please tell me which init script to call it from?

Any help would be REALLY appreciated! Please cc: hboyer@minn.net.

My /var/log/messages:

Aug 17 12:07:36 localhost kernel: Linux PCMCIA Card Services 3.1.8 
Aug 17 12:07:36 localhost kernel:   kernel build: 2.2.14-5.0 #1 Tue Mar 7 21:07:39 EST 2000 
Aug 17 12:07:36 localhost kernel:   options:  [pci] [cardbus] [apm] 
Aug 17 12:07:36 localhost kernel: Intel PCIC probe:  
Aug 17 12:07:36 localhost kernel:   Intel i82365sl B step ISA-to-PCMCIA at port 0x3e0 ofs 0x00, 1 socket 
Aug 17 12:07:36 localhost kernel:     host opts [0]: none 
Aug 17 12:07:36 localhost kernel:     ISA irqs (scanned) = 3,4,5,7,10 polling interval = 1000 ms 
Aug 17 12:07:36 localhost cardmgr[859]: starting, version is 3.1.8
Aug 17 12:07:36 localhost cardmgr[859]: watching 1 sockets
Aug 17 12:07:36 localhost kernel: cs: IO port probe 0x1000-0x17ff: clean. 
Aug 17 12:07:36 localhost kernel: cs: IO port probe 0x0100-0x04ff: excluding 0x378-0x37f 0x4d0-0x4d7 
Aug 17 12:07:36 localhost kernel: cs: IO port probe 0x0a00-0x0aff: clean. 
Aug 17 12:07:37 localhost cardmgr[859]: initializing socket 0
Aug 17 12:07:37 localhost kernel: cs: memory probe 0x0d0000-0x0dffff: clean. 
Aug 17 12:07:37 localhost cardmgr[859]: socket 0: KTI ETHER-C16 Fast ethernet
Aug 17 12:07:37 localhost cardmgr[859]: executing: 'insmod /lib/modules/2.2.14-5.0/net/8390.o'
Aug 17 12:07:37 localhost cardmgr[859]: executing: 'insmod /lib/modules/2.2.14-5.0/pcmcia/pcnet_cs.o'
Aug 17 12:07:37 localhost kernel: eth0: NE2000 Compatible: io 0x300, irq 5, hw_addr 00:50:BA:73:6D:1E 
Aug 17 12:07:37 localhost cardmgr[859]: executing: './network start eth0'
Aug 17 12:07:37 localhost pumpd[891]: starting at (uptime 0 days, 0:02:31) Thu Aug 17 12:07:37 2000  
Aug 17 12:07:38 localhost kernel: eth0: found link beat 
Aug 17 12:07:39 localhost kernel: eth0: lost link beat 
Aug 17 12:07:41 localhost kernel: eth0: trigger_send() called with the transmitter busy. 
Aug 17 12:08:07 localhost kernel: eth0: trigger_send() called with the transmitter busy. 
Aug 17 12:08:07 localhost ifdown: Operation failed.
Aug 17 12:08:08 localhost network: Shutting down interface eth0 succeeded

Jochen Friedrich's code:

#include <sys/types.h>
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <net/if.h>
#include <stdio.h>
#include <errno.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>

inline unsigned char
inb (unsigned short port)
{
  unsigned char _v;

  __asm__ __volatile__ ("inb %w1,%0":"=a" (_v):"Nd" (port));
  return _v;
}

inline void
outb (unsigned char value, unsigned short port)
{
  __asm__ __volatile__ ("outb %b0,%w1"::"a" (value), "Nd" (port));
}

static int sockets_open(void)
{
    int sock;
    if ((sock = socket(AF_INET, SOCK_DGRAM, 0)) != -1)
        return sock;
    else if ((sock = socket(AF_IPX, SOCK_DGRAM, 0)) != -1)
        return sock;
    else if ((sock = socket(AF_AX25, SOCK_DGRAM, 0)) != -1)
        return sock;
    else
        return socket(AF_APPLETALK, SOCK_DGRAM, 0);
}
void write_bit(int port, int bit)
{
    outb((bit << 6) + 0x20, port);
    usleep(1);
    outb((bit << 6) + 0xa0, port);
    usleep(1);
    outb((bit << 6) + 0x20, port);
}
int read_bit(int port)
{
    int i;
    outb(0,    port);
    usleep(1);
    outb(0x80, port);
    usleep(1);
    i = inb(port);
    outb(0,    port);
    return (i & 0x10) >> 4;
}
void reset(int port)
{
    outb(0x08, port);
    usleep(1);
    outb(0x0C, port);
    usleep(1);
    outb(0x08, port);
    usleep(1);
    outb(0x0C, port);
    outb(0x00, port);
}
int reada(int port, int adr)
{
    int i,j;

    for (i=0; i<0x20; i++)
      write_bit(port, 1);

    write_bit(port, 0);
    write_bit(port, 1);
    write_bit(port, 1);
    write_bit(port, 0);

    write_bit(port, 0);
    write_bit(port, 0);
    write_bit(port, 0);
    write_bit(port, 0);
    write_bit(port, 0);

    write_bit(port, (adr & 0x10) >> 4);
    write_bit(port, (adr & 0x08) >> 3);
    write_bit(port, (adr & 0x04) >> 2);
    write_bit(port, (adr & 0x02) >> 1);
    write_bit(port, (adr & 0x01) >> 0);

    j = read_bit(port);
    if (j == 1)
      j = read_bit(port);
    for (i=0; i<16; i++) {
      j = (j << 1) + read_bit(port);
    }
    write_bit(port, 1);
    return j;
}
int writea(int port, int adr, int val)
{
    int i,j;

    outb(0x08, port);
    usleep(1);
    outb(0x0C, port);
    usleep(1);
    outb(0x08, port);
    usleep(1);
    outb(0x0C, port);
    outb(0x00, port);

    for (i=0; i<0x20; i++)
      write_bit(port, 1);

    write_bit(port, 0);
    write_bit(port, 1);
    write_bit(port, 0);
    write_bit(port, 1);

    write_bit(port, 0);
    write_bit(port, 0);
    write_bit(port, 0);
    write_bit(port, 0);
    write_bit(port, 0);

    write_bit(port, (adr & 0x10) >> 4);
    write_bit(port, (adr & 0x08) >> 3);
    write_bit(port, (adr & 0x04) >> 2);
    write_bit(port, (adr & 0x02) >> 1);
    write_bit(port, (adr & 0x01) >> 0);

    write_bit(port, 1);
    write_bit(port, 0);

    write_bit(port, (val & 0x8000) >> 15);
    write_bit(port, (val & 0x4000) >> 14);
    write_bit(port, (val & 0x2000) >> 13);
    write_bit(port, (val & 0x1000) >> 12);
    write_bit(port, (val & 0x0800) >> 11);
    write_bit(port, (val & 0x0400) >> 10);
    write_bit(port, (val & 0x0200) >> 9);
    write_bit(port, (val & 0x0100) >> 8);
    write_bit(port, (val & 0x0080) >> 7);
    write_bit(port, (val & 0x0040) >> 6);
    write_bit(port, (val & 0x0020) >> 5);
    write_bit(port, (val & 0x0010) >> 4);
    write_bit(port, (val & 0x0008) >> 3);
    write_bit(port, (val & 0x0004) >> 2);
    write_bit(port, (val & 0x0002) >> 1);
    write_bit(port, (val & 0x0001) >> 0);

    write_bit(port, 1);
    return 0;
}
void main(int argc, char **argv)
{
    int skfd, i, sub, led;
    struct ifreq ifr;

    skfd = sockets_open();
    if (skfd == -1) {
        perror("socket");
        exit(1);
    }
    strcpy(ifr.ifr_name, argv[1]);
    if (ioctl(skfd, SIOCGIFMAP, &ifr) < 0) {
        perror("ioctl");
        exit(1);
    }
    i = atoi(argv[2]);
    switch(i) {
      case 0:
        sub = 0x0000;
        break;
      case 1:
        sub = 0x0100;
        break;
      case 2:
        sub = 0x2000;
        break;
      default:
        sub = 0x2100;
        break;
    }
    ioperm(ifr.ifr_map.base_addr+0x1c, 1, 1);
    reset(ifr.ifr_map.base_addr+0x1c);
    writea(ifr.ifr_map.base_addr+0x1c, 0, 0x8000);
    writea(ifr.ifr_map.base_addr+0x1c, 0, sub);
    close(skfd);
    exit(0);
}

Next-in-Thread Next Message

Messages Inline: 1 All Outline: 1 2 All

1. None Re: Angry: HELP! *Still* can't get D-Link DFE-650TX going! (Day 5) by David Hinds, 2000, Aug 21

Add Message to: "HELP! *Still* can't get D-Link DFE-650TX going! (Day 5)"

Members Subscribe Admin Mode Show Frames Help for HyperNews at pcmcia-cs.sourceforge.net 1.10