Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp3683201imm; Mon, 30 Jul 2018 01:19:25 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfay2zsbSv6SVizWy2yhMnXCWMo/XYiP0KnbS56c/o7MHBd7QKsVsovuSNgw7L8WjKSGQKw X-Received: by 2002:a17:902:4a0c:: with SMTP id w12-v6mr15639364pld.289.1532938765520; Mon, 30 Jul 2018 01:19:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532938765; cv=none; d=google.com; s=arc-20160816; b=gRjDjQDYXVYi808TTvRTYw1WlWKaKWNFz3ywBuprcJtWGcp2xZE6aoZqPhgaYN+Sdg lcwPo9miGAYNVC8WZ0K3cbUPX6ur0R2YuJgezf4/mBVaUowmGKtWrVxZJjlKFQ5lbzrZ hA2sZrD56ONtVL3yzWYa/1klxsOQyMK/Z4+p4UOmh43lrYKXylRA5vfuG47ZkmkXW4Gv k6kf3subCXunD52gft0faNSumCm9RXf8fpO+mxeSctidc+V+2gGfUTAr5PQWluzn3EBw qU3sB2OWobZzk8x2MuYGJnkrrEsU0RpVD249uq+ISiVblOwCx9qeG9eeCWJEvtuMc6PP gVtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=KTgd/bdZ2GlawmA8tzVbCsgw4hnVye8+o0LlBFxTCXc=; b=XIi6bfg4hmNfl4O9E10hZ0Edk2XSBzqxj9s4C8/DNAQyLid8ITzGk8uhd8CRVwAMe2 blPuJcov0HApVIyf2ASWX3H1kT4zYphwcd0hHC2PEZnrtOaMv6VxtFMk74hVLUwZBghn H6wFOtOmUlHUbTUWa0OplfgpmukcdVRtBGiMirqg1YwGpvAzB3IE25xRhX9aNZm89+HY FSY4Jj+mn1fxlPz0pnSjC7tYWNp72m00TYeNUAWPHshzSQ47lRwpERChHvt7CjjPxXh8 qLmQEfcnYG8t+CXZKrn+9w4MgbKH6qSeA1sz+jk7vf2goly9nbwKY1OkGKwNjMn9YIdm S7Wg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j184-v6si10399964pge.607.2018.07.30.01.19.11; Mon, 30 Jul 2018 01:19:25 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726632AbeG3JwG (ORCPT + 99 others); Mon, 30 Jul 2018 05:52:06 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:43848 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726476AbeG3JwF (ORCPT ); Mon, 30 Jul 2018 05:52:05 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7343B40216FC; Mon, 30 Jul 2018 08:18:15 +0000 (UTC) Received: from dhcp-2-242.nay.redhat.com (dhcp-2-242.nay.redhat.com [10.66.2.242]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 09A12112D175; Mon, 30 Jul 2018 08:18:12 +0000 (UTC) Subject: Re: [Xen-devel] [PATCH] xen-netfront: wait xenbus state change when load module manually To: David Miller Cc: jgross@suse.com, netdev@vger.kernel.org, boris.ostrovsky@oracle.com, linux-kernel@vger.kernel.org, xen-devel@lists.xenproject.org References: <20180727095608.25210-1-xiliang@redhat.com> <20180729.083040.53901922165497594.davem@davemloft.net> From: Xiao Liang Message-ID: <60e93e09-7dc2-d2f6-379d-c1d086aa1f49@redhat.com> Date: Mon, 30 Jul 2018 16:18:10 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20180729.083040.53901922165497594.davem@davemloft.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Mon, 30 Jul 2018 08:18:15 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Mon, 30 Jul 2018 08:18:15 +0000 (UTC) for IP:'10.11.54.3' DOMAIN:'int-mx03.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'xiliang@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Thanks, David On 07/29/2018 11:30 PM, David Miller wrote: > From: Xiao Liang > Date: Fri, 27 Jul 2018 17:56:08 +0800 > >> @@ -1330,6 +1331,11 @@ static struct net_device *xennet_create_dev(struct xenbus_device *dev) >> netif_carrier_off(netdev); >> >> xenbus_switch_state(dev, XenbusStateInitialising); >> + wait_event(module_load_q, >> + xenbus_read_driver_state(dev->otherend) != >> + XenbusStateClosed && >> + xenbus_read_driver_state(dev->otherend) != >> + XenbusStateUnknown); >> return netdev; >> >> exit: > What performs the wakeups that will trigger for this sleep site? In my understanding, backend leaving closed/unknow state can trigger the wakeups. I mean to make sure both sides are ready for creating connection. Thanks, Liang > > Thank you. > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xenproject.org > https://lists.xenproject.org/mailman/listinfo/xen-devel