svn commit: r304728 - head/sys/dev/hyperv/netvsc
Sepherosa Ziehau
sephe at FreeBSD.org
Wed Aug 24 04:21:17 UTC 2016
Author: sephe
Date: Wed Aug 24 04:21:15 2016
New Revision: 304728
URL: https://svnweb.freebsd.org/changeset/base/304728
Log:
hyperv/hn: Log a warning for RESET_CMPLT.
RESET is not used by the hn(4) at all, and RESET_CMPLT does not even
have a rid to match with the pending requests. So, let's put it
onto an independent switch branch and log a warning about it.
MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D7602
Modified:
head/sys/dev/hyperv/netvsc/hv_rndis_filter.c
Modified: head/sys/dev/hyperv/netvsc/hv_rndis_filter.c
==============================================================================
--- head/sys/dev/hyperv/netvsc/hv_rndis_filter.c Wed Aug 24 03:51:40 2016 (r304727)
+++ head/sys/dev/hyperv/netvsc/hv_rndis_filter.c Wed Aug 24 04:21:15 2016 (r304728)
@@ -324,16 +324,9 @@ hv_rf_receive_response(rndis_device *dev
memcpy(&request->response_msg, response,
response->msg_len);
} else {
- if (response->ndis_msg_type == REMOTE_NDIS_RESET_CMPLT) {
- /* Does not have a request id field */
- request->response_msg.msg.reset_complete.status =
- STATUS_BUFFER_OVERFLOW;
- } else {
- request->response_msg.msg.init_complete.status =
- STATUS_BUFFER_OVERFLOW;
- }
+ request->response_msg.msg.init_complete.status =
+ STATUS_BUFFER_OVERFLOW;
}
-
sema_post(&request->wait_sema);
}
}
@@ -566,29 +559,40 @@ hv_rf_on_receive(struct hn_softc *sc, st
rndis_hdr = data;
switch (rndis_hdr->ndis_msg_type) {
-
/* data message */
case REMOTE_NDIS_PACKET_MSG:
hv_rf_receive_data(rxr, data, dlen);
break;
+
/* completion messages */
case REMOTE_NDIS_INITIALIZE_CMPLT:
case REMOTE_NDIS_QUERY_CMPLT:
case REMOTE_NDIS_SET_CMPLT:
- case REMOTE_NDIS_RESET_CMPLT:
case REMOTE_NDIS_KEEPALIVE_CMPLT:
hv_rf_receive_response(rndis_dev, rndis_hdr);
break;
+
/* notification message */
case REMOTE_NDIS_INDICATE_STATUS_MSG:
hv_rf_receive_indicate_status(rndis_dev, rndis_hdr);
break;
+
+ case REMOTE_NDIS_RESET_CMPLT:
+ /*
+ * Reset completed, no rid.
+ *
+ * NOTE:
+ * RESET is not issued by hn(4), so this message should
+ * _not_ be observed.
+ */
+ if_printf(sc->hn_ifp, "RESET CMPLT received\n");
+ break;
+
default:
- printf("hv_rf_on_receive(): Unknown msg_type 0x%x\n",
+ if_printf(sc->hn_ifp, "unknown RNDIS message 0x%x\n",
rndis_hdr->ndis_msg_type);
break;
}
-
return (0);
}
More information about the svn-src-head
mailing list