<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Aug 21, 2017 at 10:56 PM, Aleksander Morgado <span dir="ltr"><<a href="mailto:aleksander@aleksander.es" target="_blank">aleksander@aleksander.es</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">>> > > > But now I wonder, maybe we could just remove the whole block? Is<br>
>> > > > there<br>
>> > > > any case nowadays were we don't get port event removals? If this<br>
>> > > > was a<br>
>> > > > hack for a bug in kernel 2.6.31, maybe we could consider it<br>
>> > > > already<br>
>> > > > obsoleted?<br>
>> > ><br>
>> > ><br>
>> > ><br>
>> > > Yeah, this comes from an old commit<br>
>> > > 53af144f49b0d81bd4dc1f5ee9eea6<wbr>d61ccae992<br>
>> > > (udev: handle removal of parent usb devices) dated back to 2009,<br>
>> > > which seems<br>
>> > > to imply that the kernel doesn't remove the tty when the usb device<br>
>> > > is<br>
>> > > removed. I guess it's probably not hard to reproduce the steps, but<br>
>> > > I'm not<br>
>> > > sure if the original fix was related to a particular kernel version<br>
>> > > or a<br>
>> > > particular devices or a combination of both.<br>
>> > ><br>
>> ><br>
>> > Dan, what do you think?<br>
>> ><br>
>> > From my POV, I would nuke that device removal logic right away now...<br>
>><br>
>> I'll have to think about that one, but I'm on vacation all this coming<br>
>> week so I might not have a reply soon. IIRC it may have been related<br>
>> to before the tty subsystem was fully sysfs/kevent ported. I think we<br>
>> could be reasonably sure about it if we test a bunch of old modems with<br>
>> the block removed.<br>
><br>
><br>
> Aleksander, in the meantime, should I submit a patch to guard this block of<br>
> code with a check DEVTYPE==usb_device? That would at least address the issue<br>
> I observed on my Huawei modem. WDYT?<br>
><br>
<br>
</div></div>Yes, this is something we can do, and would also be a safe update for<br>
stable branches.<br></blockquote><div><br></div><div>sgtm, let me know if the previously attached patch looks reasonable to you. I'm not sure if we need to do anything if udev is disabled. </div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Aleksander<br>
<a href="https://aleksander.es" rel="noreferrer" target="_blank">https://aleksander.es</a><br>
</font></span></blockquote></div><br></div></div>