<div dir="ltr"><div>Hi Bjørn,</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Sep 13, 2020 at 10:56 AM Bjørn Mork <<a href="mailto:bjorn@mork.no">bjorn@mork.no</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Aleksander Morgado <<a href="mailto:aleksander@aleksander.es" target="_blank">aleksander@aleksander.es</a>> writes:<br>
<br>
> This is something that could obviously be fixed in the side of the<br>
> device, but it is also something we can avoid in the host side, by<br>
> making sure all MBIM sessions between host and device are brought down<br>
> on suspend, and brought up again automatically on resume.<br>
<br>
Won't that disconnect all IP sessions as a side effect? I can imagine<br>
use cases where that's unwanted.<br></blockquote><div><br></div><div>This patch is for host suspended, which drops the USB VBUS line (ie: disconnects). At least I have not seen any application/controller that keeps the line up.</div><div>And when it is re-connected on resume, then the device is re-enumerated and all PDNs are inevitably lost.</div><div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">IMHO, the host should (and do) suspend the USB bus, but not touch any<br>
higher level stuff unless explicitly configured to do so. This will<br>
allow a powered modem to maintain active connections, so that the host<br>
can resume them when it wakes up.<br></blockquote><div><br></div><div>It doesn't work if VBUS goes down (USB suspend/resume transit on VBUS, not on the data lines). And it does. </div><div>This strategy would work seamlessly on plain RS232/422 lines, thou. But in that case no MBIM.</div><div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Killing connections on suspend and reconnecting on resume is sub-optimal<br>
behaviour. It breaks all established tcp sessions unless you have a<br>
static address. Completely unnecessary.<br></blockquote><div><br></div><div>From a device point of view, the application asks for notifications, and then doesn't read them.</div><div>It is forced to buffer them, and the buffer is limited.</div><div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I hate all sort of "bring down networking" on suspend. It just makes<br>
suspend pointless. You might as well power off then.<br></blockquote><div><br></div><div>Power off has a much higher cost in terms of reboot of the host and the device.<br></div><div>Re-establishing the PDNs is fast if the modem is already registered.</div><div><br></div><div>It is inconvenient for the high-level, for sure, but some applications stay suspended for days. It also costs resources on the remote side to keep unused TCP connection structures in memory.</div><div><br></div><div>Regards,</div><div>Giacinto</div><div> </div></div></div>