diff options
author | 2019-10-15 05:21:16 +0000 | |
---|---|---|
committer | 2019-10-15 05:21:16 +0000 | |
commit | 63effaba642375fbe805adb04c5256f8dcbb5e48 (patch) | |
tree | 6e0d122529d093ea276d9c8a0e39ce248ceca70d | |
parent | Fix compiler's view of the alignment of xhci structs. Because the struct (diff) | |
download | wireguard-openbsd-63effaba642375fbe805adb04c5256f8dcbb5e48.tar.xz wireguard-openbsd-63effaba642375fbe805adb04c5256f8dcbb5e48.zip |
Try to match the devid against the bootpath if link->port_wwn doesn't
work. mpii(4) controllers tend not to provide the right wwn for sata devices,
so this helps if we happen to be booting off one of those.
ok dlg@ kettenis@
-rw-r--r-- | sys/arch/sparc64/sparc64/autoconf.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/sys/arch/sparc64/sparc64/autoconf.c b/sys/arch/sparc64/sparc64/autoconf.c index 1e059dcad67..3bb6f233e00 100644 --- a/sys/arch/sparc64/sparc64/autoconf.c +++ b/sys/arch/sparc64/sparc64/autoconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: autoconf.c,v 1.132 2019/07/25 22:45:53 kettenis Exp $ */ +/* $OpenBSD: autoconf.c,v 1.133 2019/10/15 05:21:16 jmatthew Exp $ */ /* $NetBSD: autoconf.c,v 1.51 2001/07/24 19:32:11 eeh Exp $ */ /* @@ -1459,6 +1459,15 @@ device_register(struct device *dev, void *aux) if (bp->val[0] == sl->port_wwn && lun == sl->lun) { nail_bootdev(dev, bp); } + + /* + * sata devices on some controllers don't get + * port_wwn filled in, so look at devid too. + */ + if (sl->id && sl->id->d_len == 8 && + sl->id->d_type == DEVID_NAA && + memcmp(sl->id + 1, &bp->val[0], 8) == 0) + nail_bootdev(dev, bp); return; } |