From owner-freebsd-current@freebsd.org Tue Dec 6 12:59:55 2016 Return-Path: Delivered-To: freebsd-current@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 D35D6C695D4 for ; Tue, 6 Dec 2016 12:59:55 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (mail.turbocat.net [IPv6:2a01:4f8:d16:4514::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A00DA18E7 for ; Tue, 6 Dec 2016 12:59:55 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2016.home.selasky.org (unknown [62.141.129.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id E28EC1FE158; Tue, 6 Dec 2016 13:59:52 +0100 (CET) Subject: Re: How to load kernel module automatic? To: Slawa Olhovchenkov References: <20161206114715.GP57876@zxy.spb.ru> <20161206125257.GJ99742@zxy.spb.ru> Cc: freebsd-current@freebsd.org, Warner Losh From: Hans Petter Selasky Message-ID: <556090d6-1f56-9aef-622c-ab0b502ec4e5@selasky.org> Date: Tue, 6 Dec 2016 13:59:27 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <20161206125257.GJ99742@zxy.spb.ru> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Dec 2016 12:59:55 -0000 On 12/06/16 13:52, Slawa Olhovchenkov wrote: > On Tue, Dec 06, 2016 at 12:50:40PM +0100, Hans Petter Selasky wrote: > >> On 12/06/16 12:47, Slawa Olhovchenkov wrote: >>> Now I am try to update fw in chelsio card. >>> Firmware can't be updated if card was running (interface go to UP). >>> I am try to unload if_cxgbe module, check module unloaded... and after >>> short time see module loaded again! >>> How is this possible? >> >> Hi, >> >> devd is likely re-loading the .ko for you. > > What event is? > How devd guess module name for load? Hi, Usually the kernel generates a no-driver found event, and that triggers devd to reload the driver based on its configuration scripts. Warner Losh, has done some work to integrate PCI device hints in the linker hints. I'm not sure if his work has been committed yet. Try to stop devd temporarily. --HPS