Re: misc/157903: automated kldload for USB class devices

2011-06-24 Thread Warner Losh

On Jun 24, 2011, at 7:11 AM, Hans Petter Selasky wrote:

> On Friday 24 June 2011 14:59:37 Robert Millan wrote:
>> 2011/6/24 Hans Petter Selasky :
 Very nice.  But why not use variable names instead of hardcoding
 numbers? It makes the output much easier to understand.
>>> 
>>> To save memory.
>> 
>> I haven't inspected devd code, but I was under the assumption that
>> variables only lived untill resolved.  What would be the point of keeping
>> them in memory after devd has finished parsing the config files?
> 
> Hi,
> 
> I haven't checked that, though if you want the readable version, then you 
> need 
> to check the source code.
> 
> However I could add some code to print a vendor ID comment, based on usbdevs.

devd keeps them in memory and expands them when the commands are executed.  It 
will use more memory and be slower if you have lots of variables.  Now much 
more memory and how much slower?  I kinda doubt you'd notice on modern gear.

Warner

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


Re: misc/157903: automated kldload for USB class devices

2011-06-24 Thread Robert Millan
2011/6/24 Hans Petter Selasky :
>> Very nice.  But why not use variable names instead of hardcoding numbers?
>> It makes the output much easier to understand.
>
> To save memory.

I haven't inspected devd code, but I was under the assumption that
variables only lived untill resolved.  What would be the point of keeping
them in memory after devd has finished parsing the config files?

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


Re: misc/157903: automated kldload for USB class devices

2011-06-24 Thread Hans Petter Selasky
On Friday 24 June 2011 14:59:37 Robert Millan wrote:
> 2011/6/24 Hans Petter Selasky :
> >> Very nice.  But why not use variable names instead of hardcoding
> >> numbers? It makes the output much easier to understand.
> > 
> > To save memory.
> 
> I haven't inspected devd code, but I was under the assumption that
> variables only lived untill resolved.  What would be the point of keeping
> them in memory after devd has finished parsing the config files?

Hi,

I haven't checked that, though if you want the readable version, then you need 
to check the source code.

However I could add some code to print a vendor ID comment, based on usbdevs.

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


Re: misc/157903: automated kldload for USB class devices

2011-06-24 Thread Robert Millan
2011/6/24 Hans Petter Selasky :
> Updated bus_auto.conf:
>
> http://hselasky.homeunix.org:8192/bus_auto.conf

Very nice.  But why not use variable names instead of hardcoding numbers?  It
makes the output much easier to understand.

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


Re: misc/157903: automated kldload for USB class devices

2011-06-24 Thread Hans Petter Selasky
On Friday 24 June 2011 09:22:57 Robert Millan wrote:
> 2011/6/24 Hans Petter Selasky :
> > Updated bus_auto.conf:
> > 
> > http://hselasky.homeunix.org:8192/bus_auto.conf
> 
> Very nice.  But why not use variable names instead of hardcoding numbers? 
> It makes the output much easier to understand.

To save memory.

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


Re: misc/157903: automated kldload for USB class devices

2011-06-23 Thread Hans Petter Selasky
On Friday 24 June 2011 04:37:25 Hans Petter Selasky wrote:
> Hi,
> 
> I need some people testing the following patch:
> 
> http://svn.freebsd.org/changeset/base/223486
> 
> svn up and build a new kernel.
> 
> Try to remove all USB devices from kernel config except the host
> controllers and USB keyboard. Then put the following file into /etc/devd/
> 
> http://hselasky.homeunix.org:8192/bus_auto.conf
> 
> MD5 (bus_auto.conf) = 4a1130910cdbe0a5d3eca86b0b12f533
> 
> Verify using kldstat that modules are loaded when you plug a new USB
> device.
> 
> --HPS

Hi,

Turns out some additional patches were needed:

http://svn.freebsd.org/changeset/base/223489

Please try again.

Updated bus_auto.conf:

http://hselasky.homeunix.org:8192/bus_auto.conf

MD5 (/etc/devd/bus_auto.conf) = c321d1801f0fa3c6260eeef7061330e8

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


Re: misc/157903: automated kldload for USB class devices

2011-06-23 Thread Hans Petter Selasky
Hi,

I need some people testing the following patch:

http://svn.freebsd.org/changeset/base/223486

svn up and build a new kernel.

Try to remove all USB devices from kernel config except the host controllers 
and USB keyboard. Then put the following file into /etc/devd/

http://hselasky.homeunix.org:8192/bus_auto.conf

MD5 (bus_auto.conf) = 4a1130910cdbe0a5d3eca86b0b12f533

Verify using kldstat that modules are loaded when you plug a new USB device.

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