diff options
author | 2019-01-07 03:41:06 +0000 | |
---|---|---|
committer | 2019-01-07 03:41:06 +0000 | |
commit | 71696a07ff2284c0e5ff690a668aff7de15addab (patch) | |
tree | 4c098f4e7bddeb995dba4c648849d070ca6ccda9 /sys | |
parent | the pledge handing for access(2) of /var/run/ypbind.lock is artificially (diff) | |
download | wireguard-openbsd-71696a07ff2284c0e5ff690a668aff7de15addab.tar.xz wireguard-openbsd-71696a07ff2284c0e5ff690a668aff7de15addab.zip |
tweak ohci_checkrev so it doesnt print a leading comma and space.
it assumes that it always followed an interrupt string, but we don't
print that on fdt. having the bus responsible for the whitespace
means the fdt glue can print a colon to separate the bus info from
checkrev output, while every other glue keeps the comma.
ok deraadt@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/loongson/dev/ohci_voyager.c | 4 | ||||
-rw-r--r-- | sys/arch/octeon/dev/octohci.c | 4 | ||||
-rw-r--r-- | sys/dev/cardbus/ohci_cardbus.c | 4 | ||||
-rw-r--r-- | sys/dev/fdt/ohci_fdt.c | 4 | ||||
-rw-r--r-- | sys/dev/pci/ohci_pci.c | 4 | ||||
-rw-r--r-- | sys/dev/usb/ohci.c | 5 |
6 files changed, 13 insertions, 12 deletions
diff --git a/sys/arch/loongson/dev/ohci_voyager.c b/sys/arch/loongson/dev/ohci_voyager.c index 574506c0b2b..ee168228ac3 100644 --- a/sys/arch/loongson/dev/ohci_voyager.c +++ b/sys/arch/loongson/dev/ohci_voyager.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ohci_voyager.c,v 1.6 2014/05/19 13:11:31 mpi Exp $ */ +/* $OpenBSD: ohci_voyager.c,v 1.7 2019/01/07 03:41:06 dlg Exp $ */ /* OpenBSD: ohci_pci.c,v 1.33 2008/06/26 05:42:17 ray Exp */ /* $NetBSD: ohci_pci.c,v 1.23 2002/10/02 16:51:47 thorpej Exp $ */ @@ -130,7 +130,7 @@ ohci_voyager_attach(struct device *parent, struct device *self, void *aux) splx(s); return; } - printf(": %s", voyager_intr_string(sc->sc_ih)); + printf(": %s, ", voyager_intr_string(sc->sc_ih)); /* Figure out vendor for root hub descriptor. */ vendor = pci_findvendor(pa->pa_id); diff --git a/sys/arch/octeon/dev/octohci.c b/sys/arch/octeon/dev/octohci.c index 1fe457ef7e6..7a5fd656d7b 100644 --- a/sys/arch/octeon/dev/octohci.c +++ b/sys/arch/octeon/dev/octohci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: octohci.c,v 1.3 2017/08/13 14:46:04 visa Exp $ */ +/* $OpenBSD: octohci.c,v 1.4 2019/01/07 03:41:06 dlg Exp $ */ /* * Copyright (c) 2015 Jonathan Matthew <jmatthew@openbsd.org> @@ -96,6 +96,8 @@ octohci_attach(struct device *parent, struct device *self, void *aux) (void *)&sc->sc_ohci, sc->sc_ohci.sc_bus.bdev.dv_xname); KASSERT(sc->sc_ih != NULL); + printf(", "); + if ((ohci_checkrev(&sc->sc_ohci) != USBD_NORMAL_COMPLETION) || (ohci_handover(&sc->sc_ohci) != USBD_NORMAL_COMPLETION)) goto failed; diff --git a/sys/dev/cardbus/ohci_cardbus.c b/sys/dev/cardbus/ohci_cardbus.c index af76290abb4..c099342bccc 100644 --- a/sys/dev/cardbus/ohci_cardbus.c +++ b/sys/dev/cardbus/ohci_cardbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ohci_cardbus.c,v 1.21 2015/03/14 03:38:47 jsg Exp $ */ +/* $OpenBSD: ohci_cardbus.c,v 1.22 2019/01/07 03:41:06 dlg Exp $ */ /* $NetBSD: ohci_cardbus.c,v 1.19 2004/08/02 19:14:28 mycroft Exp $ */ /* @@ -135,7 +135,7 @@ ohci_cardbus_attach(struct device *parent, struct device *self, void *aux) printf(": couldn't establish interrupt\n"); return; } - printf(": irq %d", ca->ca_intrline); + printf(": irq %d, ", ca->ca_intrline); /* Figure out vendor for root hub descriptor. */ vendor = cardbus_findvendor(ca->ca_id); diff --git a/sys/dev/fdt/ohci_fdt.c b/sys/dev/fdt/ohci_fdt.c index 12550f199f4..4f3c0ae683b 100644 --- a/sys/dev/fdt/ohci_fdt.c +++ b/sys/dev/fdt/ohci_fdt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ohci_fdt.c,v 1.1 2019/01/04 23:55:29 dlg Exp $ */ +/* $OpenBSD: ohci_fdt.c,v 1.2 2019/01/07 03:41:06 dlg Exp $ */ /* * Copyright (c) 2005, 2019 David Gwynne <dlg@openbsd.org> @@ -117,7 +117,7 @@ ohci_fdt_attach(struct device *parent, struct device *self, void *aux) printf(": can't establish interrupt\n"); goto disable_clocks; } - printf(": fdt"); + printf(": "); strlcpy(sc->sc.sc_vendor, "Generic", sizeof(sc->sc.sc_vendor)); diff --git a/sys/dev/pci/ohci_pci.c b/sys/dev/pci/ohci_pci.c index 86b6d979c09..274183392dc 100644 --- a/sys/dev/pci/ohci_pci.c +++ b/sys/dev/pci/ohci_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ohci_pci.c,v 1.40 2014/05/16 18:17:03 mpi Exp $ */ +/* $OpenBSD: ohci_pci.c,v 1.41 2019/01/07 03:41:06 dlg Exp $ */ /* $NetBSD: ohci_pci.c,v 1.23 2002/10/02 16:51:47 thorpej Exp $ */ /* @@ -141,7 +141,7 @@ ohci_pci_attach(struct device *parent, struct device *self, void *aux) splx(s); return; } - printf(": %s", intrstr); + printf(": %s, ", intrstr); /* Figure out vendor for root hub descriptor. */ vendor = pci_findvendor(pa->pa_id); diff --git a/sys/dev/usb/ohci.c b/sys/dev/usb/ohci.c index 43471e08950..9313dc382df 100644 --- a/sys/dev/usb/ohci.c +++ b/sys/dev/usb/ohci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ohci.c,v 1.154 2018/11/18 16:24:05 mpi Exp $ */ +/* $OpenBSD: ohci.c,v 1.155 2019/01/07 03:41:06 dlg Exp $ */ /* $NetBSD: ohci.c,v 1.139 2003/02/22 05:24:16 tsutsui Exp $ */ /* $FreeBSD: src/sys/dev/usb/ohci.c,v 1.22 1999/11/17 22:33:40 n_hibma Exp $ */ @@ -656,9 +656,8 @@ ohci_checkrev(struct ohci_softc *sc) { u_int32_t rev; - printf(","); rev = OREAD4(sc, OHCI_REVISION); - printf(" version %d.%d%s\n", OHCI_REV_HI(rev), OHCI_REV_LO(rev), + printf("version %d.%d%s\n", OHCI_REV_HI(rev), OHCI_REV_LO(rev), OHCI_REV_LEGACY(rev) ? ", legacy support" : ""); if (OHCI_REV_HI(rev) != 1 || OHCI_REV_LO(rev) != 0) { |