hyperv/vmbus: More verbose for GPADL_connect/chan_{rescind,offer}

Reviewed by:	Dexuan Cui <decui microsoft com>, Hongjiang Zhang <honzhan microsoft com>
MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D6976
This commit is contained in:
Sepherosa Ziehau 2016-07-12 08:21:28 +00:00
parent 7fbf073008
commit 3dee05577d
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=302632
2 changed files with 22 additions and 12 deletions

View File

@ -423,6 +423,11 @@ hv_vmbus_channel_establish_gpadl(struct hv_vmbus_channel *channel,
device_printf(sc->vmbus_dev, "gpadl->chan%u failed: " device_printf(sc->vmbus_dev, "gpadl->chan%u failed: "
"status %u\n", channel->offer_msg.child_rel_id, status); "status %u\n", channel->offer_msg.child_rel_id, status);
return EIO; return EIO;
} else {
if (bootverbose) {
device_printf(sc->vmbus_dev, "gpadl->chan%u "
"succeeded\n", channel->offer_msg.child_rel_id);
}
} }
return 0; return 0;
} }

View File

@ -142,6 +142,19 @@ vmbus_channel_process_offer(hv_vmbus_channel *new_channel)
} }
mtx_unlock(&sc->vmbus_chlist_lock); mtx_unlock(&sc->vmbus_chlist_lock);
if (bootverbose) {
char logstr[64];
logstr[0] = '\0';
if (channel != NULL) {
snprintf(logstr, sizeof(logstr), ", primary chan%u",
channel->offer_msg.child_rel_id);
}
device_printf(sc->vmbus_dev, "chan%u subchanid%u offer%s\n",
new_channel->offer_msg.child_rel_id,
new_channel->offer_msg.offer.sub_channel_index, logstr);
}
if (channel != NULL) { if (channel != NULL) {
/* /*
* Check if this is a sub channel. * Check if this is a sub channel.
@ -157,13 +170,6 @@ vmbus_channel_process_offer(hv_vmbus_channel *new_channel)
new_channel, sc_list_entry); new_channel, sc_list_entry);
mtx_unlock(&channel->sc_lock); mtx_unlock(&channel->sc_lock);
if (bootverbose) {
printf("VMBUS get multi-channel offer, "
"rel=%u, sub=%u\n",
new_channel->offer_msg.child_rel_id,
new_channel->offer_msg.offer.sub_channel_index);
}
/* /*
* Insert the new channel to the end of the global * Insert the new channel to the end of the global
* channel list. * channel list.
@ -178,11 +184,6 @@ vmbus_channel_process_offer(hv_vmbus_channel *new_channel)
ch_link); ch_link);
mtx_unlock(&sc->vmbus_chlist_lock); mtx_unlock(&sc->vmbus_chlist_lock);
if(bootverbose)
printf("VMBUS: new multi-channel offer <%p>, "
"its primary channel is <%p>.\n",
new_channel, new_channel->primary_channel);
new_channel->state = HV_CHANNEL_OPEN_STATE; new_channel->state = HV_CHANNEL_OPEN_STATE;
/* /*
@ -345,6 +346,10 @@ vmbus_channel_on_offer_rescind(struct vmbus_softc *sc,
hv_vmbus_channel* channel; hv_vmbus_channel* channel;
rescind = (const hv_vmbus_channel_rescind_offer *)msg->msg_data; rescind = (const hv_vmbus_channel_rescind_offer *)msg->msg_data;
if (bootverbose) {
device_printf(sc->vmbus_dev, "chan%u rescind\n",
rescind->child_rel_id);
}
channel = hv_vmbus_g_connection.channels[rescind->child_rel_id]; channel = hv_vmbus_g_connection.channels[rescind->child_rel_id];
if (channel == NULL) if (channel == NULL)