In cbus(4) drivers, make it easier to identify which driver is doing
authorstsp <stsp@openbsd.org>
Wed, 17 Jan 2018 15:52:33 +0000 (15:52 +0000)
committerstsp <stsp@openbsd.org>
Wed, 17 Jan 2018 15:52:33 +0000 (15:52 +0000)
debug printfs about LDC link state changes. No functional change.

ok kettenis@

sys/arch/sparc64/dev/vcctty.c
sys/arch/sparc64/dev/vdsk.c
sys/arch/sparc64/dev/vdsp.c
sys/arch/sparc64/dev/vldcp.c
sys/arch/sparc64/dev/vnet.c

index b2102f3..8486b12 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: vcctty.c,v 1.12 2015/01/25 21:42:13 kettenis Exp $    */
+/*     $OpenBSD: vcctty.c,v 1.13 2018/01/17 15:52:33 stsp Exp $        */
 /*
  * Copyright (c) 2009 Mark Kettenis
  *
@@ -179,13 +179,13 @@ vcctty_tx_intr(void *arg)
        if (tx_state != lc->lc_tx_state) {
                switch (tx_state) {
                case LDC_CHANNEL_DOWN:
-                       DPRINTF(("Tx link down\n"));
+                       DPRINTF(("%s: Tx link down\n", __func__));
                        break;
                case LDC_CHANNEL_UP:
-                       DPRINTF(("Tx link up\n"));
+                       DPRINTF(("%s: Tx link up\n", __func__));
                        break;
                case LDC_CHANNEL_RESET:
-                       DPRINTF(("Tx link reset\n"));
+                       DPRINTF(("%s: Tx link reset\n", __func__));
                        break;
                }
                lc->lc_tx_state = tx_state;
@@ -214,13 +214,13 @@ vcctty_rx_intr(void *arg)
        if (rx_state != lc->lc_rx_state) {
                switch (rx_state) {
                case LDC_CHANNEL_DOWN:
-                       DPRINTF(("Rx link down\n"));
+                       DPRINTF(("%s: Rx link down\n", __func__));
                        break;
                case LDC_CHANNEL_UP:
-                       DPRINTF(("Rx link up\n"));
+                       DPRINTF(("%s: Rx link up\n", __func__));
                        break;
                case LDC_CHANNEL_RESET:
-                       DPRINTF(("Rx link reset\n"));
+                       DPRINTF(("%s: Rx link reset\n", __func__));
                        break;
                }
                lc->lc_rx_state = rx_state;
index 530f8e5..f3670e5 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: vdsk.c,v 1.48 2017/05/25 03:19:39 dlg Exp $   */
+/*     $OpenBSD: vdsk.c,v 1.49 2018/01/17 15:52:34 stsp Exp $  */
 /*
  * Copyright (c) 2009, 2011 Mark Kettenis
  *
@@ -384,13 +384,13 @@ vdsk_tx_intr(void *arg)
        if (tx_state != lc->lc_tx_state) {
                switch (tx_state) {
                case LDC_CHANNEL_DOWN:
-                       DPRINTF(("Tx link down\n"));
+                       DPRINTF(("%s: Tx link down\n", __func__));
                        break;
                case LDC_CHANNEL_UP:
-                       DPRINTF(("Tx link up\n"));
+                       DPRINTF(("%s: Tx link up\n", __func__));
                        break;
                case LDC_CHANNEL_RESET:
-                       DPRINTF(("Tx link reset\n"));
+                       DPRINTF(("%s: Tx link reset\n", __func__));
                        break;
                }
                lc->lc_tx_state = tx_state;
@@ -422,14 +422,14 @@ vdsk_rx_intr(void *arg)
                lc->lc_state = 0;
                switch (rx_state) {
                case LDC_CHANNEL_DOWN:
-                       DPRINTF(("Rx link down\n"));
+                       DPRINTF(("%s: Rx link down\n", __func__));
                        break;
                case LDC_CHANNEL_UP:
-                       DPRINTF(("Rx link up\n"));
+                       DPRINTF(("%s: Rx link up\n", __func__));
                        ldc_send_vers(lc);
                        break;
                case LDC_CHANNEL_RESET:
-                       DPRINTF(("Rx link reset\n"));
+                       DPRINTF(("%s: Rx link reset\n", __func__));
                        break;
                }
                lc->lc_rx_state = rx_state;
index fc00aba..762ab87 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: vdsp.c,v 1.42 2016/03/19 12:04:15 natano Exp $        */
+/*     $OpenBSD: vdsp.c,v 1.43 2018/01/17 15:52:34 stsp Exp $  */
 /*
  * Copyright (c) 2009, 2011, 2014 Mark Kettenis
  *
@@ -412,13 +412,13 @@ vdsp_tx_intr(void *arg)
        if (tx_state != lc->lc_tx_state) {
                switch (tx_state) {
                case LDC_CHANNEL_DOWN:
-                       DPRINTF(("Tx link down\n"));
+                       DPRINTF(("%s: Tx link down\n", __func__));
                        break;
                case LDC_CHANNEL_UP:
-                       DPRINTF(("Tx link up\n"));
+                       DPRINTF(("%s: Tx link up\n", __func__));
                        break;
                case LDC_CHANNEL_RESET:
-                       DPRINTF(("Tx link reset\n"));
+                       DPRINTF(("%s: Tx link reset\n", __func__));
                        break;
                }
                lc->lc_tx_state = tx_state;
@@ -448,16 +448,16 @@ vdsp_rx_intr(void *arg)
        if (rx_state != lc->lc_rx_state) {
                switch (rx_state) {
                case LDC_CHANNEL_DOWN:
-                       DPRINTF(("Rx link down\n"));
+                       DPRINTF(("%s: Rx link down\n", __func__));
                        lc->lc_tx_seqid = 0;
                        lc->lc_state = 0;
                        lc->lc_reset(lc);
                        break;
                case LDC_CHANNEL_UP:
-                       DPRINTF(("Rx link up\n"));
+                       DPRINTF(("%s: Rx link up\n", __func__));
                        break;
                case LDC_CHANNEL_RESET:
-                       DPRINTF(("Rx link reset\n"));
+                       DPRINTF(("%s: Rx link reset\n", __func__));
                        lc->lc_tx_seqid = 0;
                        lc->lc_state = 0;
                        lc->lc_reset(lc);
index 7d8bb3a..5aed7b2 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: vldcp.c,v 1.14 2018/01/13 15:10:02 stsp Exp $ */
+/*     $OpenBSD: vldcp.c,v 1.15 2018/01/17 15:52:34 stsp Exp $ */
 /*
  * Copyright (c) 2009, 2012 Mark Kettenis
  *
@@ -212,13 +212,13 @@ vldcp_tx_intr(void *arg)
        if (tx_state != lc->lc_tx_state) {
                switch (tx_state) {
                case LDC_CHANNEL_DOWN:
-                       DPRINTF(("Tx link down\n"));
+                       DPRINTF(("%s: Tx link down\n", __func__));
                        break;
                case LDC_CHANNEL_UP:
-                       DPRINTF(("Tx link up\n"));
+                       DPRINTF(("%s: Tx link up\n", __func__));
                        break;
                case LDC_CHANNEL_RESET:
-                       DPRINTF(("Tx link reset\n"));
+                       DPRINTF(("%s: Tx link reset\n", __func__));
                        break;
                }
                lc->lc_tx_state = tx_state;
@@ -247,7 +247,7 @@ vldcp_rx_intr(void *arg)
        if (rx_state != lc->lc_rx_state) {
                switch (rx_state) {
                case LDC_CHANNEL_DOWN:
-                       DPRINTF(("Rx link down\n"));
+                       DPRINTF(("%s: Rx link down\n", __func__));
                        if (rx_head == rx_tail)
                                break;
                        /* Discard and ack pending I/O. */
@@ -258,10 +258,10 @@ vldcp_rx_intr(void *arg)
                        printf("%s: hv_ldc_rx_set_qhead %d\n", __func__, err);
                        break;
                case LDC_CHANNEL_UP:
-                       DPRINTF(("Rx link up\n"));
+                       DPRINTF(("%s: Rx link up\n", __func__));
                        break;
                case LDC_CHANNEL_RESET:
-                       DPRINTF(("Rx link reset\n"));
+                       DPRINTF(("%s: Rx link reset\n", __func__));
                        break;
                }
                lc->lc_rx_state = rx_state;
index 0cd73a3..4d1e96b 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: vnet.c,v 1.58 2017/01/22 10:17:37 dlg Exp $   */
+/*     $OpenBSD: vnet.c,v 1.59 2018/01/17 15:52:34 stsp Exp $  */
 /*
  * Copyright (c) 2009, 2015 Mark Kettenis
  *
@@ -341,13 +341,13 @@ vnet_tx_intr(void *arg)
        if (tx_state != lc->lc_tx_state) {
                switch (tx_state) {
                case LDC_CHANNEL_DOWN:
-                       DPRINTF(("Tx link down\n"));
+                       DPRINTF(("%s: Tx link down\n", __func__));
                        break;
                case LDC_CHANNEL_UP:
-                       DPRINTF(("Tx link up\n"));
+                       DPRINTF(("%s: Tx link up\n", __func__));
                        break;
                case LDC_CHANNEL_RESET:
-                       DPRINTF(("Tx link reset\n"));
+                       DPRINTF(("%s: Tx link reset\n", __func__));
                        break;
                }
                lc->lc_tx_state = tx_state;
@@ -376,17 +376,17 @@ vnet_rx_intr(void *arg)
        if (rx_state != lc->lc_rx_state) {
                switch (rx_state) {
                case LDC_CHANNEL_DOWN:
-                       DPRINTF(("Rx link down\n"));
+                       DPRINTF(("%s: Rx link down\n", __func__));
                        lc->lc_tx_seqid = 0;
                        lc->lc_state = 0;
                        lc->lc_reset(lc);
                        break;
                case LDC_CHANNEL_UP:
-                       DPRINTF(("Rx link up\n"));
+                       DPRINTF(("%s: Rx link up\n", __func__));
                        timeout_add_msec(&sc->sc_handshake_to, 500);
                        break;
                case LDC_CHANNEL_RESET:
-                       DPRINTF(("Rx link reset\n"));
+                       DPRINTF(("%s: Rx link reset\n", __func__));
                        lc->lc_tx_seqid = 0;
                        lc->lc_state = 0;
                        lc->lc_reset(lc);