From owner-freebsd-bugs Wed Sep 20 15:30:04 1995 Return-Path: owner-bugs Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id PAA04052 for bugs-outgoing; Wed, 20 Sep 1995 15:30:04 -0700 Received: (from gnats@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id PAA04035 ; Wed, 20 Sep 1995 15:30:02 -0700 Resent-Date: Wed, 20 Sep 1995 15:30:02 -0700 Resent-Message-Id: <199509202230.PAA04035@freefall.freebsd.org> Resent-From: gnats (GNATS Management) Resent-To: freebsd-bugs Resent-Reply-To: FreeBSD-gnats@freefall.FreeBSD.org, jin@pesto.lbl.gov Received: from pesto.lbl.gov (pesto.lbl.gov [128.3.196.67]) by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id PAA03434 for ; Wed, 20 Sep 1995 15:23:13 -0700 Received: (from jin@localhost) by pesto.lbl.gov (8.6.11/8.6.9) id PAA00315; Wed, 20 Sep 1995 15:23:11 GMT Message-Id: <199509201523.PAA00315@pesto.lbl.gov> Date: Wed, 20 Sep 1995 15:23:11 GMT From: "Jin Guojun[ITG]" Reply-To: jin@pesto.lbl.gov To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: kern/730: 3Com 3C5x9 probe problem Sender: owner-bugs@freebsd.org Precedence: bulk >Number: 730 >Category: kern >Synopsis: 3Com 3C5x9 probe problem >Confidential: no >Severity: serious >Priority: high >Responsible: freebsd-bugs >State: open >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Sep 20 15:30:01 PDT 1995 >Last-Modified: >Originator: Jin Guojun[ITG] >Organization: /-------------- Jin Guojun ------------ v ---- Internet: g_jin@lbl.gov ----\ | Imaging & Distributed Computing | Usenet: ucbvax!g_jin@lbl.gov | | Lawrence Berkeley Laboratory | Bitnet: -- | | 50B-2239, Berkeley, CA 94720 - jin%george.lbl.gov@Csa3.LBL.Gov | \--Ph#:(510) 486-7531 + Fax: 486-6363 --^--http://www-itg.lbl.gov/ITG.html-/ >Release: FreeBSD 2.0-BUILT-19950628 i386 >Environment: 3Com ethernet card + newer Pentinum motherboard >Description: Fail to initialize 3Com 3C5x9 card on new Pentinum motherboard >How-To-Repeat: Fixed in /sys/i386/isa/if_ep.c -- See patch below Please update the installation floppy (boot.flp) A.S.A.P. Thanks. >Fix: *** if_ep.c Wed Sep 20 15:13:59 1995 --- if_ep.old Wed Sep 20 15:06:59 1995 *************** *** 167,174 **** { int i; ! for (i = 0; is_eeprom_busy(IS_BASE) && i < MAX_EEPROMBUSY; i++) ! DELAY(10); if (i >= MAX_EEPROMBUSY) { printf("ep%d: eeprom failed to come ready.\n", is->id_unit); return (0); --- 166,172 ---- { int i; ! for (i = 0; is_eeprom_busy(IS_BASE) && i < MAX_EEPROMBUSY; i++); if (i >= MAX_EEPROMBUSY) { printf("ep%d: eeprom failed to come ready.\n", is->id_unit); return (0); *************** *** 213,219 **** /* Look for the ISA boards. Init and leave them actived */ outb(id_port, 0xc0); /* Global reset */ DELAY(10000); ! for (i = EP_MAX_BOARDS; i--;) { send_ID_sequence(id_port); data = get_eeprom_data(id_port, EEPROM_MFG_ID); --- 211,219 ---- /* Look for the ISA boards. Init and leave them actived */ outb(id_port, 0xc0); /* Global reset */ DELAY(10000); ! for (i = 0; i < EP_MAX_BOARDS; i++) { ! outb(id_port, 0); ! outb(id_port, 0); send_ID_sequence(id_port); data = get_eeprom_data(id_port, EEPROM_MFG_ID); *************** *** 225,247 **** data = get_eeprom_data(id_port, j); ep_board[neisa+nisa].epb_used = 0; ! ep_board[neisa+nisa].epb_addr = (get_eeprom_data(id_port, EEPROM_ADDR_CFG) & 0x1f) * 0x10 + 0x200; outb(id_port, ep_current_tag); /* tags board */ ! outb(id_port, 0xE0 | (ep_board[neisa+nisa++].epb_addr>>4) & 0x1F); ep_current_tag--; } ep_board[neisa+nisa].epb_addr = 0; if (neisa) { ! printf("%d 3C579 board(s) on EISA found at", neisa); for (j = 0; ep_board[j].epb_addr; j++) if (ep_board[j].epb_addr >= EP_EISA_START) printf(" 0x%x", ep_board[j].epb_addr); printf("\n"); } if (nisa) { ! printf("%d 3C509 board(s) on ISA found at", nisa); for (j = 0; ep_board[j].epb_addr; j++) if (ep_board[j].epb_addr < EP_EISA_START) printf(" 0x%x", ep_board[j].epb_addr); --- 225,247 ---- data = get_eeprom_data(id_port, j); ep_board[neisa+nisa].epb_used = 0; ! ep_board[neisa+nisa++].epb_addr = (get_eeprom_data(id_port, EEPROM_ADDR_CFG) & 0x1f) * 0x10 + 0x200; outb(id_port, ep_current_tag); /* tags board */ ! outb(id_port, ACTIVATE_ADAPTER_TO_CONFIG); ep_current_tag--; } ep_board[neisa+nisa].epb_addr = 0; if (neisa) { ! printf("%d 3C5x9 board(s) on EISA found at", neisa); for (j = 0; ep_board[j].epb_addr; j++) if (ep_board[j].epb_addr >= EP_EISA_START) printf(" 0x%x", ep_board[j].epb_addr); printf("\n"); } if (nisa) { ! printf("%d 3C5x9 board(s) on ISA found at", nisa); for (j = 0; ep_board[j].epb_addr; j++) if (ep_board[j].epb_addr < EP_EISA_START) printf(" 0x%x", ep_board[j].epb_addr); *************** *** 273,283 **** if( ep_board[i].epb_used || ep_board[i].epb_addr != IS_BASE) return 0; - ep_board[i].epb_used=1; if (inw(IS_BASE + EP_W0_EEPROM_COMMAND) & EEPROM_TST_MODE) printf("ep%d: 3c5x9 at 0x%x in test mode. Erase pencil mark!\n", ! is->id_unit, IS_BASE), ! ep_board[i].epb_used++; /* remember pencil mark! */ return 1; } } --- 273,282 ---- if( ep_board[i].epb_used || ep_board[i].epb_addr != IS_BASE) return 0; if (inw(IS_BASE + EP_W0_EEPROM_COMMAND) & EEPROM_TST_MODE) printf("ep%d: 3c5x9 at 0x%x in test mode. Erase pencil mark!\n", ! is->id_unit, IS_BASE); ! ep_board[i].epb_used=1; return 1; } } *************** *** 1273,1281 **** { int cx, al; ! outb(port, 0); ! outb(port, 0); ! for (al = cx = 0xff; cx--;) { outb(port, al); al <<= 1; if (al & 0x100) --- 1272,1278 ---- { int cx, al; ! for (al = 0xff, cx = 0; cx < 255; cx++) { outb(port, al); al <<= 1; if (al & 0x100) >Audit-Trail: >Unformatted: