Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp3020651imm; Sun, 29 Jul 2018 08:32:11 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfUu1V1o0FGsf5QdjqrIy8LOBgxW9T3GzEeBVLE7ZvQTPpCPae2hbuWVFjf1Df8z565algX X-Received: by 2002:a63:6501:: with SMTP id z1-v6mr13294875pgb.419.1532878331808; Sun, 29 Jul 2018 08:32:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532878331; cv=none; d=google.com; s=arc-20160816; b=Ii6JHS7Ar1QxCzub7qzYN3roVqLbD8V4bnVOwQIwq+K1mhxpAfkP480FUW3itDuj4o eZfY9Ineb8cL1acIbKZkGb7OH1A3hSumOmb6+Hd7IotsMXUiad1tFEnHoGKtq5cjqBnk 2JnxIxeHM5A0s238v9EwDgF2zgMSqDBXCtL2SaNZikmcGNgwbiFRodj92DZc53geV7yq yzzaDH08RdkKFVbZ+6tn5eZD1c6+bjoBLzK7BAXCatF46ZVaNBNFcfiXkl+n1w/DlGqg wbSr4HlBTue5/aJf67CQ0mmrz0UmuTUlO5xQCKKq3DA4C0BDLPQ08lbBQmU/FhepxwTW vCAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:from:subject:cc:to:message-id:date :arc-authentication-results; bh=z0efVcZwTqENDCtK8ECXxbY6oxIOwMYmIK0VwYmQ4i4=; b=hXl/MaGveI7F6I6NQjMm7c1Ih8vt2LQkTS/OXrCQReX4DcEYxiTNkuCnfjMm2AVpbZ 6f4yVURPTTtx/zFy06am/SjtemvraZEmEAEH839kSWKoqDen8+lFol8DB9X7s3L7L3kw wGqMC5Eb79KkXEbx3qrAh+9dfX5oq0hZJreZ9nBNxt2EP1nIfkOb68sxM6InqiMBQuHe iMe5TFa5yfLUKRPtrKBg4uZou6pSI170PRacDtoFeF3ZmjyBa+LknhUushPD4QW42qev xi6PyNoKme+2UPbuaHFCg/iN+OOh9e+NaSjO6NRbfSe0mRNfMmlktTsBxjPl5VeVd1Wz N+DA== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 199-v6si9299389pfv.114.2018.07.29.08.31.57; Sun, 29 Jul 2018 08:32:11 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726751AbeG2RBd (ORCPT + 99 others); Sun, 29 Jul 2018 13:01:33 -0400 Received: from shards.monkeyblade.net ([23.128.96.9]:40734 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726355AbeG2RBd (ORCPT ); Sun, 29 Jul 2018 13:01:33 -0400 Received: from localhost (c-24-20-22-31.hsd1.or.comcast.net [24.20.22.31]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id 3625913CEE04F; Sun, 29 Jul 2018 08:30:44 -0700 (PDT) Date: Sun, 29 Jul 2018 08:30:40 -0700 (PDT) Message-Id: <20180729.083040.53901922165497594.davem@davemloft.net> To: xiliang@redhat.com Cc: netdev@vger.kernel.org, xen-devel@lists.xenproject.org, jgross@suse.com, boris.ostrovsky@oracle.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH] xen-netfront: wait xenbus state change when load module manually From: David Miller In-Reply-To: <20180727095608.25210-1-xiliang@redhat.com> References: <20180727095608.25210-1-xiliang@redhat.com> X-Mailer: Mew version 6.7 on Emacs 26 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Sun, 29 Jul 2018 08:30:44 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? Thank you.