From: deraadt Date: Sun, 24 Aug 2008 20:24:43 +0000 (+0000) Subject: Tadpole Viper onboard ethernet has no eeprom either, but the PROM entry X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=25696e56d5d884a54ec37a2e029cd0764775b40a;p=openbsd Tadpole Viper onboard ethernet has no eeprom either, but the PROM entry has subsystem ids set to the same as the regular ids, so the heuristic does not work. So look for the TAD,Viper machine name. When we get our hand on a Bullfrog (with a PCI slot) we will need to revisit this. ok kettenis --- diff --git a/sys/dev/pci/if_bge.c b/sys/dev/pci/if_bge.c index 2d7c80d585f..8dda5ead053 100644 --- a/sys/dev/pci/if_bge.c +++ b/sys/dev/pci/if_bge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_bge.c,v 1.239 2008/08/24 16:30:18 deraadt Exp $ */ +/* $OpenBSD: if_bge.c,v 1.240 2008/08/24 20:24:43 deraadt Exp $ */ /* * Copyright (c) 2001 Wind River Systems @@ -107,6 +107,7 @@ #endif #ifdef __sparc64__ +#include #include #endif @@ -1792,6 +1793,7 @@ bge_attach(struct device *parent, struct device *self, void *aux) struct ifnet *ifp; caddr_t kva; #ifdef __sparc64__ + char namebuf[32]; int subvendor; #endif @@ -1872,6 +1874,9 @@ bge_attach(struct device *parent, struct device *self, void *aux) if (subvendor == PCI_VENDOR_SUN) sc->bge_flags |= BGE_NO_EEPROM; } + if (OF_getprop(findroot(), "name", namebuf, sizeof(namebuf)) > 0 && + strcmp(namebuf, "TAD,Viper") == 0) + sc->bge_flags |= BGE_NO_EEPROM; #endif /*