summaryrefslogtreecommitdiffstats
path: root/sys/dev/ntb
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/ntb')
-rw-r--r--sys/dev/ntb/if_ntb/if_ntb.c15
-rw-r--r--sys/dev/ntb/ntb_hw/ntb_hw.c6
-rw-r--r--sys/dev/ntb/ntb_hw/ntb_hw.h1
3 files changed, 21 insertions, 1 deletions
diff --git a/sys/dev/ntb/if_ntb/if_ntb.c b/sys/dev/ntb/if_ntb/if_ntb.c
index 55b19c5..58a72dc 100644
--- a/sys/dev/ntb/if_ntb/if_ntb.c
+++ b/sys/dev/ntb/if_ntb/if_ntb.c
@@ -475,8 +475,11 @@ ntb_transport_init(struct ntb_softc *ntb)
if (rc != 0)
goto err;
- if (ntb_query_link_status(ntb))
+ if (ntb_query_link_status(ntb)) {
+ if (bootverbose)
+ device_printf(ntb_get_device(ntb), "link up\n");
callout_reset(&nt->link_work, 0, ntb_transport_link_work, nt);
+ }
return (0);
@@ -673,6 +676,8 @@ ntb_transport_link_up(struct ntb_transport_qp *qp)
return;
qp->client_ready = NTB_LINK_UP;
+ if (bootverbose)
+ device_printf(ntb_get_device(qp->ntb), "qp client ready\n");
if (qp->transport->transport_link == NTB_LINK_UP)
callout_reset(&qp->link_work, 0, ntb_qp_link_work, qp);
@@ -988,9 +993,13 @@ ntb_transport_event_callback(void *data, enum ntb_hw_event event)
switch (event) {
case NTB_EVENT_HW_LINK_UP:
+ if (bootverbose)
+ device_printf(ntb_get_device(nt->ntb), "HW link up\n");
callout_reset(&nt->link_work, 0, ntb_transport_link_work, nt);
break;
case NTB_EVENT_HW_LINK_DOWN:
+ if (bootverbose)
+ device_printf(ntb_get_device(nt->ntb), "HW link down\n");
ntb_transport_link_cleanup(nt);
break;
default:
@@ -1071,6 +1080,8 @@ ntb_transport_link_work(void *arg)
return;
nt->transport_link = NTB_LINK_UP;
+ if (bootverbose)
+ device_printf(ntb_get_device(ntb), "transport link up\n");
for (i = 0; i < nt->max_qps; i++) {
qp = &nt->qps[i];
@@ -1176,6 +1187,8 @@ ntb_qp_link_work(void *arg)
qp->qp_link = NTB_LINK_UP;
if (qp->event_handler != NULL)
qp->event_handler(qp->cb_data, NTB_LINK_UP);
+ if (bootverbose)
+ device_printf(ntb_get_device(ntb), "qp link up\n");
} else if (nt->transport_link == NTB_LINK_UP) {
callout_reset(&qp->link_work,
NTB_LINK_DOWN_TIMEOUT * hz / 1000, ntb_qp_link_work, qp);
diff --git a/sys/dev/ntb/ntb_hw/ntb_hw.c b/sys/dev/ntb/ntb_hw/ntb_hw.c
index 72314dd..2f1d65d 100644
--- a/sys/dev/ntb/ntb_hw/ntb_hw.c
+++ b/sys/dev/ntb/ntb_hw/ntb_hw.c
@@ -1286,3 +1286,9 @@ is_bar_for_data_transfer(int bar_num)
else
return false;
}
+
+device_t ntb_get_device(struct ntb_softc *ntb)
+{
+
+ return (ntb->device);
+}
diff --git a/sys/dev/ntb/ntb_hw/ntb_hw.h b/sys/dev/ntb/ntb_hw/ntb_hw.h
index 4f44031..c6c1274 100644
--- a/sys/dev/ntb/ntb_hw/ntb_hw.h
+++ b/sys/dev/ntb/ntb_hw/ntb_hw.h
@@ -69,5 +69,6 @@ u_long ntb_get_mw_size(struct ntb_softc *ntb, unsigned int mw);
void ntb_set_mw_addr(struct ntb_softc *ntb, unsigned int mw, uint64_t addr);
void ntb_ring_sdb(struct ntb_softc *ntb, unsigned int db);
bool ntb_query_link_status(struct ntb_softc *ntb);
+device_t ntb_get_device(struct ntb_softc *ntb);
#endif /* _NTB_HW_H_ */
OpenPOWER on IntegriCloud