Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/ic If there is only 1 port, don't say "1 ports".
details: https://anonhg.NetBSD.org/src/rev/bb10740a4708
branches: trunk
changeset: 789806:bb10740a4708
user: matt <matt%NetBSD.org@localhost>
date: Sun Sep 08 11:19:47 2013 +0000
description:
If there is only 1 port, don't say "1 ports".
Add a debug printf after reading the active ports.
diffstat:
sys/dev/ic/ahcisata_core.c | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diffs (40 lines):
diff -r 168ca2640020 -r bb10740a4708 sys/dev/ic/ahcisata_core.c
--- a/sys/dev/ic/ahcisata_core.c Sun Sep 08 10:43:51 2013 +0000
+++ b/sys/dev/ic/ahcisata_core.c Sun Sep 08 11:19:47 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ahcisata_core.c,v 1.48 2013/06/22 05:41:25 matt Exp $ */
+/* $NetBSD: ahcisata_core.c,v 1.49 2013/09/08 11:19:47 matt Exp $ */
/*
* Copyright (c) 2006 Manuel Bouyer.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ahcisata_core.c,v 1.48 2013/06/22 05:41:25 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ahcisata_core.c,v 1.49 2013/09/08 11:19:47 matt Exp $");
#include <sys/types.h>
#include <sys/malloc.h>
@@ -259,9 +259,11 @@
"b\037S64A\0"
"\0", sc->sc_ahci_cap);
aprint_normal_dev(sc->sc_atac.atac_dev, "AHCI revision %u.%u"
- ", %d ports, %d slots, CAP %s\n",
+ ", %d port%s, %d slot%s, CAP %s\n",
AHCI_VS_MJR(ahci_rev), AHCI_VS_MNR(ahci_rev),
- sc->sc_atac.atac_nchannels, sc->sc_ncmds, buf);
+ sc->sc_atac.atac_nchannels,
+ (sc->sc_atac.atac_nchannels == 1 ? "" : "s"),
+ sc->sc_ncmds, (sc->sc_ncmds == 1 ? "" : "s"), buf);
sc->sc_atac.atac_cap = ATAC_CAP_DATA16 | ATAC_CAP_DMA | ATAC_CAP_UDMA;
sc->sc_atac.atac_cap |= sc->sc_atac_capflags;
@@ -312,6 +314,7 @@
ahci_enable_intrs(sc);
ahci_ports = AHCI_READ(sc, AHCI_PI);
+ AHCIDEBUG_PRINT(("active ports %#x\n", ahci_ports), DEBUG_PROBE);
for (i = 0, port = 0; i < AHCI_MAX_PORTS; i++) {
if ((ahci_ports & (1 << i)) == 0)
continue;
Home |
Main Index |
Thread Index |
Old Index