Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Sep 1995 15:23:11 GMT
From:      "Jin Guojun[ITG]" <jin@pesto.lbl.gov>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   kern/730: 3Com 3C5x9 probe problem
Message-ID:  <199509201523.PAA00315@pesto.lbl.gov>
Resent-Message-ID: <199509202230.PAA04035@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199509201523.PAA00315>