From owner-freebsd-hackers@freebsd.org Wed Mar 30 15:00:45 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B5246AE295D for ; Wed, 30 Mar 2016 15:00:45 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-io0-x236.google.com (mail-io0-x236.google.com [IPv6:2607:f8b0:4001:c06::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 75A6C1442 for ; Wed, 30 Mar 2016 15:00:45 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mail-io0-x236.google.com with SMTP id a129so68878098ioe.0 for ; Wed, 30 Mar 2016 08:00:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-transfer-encoding; bh=e8c8hLsBrm3j106Rw48FcZES7iqL8kfLUR1VJwWu0HI=; b=gEWn4j+YfSpYMcMuidwH77B8Qz3ctdGjCBig3+qawqDjEo7/pfZ+ktCKeG0e4rm/LC gxKZTyDRxxOqU6PP6JBaU4bwXp78rlflDlOaTCp9u+PF9sf4/ihw+nxWGxaRDWpwwDLN Wp1VvW8R/9gsNqlGtFncikBM/XR/szYRrCF0Dp2PdSYr1T3OQ2Is8uqi4nDppaVU3bET MRnv122RdwFqZ3F2d1R4Qag0UoHa8mQ9Pd+jV4plCzGWaz08zki2eL61FqZ0TKUhITqN nu4tDrV3jWId6oG2uc/dZsnsQOnkVi8qHX9vPq7uD3Bqts9SFyUl6neLKzy//I0YjN2J 703w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-transfer-encoding; bh=e8c8hLsBrm3j106Rw48FcZES7iqL8kfLUR1VJwWu0HI=; b=i0P9i7Dpp5ZN9n6XAlwUhy7pa5J8Rvd22Y9HsVB1KsUCjQokhluz8zMwzJe8NPQflr SII7TuiRsWAbl87qBRNhoNvglldDv1jgZ/iQawAkLeCgB5eh63MTqBMR9hHgXpkZFy2Q 8boSpo5X6cWWnskOAc0qHWtXkBJYOsrPXkx5lGpNdWvn8n4L9xinx5MtwGTXpMuYWrwJ lLPzvsaoER9ErKU13iv4a37lnyXIKbfJ4W9ZvT+uEk0WAjCBPqv9fzRml+k4ZHFU7jWn Obcb76wQYmqg314/qei/orwijOZfyrtb7NkDcGiSxkbqg6ypns8c2ZbxGyDhmIPSiAOT fa8Q== X-Gm-Message-State: AD7BkJK1cnb0N4o8z7ZoTICbc4gNnGOKHL4dTiCe/9FuYNqgOQLIqbvqLBUSAbrTQ3LCsh3Zq8703mXsvnICTQ== MIME-Version: 1.0 X-Received: by 10.107.11.162 with SMTP id 34mr9611122iol.165.1459350043417; Wed, 30 Mar 2016 08:00:43 -0700 (PDT) Received: by 10.36.14.19 with HTTP; Wed, 30 Mar 2016 08:00:43 -0700 (PDT) In-Reply-To: <56FBBC62.6040905@selasky.org> References: <20160330123048.3361a9e4@fujitsu> <56FBBC62.6040905@selasky.org> Date: Wed, 30 Mar 2016 08:00:43 -0700 Message-ID: Subject: Re: I need a little help in fixing `exclusive sleep mutex urtwn0_com_lock` in CURRENT From: Adrian Chadd To: Hans Petter Selasky Cc: Andriy Voskoboinyk , "freebsd-hackers@freebsd.org" , Aleksander Alekseev Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Mailman-Approved-At: Wed, 30 Mar 2016 16:41:58 +0000 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Mar 2016 15:00:45 -0000 We really need some kind of device refcounting for things that be hotplugged (ie, most things these days) so we don't end up freeing driver state before all the driver / stack entry points are done. For net80211 drivers, they need to (a) not finish detach until all entry points are done, and (b) this includes ioctls and net80211 entry points, as net80211 may be doing something with the ic (eg an ioctl, etc) that hasn't yet finished. So yeah, it's not /just/ draining taskqueues, it's actually "we need an actual device lifecycle management thing". -adrian On 30 March 2016 at 04:45, Hans Petter Selasky wrote: > On 03/30/16 13:30, Andriy Voskoboinyk wrote: >> >> Wed, 30 Mar 2016 12:30:48 +0300 =D0=B1=D1=83=D0=BB=D0=BE =D0=BD=D0=B0=D0= =BF=D0=B8=D1=81=D0=B0=D0=BD=D0=BE Aleksander Alekseev >> : >> >>> and then pull Wi-Fi adapter out of USB >> >> >> Here (it's not the only driver which does detach incorrectly). > > > Is this something which you can fix? > > --HPS > > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org= "