Date: Sat, 2 Jan 1999 09:09:42 -0500 (EST) From: Peter Dufault <dufault@hda.com> To: current@FreeBSD.ORG Subject: if_ep probe failures related to reading back settings Message-ID: <199901021409.JAA18234@hda.hda.com>
next in thread | raw e-mail | index | archive | help
I have trouble properly reading the settings back from a 3C509 on a 180MHz Cyrix MediaGX crash box. The result is that it won't always probe in at boot. I find that by increasing the DELAY by a factor of 10 and more importantly adding a delay before reading each serial bit of data (I assume we're reading back a serial EEPROM): Before: > outb(id_port, 0x80 + offset); > DELAY(1000); > for (i = 0; i < 16; i++) > data = (data << 1) | (inw(id_port) & 1); After: >#define DELAY_MULTIPLE 10 > outb(id_port, 0x80 + offset); > for (i = 0; i < 16; i++) { > DELAY(DELAY_MULTIPLE * 1000); > data = (data << 1) | (inw(id_port) & 1); > } that it always works. Without this I get signs of not reading back the data properly - for example, sometimes it will boot with a corrupt hardware address so that on another system I'll see this: > arp: 198.252.184.2 moved from 00:20:ff:ff:af:a0 to 00:20:eb:e8:96:3a > arp: 198.252.184.2 moved from 00:20:eb:e8:96:3a to e0:00:af:a0:96:3a > de0: receive: e0:00:af:a0:96:3a: bad crc > arp: 198.252.184.2 moved from e0:00:af:a0:96:3a to 00:20:af:a0:e5:8e > arp: 198.252.184.2 moved from 00:20:af:a0:e5:8e to 00:20:af:a0:96:3a Can someone check if we may be violating timings on reading that serial bus, or is it likely that this Cyrix has an inw that is too fast and I have to monkey with some BIOS settings? Peter -- Peter Dufault (dufault@hda.com) Realtime development, Machine control, HD Associates, Inc. Safety critical systems, Agency approval To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199901021409.JAA18234>