Date: Wed, 25 Oct 2000 10:18:16 -0400 From: Pat Wendorf <beholder@unios.dhs.org> To: Satoshi Asami <asami@FreeBSD.ORG> Cc: mobile@FreeBSD.ORG Subject: Re: Linksys EtherFast 10/100 in 4-stable? Message-ID: <39F6EBA8.18E0727B@unios.dhs.org> References: <200010250612.e9P6CrX97864@silvia.hip.berkeley.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
I also have this card and yhis is the same thing that happened to me
when I switched from a 10mbps Hub to a 100mbps hub for my network. It
seemed to work with everthing but NFS. Considering the card, even in
100 mode, can't seem to do more than 1M/s I just stuck it back on the
10mbps hub, and regained the ability to use NFS.
- Pat
Satoshi Asami wrote:
>
> Hi,
>
> I upgraded my ThinkPad 560 to 4.1 today and the network is not working
> well. NFS seems to hang as soon as I try to transfer a big file. It
> happens 4.1 as well as the latest (as of two days ago) 4-stable.
> Normal network stuff seems fine, at least I can transfer stuff like
> the kernel with ftp.
>
> I'm not sure if it's related but I'm using a Linksys EtherFast 10/100.
> It used to work fine with the following patch to 3-stable. Looking at
> sys/dev/ed, it seems some of the stuff were merged but not all of it.
>
> I tried to apply the patch by hand but not being a kernel buff at all,
> I can't get anything to work. ;)
>
> Does anyone have any idea what I should do?
>
> Satoshi
> -------
> Index: sys/i386/isa/if_ed.c
> ===================================================================
> RCS file: /usr/cvs/src/sys/i386/isa/Attic/if_ed.c,v
> retrieving revision 1.148.2.5
> diff -u -r1.148.2.5 if_ed.c
> --- sys/i386/isa/if_ed.c 2000/01/18 14:19:39 1.148.2.5
> +++ sys/i386/isa/if_ed.c 2000/01/19 11:48:24
> @@ -1072,6 +1072,7 @@
> u_char romdata[16], tmp;
> static char test_pattern[32] = "THIS is A memory TEST pattern";
> char test_buffer[32];
> + int linksys = 0;
>
> sc->asic_addr = port + ED_NOVELL_ASIC_OFFSET;
> sc->nic_addr = port + ED_NOVELL_NIC_OFFSET;
> @@ -1141,7 +1142,13 @@
> ed_pio_writemem(sc, test_pattern, 8192, sizeof(test_pattern));
> ed_pio_readmem(sc, 8192, test_buffer, sizeof(test_pattern));
>
> - if (bcmp(test_pattern, test_buffer, sizeof(test_pattern))) {
> + linksys = ed_get_Linksys(sc);
> + if (linksys) {
> + outb(sc->nic_addr + ED_P0_DCR, ED_DCR_WTS | ED_DCR_FT1 | ED_DCR_LS);
> + sc->isa16bit = 1;
> + sc->type = ED_TYPE_NE2000;
> + sc->type_str = "Linksys";
> + } else if (bcmp(test_pattern, test_buffer, sizeof(test_pattern))) {
> /* not an NE1000 - try NE2000 */
>
> outb(sc->nic_addr + ED_P0_DCR, ED_DCR_WTS | ED_DCR_FT1 | ED_DCR_LS);
> @@ -1251,19 +1258,22 @@
> * Use one xmit buffer if < 16k, two buffers otherwise (if not told
> * otherwise).
> */
> - if ((memsize < 16384) || (flags & ED_FLAGS_NO_MULTI_BUFFERING))
> + if ((sc->mem_size < 16384) || (flags & ED_FLAGS_NO_MULTI_BUFFERING))
> sc->txb_cnt = 1;
> else
> sc->txb_cnt = 2;
>
> sc->rec_page_start = sc->tx_page_start + sc->txb_cnt * ED_TXBUF_SIZE;
> - sc->rec_page_stop = sc->tx_page_start + memsize / ED_PAGE_SIZE;
> + n = sc->tx_page_start + sc->mem_size / ED_PAGE_SIZE;
> + sc->rec_page_stop = (n > 0xff) ? 0xff : n;
>
> sc->mem_ring = sc->mem_start + sc->txb_cnt * ED_PAGE_SIZE * ED_TXBUF_SIZE;
>
> - ed_pio_readmem(sc, 0, romdata, 16);
> - for (n = 0; n < ETHER_ADDR_LEN; n++)
> - sc->arpcom.ac_enaddr[n] = romdata[n * (sc->isa16bit + 1)];
> + if (!linksys) {
> + ed_pio_readmem(sc, 0, romdata, 16);
> + for (n = 0; n < ETHER_ADDR_LEN; n++)
> + sc->arpcom.ac_enaddr[n] = romdata[n * (sc->isa16bit + 1)];
> + }
>
> #ifdef GWETHER
> if (sc->arpcom.ac_enaddr[2] == 0x86) {
> @@ -2195,6 +2205,24 @@
> * Loop back to the top to possibly buffer more packets
> */
> goto outloop;
> +}
> +
> +static int
> +ed_get_Linksys(sc)
> + struct ed_softc *sc;
> +{
> + u_char sum;
> + int i;
> +
> + for (sum = 0, i = 0x14; i < 0x1c; i++)
> + sum += inb(sc->nic_addr + i);
> + if (sum != 0xff)
> + return (0);
> + for (i = 0; i < ETHER_ADDR_LEN; i++) {
> + sc->arpcom.ac_enaddr[i] = inb(sc->nic_addr + 0x14 + i);
> + printf("%02x.", sc->arpcom.ac_enaddr[i]);
> + }
> + return (1);
> }
>
> /*
>
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-mobile" in the body of the message
--
Pat Wendorf
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-mobile" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?39F6EBA8.18E0727B>
