diff options
author | 2007-10-15 18:43:28 +0000 | |
---|---|---|
committer | 2007-10-15 18:43:28 +0000 | |
commit | cf78ad2ff007e30e0dfcb84bdda277604663af8b (patch) | |
tree | e4ad6fa67334fc2fe88fac6f20b97367a19e38b9 | |
parent | enable ADDMULTI and DELMULTI in the ioctl handler now that the tht (diff) | |
download | wireguard-openbsd-cf78ad2ff007e30e0dfcb84bdda277604663af8b.tar.xz wireguard-openbsd-cf78ad2ff007e30e0dfcb84bdda277604663af8b.zip |
Skip non-SPD EEPROMs.
somewhat confused ok deraadt@
-rw-r--r-- | sys/arch/sparc64/dev/ofwi2c.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/sys/arch/sparc64/dev/ofwi2c.c b/sys/arch/sparc64/dev/ofwi2c.c index 4252ee0dddf..7fa2ef6fbc2 100644 --- a/sys/arch/sparc64/dev/ofwi2c.c +++ b/sys/arch/sparc64/dev/ofwi2c.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ofwi2c.c,v 1.6 2007/10/08 03:10:58 jsg Exp $ */ +/* $OpenBSD: ofwi2c.c,v 1.7 2007/10/15 18:43:28 kettenis Exp $ */ /* * Copyright (c) 2006 Theo de Raadt @@ -83,6 +83,18 @@ ofwiic_scan(struct device *self, struct i2cbus_attach_args *iba, void *aux) if (strncmp(ia.ia_name, "i2c-", strlen("i2c-")) == 0) ia.ia_name += strlen("i2c-"); + /* Skip non-SPD EEPROMs. */ + if (strcmp(ia.ia_name, "at24c64") == 0 || + strcmp(ia.ia_name, "at34c02") == 0) { + if (OF_getprop(node, "name", name, sizeof(name)) == -1) + continue; + if (strcmp(name, "dimm") == 0 || + strcmp(name, "dimm-spd") == 0) + ia.ia_name = "spd"; + else + continue; + } + config_found(self, &ia, iic_print); } } |