Subject: Re: NetBSD ruined my NIC??
To: Bert Kiers <kiers@original.xs4all.nl>
From: Peter Fors <pikofarad@bredband.net>
List: port-i386
Date: 04/16/2004 02:15:00
What changes did you try?

I'm trying to understand the /src/sys/dev/ic/i82557.c code right now, and
found this:

if (sc->sc_flags & FXPF_HAS_RESUME_BUG) {
  fxp_read_eeprom(sc, &data, 10, 1);
  if (data & 0x02) {  /* STB enable */
   aprint_error("%s: WARNING: "
       "Disabling dynamic standby mode in EEPROM "
       "to work around a\n",
       sc->sc_dev.dv_xname);
   aprint_normal(
       "%s: WARNING: hardware bug.  You must reset "
       "the system before using this\n",
       sc->sc_dev.dv_xname);
   aprint_normal("%s: WARNING: interface.\n",
       sc->sc_dev.dv_xname);
   data &= ~0x02;
   fxp_write_eeprom(sc, &data, 10, 1);
   aprint_normal("%s: new EEPROM ID: 0x%04x\n",
       sc->sc_dev.dv_xname, data);
   fxp_eeprom_update_cksum(sc);
  }

or in short:

fxp_read_eeprom(sc, &data, 10, 1);
data &= ~0x02;
fxp_write_eeprom(sc, &data, 10, 1);
fxp_eeprom_update_cksum(sc);


So maybe a

fxp_read_eeprom(sc, &data, 10, 1);
data |= 0x02;
fxp_write_eeprom(sc, &data, 10, 1);
fxp_eeprom_update_cksum(sc);

could work? (or dig the grave for my NIC even deeper)


Regards,

/ Peter Fors


----- Original Message ----- 
From: "Bert Kiers" <kiers@original.xs4all.nl>
To: "Peter Fors" <pikofarad@bredband.net>
Cc: "Bert Kiers" <kiers@original.xs4all.nl>; <port-i386@netbsd.org>;
<heidieker@cubeportal.com>
Sent: Friday, April 16, 2004 12:51 AM
Subject: Re: NetBSD ruined my NIC??


> On Fri, Apr 16, 2004 at 12:38:53AM +0200, Peter Fors wrote:
> > Thanks for the information!
> >
> > But it seems that so little is being written to the EEPROM, so it should
be
> > possible to reverse the damage? Is there some kind of utility to do
change
> > it back, or "reverse hack" of the fxp driver? Unfortunately I don't know
> > much about NetBSD driver programming :-(
>
> I tried some changes to the kernel to correct the problem. After trying
> some suggestions from other ppl, the NIC vanished completely. The only
> evidence the NIC is on the board is the RJ45 socket. Absolutely nothing
> about it in the boot messages.
>
> -- 
> Bert Kiers, !MCSE && 0xFF, frique d'ordinateur
>