From owner-freebsd-net@FreeBSD.ORG Mon Jun 9 17:00:10 2003 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A48A937B401 for ; Mon, 9 Jun 2003 17:00:10 -0700 (PDT) Received: from www.ambrisko.com (adsl-64-174-51-42.dsl.snfc21.pacbell.net [64.174.51.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id CAD4E43FA3 for ; Mon, 9 Jun 2003 17:00:09 -0700 (PDT) (envelope-from ambrisko@www.ambrisko.com) Received: from www.ambrisko.com (localhost [127.0.0.1]) by www.ambrisko.com (8.12.8p1/8.12.8) with ESMTP id h5A008O7055438; Mon, 9 Jun 2003 17:00:09 -0700 (PDT) (envelope-from ambrisko@www.ambrisko.com) Received: (from ambrisko@localhost) by www.ambrisko.com (8.12.8p1/8.12.8/Submit) id h5A008Ae055437; Mon, 9 Jun 2003 17:00:08 -0700 (PDT) (envelope-from ambrisko) From: Doug Ambrisko Message-Id: <200306100000.h5A008Ae055437@www.ambrisko.com> In-Reply-To: <176830000.1054647441@palle.girgensohn.se> To: Palle Girgensohn Date: Mon, 9 Jun 2003 17:00:08 -0700 (PDT) X-Mailer: ELM [version 2.4ME+ PL94b (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII cc: freebsd-net@freebsd.org Subject: Re: fxp0: device timeout | SCB already complete. X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jun 2003 00:00:10 -0000 Palle Girgensohn writes: | Hi! | | When I run network backups, one of our FreeBSD machines (backup client) get | NIC timeouts and warnings from the scsi driver: | | Jun 3 14:50:12 melon /kernel: fxp0: device timeout | Jun 3 14:50:36 melon /kernel: fxp0: device timeout | Jun 3 14:51:03 melon /kernel: fxp0: device timeout | Jun 3 14:51:38 melon /kernel: fxp0: device timeout | Jun 3 14:52:41 melon /kernel: ahc0: Timedout SCB already complete. | Interrupts may not be functioning. | Jun 3 14:53:12 melon /kernel: fxp0: device timeout | | Both machines are on a hubbed 100 Mbit/s half duplex network. Looking at | the traffic with netstat -d 1, I see that as soon as the traffic increases, | there is a timeout and traffic stops, after with the net is reachable | again. This goes on and on. It only happens when there is much traffic on | both NIC and SCSI, it seems (alas when running backups...) | | Since there was a second NIC, it tried connecting it to the server using | that NIC through a switch, on a private network, but then the machine | nearly crashed, or at least came to a grinding halt. It seems, as soon as I | pulled the ethernet cable it came back. This happened without any backup | running... | | To me, this sounds like some odd interrupt problem? It is a PCI machine | with an Intel ?x440 (if memory serves me right) and dual CPUs 400 Mhz, | running freebsd-4.7p2. | | Any ideas where to look, how to debug or what to do? Try this: diff -c -r1.1.1.2 -r1.3 *** if_fxp.c 28 May 2003 23:39:32 -0000 1.1.1.2 --- if_fxp.c 5 Jun 2003 02:10:23 -0000 1.3 *************** *** 574,579 **** --- 579,610 ---- } } + if (i == 0x1039 || i == 0x103A) { + fxp_read_eeprom(sc, &data, 13, 1); + if ((data & 0x0f) == 4) { + u_int16_t cksum; + int i; + + device_printf(dev, + "Fix Tyan bug in EEPROM\n"); + data = (data & 0xf0) + 0xf; + fxp_write_eeprom(sc, &data, 13, 1); + device_printf(dev, "New EEPROM ID: 0x%x\n", data); + cksum = 0; + for (i = 0; i < (1 << sc->eeprom_size) - 1; i++) { + fxp_read_eeprom(sc, &data, i, 1); + cksum += data; + } + i = (1 << sc->eeprom_size) - 1; + cksum = 0xBABA - cksum; + fxp_read_eeprom(sc, &data, i, 1); + fxp_write_eeprom(sc, &cksum, i, 1); + device_printf(dev, + "EEPROM checksum @ 0x%x: 0x%x -> 0x%x\n", + i, data, cksum); + } + } + /* * If we are not a 82557 chip, we can enable extended features. */ For kicks. We had to do this on our motherboard. Don't know why. Couldn't get an answer. I figured this out via a binary search of a good eeprom contents and bad. Note you have to boot the kernel twice or power off. Your mileage may vary. Your machine could blow up etc. This is on a Tyan 2099GNN board. Doug A.