Re: How to load kernel module automatic?

2016-12-06 Thread Slawa Olhovchenkov
On Tue, Dec 06, 2016 at 06:53:03AM -0800, Navdeep Parhar wrote:

> On Tue, Dec 06, 2016 at 05:43:38PM +0300, Slawa Olhovchenkov wrote:
> > On Tue, Dec 06, 2016 at 06:41:14AM -0800, Navdeep Parhar wrote:
> > 
> > > On Tue, Dec 06, 2016 at 05:34:56PM +0300, Slawa Olhovchenkov wrote:
> > > > On Tue, Dec 06, 2016 at 06:25:44AM -0800, Navdeep Parhar wrote:
> > > > 
> > > > > On Tue, Dec 06, 2016 at 02:47:15PM +0300, 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?
> > > > > 
> > > > > Something is running "ifconfig cxgbe|cxl|cc" on your system.  ifconfig
> > > > > can figure out the name of the module from the name of the ifnet and
> > > > > will kldload it if it isn't in the kernel already.
> > > > 
> > > > What is 'something'?
> > > 
> > > A script that's running via devd or some other mechanism.
> > 
> > Its not clear to me what exact event cause devd start such script.
> 
> Doesn't have to be devd.  Could be any automated script running
> ifconfig.  Leave this running and see if ifconfig is ever called with

No any automated scripts.

> (cxgbe|cxl|cc) as parameter.  If it is then that's what's loading
> cxgbe(4) automatically.
> 
> dtrace -n 'proc:::exec-success /execname == "ifconfig"/ 
> {trace(curpsinfo->pr_psargs);}

ok, i am do it tomorrow.
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: How to load kernel module automatic?

2016-12-06 Thread Navdeep Parhar
On Tue, Dec 06, 2016 at 05:43:38PM +0300, Slawa Olhovchenkov wrote:
> On Tue, Dec 06, 2016 at 06:41:14AM -0800, Navdeep Parhar wrote:
> 
> > On Tue, Dec 06, 2016 at 05:34:56PM +0300, Slawa Olhovchenkov wrote:
> > > On Tue, Dec 06, 2016 at 06:25:44AM -0800, Navdeep Parhar wrote:
> > > 
> > > > On Tue, Dec 06, 2016 at 02:47:15PM +0300, 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?
> > > > 
> > > > Something is running "ifconfig cxgbe|cxl|cc" on your system.  ifconfig
> > > > can figure out the name of the module from the name of the ifnet and
> > > > will kldload it if it isn't in the kernel already.
> > > 
> > > What is 'something'?
> > 
> > A script that's running via devd or some other mechanism.
> 
> Its not clear to me what exact event cause devd start such script.

Doesn't have to be devd.  Could be any automated script running
ifconfig.  Leave this running and see if ifconfig is ever called with
(cxgbe|cxl|cc) as parameter.  If it is then that's what's loading
cxgbe(4) automatically.

dtrace -n 'proc:::exec-success /execname == "ifconfig"/ 
{trace(curpsinfo->pr_psargs);}

Regards,
Navdeep
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: How to load kernel module automatic?

2016-12-06 Thread Slawa Olhovchenkov
On Tue, Dec 06, 2016 at 06:41:14AM -0800, Navdeep Parhar wrote:

> On Tue, Dec 06, 2016 at 05:34:56PM +0300, Slawa Olhovchenkov wrote:
> > On Tue, Dec 06, 2016 at 06:25:44AM -0800, Navdeep Parhar wrote:
> > 
> > > On Tue, Dec 06, 2016 at 02:47:15PM +0300, 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?
> > > 
> > > Something is running "ifconfig cxgbe|cxl|cc" on your system.  ifconfig
> > > can figure out the name of the module from the name of the ifnet and
> > > will kldload it if it isn't in the kernel already.
> > 
> > What is 'something'?
> 
> A script that's running via devd or some other mechanism.

Its not clear to me what exact event cause devd start such script.
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: How to load kernel module automatic?

2016-12-06 Thread Navdeep Parhar
On Tue, Dec 06, 2016 at 05:34:56PM +0300, Slawa Olhovchenkov wrote:
> On Tue, Dec 06, 2016 at 06:25:44AM -0800, Navdeep Parhar wrote:
> 
> > On Tue, Dec 06, 2016 at 02:47:15PM +0300, 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?
> > 
> > Something is running "ifconfig cxgbe|cxl|cc" on your system.  ifconfig
> > can figure out the name of the module from the name of the ifnet and
> > will kldload it if it isn't in the kernel already.
> 
> What is 'something'?

A script that's running via devd or some other mechanism.

Regards,
Navdeep
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: How to load kernel module automatic?

2016-12-06 Thread Slawa Olhovchenkov
On Tue, Dec 06, 2016 at 06:25:44AM -0800, Navdeep Parhar wrote:

> On Tue, Dec 06, 2016 at 02:47:15PM +0300, 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?
> 
> Something is running "ifconfig cxgbe|cxl|cc" on your system.  ifconfig
> can figure out the name of the module from the name of the ifnet and
> will kldload it if it isn't in the kernel already.

What is 'something'?
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: How to load kernel module automatic?

2016-12-06 Thread Navdeep Parhar
On Tue, Dec 06, 2016 at 02:47:15PM +0300, 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?

Something is running "ifconfig cxgbe|cxl|cc" on your system.  ifconfig
can figure out the name of the module from the name of the ifnet and
will kldload it if it isn't in the kernel already.

Regards,
Navdeep
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: How to load kernel module automatic?

2016-12-06 Thread Hans Petter Selasky

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

___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: How to load kernel module automatic?

2016-12-06 Thread Slawa Olhovchenkov
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?
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: How to load kernel module automatic?

2016-12-06 Thread Hans Petter Selasky

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.

--HPS

___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"