From 25696e56d5d884a54ec37a2e029cd0764775b40a Mon Sep 17 00:00:00 2001 From: deraadt Date: Sun, 24 Aug 2008 20:24:43 +0000 Subject: [PATCH] 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 --- sys/dev/pci/if_bge.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 /* -- 2.20.1