Thread (13 messages) 13 messages, 3 authors, 2021-04-08

Re: [PATCH 3/4] USB: serial: add support for multi-interface functions

From: Oliver Neukum <oneukum@suse.com>
Date: 2021-03-31 07:09:03
Also in: lkml

Am Dienstag, den 30.03.2021, 17:22 +0200 schrieb Johan Hovold:
On Tue, Mar 30, 2021 at 04:44:32PM +0200, Oliver Neukum wrote:
quoted
Am Dienstag, den 30.03.2021, 16:38 +0200 schrieb Johan Hovold:
quoted
@@ -1115,6 +1161,8 @@ static void usb_serial_disconnect(struct usb_interface *interface)
        if (serial->type->disconnect)
                serial->type->disconnect(serial);
 
+       release_sibling(serial, interface);
+
        /* let the last holder of this object cause it to be cleaned up */
        usb_serial_put(serial);
        dev_info(dev, "device disconnected\n");
Hi,

does this assume you are called for the original interface first?
No, I handle either interface being unbound first (e.g. see
release_sibling()).
quoted
I am afraid that is an assumption you cannot make. In fact, if somebody
is doing odd things with sysfs you cannot even assume both will see a
disconnect()
Right, but disconnect() will still be called also for the sibling
interface as part of release_sibling() above.
OK, sorry I overlooked that.

	Regards
		Oliver

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help