Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 1 Nov 1995 08:47:22 +0200 (SAT)
From:      John Hay <jhay@mikom.csir.co.za>
To:        henrich@msu.edu
Cc:        hackers@FreeBSD.ORG (FreeBSD-hackers)
Subject:   Re: kern/805: SMC Ultra 8216 incorrectly probed (if_ed driver)
Message-ID:  <199511010647.IAA18778@zibbi.mikom.csir.co.za>
In-Reply-To: <199510311856.NAA03475@crh.cl.msu.edu> from "henrich@msu.edu" at Oct 31, 95 01:56:54 pm

next in thread | previous in thread | raw e-mail | index | archive | help
I have tried out the suggested fix that Steve Piette send a while back to
this list and it works fine on my 8216C cards. I don't have any 8416 cards
to test it on. I have attached Steve's message and at the end a diff that I
made relative to -current. I would like people to try it out and see if it
breaks the probing of the 8416 cards or maybe something else. And then maybe
we can get this into current?

John
-- 
John Hay -- John.Hay@csir.co.za


> What's wrong with using the probe section from ED_TYPE_SMC8216T?
> It worked find here when I first put developed the 8416 patch. It doesn't
> care if the card is a combo or utp only device. I did test the driver with
> Elite 16, Ultra, and Ether EZ to make sure it still worked after the patch
> to 2.0-RELEASE
> 
> ie: (based on 2.0.5-ALPHA /usr/src/sys/i386/isa/if_ed.c)
> 
>       case ED_TYPE_SMC8216C:
>       case ED_TYPE_SMC8216T:
>               if (sc->type = ED_TYPE_SMC8216C) {
>                       sc->type_str = "SMC8216/SMC8216C";
>                       sc->kdc.kdc_description =
>                               "Ethernet adapter: SMC 8216 or 8216C";
>               } else {
>                       sc->type_str = "SMC8216T";
>                       sc->kdc.kdc_description =
>                                "Ethernet adapter: SMC 8216T";
>               }
>               outb(sc->asic_addr + ED_WD790_HWR,
>                   inb(sc->asic_addr + ED_WD790_HWR) | ED_WD790_HWR_SWH);
>               switch (inb(sc->asic_addr + ED_WD790_RAR) & ED_WD790_RAR_SZ64) {
>               case ED_WD790_RAR_SZ64:
>                       memsize = 65536;
>                       break;
>               case ED_WD790_RAR_SZ32:
>                       memsize = 32768;
>                       break;
>               case ED_WD790_RAR_SZ16:
>                       memsize = 16384;
>                       break;
>               case ED_WD790_RAR_SZ8:
>                       /* 8216 has 16K shared mem -- 8416 has 8K */
>                       if (sc->type = ED_TYPE_SMC8216C) {
>                               sc->type_str = "SMC8416C/SMC8416BT";
>                               sc->kdc.kdc_description =
>                                       "Ethernet adapter: SMC 8416C or 8416BT";
>                       } else {
>                               sc->type_str = "SMC8416T";
>                               sc->kdc.kdc_description =
>                                       "Ethernet adapter: SMC 8416T";
>                       memsize = 8192;
>                       break;
>               }
>               outb(sc->asic_addr + ED_WD790_HWR,
>                   inb(sc->asic_addr + ED_WD790_HWR) & ~ED_WD790_HWR_SWH);
> 
>               isa16bit = 1;
>               sc->is790 = 1;
>               break;
> 
> 
> Or did I miss something important?
> 
> Steve Piette                                       Applied Computer Technology
> steve@simon.chi.il.US.                             7N852 Phar Lap Drive 
> (708) 513-6920                                     St. Charles, IL 60175-6868
> ------------------------------------------------------------------------------
> By sending unsolicited commercially-oriented e-mail to this address, the 
> sender agrees to pay a $100 flat fee to the recipient for proofreading 
> services.


*** if_ed.c.org	Sun Oct 29 12:16:18 1995
--- if_ed.c	Wed Nov  1 08:24:25 1995
***************
*** 509,533 ****
  		isa16bit = 1;
  		break;
  	case ED_TYPE_SMC8216C: /* 8216 has 16K shared mem -- 8416 has 8K */
! 		(unsigned int) *(isa_dev->id_maddr+8192) = (unsigned int)0;
! 		if ((unsigned int) *(isa_dev->id_maddr+8192)) {
! 			sc->type_str = "SMC8416C/SMC8416BT";
! 			sc->kdc.kdc_description =
! 				"Ethernet adapter: SMC 8416C or 8416BT";
! 			memsize = 8192;
! 		} else {
  			sc->type_str = "SMC8216/SMC8216C";
  			sc->kdc.kdc_description =
  				"Ethernet adapter: SMC 8216 or 8216C";
! 			memsize = 16384;
  		}
- 		isa16bit = 1;
- 		sc->is790 = 1;
- 		break;
- 	case ED_TYPE_SMC8216T:
- 		sc->type_str = "SMC8216T";
- 		sc->kdc.kdc_description =
- 			"Ethernet adapter: SMC 8216T";
  
  		outb(sc->asic_addr + ED_WD790_HWR,
  		    inb(sc->asic_addr + ED_WD790_HWR) | ED_WD790_HWR_SWH);
--- 509,524 ----
  		isa16bit = 1;
  		break;
  	case ED_TYPE_SMC8216C: /* 8216 has 16K shared mem -- 8416 has 8K */
! 	case ED_TYPE_SMC8216T:
! 		if (sc->type = ED_TYPE_SMC8216C) {
  			sc->type_str = "SMC8216/SMC8216C";
  			sc->kdc.kdc_description =
  				"Ethernet adapter: SMC 8216 or 8216C";
! 		} else {
! 			sc->type_str = "SMC8216T";
! 			sc->kdc.kdc_description =
! 				"Ethernet adapter: SMC 8216T";
  		}
  
  		outb(sc->asic_addr + ED_WD790_HWR,
  		    inb(sc->asic_addr + ED_WD790_HWR) | ED_WD790_HWR_SWH);
***************
*** 542,550 ****
  			memsize = 16384;
  			break;
  		case ED_WD790_RAR_SZ8:
! 			sc->type_str = "SMC8416T";
! 			sc->kdc.kdc_description =
! 				"Ethernet adapter: SMC 8416T";
  			memsize = 8192;
  			break;
  		}
--- 533,548 ----
  			memsize = 16384;
  			break;
  		case ED_WD790_RAR_SZ8:
! 			/* 8216 has 16K shared mem -- 8416 has 8K */
! 			if (sc->type = ED_TYPE_SMC8216C) {
! 				sc->type_str = "SMC8416C/SMC8416BT";
! 				sc->kdc.kdc_description =
! 					"Ethernet adapter: SMC 8416C or 8416BT";
! 			} else {
! 				sc->type_str = "SMC8416T";
! 				sc->kdc.kdc_description =
! 					"Ethernet adapter: SMC 8416T";
! 			}
  			memsize = 8192;
  			break;
  		}




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