Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp185916pxf; Wed, 31 Mar 2021 00:13:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyP7oDzIS0VR4f3oDFSzz4HzntIa/KvAfF6aRhS/cs/83HHVLQwa+2nkf6Y2J90EKHlwiQ4 X-Received: by 2002:aa7:dd05:: with SMTP id i5mr1937295edv.300.1617174786081; Wed, 31 Mar 2021 00:13:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617174786; cv=none; d=google.com; s=arc-20160816; b=LwtOl7WlLizaTdO7+YYhWTWmELCaoyXHsHdoNSTPcRB7i5XY2dY85KA0J2OWC/FmRH yeV8Su3Wsxd1PohxOh9BKReYQCCIJUKCWeoqxo4ovGkyfyy8iggeeNUw1BlZr0yaETkF NFAY91r3Ea25nwcg7n+i0Oqabb9fdtqR04nf7xs102SXafa81fujP7Ji0ALSzQJyzjBt BZvEevFa9iUVe0ATpmohTEhl64YUR6tFR3pNSHnGyC44CGsucOimMp7OuW/hGejgEebg 08OgAzhqRhcWTbkiTdOzoycvZlnyDZREt4umV6DA8rtI4vGMi/L0FdcLS+DCzX4d7gj+ D0dg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id:dkim-signature; bh=a1hXApR+/n3Tm8UPNKP9JBk/yexpBOlO3b/93PdVzrQ=; b=GQT8E/MlCF9BkYQdV2uDuCMBGtf6YMO8Y1oxx05yMJRkUoKu0mQX63/PXQ301C2F9H 9bZF9kWRqYMaw2ecsTIS7SuZcABiSJdFRjg+dx3VPoQ71vfYdneJxMt+B/Ct952DaxMW Vcvy5V1hiaQtIaf4jboVn5xWkH0f3Bh6iNjFUvYi8h7bauL96uHe6NuPKNKWrhgupVp8 RdGleX0zZ/08LE9DZC2g2f1/oxIb64OCAcgsQQtzDAkNoJCO1PWlMMnQ/uVI9RXJP/cU CBR+NWGFqQ8S87fcFDjUKVeifYISKgo6auc3qZEHM4srWP6jfaRDjqlJnpkTErbfBgbb 9vQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=i+P4oz+I; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y8si1145991edw.487.2021.03.31.00.12.41; Wed, 31 Mar 2021 00:13:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=i+P4oz+I; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233941AbhCaHIc (ORCPT + 99 others); Wed, 31 Mar 2021 03:08:32 -0400 Received: from mx2.suse.de ([195.135.220.15]:59092 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233940AbhCaHIU (ORCPT ); Wed, 31 Mar 2021 03:08:20 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1617174499; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=a1hXApR+/n3Tm8UPNKP9JBk/yexpBOlO3b/93PdVzrQ=; b=i+P4oz+Ia5QucybiB2GYs8tsmxkTSxDmmsms11xvTktT+qr8dzRE4MIXQv3uD5cTY2iy3X qAMS3iIbY34387FOEX6LyzKNvtlF5PY6UWU/BQO8mbEZcgvGDbpQz4V2L2XJzeOEOZhbpE JirNZbJLQGt/DXIgkx9XMGTmY0NNML0= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 50EACAD80; Wed, 31 Mar 2021 07:08:19 +0000 (UTC) Message-ID: Subject: Re: [PATCH 3/4] USB: serial: add support for multi-interface functions From: Oliver Neukum To: Johan Hovold Cc: Mauro Carvalho Chehab , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Date: Wed, 31 Mar 2021 09:08:07 +0200 In-Reply-To: References: <20210330143820.9103-1-johan@kernel.org> <20210330143820.9103-4-johan@kernel.org> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.4 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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: > > Am Dienstag, den 30.03.2021, 16:38 +0200 schrieb Johan Hovold: > > > @@ -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()). > > > 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