From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.7 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 11AE0C48BD8 for ; Wed, 26 Jun 2019 12:13:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EA4B620663 for ; Wed, 26 Jun 2019 12:13:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727377AbfFZMN2 (ORCPT ); Wed, 26 Jun 2019 08:13:28 -0400 Received: from mga04.intel.com ([192.55.52.120]:56455 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726104AbfFZMN2 (ORCPT ); Wed, 26 Jun 2019 08:13:28 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Jun 2019 05:13:27 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,419,1557212400"; d="scan'208";a="170048816" Received: from pipin.fi.intel.com (HELO pipin) ([10.237.72.175]) by FMSMGA003.fm.intel.com with ESMTP; 26 Jun 2019 05:13:26 -0700 From: Felipe Balbi To: Kai Ruhnau , "linux-usb\@vger.kernel.org" Subject: Re: No carrier lost information with gadget RNDIS/ECM In-Reply-To: References: Date: Wed, 26 Jun 2019 15:13:26 +0300 Message-ID: <87o92kk0ih.fsf@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Hi, Kai Ruhnau writes: > On my i.MX6 SoloX, I have configured one of the OTG ports for a > combined RNDIS/ECM gadget. After boot, I have two network interfaces > (usb0 and usb1) which are managed by systemd-networkd. > > With kernel 4.9.153, systemd-networkd reports an immediate carrier > loss when I pull the USB cable from a Windows or macOS host. With > 4.19.53 or 5.1.15 that carrier loss is only reported when I re-attach > the cable, meaning there is a "Lost carrier" for the last used > interface immediately followed by a "Gained carrier" for the newly > connected interface. First of all, thanks for actually testing the most recent stable kernels. Much appreciated :-) > I have activated CONFIG_USB_GADGET_DEBUG_FILES, and the contents of > /proc/driver/rndis-000 don't change when I pull the cable: > > Config Nr. 0 > used : y > state : RNDIS_DATA_INITIALIZED > medium : 0x00000000 > speed : 425984000 > cable : connected > vendor ID : 0x00000000 > vendor : (null) > > Only when changing the host to a Mac, it's different: > Config Nr. 0 > used : y > state : RNDIS_UNINITIALIZED > medium : 0x00000000 > speed : 425984000 > cable : connected > vendor ID : 0x00000000 > vendor : (null) > > Thanks for any help. Which peripheral controller is this board using? Is it chipidea? dwc2? dwc3? High Speed or Super Speed? -- balbi