Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci When searching PROM data to get a MAC address, s...
details: https://anonhg.NetBSD.org/src/rev/65f759aa6220
branches: trunk
changeset: 756361:65f759aa6220
user: jnemeth <jnemeth%NetBSD.org@localhost>
date: Wed Jul 14 09:52:39 2010 +0000
description:
When searching PROM data to get a MAC address, search for National
Semiconductor Saturn data as well as Sun Cassini data.
diffstat:
sys/dev/pci/if_cas.c | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
diffs (40 lines):
diff -r cd2790bef7ca -r 65f759aa6220 sys/dev/pci/if_cas.c
--- a/sys/dev/pci/if_cas.c Wed Jul 14 04:50:28 2010 +0000
+++ b/sys/dev/pci/if_cas.c Wed Jul 14 09:52:39 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_cas.c,v 1.10 2010/07/14 04:50:28 jnemeth Exp $ */
+/* $NetBSD: if_cas.c,v 1.11 2010/07/14 09:52:39 jnemeth Exp $ */
/* $OpenBSD: if_cas.c,v 1.29 2009/11/29 16:19:38 kettenis Exp $ */
/*
@@ -44,7 +44,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_cas.c,v 1.10 2010/07/14 04:50:28 jnemeth Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_cas.c,v 1.11 2010/07/14 09:52:39 jnemeth Exp $");
#include "opt_inet.h"
@@ -187,6 +187,11 @@
PCI_VENDOR_SUN & 0xff, PCI_VENDOR_SUN >> 8,
PCI_PRODUCT_SUN_CASSINI & 0xff, PCI_PRODUCT_SUN_CASSINI >> 8
};
+static const u_int8_t cas_promdat_ns[] = {
+ 'P', 'C', 'I', 'R',
+ PCI_VENDOR_NS & 0xff, PCI_VENDOR_NS >> 8,
+ PCI_PRODUCT_NS_SATURN & 0xff, PCI_PRODUCT_NS_SATURN >> 8
+};
static const u_int8_t cas_promdat2[] = {
0x18, 0x00, /* structure length */
@@ -227,7 +232,8 @@
goto fail;
bus_space_read_region_1(romt, romh, dataoff, buf, sizeof(buf));
- if (bcmp(buf, cas_promdat, sizeof(cas_promdat)) ||
+ if ((bcmp(buf, cas_promdat, sizeof(cas_promdat)) &&
+ bcmp(buf, cas_promdat_ns, sizeof(cas_promdat_ns))) ||
bcmp(buf + PROMDATA_DATA2, cas_promdat2, sizeof(cas_promdat2)))
goto fail;
Home |
Main Index |
Thread Index |
Old Index