On Wed, Dec 08, 2021 at 02:43:04PM +0100, Gerhard Roth wrote:
> Well, the RNDIS device doesn't respond to REMOTE_NDIS_KEEPALIVE_MSG
> messages anymore, but now you hope that it'll still process the
> REMOTE_NDIS_RESET_MSG we are sending? Sounds like wishful thinking.
> I'd say a usbd_reset_port() might be more effective.
> BTW: I was wrong about the 5 seconds. In fact its 10 seconds since the
> same timeout applies to the reset message.
>
I think if the device don't ack the keepalive message the driver will
just output an error to the log and return, there should be no second 5
sec timeout:
748 rval = urndis_ctrl_send(sc, keep, sizeof(*keep));
749 free(keep, M_TEMP, sizeof *keep);
750
751 if (rval != RNDIS_STATUS_SUCCESS) {
752 printf("%s: keepalive failed\n", DEVNAME(sc));
753 return rval;
754 }
755
756 if ((hdr = urndis_ctrl_recv(sc)) == NULL) {
757 printf("%s: unable to get keepalive response\n",
DEVNAME(sc));
758 return RNDIS_STATUS_FAILURE;
759 }
I don't want to fight for this diff, if you think that it's too naive to
expect proper reset from unresponsive device - that's fine, I'm ready to
drop the diff, but who knows how those devices are engineered and trade
of of not being able to run other watchdogs comparing to possible
network recovery does look reasonable to me.